Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

configuration.h

Go to the documentation of this file.
      00001 //----------------------------------------------------------------------------------------
      00011 // RCS-ID:      $Id: configuration.h,v 1.18 2002/09/10 18:07:56 robertoconnor Exp $
      00012 //----------------------------------------------------------------------------------------
      00013 
      00014 //----------------------------------------------------------------------------------------
      00015 // Begin single inclusion of this .h file condition
      00016 //----------------------------------------------------------------------------------------
      00017 
      00018 #ifndef _CONFIGURATION_H_
      00019 #define _CONFIGURATION_H_
      00020 
      00021 //----------------------------------------------------------------------------------------
      00022 // GCC interface
      00023 //----------------------------------------------------------------------------------------
      00024 
      00025 #if defined(__GNUG__) && ! defined(__APPLE__)
      00026     #pragma interface "configuration.h"
      00027 #endif
      00028 
      00029 //----------------------------------------------------------------------------------------
      00030 // Shared defines
      00031 //----------------------------------------------------------------------------------------
      00032 
      00033 #include "plucker_defines.h"
      00034 
      00035 //----------------------------------------------------------------------------------------
      00036 // Headers
      00037 //----------------------------------------------------------------------------------------
      00038 
      00039 #include "wx/confbase.h"
      00040 #include "wx/fileconf.h"
      00041 
      00042 //----------------------------------------------------------------------------------------
      00043 // External functions and variables
      00044 //----------------------------------------------------------------------------------------
      00045 
      00046 // Option flags
      00047 enum {
      00048         optionCONFIGURATION_COPY_SECTION_TREAT_AS_ABSOLUTE = 1,
      00049         optionCONFIGURATION_COPY_SECTION_FLUSH_AT_END      = 2
      00050 };
      00051 
      00053     // Then Doxygenate configuration.h
      00054     extern wxFileConfig* the_configuration;
      00055 
      00057     void init_configuration();
00058 
00060     void finish_configuration();
00061 
00062 //----------------------------------------------------------------------------------------
00063 
00065     wxString get_configuration_filename();
00066 
00068     wxString get_custom_configuration_filename( const wxString& basename );
00069 
00071     wxString get_os_configuration_section();
00072 
00074     bool is_channel_section( wxString section );
00075 
00077     bool is_reserved_section( wxString section );
00078 
00080     bool is_modifier_section( wxString section );
00081 
00083     wxString get_legal_new_channel_section( wxString string_to_convert );
00084 
00085 //----------------------------------------------------------------------------------------
00086 
00088     wxString get_pluckerhome_directory();
00089 
00091     wxString get_plucker_directory( long directory_name );
00092 
00094     wxString get_msw_pluckerhome_from_registry();
00095 
00097     void strip_depreciated_keys( wxString section );
00098 
00100 
00106     void copy_section( wxString from_section,
00107                        wxString to_section,
00108                        bool treat_as_absolute
00109                      );
00110 
00112     void copy_section2( const wxString& from_section = wxEmptyString,
00113                         const wxString& to_section = wxEmptyString,
00114                         long options = optionCONFIGURATION_COPY_SECTION_TREAT_AS_ABSOLUTE |
00115                                        optionCONFIGURATION_COPY_SECTION_FLUSH_AT_END,
00116                         wxFileConfig* from_configuration = the_configuration,
00117                         wxFileConfig* to_configuration = the_configuration
00118                       );
00119 
00121     void copy_all_sections( wxFileConfig* from_configuration,
00122                             wxFileConfig* to_configuration,
00123                             long options = optionCONFIGURATION_COPY_SECTION_TREAT_AS_ABSOLUTE |
00124                                            optionCONFIGURATION_COPY_SECTION_FLUSH_AT_END
00125                           );
00126 
00128     wxString protocol_filename_to_normal_fullname( const wxString& input_filename );
00129 
00131     wxString get_protocol_prefix( wxString& input );
00132 
00133 //----------------------------------------------------------------------------------------
00134 
00136 
00142     void set_close_on_exit( const wxString& section, 
00143                             bool enabled,
00144                             bool only_write_if_key_exists,
00145                             bool flush
00146                           );
00147 
00149 
00155     void set_close_on_error( const wxString& section, 
00156                              bool enabled,
00157                              bool only_write_if_key_exists,
00158                              bool flush
00159                            );
00160 
00161 //----------------------------------------------------------------------------------------    
00162     
00164 enum {
00165     PLUCKERHOME                = 0,
00166     CHANNELS,        
00167     RESOURCES,
00168     LOCALE,
00169     HANDHELD_VIEWER_SOFTWARE,
00170     DOCUMENTATION,
00171     WXWINDOWS_CONFIGURATION
00172 };
00173 
00174 //----------------------------------------------------------------------------------------
00175 // End single inclusion of this .h file condition
00176 //----------------------------------------------------------------------------------------
00177 
00178 #endif  //_CONFIGURATION_H_
00179