|
1 /* |
|
2 * Copyright (c) 2007-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: CSC Applicationīs Document |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <apgwgnam.h> |
|
19 #include <cchclient.h> |
|
20 #include <xSPViewServices.h> |
|
21 #include <AiwServiceHandler.h> |
|
22 |
|
23 #include "cscappui.h" |
|
24 #include "csclogger.h" |
|
25 #include "cscdocument.h" |
|
26 #include "cscengservicepluginhandler.h" |
|
27 #include "cscenguiextensionpluginhandler.h" |
|
28 |
|
29 |
|
30 // ======== MEMBER FUNCTIONS ======== |
|
31 |
|
32 |
|
33 // --------------------------------------------------------------------------- |
|
34 // --------------------------------------------------------------------------- |
|
35 // |
|
36 CCSCDocument::CCSCDocument( CEikApplication& aApp ) : |
|
37 CAknDocument( aApp ) |
|
38 { |
|
39 } |
|
40 |
|
41 |
|
42 // --------------------------------------------------------------------------- |
|
43 // --------------------------------------------------------------------------- |
|
44 // |
|
45 void CCSCDocument::ConstructL() |
|
46 { |
|
47 } |
|
48 |
|
49 |
|
50 // --------------------------------------------------------------------------- |
|
51 // --------------------------------------------------------------------------- |
|
52 // |
|
53 void CCSCDocument::UpdateTaskNameL( CApaWindowGroupName* aWgName ) |
|
54 { |
|
55 CAknDocument::UpdateTaskNameL( aWgName ); |
|
56 aWgName->SetHidden( ETrue ); |
|
57 } |
|
58 |
|
59 // --------------------------------------------------------------------------- |
|
60 // --------------------------------------------------------------------------- |
|
61 // |
|
62 CCSCDocument* CCSCDocument::NewL( CEikApplication& aApp ) |
|
63 { |
|
64 CCSCDocument* self = NewLC( aApp ); |
|
65 CleanupStack::Pop( self ); |
|
66 return self; |
|
67 } |
|
68 |
|
69 |
|
70 // --------------------------------------------------------------------------- |
|
71 // --------------------------------------------------------------------------- |
|
72 // |
|
73 CCSCDocument* CCSCDocument::NewLC( CEikApplication& aApp ) |
|
74 { |
|
75 CCSCDocument* self = new (ELeave) CCSCDocument( aApp ); |
|
76 CleanupStack::PushL( self ); |
|
77 self->ConstructL(); |
|
78 return self; |
|
79 } |
|
80 |
|
81 |
|
82 // --------------------------------------------------------------------------- |
|
83 // Transfers ownership to document. |
|
84 // --------------------------------------------------------------------------- |
|
85 // |
|
86 void CCSCDocument::SetOwnershipOfPluginHandlers( |
|
87 CCSCEngServicePluginHandler* aServicePluginHandler, |
|
88 CCSCEngUiExtensionPluginHandler* aUiExtensionPluginHandler ) |
|
89 { |
|
90 iServicePluginHandler = aServicePluginHandler; |
|
91 iUiExtensionPluginHandler = aUiExtensionPluginHandler; |
|
92 } |
|
93 |
|
94 |
|
95 // --------------------------------------------------------------------------- |
|
96 // Returns reference to service plug-in handler. |
|
97 // --------------------------------------------------------------------------- |
|
98 // |
|
99 CCSCEngServicePluginHandler& CCSCDocument::ServicePluginHandler() |
|
100 { |
|
101 return *iServicePluginHandler; |
|
102 } |
|
103 |
|
104 // --------------------------------------------------------------------------- |
|
105 // From class CAknDocument |
|
106 // Create the application user interface |
|
107 // --------------------------------------------------------------------------- |
|
108 // |
|
109 CEikAppUi* CCSCDocument::CreateAppUiL() |
|
110 { |
|
111 // Create the application user interface, and return a pointer to it |
|
112 // the framework takes ownership of this object |
|
113 return ( static_cast<CEikAppUi*>( new (ELeave) CCSCAppUi ) ); |
|
114 } |
|
115 |
|
116 |
|
117 // --------------------------------------------------------------------------- |
|
118 // --------------------------------------------------------------------------- |
|
119 // |
|
120 CCSCDocument::~CCSCDocument() |
|
121 { |
|
122 CSCDEBUG( "CCSCDocument::~CCSCDocument - begin" ); |
|
123 |
|
124 delete iServicePluginHandler; |
|
125 delete iUiExtensionPluginHandler; |
|
126 |
|
127 CSCDEBUG( "CCSCDocument::~CCSCDocument - end" ); |
|
128 } |
|
129 |