|
1 /* |
|
2 * Copyright (c) 2006-2009 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: Data transfer object for harvest client data |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <harvesterclientdata.h> |
|
19 |
|
20 // CHarvestClientData implementation |
|
21 |
|
22 //========================================================================== |
|
23 // Constructor |
|
24 //========================================================================== |
|
25 // |
|
26 CHarvestClientData::CHarvestClientData() |
|
27 { |
|
28 // no implementation needed |
|
29 } |
|
30 |
|
31 //========================================================================== |
|
32 // Destructor |
|
33 //========================================================================== |
|
34 // |
|
35 CHarvestClientData::~CHarvestClientData() |
|
36 { |
|
37 iAlbumIds.Close(); |
|
38 } |
|
39 |
|
40 //========================================================================== |
|
41 // New |
|
42 //========================================================================== |
|
43 // |
|
44 EXPORT_C CHarvestClientData* CHarvestClientData::New() |
|
45 { |
|
46 CHarvestClientData* self = NULL; |
|
47 TRAPD( err, self = NewL() ); |
|
48 if ( err != KErrNone ) |
|
49 { |
|
50 return NULL; |
|
51 } |
|
52 return self; |
|
53 } |
|
54 |
|
55 //========================================================================== |
|
56 // NewL |
|
57 //========================================================================== |
|
58 // |
|
59 EXPORT_C CHarvestClientData* CHarvestClientData::NewL() |
|
60 { |
|
61 CHarvestClientData* self = new (ELeave) CHarvestClientData(); |
|
62 return self; |
|
63 } |
|
64 |
|
65 //========================================================================== |
|
66 // SetAlbumIds |
|
67 //========================================================================== |
|
68 // |
|
69 EXPORT_C void CHarvestClientData::SetAlbumIds( const RArray<TItemId>& aAlbumIds ) |
|
70 { |
|
71 iAlbumIds.Reset(); |
|
72 const TInt count = aAlbumIds.Count(); |
|
73 iAlbumIds.Reserve( count ); |
|
74 for ( TInt i = 0; i < count; i++ ) |
|
75 { |
|
76 iAlbumIds.Append( aAlbumIds[i] ); |
|
77 } |
|
78 } |