<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<title>Paul Todd&#039;s Forum Nokia Blog</title> 
<subtitle type="html">&lt;p&gt;Hi, I&#039;m Paul, but you can also call me Todd and I won&#039;t get upset.&lt;/p&gt;
</subtitle>
 
<updated>2009-08-10T12:37:23+03:00</updated> 
<id>http://www.lifetype.net,1.2/</id>
<link rel="alternate" type="text/html"  hreflang="en" href="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog" />
 
<rights>Copyright (c) Paul.Todd</rights>
<generator uri="http://www.lifetype.net/" version="1.2">LifeType at Forum Nokia</generator> 
 
<entry> 
<title>Why can I not use custom soft keys in global notes?</title>
<link rel="alternate" type="text/html" href="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog/2009/08/10/why-can-i-not-use-custom-soft-keys-in-global-notes" /> 
<id>tag:blogs.forum.nokia.com,2009-08-10:2230</id>
 
<updated>2009-08-10T12:37:23+03:00</updated> 
<published>2009-08-10T12:37:23+03:00</published> 
<summary type="html"> 
This question often pops up on the boards and has to do with the way global notes are implemented.A global note is implemented as a notifier and as such the server for the notifier exists in a ...</summary> 
<author> 
 
<name>Paul.Todd</name> 
<uri>http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog</uri> 
</author> 
<dc:subject>
S60 
Symbian C++ 
</dc:subject> 
<content type="text/html" xml:lang="en" xml:base="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog"> 
&lt;p&gt;
This question often pops up on the boards and has to do with the way global notes are implemented.A global note is implemented as a notifier and as such the server for the notifier exists in a seperate process so resource files that are loaded in the client side of the notifier will not get transferred to the notifier server process and so only avkon resources (in avkon.rsc/avkon.rsg) are guaranteed to be supported in the server process* and hence the only CBA buttons that can be used are those in avkon.&lt;br /&gt;
&lt;br /&gt;
Of course it is entirely possible to add a new cba structure to the data that is marshalled between the client structure and the server but this is not currently implemented and probably will never be due to issues around localization and the fact the global notes should strongly be discouraged as they block&amp;nbsp; access to the device until the note is dismissed. 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
(*this is sort of correct, its implemented slightly differently underneath) 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt; 
</content> 
</entry> 
 
<entry> 
<title>Using TSecurityInfo</title>
<link rel="alternate" type="text/html" href="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog/2009/07/29/using-tsecurityinfo" /> 
<id>tag:blogs.forum.nokia.com,2009-07-29:2224</id>
 
<updated>2009-07-29T16:02:07+03:00</updated> 
<published>2009-07-29T16:02:07+03:00</published> 
<summary type="html"> 
Ok its been a long time since I blogged since I have been overworked getting a couple of apps ready for OVI. 
 
 
However there is some info on a useful little but well hidden class:
 
  ...</summary> 
<author> 
 
<name>Paul.Todd</name> 
<uri>http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog</uri> 
</author> 
<dc:subject>
Symbian C++ 
</dc:subject> 
<content type="text/html" xml:lang="en" xml:base="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog"> 
&lt;p&gt;
Ok its been a long time since I blogged since I have been overworked getting a couple of apps ready for OVI. 
&lt;/p&gt;
&lt;p&gt;
However there is some info on a useful little but well hidden class:
&lt;/p&gt;
&lt;p&gt;
There are two basic ways of getting the process info at runtime, rather than compile time&lt;br /&gt;
&lt;br /&gt;
The main method is to use the less than well known &lt;a href=&quot;http://www.forum.nokia.com/infocenter/index.jsp?topic=/S60_5th_Edition_Cpp_Developers_Library/GUID-35228542-8C95-4849-A73F-2B4F082F0C44/sdk/doc_source/reference/reference-cpp/Kernel_Architecture_2/TSecurityInfoClass.html&quot;&gt;TSecurityInfo&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
This T class will get the capabilties, VID and SID of the current process, current message or current thread. bviously all these need to be within the scope of the current process rather than system wide if platsec is enabled.&lt;br /&gt;
&lt;br /&gt;
There are some useful methods as well:
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;TSecurityInfo::SetToCreatorInfo()&lt;/strong&gt; &lt;br /&gt;
	which will set all the data to the process that created this process.&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;TSecurityInfo::SetToCurrentInfo() &lt;/strong&gt;&lt;br /&gt;
	which will set all the data to the this process&#039;s info.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
