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