#ifndef installconf_h #define installconf_h #pragma interface #ifndef MISC_H #include #endif #ifndef MODULE_H #include #endif #include #include class MODULE_installconf: public LINUXCONF_MODULE{ /*~PROTOBEG~ MODULE_installconf */ public: MODULE_installconf (void); int dohtml (const char *key); int domenu (MENU_CONTEXT context, const char *key); int execmain (int argc, char *argv[], bool standalone); void setmenu (DIALOG&dia, MENU_CONTEXT context); void usage (SSTRINGS&tb); /*~PROTOEND~ MODULE_installconf */ }; enum SHOW_MODE { SHOW_INSTALLED, SHOW_UNINSTALLED, SHOW_ALL }; class CATEG: public ARRAY_OBJ{ public: bool suggested; // This is a suggested category bool installed; // All packages from that categorie are installed int nbinstalled; // How many packages are installed in this category bool hidden; // This is a pseudo category which is never shown // It is mainly used so other category // may reference a category list using a single name char selected; SSTRING name; SSTRINGS needs; // Other needed categories SSTRING_KEYS pkgs; // Package required // Each package is optionally associated with // another category. The package is selected only // if this category is selected too /*~PROTOBEG~ CATEG */ public: CATEG (bool _suggested, const char *_name, bool _hidden); /*~PROTOEND~ CATEG */ }; class CATEGS: public ARRAY{ class PACKAGE_API *api; /*~PROTOBEG~ CATEGS */ public: CATEGS (const char *path, const char *root); CATEG *getitem (int no)const; int install (const char *root, const char *srcdir); bool isok (void); CATEG *lookup (const char *name); int pickselected (SSTRINGS&lst); int select (SHOW_MODE mode); void selectall (void); void selectsug (void); int selectsuggested (void); int setmissing (const char *root); void unselectall (void); ~CATEGS (void); /*~PROTOEND~ CATEGS */ }; #include "installconf.p" #endif