Editing ICD Policy Plugins

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
-
An Internet Connectivity Daemon policy plugin is a plugin used by the [[Documentation/Maemo 5 Developer Guide/Using Connectivity Components/Maemo Connectivity#Internet Connectivity Daemon|Internet Connectivity Daemon]] to decide different things about an internet connection such as whether to connect or disconnect it.
+
== Information on the Internet Connectivity Daemon Policy Plugins ==
 +
An Internet Connectivity Daemon policy plugin is a plugin used by the Internet Connectivity Daemon to decide different things about an internet connection such as whether to connect or disconnect it.
By writing a new ICD policy plugin, it should be possible to do things like making one WiFi network take priority over another WiFi network (e.g. your home network taking priority over everything else)
By writing a new ICD policy plugin, it should be possible to do things like making one WiFi network take priority over another WiFi network (e.g. your home network taking priority over everything else)
-
The plugins included with Fremantle are (in priority order): (this information comes through GConf and can be changed via the normal GConf configuration-changing tools or tricks)
+
The plugins included with Fremantle are (in priority order): (this information comes through gconf and can be changed via the normal gconf configuration-changing tools or tricks)
-
*<code>libicd_policy_merge.so</code> (Merge a new request with an already existing one)
+
*libicd_policy_merge.so (Merge a new request with an already existing one)
-
*<code>libicd_policy_ask.so</code> (Request 'Select connection' dialog from UI)
+
*libicd_policy_ask.so (Request 'Select connection' dialog from UI)
-
*<code>libicd_policy_any.so</code> (Any connection)
+
*libicd_policy_any.so (Any connection)
-
*<code>libicd_policy_change.so</code> (Change to another connection)
+
*libicd_policy_change.so (Change to another connection)
-
*<code>libicd_policy_add.so</code> (New IAP creation)
+
*libicd_policy_add.so (New IAP creation)
-
*<code>libicd_policy_always_online.so</code> (Always online policy)
+
*libicd_policy_always_online.so (Always online policy)
-
*<code>libicd_policy_one.so</code> (One connection only)
+
*libicd_policy_one.so (One connection only)
-
*<code>libicd_policy_restart.so</code> (IAP restart policy)
+
*libicd_policy_restart.so (IAP restart policy)
-
*<code>libicd_policy_nw_disconnect.so</code> (Network disconnect reference count)
+
*libicd_policy_nw_disconnect.so (Network disconnect reference count)
-
ICD policy plugins all <code>#include policy_api.h</code> (the base API file for ICD policy plugins) and may optionally <code>#include icd_dbus.h</code> (header file for working with D-Bus) and/or <code>icd_log.h</code> (logging code for ICD2 policy plugins).
+
ICD policy plugins all #include policy_api.h (the base API file for ICD policy plugins) and may optionally #include icd_dbus.h (header file for working with dbus) and/or icd_log.h (logging code for ICD2 policy plugins).
-
All ICD policy plugins export a function called <code>icd_policy_init</code>. This function takes a variable of type <code>icd_policy_api *</code> plus a number of callbacks that can be saved for later use. Your plugin does whatever initialization it wishes to do (registering D-Bus handlers for example), saves any private data in the "private" field of the <code>icd_policy_api</code> structure (which may be a pointer to a data structure containing a bunch of data) and then fills in any appropriate function members of the <code>icd_policy_api</code> that this plugin wishes to listen for.
+
All ICD policy plugins export a function called icd_policy_init. This function takes a variable of type icd_policy_api * plus a number of callbacks that can be saved for later use. Your plugin does whatever initialization it wishes to do (registering dbus handlers for example), saves any private data in the "private" field of the icd_policy_api structure (which may be a pointer to a data structure containing a bunch of data) and then fills in any appropriate function members of the icd_policy_api that this plugin wishes to listen for.
Different callbacks have different prototypes but all of them get passed the private data stored earlier.
Different callbacks have different prototypes but all of them get passed the private data stored earlier.
-
I am hoping that this information will be useful to someone and that someone will take it and build new policy plugins with it.
+
The policy API header files plus reverse engineered code (that may not be 100% correct) for libicd_policy_one.so and libicd_policy_add.so can be found here:
 +
http://code.google.com/p/icd-policy/source/browse/#svn%2Ftrunk
-
== External links ==
+
Documentation for all this stuff can be found here:
 +
http://maemo.org/api_refs/5.0/5.0-final/icd2/index.html
-
The policy API header files plus reverse engineered code (that may not be 100% correct) for <code>libicd_policy_one.so</code> and <code>libicd_policy_add.so</code> can be found here: http://code.google.com/p/icd-policy/source/browse/#svn%2Ftrunk
+
I am hoping that this information will be usefull to someone and that someone will take it and build a new policy plugins with it.
-
 
+
-
Documentation for all this stuff can be found here: http://maemo.org/api_refs/5.0/5.0-final/icd2/index.html
+
-
 
+
-
[[Category:Development]]
+
-
[[Category:Fremantle]]
+

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)