sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // This class provides a wrapper around the launching of a seperate process to sl@0: // create and modify publish and subscribe variables. The calls below map directly to sl@0: // the corresponding RProperty functions. Properties are defined with the following sl@0: // security policies ReadPolicy = EAlwaysPass, WritePolicy = SID(0X10204FC5) (SysAgt2Svr SID). sl@0: // The maximum size of Text properties has been restricted to 128 bytes for convenience. sl@0: // sl@0: // sl@0: sl@0: sl@0: #ifndef __TPROPERTYMANAGER_H__ sl@0: #define __TPROPERTYMANAGER_H__ sl@0: sl@0: #include sl@0: #include sl@0: sl@0: class PropertyManager sl@0: { sl@0: public: sl@0: sl@0: enum TOperation { EDefineProperty, sl@0: EDeleteProperty, sl@0: ESetPropertyInt, sl@0: ESetPropertyDes8, sl@0: ESetPropertyDes16 sl@0: }; sl@0: sl@0: IMPORT_C static TInt DefineProperty(TUid aCategory, TUint aKey, TInt aAttr,TInt aPreallocated = 0); sl@0: IMPORT_C static TInt DeleteProperty(TUid aCategory, TUint aKey); sl@0: IMPORT_C static TInt SetProperty(TUid aCategory, TUint aKey, TInt aValue); sl@0: IMPORT_C static TInt SetProperty(TUid aCategory, TUint aKey, const TDesC8 &aValue); sl@0: IMPORT_C static TInt SetProperty(TUid aCategory, TUint aKey, const TDesC16 &aValue); sl@0: sl@0: private: sl@0: LOCAL_C TInt LaunchHelperProcess(TOperation aOperation,TDesC& aArgs); sl@0: sl@0: }; sl@0: sl@0: #endif sl@0: