#ifndef VIRTUALS_H #define VIRTUALS_H #ifndef MISC_H #include #endif #define DOMAIN 0 #define ADDRESS 1 class VIRT; class VIRTUALS: public ARRAY{ CONFIG_FILE f; PRIVILEGE *privi; bool dodb; int btype; /*~PROTOBEG~ VIRTUALS */ public: VIRTUALS (const char *config, PRIVILEGE *_privi, bool _dodb, int btype); // VIRTUALS (void); private: char *type (int nametable); VIRT *getitemsel(const char *str, int tp); int editdomain(); int editaddress(); SSTRINGS *populatedomains(); //void addline (char *buf); public: int edit(); int locate (const char *title); int locatedups (const char *name); void addnewdomain (void); void addnewaddress (void); int write (void); int have_reddom (const char *domain); VIRT *getitem (int no); /*~PROTOEND~ VIRTUALS */ }; class VIRT: public ARRAY_OBJ{ public: SSTRING adrsdom; SSTRINGS redcom; SSTRING comment; SSTRING anything; char type; /*~PROTOBEG~ VIRT*/ public: VIRT (char *line, VIRTUALS *vrtls); VIRT (VIRTUALS *vrtls); const char *getname (void); int is_valid(); int editdomain(PRIVILEGE *privi, char anew); int editaddress(PRIVILEGE *privi, SSTRINGS *dom, char anew); void write (FILE_CFG *fout); bool is_comment (char *t); private: VIRTUALS *vrtls; bool is_address (const char *t); int have_domain(const char *d, SSTRINGS* doms); }; #endif