There are other ways to get the creator info by using the &amp;quot;Creator*&amp;quot; methods in the User library but doing it via TSecurityInfo is a lot simpler to understand.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
The process info can also be retrieved if the name, path and drive of the executable is known which is quite difficult without the &amp;quot;all files&amp;quot; capability.
&lt;/p&gt;
&lt;p&gt;
RLibrary::TInfo info;&lt;br /&gt;
TPckg&amp;lt;RLibrary::TInfo&amp;gt; pkg(info);&lt;br /&gt;
User::LeaveIfError(RLibrary::GetInfo(_L(&amp;quot;c:\\sys\\bin\\PhoNetInfo.exe&amp;quot;), pkg));&lt;br /&gt;
&lt;br /&gt;
The creator info is quite useful as it allows the application to stop being launched by &amp;quot;unapproved&amp;quot; applications since the SID of the creating process can be checked to see if is a known one that is allowed or to ensure a creating process has the correct capabilty(ies).&lt;br /&gt;
&lt;/p&gt; 
</content> 
</entry> 
 
<entry> 
<title>Mercurial book preview</title>
<link rel="alternate" type="text/html" href="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog/2009/04/18/mercurial-book-preview" /> 
<id>tag:blogs.forum.nokia.com,2009-04-18:2082</id>
 
<updated>2009-04-18T11:26:08+03:00</updated> 
<published>2009-04-18T11:26:08+03:00</published> 
<summary type="html"> 
Since the Symbian Foundation is committed to using Mercurial as its SCM (DVCS) I have been looking around for tools and training notes to get up to speed since my tools involve Subversion + ...</summary> 
<author> 
 
