bluetooth/btsdp/server/SdpServerSecurityPolicy.h
changeset 0 29b1cd4cb562
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     1 // Copyright (c) 2004-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 // SDP Server Security Policy definitions for Platform security.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file 
       
    20  @internalComponent
       
    21 */
       
    22  
       
    23 #if !defined(__SDPSERVERSECURITYPOLICY_H__)
       
    24 #define __SDPSERVERSECURITYPOLICY_H__
       
    25 /** SDP Server Security Policy Definition */
       
    26 const TUint KSdpServerRangeCount = 3;
       
    27 
       
    28 /** Ranges Note that if a message is added to the list of Enums the 
       
    29 last range must be modifed to the last enum + 1*/
       
    30 const TInt KSdpServerRanges[KSdpServerRangeCount] = 
       
    31 	{
       
    32     ESdpCreateDatabaseSubSession, /** LocalService */
       
    33 	ESdpCreateAgentSubSession,	/** none */	
       
    34 	ESdpServerDbgFailNext + 1, /** fail (to KMaxTInt) */
       
    35 	};
       
    36 
       
    37 /** Index numbers into KSdpServerElements[] */
       
    38 const TInt KPolicyLocalServices = 0;
       
    39 const TInt KPolicyPass = 1;
       
    40 
       
    41 /**Mapping IPCs to poicy element */
       
    42 const TUint8 KSdpServerElementsIndex[KSdpServerRangeCount] = 
       
    43 	{
       
    44    	KPolicyLocalServices, /**	ESdpCreateDatabaseSubSession */
       
    45 
       
    46    	KPolicyPass,  	/**ESdpCreateAgentSubSession */
       
    47 					/**ESdpCloseSubSession*/
       
    48 					/**ESdpResourceCountMarkStart*/
       
    49 					/**ESdpResourceCountMarkEnd*/
       
    50 					/**ESdpResourceCount*/
       
    51 					/**ESdpCancelRequest*/
       
    52 					/**ESdpServiceSearch*/
       
    53 					/**ESdpAttributeSearch*/
       
    54 					/**ESdpServiceAttributeSearch*/
       
    55 					/**ESdpDatabaseCreateServiceRecord*/
       
    56 					/**ESdpDatabaseUpdateServiceRecordHandle*/
       
    57 					/**ESdpDatabaseUpdateAttribute*/
       
    58 					/**ESdpDatabaseDeleteAttribute*/
       
    59 					/**ESdpDatabaseDeleteServiceRecord*/
       
    60 					/**ESdpServerDbgMarkHeap*/
       
    61 					/**ESdpServerDbgCheckHeap*/
       
    62 					/**ESdpServerDbgMarkEnd*/
       
    63 					/**ESdpServerDbgFailNext*/
       
    64 	CPolicyServer::ENotSupported /** ESdpDatabaseDeleteServiceRecord + 1 to KMaxTInt */		 
       
    65 				
       
    66 	};
       
    67 
       
    68 /** Individual policy elements */
       
    69 const CPolicyServer::TPolicyElement KSdpServerElements[] = 
       
    70 	{
       
    71 		/** the EFailClient means that the if the check fails the CheckFailed method with 
       
    72 		return KErrPermissionDenied */
       
    73   		{ _INIT_SECURITY_POLICY_C1(ECapabilityLocalServices), CPolicyServer::EFailClient },
       
    74   		{ _INIT_SECURITY_POLICY_PASS },
       
    75 	};
       
    76 
       
    77 /** Main policy */
       
    78 const CPolicyServer::TPolicy KSdpServerPolicy = 
       
    79 	{
       
    80 	KPolicyLocalServices, /** Specifies connect attempts require local services */
       
    81 	KSdpServerRangeCount,
       
    82 	KSdpServerRanges,
       
    83 	KSdpServerElementsIndex,
       
    84 	KSdpServerElements,
       
    85 
       
    86 	};
       
    87 #endif //__SDPSERVERSECURITYPOLICY_H__