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