crossroads

Git mirror of https://crossroads.e-tunity.com/
git clone git://git.finwo.net/app/crossroads
Log | Files | Refs | LICENSE

backendcheck (897B)


      1 #ifndef _BACKENDCHECK_
      2 #define _BACKENDCHECK_
      3 
      4 #include "sys/sys"
      5 #include "error/error"
      6 
      7 class BackendCheck {
      8 public:
      9     enum CheckType {
     10 	c_connect,
     11 	c_get,
     12 	c_external,
     13     };
     14     
     15     BackendCheck();
     16 
     17     CheckType checktype() const 	 	{ return check_type; }
     18     void checktype(CheckType t)			{ check_type = t; }
     19     
     20     string server() const			{ return srv; }
     21     void server(string s)			{ srv = s; }
     22     
     23     int port() const				{ return prt; }
     24     void port(int p)				{ prt = p; }
     25     
     26     string uri() const				{ return geturi; }
     27     void uri(string u)				{ geturi = u; }
     28 
     29     string program() const			{ return extprog; }    
     30     void program(string const &p)		{ extprog = p; }
     31 
     32     void parse(string setting);
     33 
     34     string setting() const;
     35     string description() const;
     36 
     37 private:
     38     CheckType check_type;
     39     string srv;
     40     int prt;
     41     string geturi;
     42     string extprog;
     43 };
     44 
     45 #endif