1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/authserver/identity.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,78 @@
1.4 +/*
1.5 +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +* CIdentity declaration
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +/**
1.24 + @file
1.25 + @publishedAll
1.26 + @released
1.27 +*/
1.28 +
1.29 +#ifndef IDENTITY_H
1.30 +#define IDENTITY_H
1.31 +
1.32 +#include "authserver/authtypes.h"
1.33 +#include "authserver/protectionkey.h"
1.34 +
1.35 +namespace AuthServer
1.36 +{
1.37 +/**
1.38 + * CIdentity is an client side class of the authentication server.
1.39 + * CIdentity is returned as the result of an authentication.
1.40 + *
1.41 + */
1.42 +class CIdentity : public CBase
1.43 + {
1.44 +public:
1.45 +
1.46 + IMPORT_C static CIdentity* NewL(TIdentityId aId,
1.47 + CProtectionKey* aKey,
1.48 + HBufC* aString);
1.49 +
1.50 + IMPORT_C static CIdentity* NewLC(TIdentityId aId,
1.51 + CProtectionKey* aKey,
1.52 + HBufC* aString);
1.53 +
1.54 + IMPORT_C static CIdentity* NewL(RReadStream& aStream);
1.55 + IMPORT_C static CIdentity* NewLC(RReadStream& aStream);
1.56 +
1.57 + virtual ~CIdentity();
1.58 +
1.59 + IMPORT_C TIdentityId Id() const;
1.60 +
1.61 + IMPORT_C const CProtectionKey& Key() const;
1.62 +
1.63 + IMPORT_C TDesC& String() const;
1.64 +
1.65 + IMPORT_C void ExternalizeL(RWriteStream& s) const;
1.66 + IMPORT_C static CIdentity* InternalizeL(RReadStream& s);
1.67 +
1.68 +private:
1.69 + void ConstructL(CProtectionKey* aKey,
1.70 + HBufC* aString);
1.71 +
1.72 + CIdentity(TIdentityId aId);
1.73 +
1.74 +private:
1.75 + TIdentityId iId;
1.76 + CProtectionKey* iKey;
1.77 + HBufC* iString;
1.78 + };
1.79 +}
1.80 +
1.81 +#endif // IDENTITY_H