williamr@4: /* williamr@4: * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@4: * All rights reserved. williamr@4: * This component and the accompanying materials are made available williamr@4: * under the terms of the License "Eclipse Public License v1.0" williamr@4: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@4: * williamr@4: * Initial Contributors: williamr@4: * Nokia Corporation - initial contribution. williamr@4: * williamr@4: * Contributors: williamr@4: * williamr@4: * Description: williamr@4: * RAuthclient - external authentication client session interface williamr@4: * The defined fuctionality is used by clients to access the authentication williamr@4: * server. williamr@4: * The access to a specific functionality is dependant on the client williamr@4: * capabilities and may be restricted. williamr@4: * williamr@4: */ williamr@4: williamr@4: williamr@4: /** williamr@4: @file williamr@4: @publishedAll williamr@4: @released williamr@4: */ williamr@4: williamr@4: #ifndef AUTHCLIENT_H williamr@4: #define AUTHCLIENT_H williamr@4: williamr@4: #include "authserver/identity.h" williamr@4: #include "authserver/authexpression.h" williamr@4: #include "authserver/plugindesc.h" williamr@4: #include "authserver/idandstring.h" williamr@4: #include williamr@4: namespace AuthServer williamr@4: { williamr@4: williamr@4: class CAsyncResponseDecoder; williamr@4: williamr@4: /** williamr@4: * Client side interface to the authentication server providing general williamr@4: * authentication and plugin query services. williamr@4: * williamr@4: */ williamr@4: class RAuthClient : public RScsClientBase williamr@4: { williamr@4: williamr@4: friend class CAsyncResponseDecoder; williamr@4: williamr@4: public: williamr@4: williamr@4: IMPORT_C RAuthClient(); williamr@4: williamr@4: IMPORT_C TInt Connect(); williamr@4: williamr@4: IMPORT_C void AuthenticateL( williamr@4: const CAuthExpression& aExpression, williamr@4: TTimeIntervalSeconds aTimeout, williamr@4: TBool aClientSpecificKey, williamr@4: TBool aWithString, williamr@4: CIdentity*& aIdentityResult, williamr@4: TRequestStatus& aStatus); williamr@4: williamr@4: IMPORT_C CIdentity* AuthenticateL( williamr@4: const CAuthExpression& aExpression, williamr@4: TTimeIntervalSeconds aTimeout, williamr@4: TBool aClientSpecificKey, williamr@4: TBool aWithString); williamr@4: williamr@4: IMPORT_C CIdentity* AuthenticateL( williamr@4: const CAuthExpression& aAuthExpression, williamr@4: TTimeIntervalSeconds aTimeout, williamr@4: TBool aClientSpecificKey, williamr@4: TUid aClientSid, williamr@4: TBool aWithString, williamr@4: const TDesC& aClientMessage); williamr@4: williamr@4: IMPORT_C void AuthenticateL( williamr@4: const CAuthExpression& aAuthExpression, williamr@4: TTimeIntervalSeconds aTimeout, williamr@4: TBool aClientSpecificKey, williamr@4: TUid aClientSid, williamr@4: TBool aWithString, williamr@4: const TDesC& aClientMessage, williamr@4: CIdentity*& aIdentityResult, williamr@4: TRequestStatus& aStatus williamr@4: ); williamr@4: williamr@4: IMPORT_C void DeauthenticateL(); williamr@4: williamr@4: IMPORT_C void PluginsL(RPluginDescriptions& aPluginList); williamr@4: IMPORT_C void ActivePluginsL(RPluginDescriptions& aPluginList); williamr@4: IMPORT_C void PluginsOfTypeL(TAuthPluginType aType, williamr@4: RPluginDescriptions& aPluginList); williamr@4: williamr@4: IMPORT_C void PluginsWithTrainingStatusL( williamr@4: TAuthTrainingStatus aStatus, williamr@4: RPluginDescriptions& aPluginList); williamr@4: williamr@4: IMPORT_C void IdentitiesL(RIdentityIdArray& aIdList); williamr@4: IMPORT_C void IdentitiesWithStringL(RIdAndStringArray& aList); williamr@4: williamr@4: IMPORT_C HBufC* IdentityStringL(TIdentityId aId); williamr@4: IMPORT_C void SetIdentityStringL(TIdentityId aId, const TDesC& aString); williamr@4: williamr@4: IMPORT_C TPluginId PreferredTypePluginL(TAuthPluginType aPluginType); williamr@4: williamr@4: IMPORT_C TUint Cancel(); williamr@4: IMPORT_C void Close(); williamr@4: williamr@4: IMPORT_C void ListAuthAliasesL(RPointerArray& aAuthAliasList); williamr@4: williamr@4: IMPORT_C CAuthExpression* CreateAuthExpressionL(const TDesC& aAuthString) const; williamr@4: williamr@4: protected: williamr@4: /* @internalComponent */ williamr@4: void CheckAsyncDecoderL(); williamr@4: /* @internalComponent */ williamr@4: HBufC8* SendReceiveBufferLC(TInt aMessage); williamr@4: /* @internalComponent */ williamr@4: HBufC8* SendReceiveBufferLC(TInt aMessage, TIpcArgs& aArgs); williamr@4: williamr@4: private: williamr@4: TInt StartAuthServer(); williamr@4: williamr@4: protected: williamr@4: CAsyncResponseDecoder* iAsyncResponseDecoder; williamr@4: }; williamr@4: williamr@4: } // namespace williamr@4: #endif williamr@4: