#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); void addnewaddress (void); void addnewdomain (void); int edit (void); private: int editaddress (void); int editdomain (void); public: VIRT *getitem (int no); private: VIRT *getitemsel (const char *str, int tp); public: int have_reddom (const char *domain); int locate (const char *name); int locatedups (const char *name); private: SSTRINGS *populatedomains (void); const char *type (int nametable); public: int write (void); /*~PROTOEND~ VIRTUALS */ }; class VIRT: public ARRAY_OBJ{ public: SSTRING adrsdom; SSTRINGS redcom; SSTRING comment; SSTRING anything; char type; private: VIRTUALS *vrtls; /*~PROTOBEG~ VIRT*/ public: VIRT (VIRTUALS *_vrtls); VIRT (char *line, VIRTUALS *_vrtls); int editaddress (PRIVILEGE *privi, SSTRINGS *dom, char anew); int editdomain (PRIVILEGE *privi, char anew); const char *getname (void); private: int have_domain (const char *d, SSTRINGS *doms); bool is_address (const char *t); public: bool is_comment (char *t); int is_valid (void); void write (FILE_CFG *fout); /*~PROTOEND~ VIRT */ }; #endif