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 SINGLECONTACTFIELD_H |
|
20 |
#define SINGLECONTACTFIELD_H |
|
21 |
||
22 |
/** |
|
23 |
* CSingleContactField : Class that represents a field in a given contact Item. |
|
24 |
* This class is used to create a contact item and add it to the database and also |
|
25 |
* it is used to return a contact from the database. |
|
26 |
*/ |
|
27 |
class CSingleContactField:public CBase |
|
28 |
{ |
|
29 |
public: |
|
30 |
/** |
|
31 |
* NewL() Method for CSingleContactField class |
|
32 |
* @return CSingleContactField* |
|
33 |
*/ |
|
34 |
IMPORT_C static CSingleContactField* NewL(); |
|
35 |
||
36 |
/** |
|
37 |
* Destructor - virtual and class not intended |
|
38 |
* for derivation, so not exported |
|
39 |
*/ |
|
40 |
||
41 |
public:// General Functions - Meant for use within the dll |
|
42 |
||
43 |
/** |
|
44 |
* Gets the Field Key, The Label and the Value of the field. |
|
45 |
* @param aFieldkey A reference to hold the resultant field key. |
|
46 |
* @param aLabel A reference to hold the resultant Label. |
|
47 |
* @param aValue A reference to hold the resultant Value. |
|
48 |
* @return None. |
|
49 |
*/ |
|
50 |
IMPORT_C void GetFieldDataL(TPtrC8& aFieldkey, |
|
51 |
TPtrC& aLabel, |
|
52 |
TPtrC& aValue); |
|
53 |
||
54 |
/** |
|
55 |
* Gets the Group Label and the array containing |
|
56 |
* the contact id's of the group |
|
57 |
* @param aGroupLabel A reference to hold the resultant Label. |
|
58 |
* @param aArray A reference to array that contains the contact id's. |
|
59 |
* @return None. |
|
60 |
*/ |
|
61 |
IMPORT_C void GetFieldDataL(TPtrC& aGroupLabel, |
|
62 |
RPointerArray<TDesC8>& aArray); |
|
63 |
||
64 |
/** |
|
65 |
* Sets the Field Key, The Label and the Value of the field. |
|
66 |
* @param aFieldkey A reference that holds the fieldkey. |
|
67 |
* @param aLabel A reference that holds the Label. |
|
68 |
* @param aValue A reference that holds the Value. |
|
69 |
* @return None. |
|
70 |
*/ |
|
71 |
IMPORT_C void SetFieldParamsL(const TDesC8& Fieldkey, |
|
72 |
const TDesC& aLabel, |
|
73 |
const TDesC& aValue); |
|
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
74 |
IMPORT_C void SetUriFieldParamsL(const TDesC8& aFieldKey, |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
75 |
const TDesC& aLabel, |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
76 |
const RPointerArray<HBufC> aValue); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
77 |
|
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
78 |
IMPORT_C void GetUriFieldParamL(RPointerArray<HBufC>& axspidArray); |
19 | 79 |
/** |
80 |
* Sets the Label and the id arrray of the group. |
|
81 |
* @param aGroupLabel A reference that holds the Label. |
|
82 |
* @param aArray A reference to array that contains the contact id's. |
|
83 |
* @return None. |
|
84 |
*/ |
|
85 |
void SetFieldParamsL(const TPtrC& aGroupLabel, |
|
86 |
RPointerArray<HBufC8>& aArray); |
|
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
87 |
IMPORT_C void SetXspidDataL(const TDesC8& aFieldKey, |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
88 |
const TDesC& aLabel, |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
89 |
RPointerArray<HBufC>& axspidArray); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
90 |
|
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
91 |
IMPORT_C void GetXspidDataL(RPointerArray<HBufC>& axspidArray); |
19 | 92 |
|
93 |
/** |
|
94 |
* Get Method for time. |
|
95 |
* @param none. |
|
96 |
* @return TTime. |
|
97 |
*/ |
|
98 |
IMPORT_C TTime GetDateTime(); |
|
99 |
||
100 |
/** |
|
101 |
* Set Method for time. |
|
102 |
* @param TTime. |
|
103 |
* @return None. |
|
104 |
*/ |
|
105 |
IMPORT_C void SetDateTime(TTime aDateTime); |
|
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
106 |
IMPORT_C void SetUriData(TPtrC aUri); |
19 | 107 |
|
108 |
/** |
|
109 |
* CSingleContactField Destructor. |
|
110 |
* @param None. |
|
111 |
* @return None. |
|
112 |
*/ |
|
113 |
~CSingleContactField(); |
|
114 |
||
115 |
private: |
|
116 |
||
117 |
/** |
|
118 |
* Second phase Constructor. |
|
119 |
* @param None. |
|
120 |
* @return None. |
|
121 |
*/ |
|
122 |
void ConstructL(); |
|
123 |
/** |
|
124 |
* Default Constructor. |
|
125 |
* @param None. |
|
126 |
* @return None. |
|
127 |
*/ |
|
128 |
CSingleContactField(); |
|
129 |
||
130 |
private: //Data Members |
|
131 |
||
132 |
//FieldKey, Label, and Value in a given field |
|
133 |
HBufC8* iFieldKey; |
|
134 |
HBufC* iLabel; |
|
135 |
HBufC* iValue; |
|
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
136 |
RPointerArray<HBufC> iArrayValue; |
19 | 137 |
//In case the value is of type TTime |
138 |
TTime iDateAndTime; |
|
139 |
||
140 |
//In case we are iterating a group |
|
141 |
HBufC* iGroupLabel; |
|
142 |
RPointerArray<HBufC8> iContactIdArray; |
|
22
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
143 |
RPointerArray<HBufC> iUriData; |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
144 |
RPointerArray<HBufC> iidArray; |
19 | 145 |
|
146 |
}; |
|
147 |
||
148 |
#endif //SINGLECONTACTFIELD_H |