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: * CIdentity declaration 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 IDENTITY_H williamr@4: #define IDENTITY_H williamr@4: williamr@4: #include "authserver/authtypes.h" williamr@4: #include "authserver/protectionkey.h" williamr@4: williamr@4: namespace AuthServer williamr@4: { williamr@4: /** williamr@4: * CIdentity is an client side class of the authentication server. williamr@4: * CIdentity is returned as the result of an authentication. williamr@4: * williamr@4: */ williamr@4: class CIdentity : public CBase williamr@4: { williamr@4: public: williamr@4: williamr@4: IMPORT_C static CIdentity* NewL(TIdentityId aId, williamr@4: CProtectionKey* aKey, williamr@4: HBufC* aString); williamr@4: williamr@4: IMPORT_C static CIdentity* NewLC(TIdentityId aId, williamr@4: CProtectionKey* aKey, williamr@4: HBufC* aString); williamr@4: williamr@4: IMPORT_C static CIdentity* NewL(RReadStream& aStream); williamr@4: IMPORT_C static CIdentity* NewLC(RReadStream& aStream); williamr@4: williamr@4: virtual ~CIdentity(); williamr@4: williamr@4: IMPORT_C TIdentityId Id() const; williamr@4: williamr@4: IMPORT_C const CProtectionKey& Key() const; williamr@4: williamr@4: IMPORT_C TDesC& String() const; williamr@4: williamr@4: IMPORT_C void ExternalizeL(RWriteStream& s) const; williamr@4: IMPORT_C static CIdentity* InternalizeL(RReadStream& s); williamr@4: williamr@4: private: williamr@4: void ConstructL(CProtectionKey* aKey, williamr@4: HBufC* aString); williamr@4: williamr@4: CIdentity(TIdentityId aId); williamr@4: williamr@4: private: williamr@4: TIdentityId iId; williamr@4: CProtectionKey* iKey; williamr@4: HBufC* iString; williamr@4: }; williamr@4: } williamr@4: williamr@4: #endif // IDENTITY_H