author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 24 Nov 2009 08:56:33 +0200 | |
changeset 33 | 50974a8b132e |
parent 22 | fc9cf246af83 |
permissions | -rw-r--r-- |
19 | 1 |
/* |
2 |
* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 |
* All rights reserved. |
|
4 |
* This component and the accompanying materials are made available |
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
|
6 |
* which accompanies this distribution, and is available |
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 |
* |
|
9 |
* Initial Contributors: |
|
10 |
* Nokia Corporation - initial contribution. |
|
11 |
* |
|
12 |
* Contributors: |
|
13 |
* |
|
14 |
* Description: Provides utility functions |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#ifndef SINGLECONTACT_H |
|
20 |
#define SINGLECONTACT_H |
|
21 |
||
22 |
#include <e32base.h> |
|
23 |
#include <MVPbkStoreContact.h> |
|
24 |
#include "contactservice.h" |
|
25 |
||
26 |
//User includes |
|
27 |
#include "searchfields.h" |
|
28 |
#include "singlecontactfield.h" |
|
29 |
||
30 |
//Class declarations |
|
31 |
class CContactService; |
|
32 |
class CSearchFields; |
|
33 |
class CSingleContactField; |
|
34 |
||
35 |
//Wrapper class around a single contact item of type MVPbkStoreContact |
|
36 |
class CSingleContact:public CBase |
|
37 |
{ |
|
38 |
public: |
|
39 |
||
40 |
/** |
|
41 |
* NewL() Method for CSingleContact class |
|
42 |
* @return CSingleContact* |
|
43 |
*/ |
|
44 |
static CSingleContact* NewL(MVPbkStoreContact* aSingleContact, |
|
45 |
Ttype aIndicator); |
|
46 |
||
47 |
IMPORT_C |
|
48 |
static CSingleContact* NewL(); |
|
49 |
/* |
|
50 |
* Constructor |
|
51 |
*/ |
|
52 |
CSingleContact(); |
|
53 |
void ConstructL(MVPbkStoreContact* aSingleContact, |
|
54 |
Ttype aIndicator); |
|
55 |
void ConvertContactToFieldListL(MVPbkStoreContact* aSingleContact); |
|
56 |
||
57 |
public: |
|
58 |
/* |
|
59 |
* Remove a field from the Contact. |
|
60 |
*/ |
|
61 |
IMPORT_C TInt RemoveField( TInt aIndex ); |
|
62 |
||
63 |
/* |
|
64 |
* Remove all fields from a Contact. |
|
65 |
*/ |
|
66 |
IMPORT_C void RemoveAllFields(); |
|
67 |
||
68 |
/* |
|
69 |
* Sets the contact id for a contact |
|
70 |
*/ |
|
71 |
IMPORT_C void SetContactIdL(const TDesC8& aContactId); |
|
72 |
||
73 |
/* |
|
74 |
* Gets the contact id of a contact |
|
75 |
*/ |
|
76 |
IMPORT_C TDesC8& GetContactId(); |
|
77 |
||
78 |
||
79 |
/* |
|
80 |
* Creates a field with the specified fields and adds it to the contact. |
|
81 |
*/ |
|
82 |
IMPORT_C void AddFieldToContactL(const CSingleContactField* aField ); |
|
83 |
||
84 |
||
85 |
/* |
|
86 |
*General Functions - Exported |
|
87 |
*/ |
|
88 |
CSingleContactField* NextFieldL(MVPbkStoreContact* aSingleContact, |
|
89 |
TInt aIndex); |
|
90 |
||
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
91 |
CSingleContactField* GetXSPIDFieldL(MVPbkStoreContact* aSingleContact, TInt& aIndex); |
19 | 92 |
/* |
93 |
*Get the number of fields in the contact |
|
94 |
*/ |
|
95 |
IMPORT_C TInt FieldCount(); |
|
96 |
/* |
|
97 |
*Get the field at the index; |
|
98 |
*/ |
|
99 |
IMPORT_C CSingleContactField* FieldAt(TInt aIndex); |
|
100 |
||
101 |
/** |
|
102 |
* Destructor |
|
103 |
*/ |
|
104 |
~CSingleContact(); |
|
105 |
||
106 |
private: //Data members |
|
107 |
//No.of Fields |
|
108 |
TInt iFieldCount; |
|
109 |
//Index |
|
110 |
TInt iFieldIndex; |
|
111 |
||
112 |
Ttype iIndicator; |
|
113 |
/* |
|
114 |
* Pointer to a contact id |
|
115 |
*/ |
|
116 |
HBufC8* iContactId; |
|
117 |
||
118 |
RPointerArray<CSingleContactField> iFields; |
|
119 |
}; |
|
120 |
||
121 |
#endif //SINGLECONTACT_H |