diff -r 5072524fcc79 -r 80ef3a206772 Symbian3/PDK/Source/GUID-33108CC9-3FF7-4076-A512-FB6F2F0BCC0D.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-33108CC9-3FF7-4076-A512-FB6F2F0BCC0D.dita Fri Jul 16 17:23:46 2010 +0100 @@ -0,0 +1,65 @@ + + + + + +Retrieving application information using filtersThis tutorial describes how application information can +be retrieved from the SCR using filters. +

The Client +applications must link against scrclient.dll.

+ +Connect +to the SCR server. +#include <usif/scr/scr.h> +Usif::RSoftwareComponentRegistry scrSession; +scrSession.Connect(); + + +Create an +object of RApplicationInfoView. +RApplicationInfoView subSession; + +Create a +filter object of CAppInfoFilter. +CAppInfoFilter* infoFilter; +infoFilter = CAppInfoFilter::NewL(); + + +Set the +filter object properties. +// embeddability filter (the extent to which the application can be embedded) +// and screen mode (size of the screen) +// The filter used below is used to list applications filtered by whether they are +// embeddable and have a screen mode value of zero +Usif::TEmbeddableFilter embedibilityFilter; +embedibilityFilter.AddEmbeddability(EEmbeddable) +infoFilter->SetEmbeddabilityFilterWithScreenMode(embedibilityFilter,0); + + +Open a RApplicationInfoView subsession with the filter. +subSession.OpenViewL(scrSession,infoFilter); + + +Retrieve +the information using RApplicationInfoView::GetNextAppInfoL(). +// GetNextAppInfoL() takes two parameters. The number of entries to be fetched +// in a single call and an output parameter of type RPointerArray +// for returning the array. +TInt noOfEntries = 5; +RPointerArray<TAppRegInfo> infoSet; +do { + ..... + ..... + infoSet.ResetAndDestroy(); + subSession.GetNextAppInfoL(noOfEntries, infoSet); + }while(0 != infoSet.Count()); + + + +
\ No newline at end of file