os/persistentdata/loggingservices/eventlogger/LogServ/inc/logservsecurity.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/loggingservices/eventlogger/LogServ/inc/logservsecurity.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,58 @@
     1.4 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __LOGSERVSECURITY_H__
    1.20 +#define __LOGSERVSECURITY_H__
    1.21 +
    1.22 +#include <e32base.h>
    1.23 +
    1.24 +class RMessage2;
    1.25 +class CLogServResourceInterpreter;
    1.26 +
    1.27 +/**
    1.28 +The enum declares two basic types of operations performed on LogEngServer events
    1.29 +and their data - "read" and "write". Every time when a client tries to execute 
    1.30 +"read" and "write" operation for a specified event type, its capabilities have
    1.31 +to be asserted against a predefined set of read/write capabilities for that event type.
    1.32 +@internalComponent
    1.33 +*/
    1.34 +enum TEventOp 
    1.35 +	{
    1.36 +	EReadOp, 
    1.37 +	EWriteOp
    1.38 +	};
    1.39 +
    1.40 +/**
    1.41 +This class manages security info against which client requests can be checked 
    1.42 +for the necessary capabilities.  An instance of this class is created in 
    1.43 +CLogServServer::ConstructL().  The security settings are defined in logwrap.rss
    1.44 +- see the sections entitled 'r_log_security' and 'r_log_initial_events'.
    1.45 +@internalComponent
    1.46 +*/
    1.47 +class CLogServSecurity : public CBase
    1.48 +	{
    1.49 +public:		
    1.50 +	static CLogServSecurity* NewL(CLogServResourceInterpreter& aResourceInterface);
    1.51 +	virtual ~CLogServSecurity();		
    1.52 +	virtual TBool IsAllowed(const RMessage2& aMsg, 
    1.53 +							TUid aEventType,
    1.54 +							TEventOp aEventOp, const char* aDiagnostic) = 0;
    1.55 +
    1.56 +#ifdef LOGSERV_CAPABILITY_TEST
    1.57 +	virtual TSecurityPolicy SecurityPolicy(TUid aEventType, TEventOp aEventOp) = 0;
    1.58 +#endif //LOGSERV_CAPABILITY_TEST
    1.59 +	};
    1.60 +		
    1.61 +#endif //__LOGSERVSECURITY_H__