1 /* |
|
2 * Copyright (c) 2005 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: Declares SyncML notifiers server application class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "SyncMLNotifierServerApplication.h" |
|
21 #include "SyncMLNotifDebug.h" |
|
22 |
|
23 // CONSTANTS |
|
24 _LIT( KSmlNotifierLibraryFileName, "SyncMLNotifier.dll" ); |
|
25 |
|
26 // ============================= LOCAL FUNCTIONS =============================== |
|
27 |
|
28 // ----------------------------------------------------------------------------- |
|
29 // NewApplication Creates a new notifier server application. |
|
30 // ----------------------------------------------------------------------------- |
|
31 // |
|
32 LOCAL_C CApaApplication* NewApplication() |
|
33 { |
|
34 FLOG(_L("[SmlNotif]\t NewApplication()")); |
|
35 return new CSyncMLNotifierServerApplication(); |
|
36 } |
|
37 |
|
38 // ============================ MEMBER FUNCTIONS =============================== |
|
39 |
|
40 // ----------------------------------------------------------------------------- |
|
41 // CSyncMLNotifierServerApplication::CSyncMLNotifierServerApplication |
|
42 // C++ default constructor can NOT contain any code, that |
|
43 // might leave. |
|
44 // ----------------------------------------------------------------------------- |
|
45 // |
|
46 CSyncMLNotifierServerApplication::CSyncMLNotifierServerApplication() |
|
47 { |
|
48 FLOG(_L("[SmlNotif]\t CSyncMLNotifierServerApplication::CreateDocumentL()")); |
|
49 } |
|
50 |
|
51 // ----------------------------------------------------------------------------- |
|
52 // CSyncMLNotifierServerApplication::NewAppServerL |
|
53 // ----------------------------------------------------------------------------- |
|
54 // |
|
55 void CSyncMLNotifierServerApplication::NewAppServerL( CApaAppServer*& aAppServer ) |
|
56 { |
|
57 FLOG(_L("[SmlNotif]\t CSyncMLNotifierServerApplication::NewAppServerL()")); |
|
58 CAknNotifierAppServer* server = new (ELeave) CAknNotifierAppServer(); |
|
59 CleanupStack::PushL(server); |
|
60 |
|
61 server->AppendNotifierLibNameL( KSmlNotifierLibraryFileName ); |
|
62 server->LoadNotifiersL(); |
|
63 CleanupStack::Pop( server ); |
|
64 aAppServer = &*server; |
|
65 FLOG(_L("[SmlNotif]\t CSyncMLNotifierServerApplication::NewAppServerL() completed")); |
|
66 } |
|
67 |
|
68 // ----------------------------------------------------------------------------- |
|
69 // CSyncMLNotifierServerApplication::CreateDocumentL |
|
70 // ----------------------------------------------------------------------------- |
|
71 // |
|
72 CApaDocument* CSyncMLNotifierServerApplication::CreateDocumentL() |
|
73 { |
|
74 FLOG(_L("[SmlNotif]\t CSyncMLNotifierServerApplication::CreateDocumentL()")); |
|
75 return new (ELeave) CSyncMLNotifierAppServerDocument( *this ); |
|
76 } |
|
77 |
|
78 // ----------------------------------------------------------------------------- |
|
79 // CSyncMLNotifierAppServerDocument::CreateAppUiL |
|
80 // ----------------------------------------------------------------------------- |
|
81 // |
|
82 CEikAppUi* CSyncMLNotifierAppServerDocument::CreateAppUiL() |
|
83 { |
|
84 FLOG(_L("[SmlNotif]\t CSyncMLNotifierAppServerDocument::CreateAppUiL()")); |
|
85 return new (ELeave) CSyncMLNotifierAppServerAppUi(); |
|
86 } |
|
87 |
|
88 // ----------------------------------------------------------------------------- |
|
89 // CSyncMLNotifierAppServerAppUi::CSyncMLNotifierAppServerAppUi |
|
90 // C++ default constructor can NOT contain any code, that |
|
91 // might leave. |
|
92 // ----------------------------------------------------------------------------- |
|
93 // |
|
94 CSyncMLNotifierAppServerAppUi::CSyncMLNotifierAppServerAppUi() |
|
95 { |
|
96 FLOG(_L("[SmlNotif]\t CSyncMLNotifierAppServerAppUi::CSyncMLNotifierAppServerAppUi()")); |
|
97 } |
|
98 |
|
99 // Destructor |
|
100 CSyncMLNotifierAppServerAppUi::~CSyncMLNotifierAppServerAppUi() |
|
101 { |
|
102 FLOG(_L("[SmlNotif]\t CSyncMLNotifierAppServerAppUi::~CSyncMLNotifierAppServerAppUi()")); |
|
103 } |
|
104 |
|
105 // ----------------------------------------------------------------------------- |
|
106 // CSyncMLNotifierAppServerAppUi::ConstructL |
|
107 // Symbian 2nd phase constructor can leave. |
|
108 // ----------------------------------------------------------------------------- |
|
109 // |
|
110 void CSyncMLNotifierAppServerAppUi::ConstructL() |
|
111 { |
|
112 FLOG(_L("[SmlNotif]\t CSyncMLNotifierAppServerAppUi::ConstructL()")); |
|
113 // base call |
|
114 CAknNotifierAppServerAppUi::ConstructL(); |
|
115 FLOG(_L("[SmlNotif]\t CSyncMLNotifierAppServerAppUi::ConstructL() completed")); |
|
116 } |
|
117 |
|
118 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
119 |
|
120 // ----------------------------------------------------------------------------- |
|
121 // E32Main |
|
122 // ----------------------------------------------------------------------------- |
|
123 // |
|
124 GLDEF_C TInt E32Main() |
|
125 { |
|
126 return EikStart::RunApplication( NewApplication ); |
|
127 } |
|
128 |
|
129 // End of File |
|