sl@0: // Copyright (c) 2005-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: // sl@0: sl@0: #ifndef __LOGSERVSECURITY_H__ sl@0: #define __LOGSERVSECURITY_H__ sl@0: sl@0: #include sl@0: sl@0: class RMessage2; sl@0: class CLogServResourceInterpreter; sl@0: sl@0: /** sl@0: The enum declares two basic types of operations performed on LogEngServer events sl@0: and their data - "read" and "write". Every time when a client tries to execute sl@0: "read" and "write" operation for a specified event type, its capabilities have sl@0: to be asserted against a predefined set of read/write capabilities for that event type. sl@0: @internalComponent sl@0: */ sl@0: enum TEventOp sl@0: { sl@0: EReadOp, sl@0: EWriteOp sl@0: }; sl@0: sl@0: /** sl@0: This class manages security info against which client requests can be checked sl@0: for the necessary capabilities. An instance of this class is created in sl@0: CLogServServer::ConstructL(). The security settings are defined in logwrap.rss sl@0: - see the sections entitled 'r_log_security' and 'r_log_initial_events'. sl@0: @internalComponent sl@0: */ sl@0: class CLogServSecurity : public CBase sl@0: { sl@0: public: sl@0: static CLogServSecurity* NewL(CLogServResourceInterpreter& aResourceInterface); sl@0: virtual ~CLogServSecurity(); sl@0: virtual TBool IsAllowed(const RMessage2& aMsg, sl@0: TUid aEventType, sl@0: TEventOp aEventOp, const char* aDiagnostic) = 0; sl@0: sl@0: #ifdef LOGSERV_CAPABILITY_TEST sl@0: virtual TSecurityPolicy SecurityPolicy(TUid aEventType, TEventOp aEventOp) = 0; sl@0: #endif //LOGSERV_CAPABILITY_TEST sl@0: }; sl@0: sl@0: #endif //__LOGSERVSECURITY_H__