authorisation/userpromptservice/inc_private/upscommon.h
changeset 8 35751d3474b7
equal deleted inserted replaced
2:675a964f4eb5 8:35751d3474b7
       
     1 /*
       
     2 * Copyright (c) 2007-2009 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: 
       
    15 * Implementation data shared between UPS client and server implementations,
       
    16 * but not with the UPS client.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 /**
       
    22  @file
       
    23  @internalComponent
       
    24  @released
       
    25 */
       
    26 
       
    27 
       
    28 #ifndef UPSCOMMON_H
       
    29 #define UPSCOMMON_H
       
    30 
       
    31 #include <e32ver.h>
       
    32 #include <e32uid.h>
       
    33 
       
    34 #ifndef BULLSEYE_OFF
       
    35 #ifdef _BullseyeCoverage
       
    36 #define BULLSEYE_OFF "BullseyeCoverage save off";
       
    37 #define BULLSEYE_RESTORE "BullseyeCoverage restore";
       
    38 #else
       
    39 #define BULLSEYE_OFF 
       
    40 #define BULLSEYE_RESTORE 
       
    41 #endif
       
    42 #endif
       
    43 
       
    44 namespace UserPromptService
       
    45 	{
       
    46 	_LIT(KUpsServerName, "!UpsServer");		///< Identifies UPS Symbian OS server.
       
    47 
       
    48 	const TInt KUpsVerMajor = 1;		///< UPS server version major component.
       
    49 	const TInt KUpsVerMinor = 0;		///< UPS server version minor component.
       
    50 	const TInt KUpsVerBuild = 0;		///< UPS server version build component.
       
    51 
       
    52 	inline TVersion Version();
       
    53 
       
    54 	/**
       
    55 		Executable which hosts UPS server.  Required to launch the process.
       
    56 
       
    57 		@see KUpsServerUid
       
    58 	 */
       
    59 	_LIT(KServerImageName, "upsserver.exe");
       
    60 
       
    61 	/**
       
    62 		Hosting executable's secure ID.  Required to launch the process.
       
    63 
       
    64 		@see KServerImageName
       
    65 	 */
       
    66 	const TUid KUpsServerUid = {0x10283558};
       
    67 
       
    68 	inline TUidType ServerImageFullUid();
       
    69 
       
    70 	/// The UPS uses this property to notify the clients RUpsSession objects (via their CPolicyChangeWatcher objects)
       
    71 	/// that they need to re-read the service config information because it may have changed.
       
    72 	/// This is particularly important if the setting is changing from "never check" to "always check".
       
    73 	const TInt KUpsServiceConfigProperty = 42;
       
    74 
       
    75 	enum TSessionFunction
       
    76 	/**
       
    77 		Functions supported by a UPS session, as opposed to subsession.
       
    78 	 */
       
    79 		{
       
    80 			ESessSubsessFromThreadId = 0,	///< Create a subsession current on a thread.
       
    81 			EGetClientConfigLength,			///< Get the number of elements in the client config array
       
    82 			EGetClientConfigData,			///< Get the client config array
       
    83 			EMngmntRead = 0x100,
       
    84 			ECreateView,
       
    85 			ENextMatch,
       
    86 			ECloseView,
       
    87 			EMngmntDelete = 0x200,
       
    88 			EDeleteDatabase,
       
    89 			ERemoveDecisions,
       
    90 			EMngmntUpdate = 0x300,
       
    91 			EUpdateDecision,
       
    92 			ESwiObserver = 0x400,
       
    93 			EDeleteDecisionsForExe,
       
    94 			ENotifyPluginsMayHaveChanged,
       
    95 			ENotifyPolicyFilesChanged,
       
    96 			ECancelNotifyPolicyFilesChanged
       
    97 		};
       
    98 
       
    99 	enum TSubsessionFunction
       
   100 	/**
       
   101 		Functions supported by a UPS subsession.
       
   102 	 */
       
   103 		{
       
   104 			ESubsessPreparePrompt = 0,
       
   105 			ESubsessExecutePrompt
       
   106 		};
       
   107 	
       
   108 	/**
       
   109 		Delay in microseconds before the server is shut down, after
       
   110 		the last remaining session has been closed.
       
   111 	 */
       
   112 	const TInt KShutdownPeriodUs = 2 * 1000 * 1000;
       
   113 
       
   114 	//Shows the flag array index of each column in a filter key 
       
   115 	static const TUint8  KPosClientSid			= 0x00;
       
   116 	static const TUint8  KPosEvaluatorId		= 0x01;
       
   117 	static const TUint8  KPosServiceId			= 0x02;
       
   118 	static const TUint8  KPosServerSid 			= 0x03;
       
   119 	static const TUint8  KPosFingerprint		= 0x04;
       
   120 	static const TUint8  KPosClientEntity		= 0x05;
       
   121 	static const TUint8  KPosMajorPolicyVersion	= 0x06;
       
   122 	static const TUint8  KPosRecordId			= 0x07;
       
   123 	static const TUint8  KPosDescription		= 0x08;
       
   124 	static const TUint8  KPosResult				= 0x09;
       
   125 	static const TUint8  KPosEvaluatorInfo		= 0x0A;
       
   126 	
       
   127 	//Shows which columns are set
       
   128 	static const TUint32 KSetClientSid    		= 0x00000001;
       
   129 	static const TUint32 KSetEvaluatorId  		= 0x00000002;
       
   130 	static const TUint32 KSetServiceId    		= 0x00000004;
       
   131 	static const TUint32 KSetServerSid    		= 0x00000008;
       
   132 	static const TUint32 KSetFingerprint  		= 0x00000010;
       
   133 	static const TUint32 KSetClientEntity 		= 0x00000020;
       
   134 	static const TUint32 KSetMajorPolicyVersion = 0x00000040;
       
   135 	static const TUint32 KSetRecordId  			= 0x00000080;
       
   136 	static const TUint32 KSetDescription  		= 0x00000100;
       
   137 	static const TUint32 KSetResult  			= 0x00000200;
       
   138 	static const TUint32 KSetEvaluatorInfo  	= 0x00000400;
       
   139 
       
   140 } // End of namespace UserPromptService
       
   141 
       
   142 #include "upscommon.inl"
       
   143 
       
   144 #endif	// #ifndef UPSCOMMON_H
       
   145