sl@0: /* sl@0: * Copyright (c) 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 the License "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: * Server-side classes which are used to implement the SecSettings server. sl@0: * sl@0: */ sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @internalComponent sl@0: @released sl@0: */ sl@0: #ifndef SECSETTINGSSERVER_H sl@0: #define SECSETTINGSSERVER_H sl@0: sl@0: #include sl@0: #include sl@0: #include "secsettingscommon.h" sl@0: sl@0: sl@0: namespace SecuritySettingsServer sl@0: { sl@0: sl@0: inline TVersion Version(); sl@0: sl@0: // forward declarations sl@0: class CSecSettingsServer; sl@0: sl@0: sl@0: class CSecSettingsSession : public CScsSession sl@0: /** sl@0: This session object is used to generate sessions for the client sl@0: which wants to access the SecSettings Server. sl@0: */ sl@0: { sl@0: public: sl@0: static CSecSettingsSession* NewL(CSecSettingsServer &aServer); sl@0: virtual ~CSecSettingsSession(); sl@0: sl@0: // implement CScsSession sl@0: virtual TBool DoServiceL(TInt aFunction, const RMessage2& aMessage); sl@0: sl@0: inline CSecSettingsServer *SecSettingsServer(); sl@0: sl@0: private: sl@0: CSecSettingsSession(CSecSettingsServer &aServer); sl@0: }; sl@0: sl@0: sl@0: sl@0: class CSecSettingsServer : public CScsServer sl@0: /** sl@0: A single instance of this object is used to generate server-side sl@0: sessions for the SecSettings client. sl@0: */ sl@0: { sl@0: public: sl@0: static CSecSettingsServer* NewLC(); sl@0: virtual ~CSecSettingsServer(); sl@0: sl@0: // implement CScsServer sl@0: virtual CScsSession* DoNewSessionL(const RMessage2& aMessage); sl@0: sl@0: private: sl@0: CSecSettingsServer(); sl@0: void ConstructL(); sl@0: }; sl@0: sl@0: // sl@0: // Inline functions sl@0: // sl@0: inline CSecSettingsServer *CSecSettingsSession::SecSettingsServer() sl@0: { sl@0: // Calls base class function and cast to correct type. sl@0: return &static_cast(iServer); sl@0: } sl@0: sl@0: } // End of namespace SecuritySettingsServer sl@0: sl@0: sl@0: #endif // #ifndef SECSETTINGSSERVER_H sl@0: