os/security/cryptomgmtlibs/securityutils/inc/secsettingsserver.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/cryptomgmtlibs/securityutils/inc/secsettingsserver.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,94 @@
     1.4 +/*
     1.5 +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +* Server-side classes which are used to implement the SecSettings server.
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +/**
    1.24 + @file
    1.25 + @internalComponent
    1.26 + @released
    1.27 +*/
    1.28 +#ifndef SECSETTINGSSERVER_H
    1.29 +#define SECSETTINGSSERVER_H
    1.30 +
    1.31 +#include <f32file.h>
    1.32 +#include <scs/scsserver.h>
    1.33 +#include "secsettingscommon.h"
    1.34 +
    1.35 +
    1.36 +namespace SecuritySettingsServer
    1.37 +{
    1.38 +
    1.39 +inline TVersion Version();
    1.40 +
    1.41 +// forward declarations
    1.42 +class CSecSettingsServer;
    1.43 +
    1.44 +
    1.45 +class CSecSettingsSession : public CScsSession
    1.46 +/**
    1.47 +	This session object is used to generate sessions for the client
    1.48 +	which wants to access the SecSettings Server.
    1.49 + */
    1.50 +	{
    1.51 +public:
    1.52 +	static CSecSettingsSession* NewL(CSecSettingsServer &aServer);
    1.53 +	virtual ~CSecSettingsSession();
    1.54 +
    1.55 +	// implement CScsSession
    1.56 +	virtual TBool DoServiceL(TInt aFunction, const RMessage2& aMessage);
    1.57 +
    1.58 +	inline CSecSettingsServer *SecSettingsServer();
    1.59 +
    1.60 +private:
    1.61 +	CSecSettingsSession(CSecSettingsServer &aServer);
    1.62 +	};
    1.63 +
    1.64 +
    1.65 +
    1.66 +class CSecSettingsServer : public CScsServer
    1.67 +/**
    1.68 +	A single instance of this object is used to generate server-side
    1.69 +	sessions for the SecSettings client.
    1.70 + */
    1.71 +	{
    1.72 +public:
    1.73 +	static CSecSettingsServer* NewLC();
    1.74 +	virtual ~CSecSettingsServer();
    1.75 +
    1.76 +	// implement CScsServer
    1.77 +	virtual CScsSession* DoNewSessionL(const RMessage2& aMessage);	
    1.78 +	
    1.79 +private:
    1.80 +	CSecSettingsServer();
    1.81 +	void ConstructL();
    1.82 +	};
    1.83 +
    1.84 +//
    1.85 +// Inline functions
    1.86 +//
    1.87 +inline CSecSettingsServer *CSecSettingsSession::SecSettingsServer()
    1.88 +	{
    1.89 +	// Calls base class function and cast to correct type.
    1.90 +	return &static_cast<CSecSettingsServer &>(iServer);
    1.91 +	}
    1.92 +
    1.93 +} // End of namespace SecuritySettingsServer
    1.94 +
    1.95 +
    1.96 +#endif	// #ifndef SECSETTINGSSERVER_H
    1.97 +