authenticationservices/authenticationserver/source/server/authserversession.h
changeset 29 ece3df019add
equal deleted inserted replaced
19:cd501b96611d 29:ece3df019add
       
     1 /*
       
     2 * Copyright (c) 2005-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 * CAuthServerSession class definition
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 /**
       
    21  @file 
       
    22  @released
       
    23  @internalComponent
       
    24 */
       
    25 #ifndef AUTHSERVERSESSION_H
       
    26 #define AUTHSERVERSESSION_H
       
    27 
       
    28 #include "authserver.h"
       
    29 #include <authserver/auth_srv_errs.h>
       
    30 #include <scs/scsserver.h>
       
    31 
       
    32 namespace AuthServer
       
    33 {
       
    34 
       
    35 /**
       
    36  * This enum is used to make IPC indexes used as arguments in function calls
       
    37  * less obscure.
       
    38  * @internalComponent
       
    39  * @released
       
    40  */
       
    41 enum TIpcIndexes
       
    42 	{
       
    43 	EIpcArgument0 = 0,  ///< IPC indexes arguments 0
       
    44 	EIpcArgument1,      ///< IPC indexes arguments 1
       
    45 	EIpcArgument2,      ///< IPC indexes arguments 2
       
    46 	EIpcArgument3       ///< IPC indexes arguments 3
       
    47 	};
       
    48 
       
    49 
       
    50 /**
       
    51  * @internalComponent
       
    52  * @released
       
    53  */
       
    54 class CAuthServerSession : public CScsSession
       
    55 	{
       
    56 public:
       
    57 	void CreateL();
       
    58 	static CAuthServerSession* NewL(CAuthServer &aServer);
       
    59 private:
       
    60 	~CAuthServerSession();
       
    61 	
       
    62 	/**
       
    63 	 * Handle a client request.
       
    64 	 * Leaving is handled by CAuthServer::ServiceError() which reports
       
    65 	 * the error code to the client
       
    66 	 **/
       
    67 	TBool DoServiceL(TInt aFunction, const RMessage2& aMessage);
       
    68 	
       
    69 	/**
       
    70 	 * Handle an error from CAuthServerSession::ServiceL().
       
    71 	 * A bad descriptor error implies a badly programmed client, so panic it;
       
    72 	 * otherwise use the default handling (report the error to the client)
       
    73 	 **/
       
    74 	void ServiceError(const RMessage2& aMessage,TInt aError);
       
    75 
       
    76  	void PanicClient(const RMessagePtr2& aMessage, TAuthServerPanic aPanic);
       
    77 
       
    78  	CAuthServerSession(CAuthServer &aServer);
       
    79  	
       
    80 	CAuthServer* iAuthServer; 
       
    81 	};
       
    82 	
       
    83 	
       
    84 } //namespace
       
    85 
       
    86 #endif // AUTHSERVERSESSION_H