|
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: Capsulating sql items |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 #include <e32std.h> |
|
24 #include "cmsqlimageitem.h" |
|
25 #include "msdebug.h" |
|
26 |
|
27 // ======== LOCAL FUNCTIONS ======== |
|
28 // --------------------------------------------------------------------------- |
|
29 // NewL |
|
30 // --------------------------------------------------------------------------- |
|
31 // |
|
32 EXPORT_C CCmSqlImageItem* CCmSqlImageItem::NewL() |
|
33 { |
|
34 CCmSqlImageItem* self = CCmSqlImageItem::NewLC(); |
|
35 CleanupStack::Pop( self ); |
|
36 return self; |
|
37 } |
|
38 |
|
39 // --------------------------------------------------------------------------- |
|
40 // NewLC |
|
41 // --------------------------------------------------------------------------- |
|
42 // |
|
43 EXPORT_C CCmSqlImageItem* CCmSqlImageItem::NewLC() |
|
44 { |
|
45 CCmSqlImageItem* self = new ( ELeave ) CCmSqlImageItem(); |
|
46 CleanupStack::PushL( self ); |
|
47 self->ConstructL(); |
|
48 return self; |
|
49 } |
|
50 |
|
51 // --------------------------------------------------------------------------- |
|
52 // Destructor |
|
53 // --------------------------------------------------------------------------- |
|
54 // |
|
55 EXPORT_C CCmSqlImageItem::~CCmSqlImageItem() |
|
56 { |
|
57 delete iDescription; |
|
58 } |
|
59 |
|
60 // --------------------------------------------------------------------------- |
|
61 // CCmSqlImageItem::SetResolutionId |
|
62 // --------------------------------------------------------------------------- |
|
63 // |
|
64 EXPORT_C void CCmSqlImageItem::SetResolutionId( const TInt64 aResolutionId ) |
|
65 { |
|
66 iResolutionId = aResolutionId; |
|
67 } |
|
68 |
|
69 // --------------------------------------------------------------------------- |
|
70 // CCmSqlImageItem::SetDescription |
|
71 // --------------------------------------------------------------------------- |
|
72 // |
|
73 EXPORT_C void CCmSqlImageItem::SetDescriptionL( const TDesC8& aDescription ) |
|
74 { |
|
75 delete iDescription; |
|
76 iDescription = NULL; |
|
77 |
|
78 if( &aDescription ) |
|
79 { |
|
80 iDescription = aDescription.AllocL(); |
|
81 } |
|
82 else |
|
83 { |
|
84 iDescription = KNullDesC8().AllocL(); |
|
85 } |
|
86 } |
|
87 |
|
88 // --------------------------------------------------------------------------- |
|
89 // CCmSqlImageItem::ResolutionId |
|
90 // --------------------------------------------------------------------------- |
|
91 // |
|
92 EXPORT_C TInt64 CCmSqlImageItem::ResolutionId() const |
|
93 { |
|
94 return iResolutionId; |
|
95 } |
|
96 |
|
97 // --------------------------------------------------------------------------- |
|
98 // CCmSqlImageItem::Description |
|
99 // --------------------------------------------------------------------------- |
|
100 // |
|
101 EXPORT_C TDesC8& CCmSqlImageItem::Description() const |
|
102 { |
|
103 return *iDescription; |
|
104 } |
|
105 |
|
106 // --------------------------------------------------------------------------- |
|
107 // Default constructor |
|
108 // --------------------------------------------------------------------------- |
|
109 // |
|
110 CCmSqlImageItem::CCmSqlImageItem() |
|
111 { |
|
112 } |
|
113 |
|
114 // --------------------------------------------------------------------------- |
|
115 // ConstructL |
|
116 // --------------------------------------------------------------------------- |
|
117 // |
|
118 void CCmSqlImageItem::ConstructL() |
|
119 { |
|
120 iDescription = KNullDesC8().AllocL(); |
|
121 } |
|
122 |
|
123 // End of file |
|
124 |