00001 #ifndef VERSION_INI_CLASS
00002 #define VERSION_INI_CLASS
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "opsysdll.h"
00019
00020 #include <basis/log_base.h>
00021
00022
00023 class filename;
00024 class ini_configurator;
00025 class version;
00026 class version_record;
00027
00029
00035 class OPSYSTEM_CLASS_STYLE version_ini : public virtual object_base
00036 {
00037 public:
00038 version_ini(const istring &path_name);
00040
00043 ~version_ini();
00044
00045 IMPLEMENT_CLASS_NAME("version_ini");
00046
00047 bool writable();
00049
00050 version get_version();
00052
00054 void set_version(const version &to_write, bool write_to_ini);
00056
00061 version_record get_record();
00063
00068 version_record &access_record();
00070
00072 void set_record(const version_record &to_write, bool write_to_ini);
00074
00078 bool executable();
00080 bool library();
00082
00083 bool ole_auto_registering();
00085
00086 bool write_rc(const version_record &to_write);
00088
00091 bool write_code(const version_record &to_write);
00093
00097 bool write_assembly(const version_record &to_write, bool do_logging);
00099
00100 static bool executable(const istring &path_name);
00102 static bool library(const istring &path_name);
00104
00105 version read_version_from_ini();
00107
00108 static bool one_stop_version_stamp(const istring &path,
00109 const istring &source_version, bool do_logging);
00111
00116
00117 static const char *VERSION_SECTION;
00118 static const char *COMPANY_KEY;
00119 static const char *COPYRIGHT_KEY;
00120 static const char *LEGAL_INFO_KEY;
00121 static const char *PRODUCT_KEY;
00122 static const char *WEB_SITE_KEY;
00123 static const char *MAJOR;
00124 static const char *MINOR;
00125 static const char *REVISION;
00126 static const char *BUILD;
00127 static const char *DESCRIPTION;
00128 static const char *ROOT;
00129 static const char *NAME;
00130 static const char *EXTENSION;
00131 static const char *OLE_AUTO;
00132
00133 private:
00134 bool _loaded;
00135 filename *_path_name;
00136 ini_configurator *_ini;
00137 version_record *_held_record;
00138
00139 static void check_name(filename &to_examine);
00141 };
00142
00143 #endif
00144