Telephony/ctsydispatchlayer/exportinc/cphonebookentry.h
author Tom Pritchard <tomp@symbian.org>
Thu, 12 Aug 2010 13:20:01 +0100
changeset 21 ab1d0f4d2aa4
permissions -rw-r--r--
Adding the "WishList" state Telephony APIs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
     1
// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
     2
// All rights reserved.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
     3
// This component and the accompanying materials are made available
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
     5
// which accompanies this distribution, and is available
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
     7
//
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
     8
// Initial Contributors:
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    10
//
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    11
// Contributors:
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    12
//
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    13
// Description:
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    14
//
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    15
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    16
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    17
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    18
/**
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    19
 @file
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    20
 @internalAll 
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    21
*/
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    22
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    23
#ifndef CPHONEBOOKENTRY_H_
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    24
#define CPHONEBOOKENTRY_H_
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    25
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    26
#include <e32def.h>
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    27
#include <e32cmn.h>
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    28
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    29
#include <mpbutil.h>
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    30
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    31
class CPhoneBookEntry : public CBase
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    32
	{
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    33
public:
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    34
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    35
	IMPORT_C static CPhoneBookEntry* NewL();
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    36
	IMPORT_C static CPhoneBookEntry* NewLC();
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    37
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    38
	IMPORT_C void Reset();
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    39
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    40
	IMPORT_C TInt GetIndex() const;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    41
	IMPORT_C const TDesC& GetFirstName() const;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    42
	IMPORT_C const TDesC& GetDiallingNumber() const;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    43
	IMPORT_C const RArray<RBuf>& GetEmailAddresss() const;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    44
	IMPORT_C const RArray<RBuf>& GetSecondNames() const;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    45
	IMPORT_C const RArray<RBuf>& GetAdditionalNumbers() const;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    46
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    47
	IMPORT_C void SetIndex(TInt aIndex);
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    48
	IMPORT_C TInt SetFirstName(const TDesC& aFirstName);
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    49
	IMPORT_C TInt SetDiallingNumber(const TDesC& aDiallingNumber);
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    50
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    51
	IMPORT_C TInt AddEmailAddress(const TDesC& aEmailAddress);
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    52
	IMPORT_C TInt AddSecondName(const TDesC& aSecondName);
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    53
	IMPORT_C TInt AddAdditionalNumber(const TDesC& aAdditionalNumber);
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    54
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    55
	IMPORT_C TInt ExternalizeToTlvEntry(CPhoneBookBuffer& aPhoneBookBuffer) const;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    56
	IMPORT_C TInt InternalizeFromTlvEntry(CPhoneBookBuffer& aPhoneBookBuffer, TBool aNewEntryTagRead = EFalse);
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    57
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    58
	IMPORT_C TInt TlvLength() const;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    59
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    60
	IMPORT_C TBool operator== (const CPhoneBookEntry& aPhoneBookEntry) const;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    61
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    62
	~CPhoneBookEntry();
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    63
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    64
private:
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    65
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    66
	void ConstructL();
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    67
	CPhoneBookEntry();
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    68
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    69
	TInt GetText(TPtrC16& text, CPhoneBookBuffer::TPhBkTagType aTagType, CPhoneBookBuffer& aPhoneBookBuffer) const;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    70
	void DesSize(TInt& aSize, const TDesC& aDes) const;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    71
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    72
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    73
private:
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    74
	
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    75
	TInt iIndex;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    76
	TBool iIndexSet;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    77
	RBuf iFirstName;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    78
	RBuf iDiallingNumber;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    79
	RArray<RBuf> iEmailAddresss;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    80
	RArray<RBuf> iSecondNames;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    81
	RArray<RBuf> iAdditionalNumbers;
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    82
	};
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    83
ab1d0f4d2aa4 Adding the "WishList" state Telephony APIs
Tom Pritchard <tomp@symbian.org>
parents:
diff changeset
    84
#endif /*CPHONEBOOKENTRY_H_*/