<name>Paul.Todd</name> 
<uri>http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog</uri> 
</author> 
<dc:subject>
Symbian C++ 
</dc:subject> 
<content type="text/html" xml:lang="en" xml:base="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog"> 
&lt;p&gt;
Since the Symbian Foundation is committed to using Mercurial as its SCM (DVCS) I have been looking around for tools and training notes to get up to speed since my tools involve Subversion + Tortoise (personal) and Perforce (work). 
&lt;/p&gt;
&lt;p&gt;
The best reference I have found so far has been this
&lt;/p&gt;
&lt;p&gt;
 (&lt;a href=&quot;http://blog.medallia.com/2007/02/a_guided_tour_of_mercurial.html&quot;&gt;http://blog.medallia.com/2007/02/a_guided_tour_of_mercurial.html&lt;/a&gt;) 
&lt;/p&gt;
&lt;p&gt;
But today O&#039;Reilly announced they are also bringing out a new book for Mercurial and there are review drafts avaliable at this link
&lt;/p&gt;
&lt;p&gt;
 &lt;a href=&quot;http://hgbook.red-bean.com/ &quot;&gt;http://hgbook.red-bean.com/&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt; 
</content> 
</entry> 
 
<entry> 
<title>S60 running on the Intel Atom</title>
<link rel="alternate" type="text/html" href="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog/2009/04/16/s60-running-on-the-intel-atom" /> 
<id>tag:blogs.forum.nokia.com,2009-04-16:2081</id>
 
<updated>2009-04-16T18:51:06+03:00</updated> 
<published>2009-04-16T18:51:06+03:00</published> 
<summary type="html"> 
The guys over at the Symbian blog are showing off S60 running on an Intel Atom moetherboard, showing its possible to integrate S60 onto other chips aside from ARM.
 
  ...</summary> 
<author> 
 
<name>Paul.Todd</name> 
<uri>http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog</uri> 
</author> 
<dc:subject>
Symbian C++ 
</dc:subject> 
<content type="text/html" xml:lang="en" xml:base="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog"> 
&lt;p&gt;
The guys over at the Symbian blog are showing off S60 running on an Intel Atom moetherboard, showing its possible to integrate S60 onto other chips aside from ARM.
&lt;/p&gt;
&lt;p&gt;
http://blog.symbian.org/2009/04/16/symbian-on-intels-atom/
&lt;/p&gt;
&lt;p&gt;
Roll on the foundation when we can do this ourselves! 
&lt;/p&gt; 
</content> 
</entry> 
 
<entry> 
<title>Mercurial SCM</title>
<link rel="alternate" type="text/html" href="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog/2009/03/04/mercurial-scm" /> 
<id>tag:blogs.forum.nokia.com,2009-03-04:2017</id>
 
<updated>2009-03-04T10:21:54+02:00</updated> 
<published>2009-03-04T10:21:54+02:00</published> 
<summary type="html"> 
Since it was recently announced the Symbian Foundation will be using Mercurial as their SCM.
 
 
(Instead of GIT :( ) I though I would post up a crib sheet on using mercurial to get a head ...</summary> 
<author> 
 
<name>Paul.Todd</name> 
<uri>http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog</uri> 
</author> 
<dc:subject>
Symbian C++ 
</dc:subject> 
<content type="text/html" xml:lang="en" xml:base="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog"> 
&lt;p&gt;
Since it was recently announced the Symbian Foundation will be using Mercurial as their SCM.
&lt;/p&gt;
&lt;p&gt;
(Instead of GIT :( ) I though I would post up a crib sheet on using mercurial to get a head start on using it. 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;Follow the &lt;a href=&quot;http://blog.edong.net/2009/03/mercurial-cheat-sheet.html&quot;&gt;link&lt;/a&gt;... 
&lt;/p&gt; 
</content> 
</entry> 
 
<entry> 
<title>HTML Control</title>
<link rel="alternate" type="text/html" href="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog/2009/02/25/html-control" /> 
<id>tag:blogs.forum.nokia.com,2009-02-25:2003</id>
 
<updated>2009-02-25T15:28:52+02:00</updated> 
<published>2009-02-25T15:28:52+02:00</published> 
<summary type="html"> 
Gzytom has posted up a new Symbian control for lightweight parsing and rendering of html compatible with 2nd edition up to the latest 5th edtion.
 
 
This looks to be ideal for seperating ...</summary> 
<author> 
 
<name>Paul.Todd</name> 
<uri>http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog</uri> 
</author> 
<dc:subject>
Symbian C++ 
</dc:subject> 
<content type="text/html" xml:lang="en" xml:base="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog"> 
&lt;p&gt;
Gzytom has posted up a new Symbian control for lightweight parsing and rendering of html compatible with 2nd edition up to the latest 5th edtion.
&lt;/p&gt;
&lt;p&gt;
This looks to be ideal for seperating the UI and the logic layers, the hardest part of good design and should make it easier to build apps.
&lt;/p&gt;
&lt;p&gt;
There are plenty of screenshots and examples provided which looks quite powerful and the source is included.
&lt;/p&gt;
&lt;p&gt;
Since the source is included it should make some of the webkit issues such as getting notifications of link clicks easier and since it is not a dll, but integrated as a lib into your application it makes it easier to ship and sign.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Anyway, grab it from here and remember to acknowledge the developer in any shipping code.... 
&lt;/p&gt;
&lt;p&gt;
&lt;a href=&quot;http://code.google.com/p/htmlcontrol-for-symbian/ &quot;&gt;http://code.google.com/p/htmlcontrol-for-symbian/ &lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Paul 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt; 
</content> 
</entry> 
 
<entry> 
<title>DevcertList update</title>
<link rel="alternate" type="text/html" href="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog/2009/01/06/devcertlist-update" /> 
<id>tag:blogs.forum.nokia.com,2009-01-06:1925</id>
 
<updated>2009-01-06T13:54:13+02:00</updated> 
<published>2009-01-06T13:54:13+02:00</published> 
<summary type="html"> 
DevcertList has been updated to version 1.2
 
 
&amp;nbsp;I have seen a number of people getting &amp;quot;Constrained by certificate&amp;quot; errors and say they are absolutly sure they transcribed ...</summary> 
<author> 
 
<name>Paul.Todd</name> 
<uri>http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog</uri> 
</author> 
<dc:subject>
S60 
Symbian C++ 
Testing 
</dc:subject> 
<content type="text/html" xml:lang="en" xml:base="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog"> 
&lt;p&gt;
DevcertList has been updated to version 1.2
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;I have seen a number of people getting &amp;quot;Constrained by certificate&amp;quot; errors and say they are absolutly sure they transcribed the IMEI correctly. To fix this I have updated DevCertList to check for IMEI&#039;s that are invalid and also IMEI&#039;s that have the wrong length.
&lt;/p&gt;
&lt;p&gt;
The 3GPP specification outlines the checksum digit calculation to make sure the IMEI is valid. 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;This was a result of this thread over at the Symbian board.. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href=&quot;http://developer.symbian.com/forum/thread.jspa?messageID=84670&amp;amp;tstart=0 &quot;&gt;http://developer.symbian.com/forum/thread.jspa?messageID=84670&amp;amp;tstart=0 &lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Get it here: 
&lt;/p&gt;
&lt;p&gt;
&lt;a href=&quot;http://wiki.forum.nokia.com/index.php/Listing_IMEIs_and_Capabilities_in_a_DevCert &quot;&gt;http://wiki.forum.nokia.com/index.php/Listing_IMEIs_and_Capabilities_in_a_DevCert &lt;/a&gt;
&lt;/p&gt; 
</content> 
</entry> 
 
<entry> 
<title>Reading and writing DM adapter settings</title>
<link rel="alternate" type="text/html" href="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog/2008/12/29/reading-and-writing-dm-adapter-settings" /> 
<id>tag:blogs.forum.nokia.com,2008-12-29:1915</id>
 
<updated>2008-12-29T18:37:36+02:00</updated> 
<published>2008-12-29T18:37:36+02:00</published> 
<summary type="html"> 
This continues the posts on DM adapters but I have had to break it into 3 parts as its very long because some areas are rather complicated...
 
 
The DM adapter framework functions by ...</summary> 
<author> 
 
<name>Paul.Todd</name> 
<uri>http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog</uri> 
</author> 
<dc:subject>
S60 
Symbian C++ 
</dc:subject> 
<content type="text/html" xml:lang="en" xml:base="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog"> 
&lt;p&gt;
This continues the posts on DM adapters but I have had to break it into 3 parts as its very long because some areas are rather complicated...
&lt;/p&gt;
&lt;p&gt;
The DM adapter framework functions by grouping together a number of requests and then executing them when CompleteOutstandingCmdsL is called synchronously.&lt;br /&gt;
This allows the adapter&#039;s underlying implementation to batch process a set of commands and deliver them to a slower client as well as allowing transactioning. 
&lt;/p&gt;
&lt;p&gt;
To read a setting that is not a group, its a simple matter to call FetchLeafObjectL with the relevant URI and mime type and the adapter will return the value back when CompleteOutstandingCmdsL is called.When an adapter method is called, two ids are also sent with the request. This allows the data that is returned to be identified to&amp;nbsp; particular transaction and the second allows the actual status of the transaction to be identified.&amp;nbsp; In practise these are normally made the same.
&lt;/p&gt;
&lt;p&gt;
Calling FetchLeafObjectL and CompleteOutstandingCmdsL will result in two call backs being generated for the class implementing MSmlDmAdapter that was supplied &lt;br /&gt;
to the adapter instance when it was created. The first callback will be the status of the call. This will be via the SetStatusL method that was implemented in callback handler. This will return the error code (if any) for that particular transaction. 
&lt;/p&gt;
&lt;p&gt;
The second callback will be the actual data for the call. This will be the data and the mime type of the data. Since the data being returned is in the form of a binary blob he actual type of the blob is also required so that it can be decoded by the caller into a suitable format for redelivery to the application or forwarding onto another caller.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
To write a setting that is not a group, its a simple matter to call UpdateLeafObjectL with the relevant URI, mimetype and the update will occur when CompleteOutstandingCmdsL is called. (I am going to defer the discusion of GUID and LUID values for the next post)&lt;br /&gt;
&lt;br /&gt;
Reading a group is slightly more complicated by the fact that the resultant data needs to be parsed. If the endpoint of the URI is a group then calling ChildURIListL will&amp;nbsp; return a string in the form of child fragment1/childfragment2/childfragment3 which needs to be split using the &#039;/&#039; character into its individual components of the child URI. Of course there are additional commands to do the other node operations such as DeleteObjectL, AddNodeObjectL, ExecuteCommandL and CopyCommandL all of which do what they say. It is worth noting however that DeleteObjectL will delete all children as well as well as the node in the tree.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Inside the DM adapter there are additional transaction commands, StartAtomic, CommitAtomic, RollbackAtomic. These commands function in conjunction with the CompleteOutstandingCmdsL method and work in a similar manner to database transactions. If the adapter is not inside a transaction, then each of the operations in the queued operations list will be executed nd the results of the operations (failure or success) reported to the caller via SetStatusL and so cannot be rolled back if there is an error. However, if before any updates are added to the adapter, StartAtomic is called, all operations that are made via for example UpdateLeafObjectL will be queued as normal and when CompleteOutstandingCmdsL is called will they be executed. This will then execute all the deferred commands, calling SetStatusL&lt;br /&gt;
and SetResultsL for each of the operations. If all the operations succeeded, the caller should then call CommitAtomic and this will make all the changes to the adapter permanent. If any of the operations failed, the caller should call RollbackAtomic and the adapter will attempt to restore its state to what it was at the StartAtomic call. Note it is also possible for the Rollback to fail, in which case the results of this will be returned via the SetStatusL callback.&lt;br /&gt;
&lt;br /&gt;
Some adapters also support streaming for large objects. For example if the data the adapter needs is coming from or going to a slow medium then the the adapter may request or respond&amp;nbsp; with a stream to supply the data in chunks. It is easy to check whether the adapter supports streaming by calling the StreamingSupport method. This returns the size of the data above which the stream methods will be used instead of the blob methods. ETrue is returned if the adapter supports streaming.
&lt;/p&gt;
&lt;p&gt;
&lt;br /&gt;
There is one API that causes more problems than all the other API&#039;s combined. This is the FetchLinkL method and will be the subject of a subsequent post.&lt;br /&gt;
The next posting will be on the GUID/LUID mess that form parts of the parameter list...&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt; 
</content> 
</entry> 
 
<entry> 
<title>Displaying something when starting up your application</title>
<link rel="alternate" type="text/html" href="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog/2008/12/15/displaying-something-when-starting-up-your-application" /> 
<id>tag:blogs.forum.nokia.com,2008-12-15:1896</id>
 
<updated>2008-12-15T23:55:02+02:00</updated> 
<published>2008-12-15T23:55:02+02:00</published> 
<summary type="html"> 
One of the commonest question that seems to be asked is how to display  
a dialog or a note when the application starts. Due to the way the UI framework starts, its not suitable or even ...</summary> 
<author> 
 
<name>Paul.Todd</name> 
<uri>http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog</uri> 
</author> 
<dc:subject>
S60 
Symbian C++ 
</dc:subject> 
<content type="text/html" xml:lang="en" xml:base="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog"> 
&lt;p&gt;
One of the commonest question that seems to be asked is how to display &lt;br /&gt;
a dialog or a note when the application starts. Due to the way the UI framework starts, its not suitable or even appropriate to block the main thread before any iews and the main view&#039;s container are created. This causes all sorts of problems such as the background being blank and wierd crashes and issues. Almost all of these revolve around the face that the UI is not fully constructed before being used so its not possible to safely use it at his point.&lt;br /&gt;
&lt;br /&gt;
The way to address this is to create an active object that is scheduled to run&lt;br /&gt;
but with an idle priority. This object will be run once there is nothing to do and so this gives the UI framework the opportunity it initialize itself and allow he container view to be created and displayed.&lt;br /&gt;
&lt;br /&gt;
Luckily its a simple matter to create the code to do this. The way I have chosen&lt;br /&gt;
to do this is to use the CAsyncCallBack object with an idle priority. Of course &lt;br /&gt;
you can use for example your own active object or the CAsyncOneShot object to&lt;br /&gt;
do the same.&lt;br /&gt;
&lt;br /&gt;
I recommend that the callback object be put in the main view rather than the appui &lt;br /&gt;
as this makes it easier to access the current view object. Of course if you&lt;br /&gt;
are not using the view framework then it is suitable to put it into the appui.&lt;br /&gt;
&lt;br /&gt;
Three methods are needed:&lt;br /&gt;
void AddInitialCallbackL();&lt;br /&gt;
void DoStartupCallbackL();&lt;br /&gt;
static TInt StartupCallback(TAny* aAny);&lt;br /&gt;
&lt;br /&gt;
The first method creates the callback, links it to an object and adds&lt;br /&gt;
the callback object to the active scheduler&lt;br /&gt;
&lt;br /&gt;
The second method is the actual callback object function. The parameter passed in &lt;br /&gt;
is the object so this can be cast to the correct type and then the method on&lt;br /&gt;
that object can be called.&lt;br /&gt;
&lt;br /&gt;
The last method is the actual implementation of the callback that is in the object. This can do various things including kicking off another active object. or this example a note is displayed.&lt;br /&gt;
&lt;br /&gt;
For the sample code I have have chosen to put it in the main view of the application and not the AppUI.&lt;br /&gt;
&lt;br /&gt;
// This is called from the DoActivateL of the view class.&lt;br /&gt;
void CView::AddInitialCallbackL()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; TCallBack callback(StartupCallback, this);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; iCallback = new (ELeave) CAsyncCallBack(callback, CActive::EPriorityIdle);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Most people forget the step below, this schedules the active object!&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; iCallback-&amp;gt;CallBack();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
TInt CView::StartupCallback(TAny* aAny)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; CView* view = REINTERPRET_CAST(CView*, aAny);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; TRAP_IGNORE(view-&amp;gt;DoStartupCallbackL());&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return EFalse;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
void CView::DoStartupCallbackL()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; CAknInformationNote* note = new (ELeave) CAknInformationNote(ETrue);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; note-&amp;gt;ExecuteLD(_L(&amp;quot;Callback Executed&amp;quot;));&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
That is all there is to getting a dialog, note or query up when your application is started 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt; 
</content> 
</entry> 
 
<entry> 
<title>Reading DM Adapter DDF&#039;s</title>
<link rel="alternate" type="text/html" href="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog/2008/11/30/reading-dm-adapter-ddf-s" /> 
<id>tag:blogs.forum.nokia.com,2008-11-30:1868</id>
 
<updated>2008-11-30T18:21:24+02:00</updated> 
<published>2008-11-30T18:21:24+02:00</published> 
<summary type="html"> 
DDF&#039;s can be represented as a tree structure and so naturally lead themselves to be described by recursion which most people find difficult to understand. Reading a ddf from the supplied ...</summary> 
<author> 
 
<name>Paul.Todd</name> 
<uri>http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog</uri> 
</author> 
<dc:subject>
Enterprise 
S60 
Symbian C++ 
</dc:subject> 
<content type="text/html" xml:lang="en" xml:base="http://blogs.forum.nokia.com/blog/paul-todds-forum-nokia-blog"> 
&lt;p&gt;
DDF&#039;s can be represented as a tree structure and so naturally lead themselves to be described by recursion which most people find difficult to understand. Reading a ddf from the supplied adapter is fairly easy, the problems are the recursive nature of the solution that describes the ddf.
&lt;/p&gt;
&lt;p&gt;
The two important methods on CSmlDmAdapter are DDFStructureL and the other one is DDFVersionL. The DDFStructureL function takes as an arguement, an implementation for an MSmlDmDDFObject. This will be the root node for the DDF and typically this will be the name of the DDF&amp;nbsp; e.g. AP for access points)
&lt;/p&gt;
&lt;p&gt;
As the adapter builds the DDF, it will call back on the methods of MSmlDmDDFObject to set the &lt;br /&gt;
various parameters that describe the node. You will need to derive a class from this and &lt;br /&gt;
CBase and provide implementations to all the methods of the MSmlDmDDFObject. &lt;br /&gt;
It is up to you to track the relationships between the nodes, so each time AddChildObjectL&lt;br /&gt;
or AddChildObjectGroupL is called, it will require a new instance of the object implementing&amp;nbsp; &lt;br /&gt;
the MSmlDmDDFObject interface to be created. This new node will be added as a child of the&lt;br /&gt;
current node. If the DDF tree is being stored then it will be up to you to keep track of &lt;br /&gt;
the objects you create.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
In order to construct the tree, AddChildObjectL is used to add a named node and &lt;br /&gt;
AddChildObjectGroupL is used to add an anonymous or ununamed node (these are denoted as &lt;br /&gt;
&amp;lt;x&amp;gt; is in the ddf specification). Both of these functions return a new instance of an &lt;br /&gt;
object implementing the MSmlDmDDFObject.
&lt;/p&gt;
&lt;p&gt;
One of the tricky aspects to this is that some of the adapters put their name in the ecom data and others do not, so generally you need to read the DDF for the adapter in order to get the name of the adapter if you are using it to set specific settings. 
&lt;/p&gt;
&lt;p&gt;
A partial example to read the ddf..&lt;br /&gt;
For the purposes of this example, we will assume that we already have an adapter &lt;br /&gt;
instantiated via RECOMSession::CreateImplementationL&lt;br /&gt;
&lt;br /&gt;
//This class is used to store the ddf&lt;br /&gt;
class CDmDDFNode : public CBase, public MSmlDmDDFObject&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
public:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; CDMDDFNode();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ~CDMDDFNode()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; iChildren.ResetAndDestroy();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
public: // MSmlDmDDFObject&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; .... // Implementations of the pure virtual &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // get and set methods of MSmlDmDDFObject&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; MSmlDmDDFObject&amp;amp; AddChildObjectGroupL()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return AddChildObjectL(_L8(&amp;quot;&amp;lt;x&amp;gt;&amp;quot;));&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; MSmDmDDFObject&amp;amp; AddChildObjectL(const TDesC8&amp;amp; aNodeName)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; CDmDDFNode* node = new (ELeave) CDmDDFNode;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; CleanupStack::PushL(node);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; iChildren.AppendL(node);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; CleanupStack::Pop(node);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return *node;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
private:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; RPointerArray&amp;lt;CDMDDFNode&amp;gt; iChildren;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }; &lt;br /&gt;
&lt;br /&gt;
When calling DDFStructure...&lt;br /&gt;
&lt;br /&gt;
CDMDDFNode* root = new (ELeave) CDMDDFNode;&lt;br /&gt;
CleanupStack::PushL(root);&lt;br /&gt;
adapter-&amp;gt;DDFStructureL(*root);&lt;br /&gt;
CleanupStack::Pop(root);&lt;br /&gt;
&lt;br /&gt;
const TDesC8&amp;amp; name= node-&amp;gt;Name(); // the root node is the adapter name.&lt;br /&gt;
....&lt;br /&gt;
&lt;br /&gt;
Once the DDF has been read, it is then possible to get the version of the DDF.&lt;br /&gt;
The DDF version is important as it allows differentiation of features as well as identifying&lt;br /&gt;
possible issues with bugs fixed from earlier releases.&lt;br /&gt;
&lt;br /&gt;
CBufFlat* buf = CBufFlat::NewL(64);&lt;br /&gt;
CleanupStack::PushL(buf);&lt;br /&gt;
adapter-&amp;gt;DDFVersionL(*buf);&lt;br /&gt;
HBufC8* DDFVersion = buf-&amp;gt;Ptr(0).AllocL();&lt;br /&gt;
// .... create store this somewhere&lt;br /&gt;
CleanupStack::PopAndDestroy(2, buf);&lt;br /&gt;
&lt;br /&gt;
Next Part...&lt;br /&gt;
Setting simple single values...
&lt;/p&gt; 
</content> 
</entry> 
 
</feed>