|
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: API implementation for Global Note Adapter. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <globalnote.h> |
|
21 #include <avkon.rsg> // For softkey resources |
|
22 |
|
23 #include "GlobalNoteImpl.h" |
|
24 |
|
25 // ============================ MEMBER FUNCTIONS ============================= |
|
26 |
|
27 // --------------------------------------------------------------------------- |
|
28 // CGlobalNote::CGlobalNote |
|
29 // C++ default constructor can NOT contain any code, that |
|
30 // might leave. |
|
31 // --------------------------------------------------------------------------- |
|
32 // |
|
33 CGlobalNote::CGlobalNote() |
|
34 { |
|
35 } |
|
36 |
|
37 |
|
38 // --------------------------------------------------------------------------- |
|
39 // CGlobalNote::ConstructL |
|
40 // Symbian 2nd phase constructor can leave. |
|
41 // --------------------------------------------------------------------------- |
|
42 // |
|
43 void CGlobalNote::ConstructL() |
|
44 { |
|
45 iImpl = CGlobalNoteImpl::NewL(); |
|
46 } |
|
47 |
|
48 |
|
49 // --------------------------------------------------------------------------- |
|
50 // CGlobalNote::NewL |
|
51 // Two-phased constructor. |
|
52 // --------------------------------------------------------------------------- |
|
53 // |
|
54 EXPORT_C CGlobalNote* CGlobalNote::NewL() |
|
55 { |
|
56 CGlobalNote* self = NewLC(); |
|
57 CleanupStack::Pop( self ); |
|
58 |
|
59 return self; |
|
60 } |
|
61 |
|
62 |
|
63 // --------------------------------------------------------------------------- |
|
64 // CGlobalNote::NewLC |
|
65 // Two-phased constructor. |
|
66 // --------------------------------------------------------------------------- |
|
67 // |
|
68 EXPORT_C CGlobalNote* CGlobalNote::NewLC() |
|
69 { |
|
70 CGlobalNote* self = new( ELeave ) CGlobalNote; |
|
71 |
|
72 CleanupStack::PushL( self ); |
|
73 self->ConstructL(); |
|
74 |
|
75 return self; |
|
76 } |
|
77 |
|
78 |
|
79 // --------------------------------------------------------------------------- |
|
80 // CGlobalNote::~CGlobalNote |
|
81 // Destructor |
|
82 // --------------------------------------------------------------------------- |
|
83 // |
|
84 EXPORT_C CGlobalNote::~CGlobalNote() |
|
85 { |
|
86 delete iImpl; |
|
87 } |
|
88 |
|
89 |
|
90 // --------------------------------------------------------------------------- |
|
91 // CGlobalNote::SetSoftkeys() |
|
92 // (other items were commented in a header). |
|
93 // --------------------------------------------------------------------------- |
|
94 // |
|
95 EXPORT_C void CGlobalNote::SetSoftkeys( TGlobalNoteSoftkey aSoftkey ) |
|
96 { |
|
97 iImpl->SetSoftkeys( aSoftkey ); |
|
98 } |
|
99 |
|
100 |
|
101 // --------------------------------------------------------------------------- |
|
102 // CGlobalNote::ShowNoteL() |
|
103 // (other items were commented in a header). |
|
104 // --------------------------------------------------------------------------- |
|
105 // |
|
106 EXPORT_C TInt CGlobalNote::ShowNoteL( TGlobalNoteType aType, |
|
107 const TDesC& aNoteText ) |
|
108 { |
|
109 return iImpl->ShowNoteL( aType, aNoteText ); |
|
110 } |
|
111 |
|
112 |
|
113 // --------------------------------------------------------------------------- |
|
114 // CGlobalNote::ShowNoteL() |
|
115 // (other items were commented in a header). |
|
116 // --------------------------------------------------------------------------- |
|
117 // |
|
118 EXPORT_C TInt CGlobalNote::ShowNoteL( TRequestStatus& aStatus, |
|
119 TGlobalNoteType aType, |
|
120 const TDesC& aNoteText ) |
|
121 { |
|
122 return iImpl->ShowNoteL( aStatus, aType, aNoteText ); |
|
123 } |
|
124 |
|
125 |
|
126 // --------------------------------------------------------------------------- |
|
127 // CGlobalNote::CancelNoteL() |
|
128 // (other items were commented in a header). |
|
129 // --------------------------------------------------------------------------- |
|
130 // |
|
131 EXPORT_C void CGlobalNote::CancelNoteL( TInt aNoteId ) |
|
132 { |
|
133 iImpl->CancelGlobalNoteL( aNoteId ); |
|
134 } |
|
135 |
|
136 // End of File |