• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Parsing a SyncML Document

To parse an incoming SyncML document, the application needs to initialize a toolkit instance with an assigned workspace buffer and set the instance options (type of ending, workspace size, and workspace name). For parsing documents, it is especially important that the application registers callback functions for different SyncML commands. The callback functions connect the toolkit to the application. Without the callback functions, the toolkit is not able to pass the parsed data to the application.

static Ret_t handleAddCmdFunc (InstanceID_t
   instanceID, VoidPtr_t userData, AddPtr_t param)
{

// Process received data here (e.g. parse user data and
// insert in database )
...
// Free memory allocated to the toolkit
smlFreeProtoElement(param);
return SML_ERR_OK;
}


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint