dependencies/rtsecmgrcommondef.h
author kashif.sayed
Fri, 26 Mar 2010 02:10:38 +0530
branchv5backport
changeset 27 28544f9237c7
parent 20 d2ab7c3d0c48
permissions -rw-r--r--
. user: kashif.sayed branch 'v5backport' changed dependencies/bld.inf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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:       Security Manager common header
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    15
 *
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    16
*/
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
#ifndef _RTSECMGR_COMMON_DEF_H_
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    24
#define _RTSECMGR_COMMON_DEF_H_
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    25
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    26
#include <e32base.h>
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    27
#include <avkon.hrh>
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    28
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    29
typedef TInt TPolicyID;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    30
typedef TInt TExecutableID;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    31
typedef TUint32 TPermGrant;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    32
typedef RArray<TCapability> RCapabilityArray;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    33
typedef TUid TProviderUid;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    34
typedef RArray<TProviderUid> RProviderArray;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    35
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    36
typedef TUint32 TCapabilityBitSet;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    37
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    38
//constant for default NULL capability bitset
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    39
const TCapabilityBitSet KDefaultNullBit = 0x0000;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    40
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    41
//constant for default capability bitset with LSB enabled
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    42
const TCapabilityBitSet KDefaultEnableBit = 0x0001;
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
enum TAccessCheckCode
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    45
	{
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    46
	EAccessNok = -1,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    47
	EAccessOk
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    48
	};
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    49
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    50
enum       
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    51
    {
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    52
     EPromptOk = EAknSoftkeyOk,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    53
     EPromptCancel = EAknSoftkeyCancel
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    54
    };
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    55
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    56
/*
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    57
 * Enumerations for various duration option
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
const TUint32 DEFAULT_ONESHOT = 0x80000000;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    60
const TUint32 DEFAULT_SESSION = 0x40000000;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    61
const TUint32 DEFAULT_BLANKET = 0x20000000;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    62
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    63
const TUint32 CONDITION_ONESHOT = 0x8000000;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    64
const TUint32 CONDITION_SESSION = 0x4000000;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    65
const TUint32 CONDITION_BLANKET = 0x2000000;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    66
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    67
const TUint32 ONESHOT_DENIED = 0x88000000;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    68
const TUint32 SESSION_DENIED = 0x44000000;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    69
const TUint32 BLANKET_DENIED = 0x22000000;
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
const TUint32 DEFAULT_ALL = 0xE0000000;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    72
const TUint32 CONDITION_ALL = 0xE000000;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    73
const TUint32 CAPABILITY_ALL = 0xFFFFF;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    74
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    75
const TUint32 NetworkServices_CAP = 0x00002000;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    76
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    77
enum TUserPromptOption
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    78
	{
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    79
	RTUserPrompt_UnDefined = 0, //can be used for permisssions denied by default
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    80
	RTUserPrompt_OneShot = CONDITION_ONESHOT,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    81
	RTUserPrompt_Session = CONDITION_SESSION,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    82
	RTUserPrompt_Permanent = CONDITION_BLANKET,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    83
	RTUserPrompt_Denied = ONESHOT_DENIED,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    84
	RTUserPrompt_SessionDenied = SESSION_DENIED,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    85
	RTUserPrompt_PermDenied = BLANKET_DENIED
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    86
	};
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    87
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    88
enum TSecMgrPromptUIOption
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    89
	{
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    90
	RTPROMPTUI_DEFAULT = 0,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    91
	RTPROMPTUI_ADVANCED,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    92
	RTPROMPTUI_PROVIDER
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
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    95
//error code used btn server and client
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    96
//error code starts with -101 as predefined symbian codes
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    97
//range upto -48
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    98
enum TSecMgrErrCode
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
	ErrInvalidParameters = -101,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   101
	ErrFileSessionNotShared = ErrInvalidParameters -1,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   102
	ErrInvalidPolicyFormat = ErrFileSessionNotShared -1,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   103
	ErrFatalDBError = ErrInvalidPolicyFormat -1,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   104
	ErrSetPolicyFailed = ErrFatalDBError -1,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   105
	ErrUpdatePolicyFailed = ErrSetPolicyFailed -1,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   106
	ErrInvalidPolicyID = ErrUpdatePolicyFailed -1,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   107
	ErrPolicyIDDoesNotExist = ErrInvalidPolicyID -1,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   108
	ErrInvalidScriptID = ErrPolicyIDDoesNotExist -1,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   109
	ErrRegisterScriptFailed = ErrInvalidScriptID -1,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   110
	ErrUpdateGrantFailed = ErrRegisterScriptFailed -1,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   111
	ErrServerReadConfig = ErrUpdateGrantFailed -1,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   112
	ErrUnRegisterScriptFailed = ErrServerReadConfig -1,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   113
	ErrUnSetPolicyFailed = ErrUnRegisterScriptFailed -1,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   114
	ErrUpdatePermGrantFailed = ErrUnSetPolicyFailed -1,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   115
	ErrBackupNotCreated = ErrUpdatePermGrantFailed - 1,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   116
	ErrRestoreTempFailed = ErrBackupNotCreated - 1,
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   117
	ErrAccessDenied = ErrRestoreTempFailed - 1
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   118
	};
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   119
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   120
const TInt KAnonymousScript = -1;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   121
const TInt KInvalidPolicyID = -1;
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   122
const TInt KMaxTrustInfoLen = 512; //magic number - half of 1 KB
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   123
d2ab7c3d0c48 homescreenpluginsrv component compiles now
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   124
#endif  //_RTSECMGR_COMMON_DEF_H_