loggingservices/eventlogger/LogServ/inc/logservsecurity.h
changeset 0 08ec8eefde2f
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     1 // Copyright (c) 2005-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 //
       
    15 
       
    16 #ifndef __LOGSERVSECURITY_H__
       
    17 #define __LOGSERVSECURITY_H__
       
    18 
       
    19 #include <e32base.h>
       
    20 
       
    21 class RMessage2;
       
    22 class CLogServResourceInterpreter;
       
    23 
       
    24 /**
       
    25 The enum declares two basic types of operations performed on LogEngServer events
       
    26 and their data - "read" and "write". Every time when a client tries to execute 
       
    27 "read" and "write" operation for a specified event type, its capabilities have
       
    28 to be asserted against a predefined set of read/write capabilities for that event type.
       
    29 @internalComponent
       
    30 */
       
    31 enum TEventOp 
       
    32 	{
       
    33 	EReadOp, 
       
    34 	EWriteOp
       
    35 	};
       
    36 
       
    37 /**
       
    38 This class manages security info against which client requests can be checked 
       
    39 for the necessary capabilities.  An instance of this class is created in 
       
    40 CLogServServer::ConstructL().  The security settings are defined in logwrap.rss
       
    41 - see the sections entitled 'r_log_security' and 'r_log_initial_events'.
       
    42 @internalComponent
       
    43 */
       
    44 class CLogServSecurity : public CBase
       
    45 	{
       
    46 public:		
       
    47 	static CLogServSecurity* NewL(CLogServResourceInterpreter& aResourceInterface);
       
    48 	virtual ~CLogServSecurity();		
       
    49 	virtual TBool IsAllowed(const RMessage2& aMsg, 
       
    50 							TUid aEventType,
       
    51 							TEventOp aEventOp, const char* aDiagnostic) = 0;
       
    52 
       
    53 #ifdef LOGSERV_CAPABILITY_TEST
       
    54 	virtual TSecurityPolicy SecurityPolicy(TUid aEventType, TEventOp aEventOp) = 0;
       
    55 #endif //LOGSERV_CAPABILITY_TEST
       
    56 	};
       
    57 		
       
    58 #endif //__LOGSERVSECURITY_H__