You Are Here:

Community: Blogs

Paul Todd's Forum Nokia Blog

Use the device management adapters

Paul.Todd | 23 November, 2008 18:26

Nigel brown reminided me that I had planned to post up a whole lot of stuff on working with the Device management adapter API's. Its written but not posted so the next couple of weeks will be devoted to this as documentation is sparse, though Jukka has posted some examples on the wiki.

The device management API's allow 3rd parties in a lot of cases to use an ECOM object to set settings in a predictable and standard manner.
This API also allows 3rd party developers to develop their own device management adapter and integrate it into the device management tree.

You can download the Plugin SDK from here:
http://www.forum.nokia.com/info/sw.nokia.com/id/78772f69-08c6-47bb-af89-0d6356c7e550/S60_3rd_Edition_Device_Management_Plugin_v1_0_en.zip.html
Note: You will need to agree to a licence before downloading it.

Having installed the plugin, it would be a good idea to go through the API sepecification in the zip file.In essence to use the SDK, you need to provide an implementation of the methods in the MSmlDmCallback interface, more on that later.

The two key files here are SMLAdapter.h and SMLAdapter.inl as these define the interfaces required to use and create DM plugin objects.

The first thing to do is get a list of all the adapters currently installed on the device. These can be third party adapters such a FSecure Mail for Exchange or they can be builtin ones like the access points adapter.

To get a list of the installed adapters, you ask the ECOM runtime to return a list of all the implementations that match the DM Adapter interface uid.

The UID for the DM adapter plugin is KSmlDMInterfaceUid (inside smldmadapter.h)

Each implementation uid is associated with a DLL and by calling CreateImplementation with the appropriate implementation uid, a new instance of CSmlDmAdapter will be returned. The only wrinkle here is that you need to provide an implementation of the MSmlDmCallback interface so the
adapter can report progress and status. (More on that later)

To get the list of adapters the following code will suffice:

RImplInfoPtrArray implementations;
REComSession::ListImplementationsL(TUid::Uid(KSmlDMInterfaceUid), implementations);

for (TInt i=0; i < implementations.Count(); i++)
   {
   CImplementationInformation* implementation = implementations[i];

   // do something with the implementation info, like get the implementation uid
   const TUid implementationUid = implementation->ImplementationUid();
   // create the relevant class using the implementation uid
   }

Next Part...
Reading the DDF

 

RSSComments

You must login to post comments. Login
 

Rate This

 
 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditFurlTechnocratiMagnoliaTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
User Rating: qfnZuserE5FratingQNx5E2E0000X