smf/smfcredentialmgr/smfcredmgrserver/inc/smfcredmgrserver.h
changeset 14 a469c0e6e7fb
child 18 013a02bf2bb0
equal deleted inserted replaced
13:b5d63d5fc252 14:a469c0e6e7fb
       
     1 /**
       
     2  * Copyright (c) 2010 Sasken Communication Technologies Ltd.
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of the "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  * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
       
    11  *
       
    12  * Description:
       
    13  * Header file for Credential Manager Server.
       
    14  */
       
    15 #ifndef __SMFCREDMGRSERVER_H__
       
    16 #define __SMFCREDMGRSERVER_H__
       
    17 
       
    18 //  Include Files
       
    19 
       
    20 #include <e32base.h>
       
    21 
       
    22 class CSmfCredMgrDb;
       
    23 
       
    24 //  Function Prototypes
       
    25 
       
    26 GLDEF_C TInt E32Main();
       
    27 
       
    28 // ----------------------------------------------------------------------------------------
       
    29 // Server's policy
       
    30 // ----------------------------------------------------------------------------------------
       
    31 static const TUint rangeCount = 1;
       
    32 static const TInt ranges[rangeCount] =
       
    33 	{
       
    34 	0
       
    35 	};
       
    36 static const TUint8 elementsIndex[rangeCount] =
       
    37 	{
       
    38 	CPolicyServer::EAlwaysPass
       
    39 	};
       
    40 static const CPolicyServer::TPolicy policy =
       
    41 	{
       
    42 	CPolicyServer::EAlwaysPass, //specifies all connect attempts should pass
       
    43 			rangeCount,
       
    44 			ranges,
       
    45 			elementsIndex,
       
    46 			NULL
       
    47 	};
       
    48 
       
    49 /**
       
    50  * Class for Credential Manager Server.
       
    51  *  Derives from CPolicyServer.
       
    52  */
       
    53 class CSmfCredMgrServer : public CPolicyServer
       
    54 	{
       
    55 public:
       
    56 	/**
       
    57 	 * New Methods
       
    58 	 */
       
    59 	static CSmfCredMgrServer * NewL();
       
    60 	static CSmfCredMgrServer* NewLC();
       
    61 
       
    62 	/**
       
    63 	 * destructor
       
    64 	 */
       
    65 	~CSmfCredMgrServer();
       
    66 
       
    67 	/**
       
    68 	 * Creates a server-side session object.The session represents a 
       
    69 	 * communication link between a client and a server, and its creation 
       
    70 	 * is initiated by the client through a call to one of the 
       
    71 	 * RSessionBase::CreateSession() variants.
       
    72 	 */
       
    73 	CSession2
       
    74 			* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
       
    75 
       
    76 private:
       
    77 	/**
       
    78 	 * constructor
       
    79 	 */
       
    80 	CSmfCredMgrServer();
       
    81 
       
    82 	/**
       
    83 	 * Two-phase constructor
       
    84 	 */
       
    85 	void ConstructL();
       
    86 
       
    87 private:
       
    88 	CSmfCredMgrDb* iDbCreator;
       
    89 	};
       
    90 
       
    91 #endif  // __SMFCREDMGRSERVER_H__