diff -r 4816d766a08a -r f345bda72bc4 Symbian3/PDK/Source/GUID-4E1B057E-5291-54FC-A0C0-37234CBFBD8E.dita --- a/Symbian3/PDK/Source/GUID-4E1B057E-5291-54FC-A0C0-37234CBFBD8E.dita Tue Mar 30 11:42:04 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-4E1B057E-5291-54FC-A0C0-37234CBFBD8E.dita Tue Mar 30 11:56:28 2010 +0100 @@ -1,150 +1,150 @@ - - - - - -Enumerating -ApplicationsDevice creators can use the APIs provided by APPARC to enumerate -a list of applications on a device. - - -Create a session with the APPARC server using the RApaLsSession::Connect(). -RApaLsSession apaLsSession; - -// Connect to the APPARC server -User::LeaveIfError(apaLsSession.Connect()); - - - -Implement one or more of the following functions as per your requirement: - - - RApaLsSession::GetAllApps() - Use this function -to initialize the process of getting all applications in the list except the -control panel applications. - - - RApaLsSession::GetEmbeddableApps() - Use this function -to initialize the process of getting all the embeddable applications in the -list except the control panel applications. - - - RApaLsSession::GetFilteredApps() - Use this function -to initialize the process of getting all the filtered applications in the -list except the control panel applications. - - - RApaLsSession::GetServerApps() - Use this function -to initialize the process of getting all the server applications in the list -except the control panel applications. - - - - -Call the RApaLsSession::GetNextApp() to get one application -at a time. -The RApaLsSession::GetNextApp() must be called in -loop to get information about the next application in the list. The application -information is stored in TApaAppInfo variable. If there -are no more applications present in the list, ENoMoreAppsInList message -is returned. -The following code snippet shows how to get a list of all the applications -on the device: -// Get the list of all the applications on the device - -TInt ret = apaLsSession.GetAllApps(); -if(ret==KErrNone) - { - TApaAppInfo appInfo; - - // Retrieve the next application in the list. - // appInfo contains the application information - - while((ret= apaLsSession.GetNextApp(appInfo)) == KErrNone); - - - // Make sure ENoMoreAppsInList is returned at the end of list. - - if(ret==RApaLsSession::ENoMoreAppsInList) - { - // No more applications in the list - } - } -The following code snippet shows how to get a list of all the server -applications on the device: -// Get the list of all the server applications on the device - -TInt ret = apaLsSession.GetServerApps(); -if(ret==KErrNone) - { - TApaAppInfo appInfo; - - // Retrieve the next application in the list which provides a service. - - while((ret= apaLsSession.GetNextApp(appInfo)) == KErrNone); - - - // Make sure ENoMoreAppsInList is returned at the end of list. - - if(ret==RApaLsSession::ENoMoreAppsInList) - { - // No more server applications in the list - } - } -The following code snippet shows how to get a list of all the embedded -applications on the device: -// Get the list of all the embedded applications on the device - -TInt ret = apaLsSession.GetEmbeddedableApps(); -if(ret==KErrNone) - { - TApaAppInfo appInfo; - - // Retrieve the next embedded application in the application list - - while((ret= apaLsSession.GetNextApp(appInfo)) == KErrNone); - - - // Make sure ENoMoreAppsInList is returned at the end of list. - - if(ret==RApaLsSession::ENoMoreAppsInList) - { - // No more embedded applications in the list - } - } -The following code snippet shows how to get a list of all the filtered -applications on the device: -// Get the list of all the application based on the filter defined in the parameter passed to it. - -TApaEmbeddabilityFilter &filter = TApaEmbeddabilityFilter(); -filter.AddEmbeddability(TApaAppCapability::EEmbeddableUiOrStandAlone); - -TInt ret = apaLsSession.GetFilteredApps(filter); -if(ret==KErrNone) - { - TApaAppInfo appInfo; - - // Retrieve the next application in the application list that matches the specified filter. - - while((ret= apaLsSession.GetNextApp(appInfo)) == KErrNone); - - - // Make sure ENoMoreAppsInList is returned at the end of list. - - if(ret==RApaLsSession::ENoMoreAppsInList) - { - // No more filtered applications in the list - } - } - - - -Application -Architecture Overview + + + + + +Enumerating +ApplicationsDevice creators can use the APIs provided by APPARC to enumerate +a list of applications on a device. + + +Create a session with the APPARC server using the RApaLsSession::Connect(). +RApaLsSession apaLsSession; + +// Connect to the APPARC server +User::LeaveIfError(apaLsSession.Connect()); + + + +Implement one or more of the following functions as per your requirement: + + + RApaLsSession::GetAllApps() - Use this function +to initialize the process of getting all applications in the list except the +control panel applications. + + + RApaLsSession::GetEmbeddableApps() - Use this function +to initialize the process of getting all the embeddable applications in the +list except the control panel applications. + + + RApaLsSession::GetFilteredApps() - Use this function +to initialize the process of getting all the filtered applications in the +list except the control panel applications. + + + RApaLsSession::GetServerApps() - Use this function +to initialize the process of getting all the server applications in the list +except the control panel applications. + + + + +Call the RApaLsSession::GetNextApp() to get one application +at a time. +The RApaLsSession::GetNextApp() must be called in +loop to get information about the next application in the list. The application +information is stored in TApaAppInfo variable. If there +are no more applications present in the list, ENoMoreAppsInList message +is returned. +The following code snippet shows how to get a list of all the applications +on the device: +// Get the list of all the applications on the device + +TInt ret = apaLsSession.GetAllApps(); +if(ret==KErrNone) + { + TApaAppInfo appInfo; + + // Retrieve the next application in the list. + // appInfo contains the application information + + while((ret= apaLsSession.GetNextApp(appInfo)) == KErrNone); + + + // Make sure ENoMoreAppsInList is returned at the end of list. + + if(ret==RApaLsSession::ENoMoreAppsInList) + { + // No more applications in the list + } + } +The following code snippet shows how to get a list of all the server +applications on the device: +// Get the list of all the server applications on the device + +TInt ret = apaLsSession.GetServerApps(); +if(ret==KErrNone) + { + TApaAppInfo appInfo; + + // Retrieve the next application in the list which provides a service. + + while((ret= apaLsSession.GetNextApp(appInfo)) == KErrNone); + + + // Make sure ENoMoreAppsInList is returned at the end of list. + + if(ret==RApaLsSession::ENoMoreAppsInList) + { + // No more server applications in the list + } + } +The following code snippet shows how to get a list of all the embedded +applications on the device: +// Get the list of all the embedded applications on the device + +TInt ret = apaLsSession.GetEmbeddedableApps(); +if(ret==KErrNone) + { + TApaAppInfo appInfo; + + // Retrieve the next embedded application in the application list + + while((ret= apaLsSession.GetNextApp(appInfo)) == KErrNone); + + + // Make sure ENoMoreAppsInList is returned at the end of list. + + if(ret==RApaLsSession::ENoMoreAppsInList) + { + // No more embedded applications in the list + } + } +The following code snippet shows how to get a list of all the filtered +applications on the device: +// Get the list of all the application based on the filter defined in the parameter passed to it. + +TApaEmbeddabilityFilter &filter = TApaEmbeddabilityFilter(); +filter.AddEmbeddability(TApaAppCapability::EEmbeddableUiOrStandAlone); + +TInt ret = apaLsSession.GetFilteredApps(filter); +if(ret==KErrNone) + { + TApaAppInfo appInfo; + + // Retrieve the next application in the application list that matches the specified filter. + + while((ret= apaLsSession.GetNextApp(appInfo)) == KErrNone); + + + // Make sure ENoMoreAppsInList is returned at the end of list. + + if(ret==RApaLsSession::ENoMoreAppsInList) + { + // No more filtered applications in the list + } + } + + + +Application +Architecture Overview \ No newline at end of file