objects.logic.configuration.optionsConfigurator.optionsConfigurator Class Reference

The options configurator is the interface for the "options.ini" configuration file which stores all settings found in the "Options" window. More...

Inherits objects::logic::configuration::configurator::configurator.

List of all members.

Public Member Functions

def ident_getConfigCoordinates
 Return a lon/lat/valid tuple based on the current configuration.
def ident_getIdentByIPAddr
 Returns True if the Home Location is identified "by IP Address".
def ident_getIdentByCoord
 Returns True if the Home Location is identified "by Coordinates".
def ident_getIPAddr
 Returns the currently set IP Address.
def ident_getIPGeoInfo
 Returns a Tuple of all geographical properties.
def ident_getManualCoord
 Returns a Tuple of longitude/latitude floats.
def ident_getConfigValid
 Network related gets.
def network_getRecordTraffic
 Returns true if the Record Network Taffic flag is set.
def network_getNeverStopRecording
 Returns the value of the "Never Stop Recording" button.
def network_getRecordingMaxLimit
 Returns the Recording Maximim Limit.
def network_getSaveDeviceSelection
 Returns True if the selected network adapter should be saved.
def network_getSelectedDevice
 Returns The selected network adapter.
def navigation_getLicenseSite
 Returns The URL of the License (GNU.org).
def navigation_getAppHomePage
def ident_setIdentByIPAddr
 Sets the Home Location identification to "BYIPADDR".
def ident_setIdentByCoord
 Sets the Home Location identification to "BYCOORD".
def ident_setIPAddr
 Sets the Home IP Address.
def ident_setIPGeoInfo
def ident_setManualCoord
 Sets the Home Coordinates using a longitude/latitude tuple.
def ident_setConfigValid
 Sets the configuration_valid flag.
def network_setRecordTraffic
 Sets the record_traffic flag.
def network_setNeverStopRecording
 Sets the never_stop_recording flag.
def network_setRecordingMaxLimit
 Sets the recording_max_limit value (how much to record).
def network_setSaveDeviceSelection
 Sets the save_device_selection value ("remember this choice").
def network_setSelectedDevice
 Sets the elected_device value (the network adapter).


Detailed Description

The options configurator is the interface for the "options.ini" configuration file which stores all settings found in the "Options" window.

file. All access to this file needs to be done via this object

--- Getters ---

Definition at line 32 of file optionsConfigurator.py.


Member Function Documentation

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.ident_getConfigCoordinates (   self  ) 

Return a lon/lat/valid tuple based on the current configuration.

Returns:
Tuple

Definition at line 38 of file optionsConfigurator.py.

00038                                         :
00039         lon = None
00040         lat = None
00041         configValid = self.ident_getConfigValid()
00042         
00043         if self.ident_getIdentByIPAddr() == True:
00044             lon  = self.getConfigValue("Identification", "info_longitude", "", False)
00045             lat  = self.getConfigValue("Identification", "info_latitude", "", False)
00046             
00047             #config no good
00048             if lon == "" or lat == "":
00049                 return 0, 0, configValid
00050             else:
00051                 return float(lon), float(lat), configValid
00052             
00053             
00054         else:
00055             (lon, lat) =  self.ident_getManualCoord()
00056             return lon, lat, configValid
00057             
00058             
    ## Returns True if the Home Location is identified "by IP Address"

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.ident_getConfigValid (   self  ) 

Network related gets.

Returns true if the configuration Home Location value is a valid one

Returns:
Boolean

Definition at line 121 of file optionsConfigurator.py.

00121                                   :
00122         configValid = self.getConfigValue("Identification", "configuration_valid", "N", True)
00123         
00124         return configValid
00125     
00126     
    ## Returns true if the Record Network Taffic flag is set.

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.ident_getIdentByCoord (   self  ) 

Returns True if the Home Location is identified "by Coordinates".

Returns:
Boolean

Definition at line 73 of file optionsConfigurator.py.

00073                                    :
00074         identMethod = self.getConfigValue("Identification", "ident_method", "", False)
00075         
00076         if identMethod == "BYCOORD":
00077             return True
00078         else:
00079             return False
00080         
00081     
    ## Returns the currently set IP Address. otherwise it will return "None

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.ident_getIdentByIPAddr (   self  ) 

Returns True if the Home Location is identified "by IP Address".

Returns:
Boolean

Definition at line 61 of file optionsConfigurator.py.

00061                                     :
00062         identMethod = self.getConfigValue("Identification", "ident_method", "", False)
00063         
00064         if identMethod == "BYIPADDR":
00065             return True
00066         else:
00067             return False
00068         
00069     
00070     
    ## Returns True if the Home Location is identified "by Coordinates"

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.ident_getIPAddr (   self  ) 

Returns the currently set IP Address.

otherwise it will return "None

Returns:
Boolean

Definition at line 84 of file optionsConfigurator.py.

