Home | History | Annotate | Download | only in doc
      1 Background
      2 ==========
      3 
      4 Profiles are containers for persistent storage of instantiated objects.
      5 When an object is created in memory we check if state from any previous
      6 instance was recorded and, if so, update the in-memory data structure
      7 accordingly.  Doing this depends on all object instances having a unique
      8 name; this is done using adhoc techniques based on object proprties such
      9 as WiFi SSID's, device addresses, and security settings.
     10 
     11 Multiple profiles may be active simultaneously.  Profiles are organized
     12 in a stack with the top-most entry termed the "active profile".
     13 
     14 When the connection manager starts up it pushes a "global profile" onto
     15 the profile stack.  Typically a per-user profile is then pushed at login
     16 and pop'd on logout.  Additional entries may be pushed and pop'd; e.g.
     17 automated tests push a "throw away profile" to capture state generated
     18 by tests and then pop the profile at the end to return the system to a
     19 pristine state.
     20 
     21 
     22 Object Handling
     23 ===============
     24 Service objects go to the "ephemeral profile" by default, and do
     25 not report a "Profile" property.  When saved, by default they end
     26 up in the top-most profile on the stack.
     27 
     28 If the "Profile" property is set on a servie, it will be re-parented
     29 to the named profile (which must be in the profile stack at the time).
     30 
     31 Device and IPConfig objects go in the global profile (if any).
     32 This ensures that enable/disable state is maintained between users
     33 (and reboots); or possibly discarded (e.g. for testing).
     34 
     35 Likewise global state like Offline mode and any Country code are stored
     36 in the global profile (see above).
     37 
     38 
     39 Profile hierarchy
     40 =================
     41 
     42 Service		org.chromium.flimflam
     43 Interface	org.chromium.flimflam.Profile
     44 Object path	[variable prefix]/{profile0,profile1,...}
     45 
     46 Methods		dict GetProperties()
     47 
     48 			Return properties for the profile object. See
     49 			the properties section for available properties.
     50 
     51 			Possible Errors: [service].Error.InvalidArguments
     52 
     53 		void SetProperty(string name, variant value)
     54 
     55 			Change the value of the specified property. Only
     56 			properties that are listed as read-write are
     57 			changeable. On success a PropertyChanged signal
     58 			is emitted.
     59 
     60 			Possible Errors: [service].Error.InvalidArguments
     61 					 [service].Error.InvalidProperty
     62 
     63 		dict GetEntry(object path)
     64 
     65 			Return properties for the specified profile
     66 			entry.  If the service is currently loaded into
     67 			memory or visible, the returned result will be
     68 			as if a "GetProperties" were called on the service.
     69 			Otherwise, a much more compact dict will be
     70 			returned:
     71 
     72 			string Name [readonly]
     73 				Name of this profile.
     74 
     75 			string GUID [readonly]
     76 				Globally Unique IDentifier for the service as
     77 				previously set by the client.
     78 
     79 			string Error [readonly]
     80 				Last error that occured with this service.
     81 
     82 			string Mode [readonly]
     83 				For WiFi services, the operating mode.
     84 
     85 			string Security [readonly]
     86 				For WiFi services, the security type.
     87 
     88 			string Type [readonly]
     89 				Type of this service entry (wifi, vpn, etc).
     90 
     91 			string UIData [readonly]
     92 				The UI data string (ignored by shill) that is
     93 				maintained for each service and can be used by
     94 				client code to store metadata.
     95 
     96 			string WiFi.HiddenSSID [readonly]
     97 				For WiFi services, whether or not the
     98 				network broadcasts it's SSID in beacon
     99 				frames.
    100 
    101 			Possible Errors: [service].Error.NotFound
    102 					 [service].Error.InvalidArguments
    103 
    104 		dict DeleteEntry(string entry_name)
    105 
    106 			Remove the entry from the profile.  Any associated
    107 			service has its security credentials revoked and
    108 			the service is disconnected.  The service is also
    109 			disassociated with the profile.
    110 
    111 			Possible Errors: [service].Error.InvalidArguments
    112 					 [service].Error.NotFound
    113 
    114 Signals		PropertyChanged(string name, variant value)
    115 
    116 			This signal indicates a changed value of the given
    117 			property.
    118 
    119 Properties	string CheckPortalList [readonly]
    120 
    121 			The list of technologies for which captive portal
    122 			checking is enabled. This is a comma-separated
    123 			string; e.g. "wifi,wimax,vpn". To alter this
    124 			setting set the Manager.CheckPortalList property.
    125 
    126 			This setting is recorded only in the
    127 			default profile as it affects all users and is
    128 			used pre-login.
    129 
    130 		string Country [readonly]
    131 
    132 			The current ISO country code for WiFi operation.
    133 			This property exists only if the country code
    134 			was set via the Manager.Country property.
    135 
    136 			This setting is recorded only in the
    137 			default profile as it affects all users and is
    138 			used pre-login.
    139 
    140 		array{object} Entries [readonly]
    141 
    142 			List of profile Entry objects.  Use the GetEntry
    143 			method to retrieve an Entry's contents.
    144 
    145 		string Name [readonly]
    146 
    147 			Name of this profile.
    148 
    149 		boolean OfflineMode [readonly]
    150 
    151 			The setting for switching all radios on or
    152 			off. This setting is recorded only in the
    153 			default profile as it affects all users and is
    154 			used pre-login.  To alter this setting set the
    155 			Manager.OfflineMode property.
    156 
    157 		string PortalURL [readonly]
    158 
    159 			The URL to use when doing captive portal
    160 			checking.  To alter this setting set the
    161 			Manager.CheckPortalList property.
    162 
    163 			This setting is recorded only in the default
    164 			profile as it affects all users and is used
    165 			pre-login.
    166 
    167 		string PortalCheckInterval [readonly]
    168 
    169 			The interval in seconds between attempts to
    170 			check for portal.  To alter this setting set the
    171 			Manager.PortalCheckInterval property.
    172 
    173 			This setting is recorded only in the default
    174 			profile as it affects all users and is used
    175 			pre-login.
    176 
    177 		array{object} Services [readonly]
    178 
    179 			List of service objects.  This property is
    180 			provided only for the active profile.
    181 
    182 		string UserHash [readonly]
    183 
    184 			The hash of the username, provided by the
    185 			the libchromeos SanitizeUsername() method.
    186