equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Definition of security protection domain inline functions |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 * Default private constructor |
|
26 * |
|
27 */ |
|
28 inline CProtectionDomain::CProtectionDomain() : |
|
29 iDomain(NULL) |
|
30 { |
|
31 } |
|
32 |
|
33 /** |
|
34 * Two phased constructor |
|
35 * |
|
36 */ |
|
37 inline void CProtectionDomain::ConstructL() |
|
38 { |
|
39 iPermSet = CPermissionSet::NewL (); |
|
40 } |
|
41 |
|
42 /** |
|
43 * Gets underlying permission set instance |
|
44 * |
|
45 * @return const CPermissionSet& permission set instance |
|
46 * |
|
47 */ |
|
48 inline const CPermissionSet& CProtectionDomain::PermSet() const |
|
49 { |
|
50 return *iPermSet; |
|
51 } |
|
52 |
|
53 /** |
|
54 * Gets domain name |
|
55 * |
|
56 * @return const TDesC& domain name |
|
57 * |
|
58 */ |
|
59 inline const TDesC& CProtectionDomain::DomainName() const |
|
60 { |
|
61 if ( iDomain) |
|
62 return *iDomain; |
|
63 else |
|
64 return KNullDesC (); |
|
65 } |
|
66 |
|
67 /** |
|
68 * Sets domain name |
|
69 * |
|
70 * @param aDomainName const TDesC& input domain name string |
|
71 */ |
|
72 inline void CProtectionDomain::SetDomainName(const TDesC& aDomain) |
|
73 { |
|
74 if ( iDomain) |
|
75 { |
|
76 delete iDomain; |
|
77 iDomain = NULL; |
|
78 } |
|
79 |
|
80 iDomain = aDomain.AllocL (); |
|
81 } |
|
82 |
|
83 /** |
|
84 * Sets permission set |
|
85 * |
|
86 * @param aPermissionSet CPermissionSet* input permission set |
|
87 */ |
|
88 inline void CProtectionDomain::SetCapInfo(CPermissionSet* aPermissionSet) |
|
89 { |
|
90 if ( iPermSet) |
|
91 { |
|
92 delete iPermSet; |
|
93 } |
|
94 |
|
95 iPermSet = aPermissionSet; |
|
96 } |