00084                              :
00085         ipAddr = self.getConfigValue("Identification", "ipaddress", "", True)
00086         return ipAddr
00087     
00088     
00089     
    ## Returns a Tuple of all geographical properties.

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.ident_getIPGeoInfo (   self  ) 

Returns a Tuple of all geographical properties.

i.e. (lon, lat, city, state/prov, country, org, isp).

All values, including lon and lat info are returned as strings

Returns:
Tuple

Definition at line 95 of file optionsConfigurator.py.

00095                                 :
00096         lon      = self.getConfigValue("Identification", "info_longitude", "", True)
00097         lat      = self.getConfigValue("Identification", "info_latitude", "", True)
00098         city     = self.getConfigValue("Identification", "info_city", "", True)
00099         statProv = self.getConfigValue("Identification", "info_state_prov", "", True)
00100         country  = self.getConfigValue("Identification", "info_country", "", True)
00101         org      = self.getConfigValue("Identification", "info_organization", "", True)
00102         ISP      = self.getConfigValue("Identification", "info_isp", "", True)
00103         
00104         return (self.readFmat(lon), lat, city, statProv, country, org, ISP)
00105     
00106     
00107     
    ## Returns a Tuple of longitude/latitude floats

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.ident_getManualCoord (   self  ) 

Returns a Tuple of longitude/latitude floats.

Returns:
Tuple

Definition at line 110 of file optionsConfigurator.py.

00110                                   :
00111         lon     = self.getConfigValue("Identification", "manual_longitude", "0.00", True)
00112         lat     = self.getConfigValue("Identification", "manual_latitude", "0.00", True)
00113         
00114         return (float(lon), float(lat))
00115     
00116     
    ## Network related gets

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.ident_setConfigValid (   self,
  configValid 
)

Sets the configuration_valid flag.

Parameters:
configValid Boolean

Definition at line 238 of file optionsConfigurator.py.

00238                                                :
00239         if configValid == True: configValid = "Y" 
00240         else: configValid = "N"
00241         
00242         self.setConfigValue("Identification", "configuration_valid", configValid)
00243     
00244     
00245     
    ## Sets the record_traffic flag.

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.ident_setIdentByCoord (   self  ) 

Sets the Home Location identification to "BYCOORD".

Definition at line 201 of file optionsConfigurator.py.

00201                                    :
00202         self.setConfigValue("Identification", "ident_method", "BYCOORD")
00203             
00204         
00205     
    ## Sets the Home IP Address

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.ident_setIdentByIPAddr (   self  ) 

Sets the Home Location identification to "BYIPADDR".

Definition at line 196 of file optionsConfigurator.py.

00196                                     :
00197         self.setConfigValue("Identification", "ident_method", "BYIPADDR")
00198     
00199     
    ## Sets the Home Location identification to "BYCOORD"

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.ident_setIPAddr (   self,
  ipAddr 
)

Sets the Home IP Address.

Definition at line 207 of file optionsConfigurator.py.

00207                                      :
00208         self.setConfigValue("Identification", "ipaddress", ipAddr)
00209     
    def ident_setIPGeoInfo(self, (lon, lat, city, stateProv, country, org, ISP)):

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.ident_setIPGeoInfo (   self,
  lon,
  lat,
  city,
  stateProv,
  country,
  org,
  ISP 
)

Definition at line 210 of file optionsConfigurator.py.

00210                                                                                 :
00211         self.setConfigValue("Identification", "info_longitude", lon)
00212         self.setConfigValue("Identification", "info_latitude", lat)
00213         self.setConfigValue("Identification", "info_city", city)
00214         self.setConfigValue("Identification", "info_state_prov", stateProv)
00215         self.setConfigValue("Identification", "info_country", country)
00216         self.setConfigValue("Identification", "info_organization", org)
00217         self.setConfigValue("Identification", "info_isp", ISP)
00218     
00219     
00220     
    ## Sets the Home Coordinates using a longitude/latitude tuple

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.ident_setManualCoord (   self,
  lon,
  lat 
)

Sets the Home Coordinates using a longitude/latitude tuple.

Parameters:
lon Home Longitude
lat Home Latitude

Definition at line 224 of file optionsConfigurator.py.

00224                                               :
00225         
00226         lon = str(lon)
00227         lat = str(lat)
00228         
00229         if lon == None or lon == "": lon = "0.00"
00230         if lat == None or lat == "": lat = "0.00"
00231         
00232         self.setConfigValue("Identification", "manual_longitude", lon)
00233         self.setConfigValue("Identification", "manual_latitude", lat)
00234 
00235     
    ## Sets the configuration_valid flag.

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.navigation_getAppHomePage (   self  ) 

Definition at line 184 of file optionsConfigurator.py.

