|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // This class provides a wrapper around the launching of a seperate process to |
|
15 // create and modify publish and subscribe variables. The calls below map directly to |
|
16 // the corresponding RProperty functions. Properties are defined with the following |
|
17 // security policies ReadPolicy = EAlwaysPass, WritePolicy = SID(0X10204FC5) (SysAgt2Svr SID). |
|
18 // The maximum size of Text properties has been restricted to 128 bytes for convenience. |
|
19 // |
|
20 // |
|
21 |
|
22 |
|
23 #ifndef __TPROPERTYMANAGER_H__ |
|
24 #define __TPROPERTYMANAGER_H__ |
|
25 |
|
26 #include <e32test.h> |
|
27 #include <e32property.h> |
|
28 |
|
29 class PropertyManager |
|
30 { |
|
31 public: |
|
32 |
|
33 enum TOperation { EDefineProperty, |
|
34 EDeleteProperty, |
|
35 ESetPropertyInt, |
|
36 ESetPropertyDes8, |
|
37 ESetPropertyDes16 |
|
38 }; |
|
39 |
|
40 IMPORT_C static TInt DefineProperty(TUid aCategory, TUint aKey, TInt aAttr,TInt aPreallocated = 0); |
|
41 IMPORT_C static TInt DeleteProperty(TUid aCategory, TUint aKey); |
|
42 IMPORT_C static TInt SetProperty(TUid aCategory, TUint aKey, TInt aValue); |
|
43 IMPORT_C static TInt SetProperty(TUid aCategory, TUint aKey, const TDesC8 &aValue); |
|
44 IMPORT_C static TInt SetProperty(TUid aCategory, TUint aKey, const TDesC16 &aValue); |
|
45 |
|
46 private: |
|
47 LOCAL_C TInt LaunchHelperProcess(TOperation aOperation,TDesC& aArgs); |
|
48 |
|
49 }; |
|
50 |
|
51 #endif |
|
52 |