author | kashif.sayed |
Fri, 26 Mar 2010 02:10:38 +0530 | |
branch | v5backport |
changeset 27 | 28544f9237c7 |
parent 20 | d2ab7c3d0c48 |
permissions | -rw-r--r-- |
20
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
1 |
/* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
2 |
* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
3 |
* All rights reserved. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
8 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
11 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
12 |
* Contributors: |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
13 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
14 |
* Description: Defines Runtime security manager's core class. Defines |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
15 |
* APIs for runtime bindings and clients to access security |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
16 |
* management functionalities |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
17 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
18 |
*/ |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
19 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
20 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
21 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
22 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
23 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
24 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
25 |
#ifndef _CRTSECMANAGER_H |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
26 |
#define _CRTSECMANAGER_H |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
27 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
28 |
#include <e32base.h> |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
29 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
30 |
#include <rtsecmgrcommondef.h> |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
31 |
#include <rtsecmgrtrustinfo.h> |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
32 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
33 |
class CRTSecMgrScriptSession; |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
34 |
class MSecMgrPromptHandler; |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
35 |
class CRTSecMgrClientProxy; |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
36 |
class CTrustInfo; |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
37 |
class CPermission; |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
38 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
39 |
/** |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
40 |
* Core class of the runtime recurity manager component. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
41 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
42 |
* Runtime security manager broadly offers |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
43 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
44 |
* - Policy management functions |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
45 |
* - Script management functions |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
46 |
* - Access permission check |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
47 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
48 |
* CRTSecManager offers methods to perform policy management functionalities |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
49 |
* such as |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
50 |
* - Registering runtime security access policy |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
51 |
* - Updating the registered security access policy |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
52 |
* - Un-registering the registered security access policy |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
53 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
54 |
* Similarly, CRTSecManager offers methods for script management such as |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
55 |
* - Registering a runtime script with security manager |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
56 |
* - Un-registering the registered script |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
57 |
* - Obtaining scipt session associated with the registered script |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
58 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
59 |
* The main functionality of CRTSecManager is to perform access permission |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
60 |
* check using script session functions |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
61 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
62 |
* @lib rtsecmgrclient.lib |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
63 |
*/ |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
64 |
NONSHARABLE_CLASS(CRTSecManager) : public CBase |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
65 |
{ |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
66 |
public: |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
67 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
68 |
/** |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
69 |
* Two-phased constructor |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
70 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
71 |
* Constructs a CRTSecManager instance |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
72 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
73 |
* Initializes client side security manager session. Starts the security |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
74 |
* manager server, if it is not already running. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
75 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
76 |
* @return pointer to an instance of CRTSecManager |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
77 |
*/ |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
78 |
IMPORT_C static CRTSecManager* NewL(); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
79 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
80 |
/** |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
81 |
* Two-phased constructor |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
82 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
83 |
* Constructs a CRTSecManager instance and leaves the created instance |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
84 |
* onto the cleanupstack. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
85 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
86 |
* Initializes client side security manager session. Starts the security |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
87 |
* manager server, if it is not already running. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
88 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
89 |
* @return pointer to an instance of CRTSecManager |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
90 |
*/ |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
91 |
IMPORT_C static CRTSecManager* NewLC(); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
92 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
93 |
/** |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
94 |
* Destructor |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
95 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
96 |
* Closes client side security manager session |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
97 |
*/ |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
98 |
IMPORT_C ~CRTSecManager(); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
99 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
100 |
/** |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
101 |
* Registers a runtime security policy. Runtimes should call this function |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
102 |
* to register their security access and trust policies. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
103 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
104 |
* @param aSecPolicy RFile Handle to security policy file |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
105 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
106 |
* @return TPolicyID generated policy identifier if successul; Otherwise one of |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
107 |
* system wide error codes |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
108 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
109 |
* \note |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
110 |
* Clients should call ShareProtected on the file session object as shown below. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
111 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
112 |
* @code * |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
113 |
* RFs fileSession; |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
114 |
* fileSession.Connect(); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
115 |
* fileSession.ShareProtected(); //Mandatorily call before invoking SetPolicy |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
116 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
117 |
* RFile secPolicyFile; |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
118 |
* secPolicyFile.Open(fileSession, _L("AccessPolicy.xml"), EFileShareAny ); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
119 |
* TPolicyID policyID = secMgr->SetPolicy(secPolicyFile); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
120 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
121 |
* if(policyID <= KErrNone) |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
122 |
* { |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
123 |
* //error.. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
124 |
* } |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
125 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
126 |
* @endcode |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
127 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
128 |
*/ |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
129 |
IMPORT_C TPolicyID SetPolicy(const RFile& aSecPolicy); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
130 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
131 |
/** |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
132 |
* Registers a runtime security policy. Runtimes should call this function |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
133 |
* to register their security access and trust policies. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
134 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
135 |
* @param aPolicyBuffer const TDesC& security policy file buffer |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
136 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
137 |
* @return TPolicyID generated policy identifier if successul; Otherwise one of |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
138 |
* system wide error codes |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
139 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
140 |
* \note |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
141 |
* Clients should call ShareProtected on the file session object as shown below. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
142 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
143 |
* @code * |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
144 |
* RFs fileSession; |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
145 |
* fileSession.Connect(); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
146 |
* fileSession.ShareProtected(); //Mandatorily call before invoking SetPolicy |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
147 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
148 |
* RFile secPolicyFile; |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
149 |
* secPolicyFile.Open(fileSession, _L("AccessPolicy.xml"), EFileShareAny ); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
150 |
* HBufC8* fileBuffer = HBufC8::NewL(KFileBufferMaxLen); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
151 |
* secPolicyFile.Read(*fileBuffer); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
152 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
153 |
* TPolicyID policyID = secMgr->SetPolicy(*fileBuffer); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
154 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
155 |
* if(policyID <= KErrNone) |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
156 |
* { |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
157 |
* //error.. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
158 |
* } |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
159 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
160 |
* @endcode |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
161 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
162 |
*/ |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
163 |
IMPORT_C TPolicyID SetPolicy(const TDesC8& aPolicyBuffer); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
164 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
165 |
/** |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
166 |
* UnRegisters a registered security policy. Runtimes should call this function |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
167 |
* to de-register the already registered security policy. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
168 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
169 |
* @param aPolicyID TPolicyID Policy identifier previously generated with SetPolicy |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
170 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
171 |
* @return TInt One of sytem wide error codes in case of failure; Otherwise KErrNone |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
172 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
173 |
*/ |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
174 |
IMPORT_C TInt UnSetPolicy(TPolicyID aPolicyID); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
175 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
176 |
/** |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
177 |
* Updates an already registered security policy. Runtimes should call this function |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
178 |
* to update their policy. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
179 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
180 |
* @param aPolicyID TPolicyID Policy identifier previously generated with SetPolicy |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
181 |
* @param aSecPolicy RFile Handle to security policy file |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
182 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
183 |
* @see SetPolicy for file session pre-conditions |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
184 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
185 |
* @return TPolicyID One of sytem wide error codes in case of failure; Otherwise the passed policyID |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
186 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
187 |
*/ |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
188 |
IMPORT_C TPolicyID UpdatePolicy(TPolicyID aPolicyID,const RFile& aSecPolicy); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
189 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
190 |
/** |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
191 |
* Updates an already registered security policy. Runtimes should call this function |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
192 |
* to update their policy. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
193 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
194 |
* @param aPolicyID TPolicyID Policy identifier previously generated with SetPolicy |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
195 |
* @param aPolicyBuffer const TDesC& security policy file buffer |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
196 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
197 |
* @see SetPolicy for file session pre-conditions |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
198 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
199 |
* @return TPolicyID One of sytem wide error codes in case of failure; Otherwise the passed policyID |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
200 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
201 |
*/ |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
202 |
IMPORT_C TPolicyID UpdatePolicy(TPolicyID aPolicyID,const TDesC8& aPolicyBuffer); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
203 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
204 |
/** |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
205 |
* Registers a script/executable. Runtimes should specify the trust information |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
206 |
* of the script to be registered. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
207 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
208 |
* @param aPolicyID TPolicyID Runtime's registered policy identifier |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
209 |
* @param aTrustInfo CTrustInfo a valid instance of CTrustInfo object |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
210 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
211 |
* @return TExecutableID generated executable identifier if successul; Otherwise one of |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
212 |
* system wide error codes |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
213 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
214 |
*/ |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
215 |
IMPORT_C TExecutableID RegisterScript(TPolicyID aPolicyID, const CTrustInfo& aTrustInfo); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
216 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
217 |
/** |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
218 |
* Registers a script/executable. Runtimes should specify the trust information |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
219 |
* of the script to be registered. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
220 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
221 |
* @param aPolicyID TPolicyID Runtime's registered policy identifier |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
222 |
* @param aHashMarker const TDesC& Hash value to identify script when starting script session |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
223 |
* @param aTrustInfo CTrustInfo a valid instance of CTrustInfo object |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
224 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
225 |
* @return TExecutableID generated executable identifier if successul; Otherwise one of |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
226 |
* system wide error codes |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
227 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
228 |
*/ |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
229 |
IMPORT_C TExecutableID RegisterScript(TPolicyID aPolicyID, const TDesC& aHashMarker, const CTrustInfo& aTrustInfo); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
230 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
231 |
/** |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
232 |
* De-Registers a script/executable. Runtimes should pass the previously registered |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
233 |
* script identifier corresponding to the script to be de-registered. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
234 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
235 |
* @param aExeID TExecutableID A valid script identifier |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
236 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
237 |
* @return TInt One of sytem wide error codes in case of failure; Otherwise KErrNone |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
238 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
239 |
*/ |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
240 |
IMPORT_C TInt UnRegisterScript(TExecutableID aExeID, TPolicyID aPolicyID); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
241 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
242 |
/** |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
243 |
* Creates a script session instance. CRTSecMgrScriptSession performs access permission |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
244 |
* check for native platform service invocation. A CRTSecMgrScriptSession instance needs to |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
245 |
* be created for every instance of scripts which could potentially invoke platform service. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
246 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
247 |
* @param aPolicyID TPolicyID Valid registered policy identifier |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
248 |
* @param aExeID TExecutableID Script identifier, KAnonymousScript in case of anonymous script session |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
249 |
* @param aPromptHdlr MSecMgrPromptHandler An optional prompt handler. If not provided, Security manager |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
250 |
* will supply a default prompt handler |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
251 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
252 |
* @return CRTSecMgrScriptSession* A pointer to the created instance of CRTSecMgrScriptSession if the executableID is valid; |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
253 |
* Otherwise NULL |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
254 |
*/ |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
255 |
IMPORT_C CRTSecMgrScriptSession* GetScriptSessionL(TPolicyID aPolicyID, TExecutableID aExecID, MSecMgrPromptHandler* aPromptHdlr=NULL , const TDesC& aHashValue = KNullDesC); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
256 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
257 |
/** |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
258 |
* Creates a script session instance for an unregisterd trusted script. CRTSecMgrScriptSession performs access permission |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
259 |
* check for native platform service invocation. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
260 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
261 |
* @param aPolicyID TPolicyID Valid registered policy identifier |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
262 |
* @param aTrustInfo CTrustInfo a valid instance of CTrustInfo object |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
263 |
* @param aPromptHdlr MSecMgrPromptHandler An optional prompt handler. If not provided, Security manager |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
264 |
* will supply a default prompt handler |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
265 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
266 |
* @return CRTSecMgrScriptSession* A pointer to the created instance of CRTSecMgrScriptSession; |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
267 |
* NULL in case of invalid policy identifier |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
268 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
269 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
270 |
*/ |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
271 |
IMPORT_C CRTSecMgrScriptSession* GetScriptSessionL(TPolicyID aPolicyID, const CTrustInfo& aTrustInfo, MSecMgrPromptHandler* aPromptHdlr=NULL); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
272 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
273 |
/** |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
274 |
* Creates a script session instance. CRTSecMgrScriptSession performs access permission |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
275 |
* check for native platform service invocation. A CRTSecMgrScriptSession instance needs to |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
276 |
* be created for every instance of scripts which could potentially invoke platform service. |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
277 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
278 |
* @param aPolicyID TPolicyID Valid registered policy identifier |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
279 |
* @param aExeID TExecutableID Script identifier, KAnonymousScript in case of anonymous script session |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
280 |
* @param aHashValue TDesC hash value passed while registering the script |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
281 |
* @param aPromptHdlr MSecMgrPromptHandler An optional prompt handler. If not provided, Security manager |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
282 |
* will supply a default prompt handler |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
283 |
* |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
284 |
* @return CRTSecMgrScriptSession* A pointer to the created instance of CRTSecMgrScriptSession if the executableID is valid; |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
285 |
* Otherwise NULL |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
286 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
287 |
IMPORT_C CRTSecMgrScriptSession* GetScriptSession(TPolicyID aPolicyID, TExecutableID aExecID, const TDesC& aHashValue, MSecMgrPromptHandler* aPromptHdlr=NULL);*/ |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
288 |
private: |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
289 |
//Private default constructor |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
290 |
CRTSecManager(); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
291 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
292 |
//Part of second-phase constructor |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
293 |
void ConstructL(); |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
294 |
|
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
295 |
private: |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
296 |
//Proxy to client side session object |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
297 |
CRTSecMgrClientProxy* iClientProxy; |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
298 |
}; |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
299 |
#endif //_CRTSECMANAGER_H |
d2ab7c3d0c48
homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
300 |