|
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 "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: s_enginecontmgtextfeatures.cpp |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDES |
|
20 #include <CVPbkContactLinkArray.h> |
|
21 /** |
|
22 * Creates an empty link array. |
|
23 * |
|
24 * @return A new instance of this class |
|
25 */ |
|
26 EXPORT_C CVPbkContactLinkArray* CVPbkContactLinkArray::NewL(){ return new (ELeave) CVPbkContactLinkArray; } |
|
27 |
|
28 /** |
|
29 * Creates an empty link array. Leaves the created array object on |
|
30 * the cleanup stack. |
|
31 * |
|
32 * @return A new instance of this class |
|
33 */ |
|
34 EXPORT_C CVPbkContactLinkArray* CVPbkContactLinkArray::NewLC() |
|
35 { |
|
36 CVPbkContactLinkArray* self = new (ELeave) CVPbkContactLinkArray; |
|
37 CleanupStack::PushL(self); |
|
38 return self; |
|
39 } |
|
40 |
|
41 /** |
|
42 * Creates a link array from a packed descriptor of links. |
|
43 * |
|
44 * @param aPackedLinks a buffer that was created using PackLC |
|
45 * of MVPbkContactLinkArray or MVPbkContactLink |
|
46 * @param aStoreList the list of stores that contain the |
|
47 * stores that links belong. |
|
48 * @return A new instance of this class |
|
49 */ |
|
50 EXPORT_C CVPbkContactLinkArray* CVPbkContactLinkArray::NewLC( |
|
51 const TDesC8& /*aPackedLinks*/, |
|
52 const MVPbkContactStoreList& /*aStoreList*/) |
|
53 { |
|
54 CVPbkContactLinkArray* self = new (ELeave) CVPbkContactLinkArray; |
|
55 CleanupStack::PushL(self); |
|
56 return self; |
|
57 } |
|
58 |
|
59 /** |
|
60 * Creates a link array from a stream of links. |
|
61 * |
|
62 * @param aStream a stream of contact link that was created |
|
63 * using MVPbkStreamable interface of |
|
64 * MVPbkContactLink |
|
65 * @param aStoreList the list of stores that contain the |
|
66 * stores that links belong. |
|
67 * @return A new instance of this class |
|
68 */ |
|
69 EXPORT_C CVPbkContactLinkArray* CVPbkContactLinkArray::NewLC( |
|
70 RReadStream& /*aStream*/, |
|
71 const MVPbkContactStoreList& /*aStoreList*/) |
|
72 { |
|
73 CVPbkContactLinkArray* self = new (ELeave) CVPbkContactLinkArray; |
|
74 CleanupStack::PushL(self); |
|
75 return self; |
|
76 } |
|
77 |
|
78 /** |
|
79 * Creates a link array from a stream of links. Uses aLoader |
|
80 * to find and load stores. |
|
81 * aLoader must exist the life time of this object. |
|
82 * |
|
83 * @param aStream a stream of contact link that was created |
|
84 * using MVPbkStreamable interface of |
|
85 * MVPbkContactLink |
|
86 * @param aLoader the contact store loader for internalization. |
|
87 * @return A new instance of this class |
|
88 */ |
|
89 CVPbkContactLinkArray* CVPbkContactLinkArray::NewLC( |
|
90 RReadStream& /*aStream*/, |
|
91 MVPbkContactStoreLoader& /*aLoader*/ ) |
|
92 { |
|
93 CVPbkContactLinkArray* self = new (ELeave) CVPbkContactLinkArray; |
|
94 CleanupStack::PushL(self); |
|
95 return self; |
|
96 } |
|
97 |
|
98 /** |
|
99 * Destructor. |
|
100 */ |
|
101 CVPbkContactLinkArray::~CVPbkContactLinkArray(){ } |
|
102 |
|
103 |
|
104 /** |
|
105 * Appends a link to this array. |
|
106 * |
|
107 * @param aLink the link object to append. This array takes ownership |
|
108 * of the link if append is succesful. |
|
109 * @pre aLink != NULL |
|
110 * @post Array count is increased by one and the link is in the last |
|
111 * element of the array. |
|
112 */ |
|
113 EXPORT_C void CVPbkContactLinkArray::AppendL(MVPbkContactLink* /*aLink*/){ } |
|
114 |
|
115 /** |
|
116 * Inserts a link to this array. |
|
117 * |
|
118 * @param aLink the link object to insert. This array takes ownership |
|
119 * of the link if insertion is succesful. |
|
120 * @param aIndex position where to insert the link. |
|
121 * @exception KErrNoMemory if out of memory. |
|
122 * @pre aLink != NULL |
|
123 * @pre aIndex >= 0 && aIndex <= Count() |
|
124 * @post Array count is increased by one and the link is in the position |
|
125 * marked by the aIndex element of the array. |
|
126 */ |
|
127 EXPORT_C void CVPbkContactLinkArray::InsertL(MVPbkContactLink* /*aLink*/, TInt /*aIndex*/){ } |
|
128 |
|
129 /** |
|
130 * Removes a link at aIndex from this array. |
|
131 * |
|
132 * @pre aIndex >= 0 && aIndex <= Count() |
|
133 * @post The array count is decreased by one. |
|
134 */ |
|
135 EXPORT_C void CVPbkContactLinkArray::Remove(TInt /*aIndex*/){ } |
|
136 |
|
137 /** |
|
138 * Removes and deletes a link at aIndex from this array. |
|
139 * |
|
140 * @pre aIndex >= 0 && aIndex <= Count() |
|
141 * @post The array count is decreased by one. |
|
142 */ |
|
143 EXPORT_C void CVPbkContactLinkArray::Delete(TInt /*aIndex*/){ } |
|
144 |
|
145 /** |
|
146 * Resets the array and destroys the links |
|
147 */ |
|
148 EXPORT_C void CVPbkContactLinkArray::ResetAndDestroy(){ } |
|
149 |
|
150 /** |
|
151 * Resets this array but doesn't destroy links |
|
152 * |
|
153 * @post Count() == 0 |
|
154 */ |
|
155 EXPORT_C void CVPbkContactLinkArray::Reset(){ } |
|
156 |
|
157 /** |
|
158 * Returns the size of the packed link array |
|
159 */ |
|
160 EXPORT_C TInt CVPbkContactLinkArray::PackedBufferSize() const{ return 0; } |
|
161 |
|
162 |
|
163 TInt CVPbkContactLinkArray::Count() const{ return 0; } |
|
164 const MVPbkContactLink& CVPbkContactLinkArray::At(TInt /*aIndex*/) const |
|
165 { |
|
166 MVPbkContactLink* ret = NULL; |
|
167 return *ret; |
|
168 } |
|
169 |
|
170 TInt CVPbkContactLinkArray::Find(const MVPbkContactLink& /*aLink*/) const{ return 0; } |
|
171 HBufC8* CVPbkContactLinkArray::PackLC() const |
|
172 { |
|
173 _LIT8(KText,"Nutan@presence"); |
|
174 |
|
175 HBufC8* temp = HBufC8::NewLC( 32 ); |
|
176 TPtr8 tempptr = temp->Des(); |
|
177 tempptr.Zero(); |
|
178 tempptr.Append( KText ); |
|
179 |
|
180 //CleanupStack::PushL( temp ); |
|
181 return temp; |
|
182 } |
|
183 const MVPbkStreamable* CVPbkContactLinkArray::Streamable() const |
|
184 { |
|
185 return NULL; |
|
186 } |
|
187 |
|
188 |
|
189 CVPbkContactLinkArray::CVPbkContactLinkArray(){ } |
|
190 void CVPbkContactLinkArray::ConstructL(){ } |
|
191 void CVPbkContactLinkArray::ConstructL(const TDesC8& /*aPackedLinks*/, |
|
192 const MVPbkContactStoreList& /*aOperations*/){ } |
|
193 void CVPbkContactLinkArray::ConstructL(RReadStream& /*aStream*/, |
|
194 const MVPbkContactStoreList& /*aOperations*/){ } |
|
195 TInt CVPbkContactLinkArray::DoCalculatePackedBufferSizeV2() const{ return 0; } |
|
196 void CVPbkContactLinkArray::DoFillPackedBufferV2L(RWriteStream& /*aWriteStream*/) const{ } |
|
197 void CVPbkContactLinkArray::InternalizeFromBufferL( RReadStream& /*aReadStream*/, |
|
198 const MVPbkContactStoreList& /*aStoreList*/ ){ } |
|
199 void CVPbkContactLinkArray::DoInternalizeFromBufferL( RReadStream& /*aReadStream*/, |
|
200 const MVPbkContactStoreList& /*aStoreList*/){ } |
|
201 void CVPbkContactLinkArray::DoInternalizeFromBufferV2L(RReadStream& /*aReadStream*/, |
|
202 const MVPbkContactStoreList& /*aStoreList*/){ } |
|
203 |
|
204 |
|
205 // End of file |