|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE task |
|
11 PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"> |
|
12 <task id="GUID-D2605514-03F4-4A07-943B-E180341518D4" xml:lang="en"><title>Retrieving application information using application UID</title><shortdesc>This tutorial describes how application information can |
|
13 be retrieved from the SCR for a specific application UID.</shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody> |
|
14 <prereq id="GUID-244C8436-7871-487A-B94C-BC9A70CEA709"><p>The Client |
|
15 applications must link against <filepath>scrclient.dll</filepath>.</p></prereq> |
|
16 <steps id="GUID-4DD07DEC-6017-4237-BE46-1D69E5FBD744-GENID-1-12-1-5-1-1-6-1-6-1-4-1-6-1-3-2"> |
|
17 <step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-12-1-5-1-1-6-1-6-1-4-1-6-1-3-2-1"><cmd>Connect |
|
18 to the SCR server.</cmd> |
|
19 <info><codeblock xml:space="preserve">#include <usif/scr/scr.h> |
|
20 Usif::RSoftwareComponentRegistry scrSession; |
|
21 scrSession.Connect(); |
|
22 </codeblock></info> |
|
23 </step> |
|
24 <step id="GUID-52B25417-323F-46D8-B572-A65C4B1F8DBA-GENID-1-12-1-5-1-1-6-1-6-1-4-1-6-1-3-2-2"><cmd>Create an |
|
25 object of <xref href="GUID-8C085940-AE69-3CE3-993A-675C2DB2D0CD.dita"><apiname>RApplicationRegistrationInfo</apiname></xref> to retrieve |
|
26 application information based on application UID.</cmd> |
|
27 <info><codeblock xml:space="preserve">RApplicationRegistrationInfo subSession;</codeblock></info> |
|
28 </step> |
|
29 <step id="GUID-90F67FCC-E2E4-4BFD-927F-AF59651B8A2D-GENID-1-12-1-5-1-1-6-1-6-1-4-1-6-1-3-2-3"><cmd>Open a <xref href="GUID-8C085940-AE69-3CE3-993A-675C2DB2D0CD.dita"><apiname>RApplicationRegistrationInfo</apiname></xref> subsession to retrieve application |
|
30 information based on application UID.</cmd> |
|
31 <info><codeblock xml:space="preserve"> subSession.OpenL(scrSession);</codeblock></info> |
|
32 </step> |
|
33 <step id="GUID-0D7AF719-87D6-4191-96AE-23193C58C236-GENID-1-12-1-5-1-1-6-1-6-1-4-1-6-1-3-2-4"><cmd>Retrieve |
|
34 the information using <xref href="GUID-8C085940-AE69-3CE3-993A-675C2DB2D0CD.dita#GUID-8C085940-AE69-3CE3-993A-675C2DB2D0CD/GUID-004208F6-EFEF-3C4A-9B1A-F818B9908555"><apiname>RApplicationRegistrationInfo::GetAppInfoL()</apiname></xref>.</cmd> |
|
35 <info><codeblock xml:space="preserve">// GetAppInfoL() takes the application UID and an output parameter. |
|
36 // The locale can be specified (optional) as the |
|
37 // third parameter. If locale is not specified the default value is assigned. |
|
38 TAppRegInfo appInfo; |
|
39 subSession.GetAppInfoL(TUid::Uid(0x1000ABCD), appInfo);</codeblock></info> |
|
40 </step> |
|
41 </steps> |
|
42 </taskbody></task> |