00184                                        :
00185         homePage = self.getConfigValue("navigation", "home_page", globalStrings.defHomePage, True)
00186         
00187         return homePage
00188     
00189 
00190     """
        --- Setters ---

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.navigation_getLicenseSite (   self  ) 

Returns The URL of the License (GNU.org).

Returns:
String

Definition at line 179 of file optionsConfigurator.py.

00179                                        :
00180         licenseSite = self.getConfigValue("navigation", "license_site", globalStrings.defLicenseSite, True)
00181         
00182         return licenseSite
00183     
    def navigation_getAppHomePage(self):

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.network_getNeverStopRecording (   self  ) 

Returns the value of the "Never Stop Recording" button.

Returns:
Boolean

Definition at line 140 of file optionsConfigurator.py.

00140                                            :
00141         neverStorRecording = self.getConfigValue("Network", "never_stop_recording", "N", True)
00142         
00143         if neverStorRecording == "Y":
00144             return True
00145         else:
00146             return False
00147     
00148     
    ## Returns the Recording Maximim Limit

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.network_getRecordingMaxLimit (   self  ) 

Returns the Recording Maximim Limit.

Returns:
Integer

Definition at line 151 of file optionsConfigurator.py.

00151                                           :
00152         recordingMaxLimit = self.getConfigValue("Network", "recording_max_limit", "100", True)
00153         
00154         return int(recordingMaxLimit)
00155     
00156     
    ## Returns True if the selected network adapter should be saved.

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.network_getRecordTraffic (   self  ) 

Returns true if the Record Network Taffic flag is set.

Returns:
Boolean

Definition at line 129 of file optionsConfigurator.py.

00129                                       :
00130         recordTraffic = self.getConfigValue("Network", "record_traffic", "N", True)
00131         
00132         if recordTraffic == "Y":
00133             return True
00134         else:
00135             return False
00136 
00137 
    ## Returns the value of the "Never Stop Recording" button

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.network_getSaveDeviceSelection (   self  ) 

Returns True if the selected network adapter should be saved.

Returns:
Boolean

Definition at line 159 of file optionsConfigurator.py.

00159                                             :
00160         saveSelection = self.getConfigValue("Network", "save_device_selection", "N", True)
00161         
00162         if saveSelection == "Y":
00163             return True
00164         else:
00165             return False
00166         
00167         
    ## Returns The selected network adapter

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.network_getSelectedDevice (   self  ) 

Returns The selected network adapter.

Returns:
String

Definition at line 170 of file optionsConfigurator.py.

00170                                        :
00171         selectedDevice = self.getConfigValue("Network", "selected_device", "", True)
00172         
00173         return selectedDevice
00174     
00175     
00176     
    ## Returns The URL of the License (GNU.org)

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.network_setNeverStopRecording (   self,
  value 
)

Sets the never_stop_recording flag.

Parameters:
value Boolean

Definition at line 258 of file optionsConfigurator.py.

00258                                                   :        
00259         if value == True: value = "Y" 
00260         else: value = "N"
00261         
00262         self.setConfigValue("Network", "never_stop_recording", value)
00263     
00264     
00265     

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.network_setRecordingMaxLimit (   self,
  maxLimit 
)

Sets the recording_max_limit value (how much to record).

Parameters:
maxLimit Integer

Definition at line 268 of file optionsConfigurator.py.

00268                                                     :            
00269         self.setConfigValue("Network", "recording_max_limit", str(maxLimit))
00270         
00271         
00272         

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.network_setRecordTraffic (   self,
  value 
)

Sets the record_traffic flag.

Parameters:
value Boolean

Definition at line 248 of file optionsConfigurator.py.

00248                                              :        
00249         if value == True: value = "Y" 
00250         else: value = "N"
00251         
00252         self.setConfigValue("Network", "record_traffic", value)
00253         
00254     
00255     

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.network_setSaveDeviceSelection (   self,
  saveSelection 
)

Sets the save_device_selection value ("remember this choice").

Parameters:
saveSelection Booleans

Definition at line 275 of file optionsConfigurator.py.

00275                                                            :
00276         if saveSelection == True: saveSelection = "Y" 
00277         else: saveSelection = "N"
00278                     
00279         self.setConfigValue("Network", "save_device_selection", saveSelection)
00280         
00281     
00282     
    ## Sets the elected_device value (the network adapter)

def objects.logic.configuration.optionsConfigurator.optionsConfigurator.network_setSelectedDevice (   self,
  selectedDevice 
)

Sets the elected_device value (the network adapter).

Parameters:
selectedDevice String

Definition at line 285 of file optionsConfigurator.py.

00285                                                        :        
00286         self.setConfigValue("Network", "selected_device", selectedDevice)
00287         
00288                
00289         
00290         
00291     
00292 
00293     
00294     
00295 
00296         
00297         
00298         


The documentation for this class was generated from the following file:

Generated on Mon Mar 30 00:26:40 2009 for EyeSpy by  doxygen 1.5.8