#pragma interface #include class ETCSERVICE: public ARRAY_OBJ { private: void init (void); int input_error( ); void modify_service( VIEWITEM *item ); public: SSTRING service_name; // int port; // SSTRING protocol; // SSTRING aliases; // SSTRING comment; // bool new_etcservice; // int etcservice_line; // Line number in file /etc/services int index; // Index in array /*~PROTOBEG~ ETCSERVICE */ public: ETCSERVICE (const char *_service_name); ETCSERVICE ( void ); int edit( void ); int write( int button ); public: /*~PROTOEND~ ETCSERVICE */ }; class ETCSERVICELIST: public ARRAY { private: char *next_word( char *d, char *s, int size ); void add_service( int line, VIEWITEM *item ); int valid_port_protocol( char *word, ETCSERVICE *inetdconf ); void valid_aliases( char *word, ETCSERVICE *inetdconf ); /*~PROTOBEG~ ETCSERVICELIST */ public: ETCSERVICELIST( ); ETCSERVICE *getitem (const char *id) const; ETCSERVICE *getitem(const char *protocol, int port) const; ETCSERVICE *getitem(int negative) const; ETCSERVICE *getitem_alias(const char *id) const; ETCSERVICE *getitem_service(const char *service) const; void read (void); int edit (void); /*~PROTOEND~ ETCSERVICELIST */ };