epoc32/include/authserver/identity.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@4
     1
/*
williamr@4
     2
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@4
     3
* All rights reserved.
williamr@4
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of the License "Eclipse Public License v1.0"
williamr@4
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@4
     8
*
williamr@4
     9
* Initial Contributors:
williamr@4
    10
* Nokia Corporation - initial contribution.
williamr@4
    11
*
williamr@4
    12
* Contributors:
williamr@4
    13
*
williamr@4
    14
* Description: 
williamr@4
    15
* CIdentity declaration
williamr@4
    16
*
williamr@4
    17
*/
williamr@4
    18
williamr@4
    19
williamr@4
    20
/**
williamr@4
    21
 @file 
williamr@4
    22
 @publishedAll
williamr@4
    23
 @released
williamr@4
    24
*/
williamr@4
    25
williamr@4
    26
#ifndef IDENTITY_H
williamr@4
    27
#define IDENTITY_H
williamr@4
    28
williamr@4
    29
#include "authserver/authtypes.h"
williamr@4
    30
#include "authserver/protectionkey.h"
williamr@4
    31
williamr@4
    32
namespace AuthServer
williamr@4
    33
{
williamr@4
    34
/**
williamr@4
    35
 * CIdentity is an client side class of the authentication server. 
williamr@4
    36
 * CIdentity is returned as the result of an authentication.
williamr@4
    37
 * 
williamr@4
    38
 */
williamr@4
    39
class CIdentity : public CBase
williamr@4
    40
	{
williamr@4
    41
public:
williamr@4
    42
williamr@4
    43
    IMPORT_C static CIdentity* NewL(TIdentityId aId,
williamr@4
    44
									CProtectionKey* aKey,
williamr@4
    45
									HBufC* aString);
williamr@4
    46
	
williamr@4
    47
    IMPORT_C static CIdentity* NewLC(TIdentityId aId,
williamr@4
    48
									 CProtectionKey* aKey,
williamr@4
    49
									 HBufC* aString);
williamr@4
    50
	
williamr@4
    51
    IMPORT_C static CIdentity* NewL(RReadStream& aStream);
williamr@4
    52
    IMPORT_C static CIdentity* NewLC(RReadStream& aStream);
williamr@4
    53
    
williamr@4
    54
	virtual ~CIdentity();
williamr@4
    55
williamr@4
    56
	IMPORT_C TIdentityId Id() const;
williamr@4
    57
williamr@4
    58
	IMPORT_C const CProtectionKey& Key() const;
williamr@4
    59
williamr@4
    60
	IMPORT_C TDesC& String() const;
williamr@4
    61
	
williamr@4
    62
	IMPORT_C void ExternalizeL(RWriteStream& s) const;
williamr@4
    63
	IMPORT_C static CIdentity* InternalizeL(RReadStream& s);
williamr@4
    64
williamr@4
    65
private:
williamr@4
    66
	void ConstructL(CProtectionKey* aKey,
williamr@4
    67
					HBufC* aString);
williamr@4
    68
	
williamr@4
    69
	CIdentity(TIdentityId aId);
williamr@4
    70
williamr@4
    71
private:
williamr@4
    72
    TIdentityId           iId;
williamr@4
    73
    CProtectionKey* iKey;
williamr@4
    74
	HBufC*                iString;
williamr@4
    75
	};
williamr@4
    76
}
williamr@4
    77
williamr@4
    78
#endif // IDENTITY_H