cryptomgmtlibs/securityutils/inc/secsettingsserver.h
changeset 31 5b5ca9f4f7b4
equal deleted inserted replaced
30:cf642210ecb7 31:5b5ca9f4f7b4
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 * Server-side classes which are used to implement the SecSettings server.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 /**
       
    21  @file
       
    22  @internalComponent
       
    23  @released
       
    24 */
       
    25 #ifndef SECSETTINGSSERVER_H
       
    26 #define SECSETTINGSSERVER_H
       
    27 
       
    28 #include <f32file.h>
       
    29 #include <scs/scsserver.h>
       
    30 #include "secsettingscommon.h"
       
    31 
       
    32 
       
    33 namespace SecuritySettingsServer
       
    34 {
       
    35 
       
    36 inline TVersion Version();
       
    37 
       
    38 // forward declarations
       
    39 class CSecSettingsServer;
       
    40 
       
    41 
       
    42 class CSecSettingsSession : public CScsSession
       
    43 /**
       
    44 	This session object is used to generate sessions for the client
       
    45 	which wants to access the SecSettings Server.
       
    46  */
       
    47 	{
       
    48 public:
       
    49 	static CSecSettingsSession* NewL(CSecSettingsServer &aServer);
       
    50 	virtual ~CSecSettingsSession();
       
    51 
       
    52 	// implement CScsSession
       
    53 	virtual TBool DoServiceL(TInt aFunction, const RMessage2& aMessage);
       
    54 
       
    55 	inline CSecSettingsServer *SecSettingsServer();
       
    56 
       
    57 private:
       
    58 	CSecSettingsSession(CSecSettingsServer &aServer);
       
    59 	};
       
    60 
       
    61 
       
    62 
       
    63 class CSecSettingsServer : public CScsServer
       
    64 /**
       
    65 	A single instance of this object is used to generate server-side
       
    66 	sessions for the SecSettings client.
       
    67  */
       
    68 	{
       
    69 public:
       
    70 	static CSecSettingsServer* NewLC();
       
    71 	virtual ~CSecSettingsServer();
       
    72 
       
    73 	// implement CScsServer
       
    74 	virtual CScsSession* DoNewSessionL(const RMessage2& aMessage);	
       
    75 	
       
    76 private:
       
    77 	CSecSettingsServer();
       
    78 	void ConstructL();
       
    79 	};
       
    80 
       
    81 //
       
    82 // Inline functions
       
    83 //
       
    84 inline CSecSettingsServer *CSecSettingsSession::SecSettingsServer()
       
    85 	{
       
    86 	// Calls base class function and cast to correct type.
       
    87 	return &static_cast<CSecSettingsServer &>(iServer);
       
    88 	}
       
    89 
       
    90 } // End of namespace SecuritySettingsServer
       
    91 
       
    92 
       
    93 #endif	// #ifndef SECSETTINGSSERVER_H
       
    94