1 /* |
|
2 * Copyright (c) 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: Server application for launching SendUi with low |
|
15 * capability requirements. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #include "senduilauncherdoc.h" |
|
22 #include "senduilauncherapp.h" |
|
23 #include "senduilauncherappui.h" |
|
24 #include "senduiservice.h" |
|
25 #include "senduiserviceclient.h" |
|
26 #include "senduiserviceslog.h" |
|
27 #include <SendUiConsts.h> |
|
28 #include "senduilauncher.h" |
|
29 |
|
30 // --------------------------------------------------------------------------- |
|
31 // Creates SendUiService or pass service request to the framework |
|
32 // --------------------------------------------------------------------------- |
|
33 // |
|
34 class CSendUiServer : public CAknAppServer |
|
35 { |
|
36 public: |
|
37 |
|
38 CApaAppServiceBase* CreateServiceL( TUid aServiceType ) const |
|
39 { |
|
40 if( aServiceType.iUid == KSendUiLauncherAppServiceUid.iUid ) |
|
41 { |
|
42 return CSendUiService::NewL(); |
|
43 } |
|
44 else |
|
45 { |
|
46 return CAknAppServer::CreateServiceL( aServiceType ); |
|
47 } |
|
48 } |
|
49 }; |
|
50 |
|
51 // ======== LOCAL FUNCTIONS ======== |
|
52 |
|
53 // --------------------------------------------------------------------------- |
|
54 // Constructs and returns an application object. |
|
55 // --------------------------------------------------------------------------- |
|
56 // |
|
57 CApaDocument* CSendUiLauncherApplication::CreateDocumentL() |
|
58 { |
|
59 // Create an SendUiServer document, and return a pointer to it |
|
60 CApaDocument* document = CSendUiLauncherDocument::NewL(*this); |
|
61 return document; |
|
62 } |
|
63 |
|
64 // --------------------------------------------------------------------------- |
|
65 // AppDllUid |
|
66 // Return application Uid |
|
67 // --------------------------------------------------------------------------- |
|
68 // |
|
69 TUid CSendUiLauncherApplication::AppDllUid() const |
|
70 { |
|
71 // Return the UID for the SendUiServer application |
|
72 return KSendUiLauncherAppUid; |
|
73 } |
|
74 |
|
75 // --------------------------------------------------------------------------- |
|
76 // NewAppServerL |
|
77 // Returns new CSendUIServer object for the framework |
|
78 // --------------------------------------------------------------------------- |
|
79 // |
|
80 void CSendUiLauncherApplication::NewAppServerL( CApaAppServer* & aAppServer ) |
|
81 { |
|
82 aAppServer = new(ELeave)CSendUiServer; |
|
83 } |
|
84 |
|