authenticationservices/authenticationserver/source/common/authserveripc.h
branchRCL_3
changeset 61 641f389e9157
parent 29 ece3df019add
equal deleted inserted replaced
60:f18401adf8e1 61:641f389e9157
       
     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 * Authserver - shared client/server definitions
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 /**
       
    21  @file 
       
    22  @internalComponent
       
    23  @released
       
    24 */
       
    25 
       
    26 #ifndef AUTHSERVERCLIENTSERVER_H
       
    27 #define AUTHSERVERCLIENTSERVER_H
       
    28 
       
    29 #include <e32std.h>
       
    30 
       
    31 namespace AuthServer
       
    32 {
       
    33 _LIT(KAuthServerName,"!AuthServer");    // name to connect to
       
    34 _LIT(KAuthServerImg, "AuthServer");		// DLL/EXE name
       
    35 _LIT(KAuthServerShortName, "AuthServer");	    // name used for identication when panicking 
       
    36                                                 // clients  - has to be less than 16 bytes
       
    37 
       
    38 const TInt KMaxAuthServerMessage	=100;
       
    39 const TInt KDefaultBufferSize		=2048;
       
    40 
       
    41 enum TAuthServerMessages
       
    42     {
       
    43 	/////////////////////////////////////////////////////////////////
       
    44 	ERequireNoCapabilities = 0x100,
       
    45 
       
    46 	ECancel,                     		///< cancel current async operation
       
    47 	EPlugins,                     		///< return all plugins
       
    48 	EActivePlugins,               		///< return active plugins only
       
    49 	EPluginsByType,               		///< return plugins matching a type
       
    50 	EPluginsByTraining,           		///< return plugins matching a training
       
    51 								  		///< status
       
    52 	EDeauthenticate,              		///< deauthenticate the current user
       
    53 	EGetAuthPreferences,          		///< get a plugin type to plugin mapping
       
    54 	EListAuthAliases,	  				///< get the list of available authentication aliases.				
       
    55 	EResolveExpression,					///< resolve any alias definitions in the auth expression string.
       
    56 	
       
    57 	/////////////////////////////////////////////////////////////////
       
    58 	ERequireReadUserData = 0x200,
       
    59 	
       
    60 	EIdentityString,              ///< return the given identity's description 
       
    61  
       
    62 	/////////////////////////////////////////////////////////////////
       
    63 	ERequireWriteUserData = 0x300,
       
    64 
       
    65 	ESetIdentityString,           ///< set the description for an identity
       
    66 	ETrainPlugin,				  ///< train a plugin for an identity
       
    67 	EForgetPlugin,				  ///< forget identity training data
       
    68 
       
    69 	/////////////////////////////////////////////////////////////////
       
    70 	ERequireReadDeviceData = 0x400,
       
    71 
       
    72 	EIdentities,                  ///< return a list of identity numbers
       
    73 
       
    74 	/////////////////////////////////////////////////////////////////
       
    75 	ERequireWriteDeviceData = 0x500,
       
    76 	ERemoveIdentity,			  ///< remove an identity
       
    77 	ESetAuthPreferences,          ///< set a plugin type to plugin mapping
       
    78 	ESetPreferredPlugin,          ///< set the default plugin to use
       
    79 	EResetIdentity,				  ///< reset identity for all registered plugins
       
    80 	EResetIdentityByType,		  ///< reset identity for given plugin type
       
    81 	EResetIdentityByList,		  ///< reset identity for given list of plugins
       
    82 	
       
    83 	/////////////////////////////////////////////////////////////////
       
    84 	ERequireTrustedUi = 0x600,
       
    85 
       
    86 	ERegisterIdentity,            ///< register a new identity
       
    87 
       
    88 	/////////////////////////////////////////////////////////////////
       
    89 	ERequireReadDeviceAndUserData = 0x700,
       
    90 
       
    91 	EIdentitiesWithString,
       
    92 	
       
    93 	////////////////////////////////////////////////////////////////
       
    94 	ERequireCustomCheck = 0x800,
       
    95 	
       
    96 	EAuthenticate,
       
    97 	
       
    98 	ELastService = 0x900,
       
    99 	};
       
   100 
       
   101 /**
       
   102  * Aggregates the parameters to the RAuthClient::AuthenticateL ipc call.
       
   103  *
       
   104  **/
       
   105 class CAuthParams : public CBase
       
   106     {
       
   107     
       
   108 public:
       
   109 	IMPORT_C static CAuthParams* NewL(TTimeIntervalSeconds aTimeout,
       
   110 									  TBool aClientKey,
       
   111 									  TUid  aClientSid,
       
   112 									  TBool aWithString,
       
   113 									  const TDesC& aClientMessage);
       
   114 	
       
   115 	
       
   116 	IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
       
   117 	
       
   118 	IMPORT_C void InternalizeL(RReadStream& aStream);
       
   119 	
       
   120 	~CAuthParams();
       
   121 	
       
   122 private:
       
   123 	CAuthParams(TTimeIntervalSeconds aTimeout,
       
   124 				TBool aClientKey,
       
   125 				TUid  aClientSid,
       
   126 	    		TBool aWithString);
       
   127 		
       
   128     void ConstructL(const TDesC& aClientMessage);
       
   129     
       
   130 public:    
       
   131 	TTimeIntervalSeconds iTimeout;
       
   132 	TBool                iClientKey;
       
   133 	TUid				 iClientSid;
       
   134 	TBool                iWithString;
       
   135 	HBufC*				 iClientMessage;
       
   136 };
       
   137 
       
   138 } //namespace
       
   139 #endif