|
1 /* |
|
2 * Copyright (c) 2002-2006 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: Global action item definitions |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "CGflmGlobalActionItem.h" |
|
22 #include <e32std.h> |
|
23 |
|
24 |
|
25 // ============================ MEMBER FUNCTIONS =============================== |
|
26 |
|
27 // ----------------------------------------------------------------------------- |
|
28 // CGflmGlobalActionItem::CGflmGlobalActionItem |
|
29 // C++ default constructor can NOT contain any code, that |
|
30 // might leave. |
|
31 // ----------------------------------------------------------------------------- |
|
32 // |
|
33 CGflmGlobalActionItem::CGflmGlobalActionItem() |
|
34 { |
|
35 } |
|
36 |
|
37 // ----------------------------------------------------------------------------- |
|
38 // CGflmGlobalActionItem::ConstructL |
|
39 // Symbian 2nd phase constructor can leave. |
|
40 // ----------------------------------------------------------------------------- |
|
41 // |
|
42 void CGflmGlobalActionItem::ConstructL( const TDesC& aCaption ) |
|
43 { |
|
44 iCaption = aCaption.AllocL(); |
|
45 } |
|
46 |
|
47 // ----------------------------------------------------------------------------- |
|
48 // CGflmGlobalActionItem::NewLC |
|
49 // Two-phased constructor. |
|
50 // ----------------------------------------------------------------------------- |
|
51 // |
|
52 CGflmGlobalActionItem* CGflmGlobalActionItem::NewLC( |
|
53 TInt aId, const TDesC& aCaption ) |
|
54 { |
|
55 CGflmGlobalActionItem* self = new( ELeave ) CGflmGlobalActionItem; |
|
56 |
|
57 CleanupStack::PushL( self ); |
|
58 self->iId = aId; |
|
59 self->ConstructL( aCaption ); |
|
60 |
|
61 return self; |
|
62 } |
|
63 |
|
64 // ----------------------------------------------------------------------------- |
|
65 // CGflmGlobalActionItem::~CGflmGlobalActionItem |
|
66 // |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 CGflmGlobalActionItem::~CGflmGlobalActionItem() |
|
70 { |
|
71 delete iCaption; |
|
72 |
|
73 } |
|
74 |
|
75 // ----------------------------------------------------------------------------- |
|
76 // CGflmGlobalActionItem::Type() |
|
77 // (other items were commented in a header). |
|
78 // ----------------------------------------------------------------------------- |
|
79 // |
|
80 CGflmGroupItem::TGflmItemType CGflmGlobalActionItem::Type() const |
|
81 { |
|
82 return EGlobalActionItem; |
|
83 } |
|
84 |
|
85 // ----------------------------------------------------------------------------- |
|
86 // CGflmGlobalActionItem::Name() |
|
87 // (other items were commented in a header). |
|
88 // ----------------------------------------------------------------------------- |
|
89 // |
|
90 TPtrC CGflmGlobalActionItem::Name() const |
|
91 { |
|
92 return iCaption->Des(); |
|
93 } |
|
94 |
|
95 // ----------------------------------------------------------------------------- |
|
96 // CGflmGlobalActionItem::Date() |
|
97 // (other items were commented in a header). |
|
98 // ----------------------------------------------------------------------------- |
|
99 // |
|
100 TTime CGflmGlobalActionItem::Date() const |
|
101 { |
|
102 // Date of an action item is undefined |
|
103 // Groups containing action items shouldn't be sorted by date |
|
104 return TTime( 0 ); |
|
105 } |
|
106 |
|
107 // ----------------------------------------------------------------------------- |
|
108 // CGflmGlobalActionItem::Size() |
|
109 // (other items were commented in a header). |
|
110 // ----------------------------------------------------------------------------- |
|
111 // |
|
112 TInt64 CGflmGlobalActionItem::Size() const |
|
113 { |
|
114 return 0; |
|
115 } |
|
116 |
|
117 // ----------------------------------------------------------------------------- |
|
118 // CGflmGlobalActionItem::Ext() |
|
119 // (other items were commented in a header). |
|
120 // ----------------------------------------------------------------------------- |
|
121 // |
|
122 TPtrC CGflmGlobalActionItem::Ext() const |
|
123 { |
|
124 return TPtrC( KNullDesC ); |
|
125 } |
|
126 |
|
127 // ----------------------------------------------------------------------------- |
|
128 // CGflmGlobalActionItem::Id() |
|
129 // (other items were commented in a header). |
|
130 // ----------------------------------------------------------------------------- |
|
131 // |
|
132 EXPORT_C TInt CGflmGlobalActionItem::Id() const |
|
133 { |
|
134 return iId; |
|
135 } |
|
136 |
|
137 // End of File |