|
1 /* |
|
2 * Copyright (c) 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: This module contains the implementation of CIAUpdateServer class |
|
15 * member functions. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include <coemain.h> |
|
23 |
|
24 #include "iaupdateserver.h" |
|
25 #include "iaupdatesession.h" |
|
26 #include "iaupdateappui.h" |
|
27 #include "iaupdateuicontroller.h" |
|
28 |
|
29 |
|
30 // ============================ MEMBER FUNCTIONS =============================== |
|
31 |
|
32 // ----------------------------------------------------------------------------- |
|
33 // CIAUpdateServer::CIAUpdateServer |
|
34 // C++ default constructor can NOT contain any code, that |
|
35 // might leave. |
|
36 // ----------------------------------------------------------------------------- |
|
37 // |
|
38 CIAUpdateServer::CIAUpdateServer() |
|
39 { |
|
40 } |
|
41 |
|
42 // ----------------------------------------------------------------------------- |
|
43 // CIAUpdateServer::ConstructL |
|
44 // Symbian 2nd phase constructor can leave. |
|
45 // ----------------------------------------------------------------------------- |
|
46 // |
|
47 void CIAUpdateServer::ConstructL() |
|
48 { |
|
49 } |
|
50 |
|
51 // ----------------------------------------------------------------------------- |
|
52 // CIAUpdateServer::NewL |
|
53 // Two-phased constructor. |
|
54 // ----------------------------------------------------------------------------- |
|
55 // |
|
56 CIAUpdateServer* CIAUpdateServer::NewL() |
|
57 { |
|
58 CIAUpdateServer* self = new (ELeave) CIAUpdateServer(); |
|
59 CleanupStack::PushL( self ); |
|
60 self->ConstructL(); |
|
61 CleanupStack::Pop( self ); |
|
62 return self; |
|
63 } |
|
64 |
|
65 // ----------------------------------------------------------------------------- |
|
66 // CIAUpdateServer::~CIAUpdateServer |
|
67 // Destructor |
|
68 // ----------------------------------------------------------------------------- |
|
69 // |
|
70 CIAUpdateServer::~CIAUpdateServer() |
|
71 { |
|
72 } |
|
73 |
|
74 // ----------------------------------------------------------------------------- |
|
75 // CIAUpdateServer::CreateServiceL |
|
76 // Service creation function. |
|
77 // (other items were commented in a header). |
|
78 // ----------------------------------------------------------------------------- |
|
79 // |
|
80 CApaAppServiceBase* CIAUpdateServer::CreateServiceL( TUid /*aServiceType*/ ) const |
|
81 { |
|
82 return new (ELeave) CIAUpdateSession(); |
|
83 } |
|
84 |
|
85 // ----------------------------------------------------------------------------- |
|
86 // CIAUpdateServer::HandleAllClientsClosed |
|
87 // All clients are closed. |
|
88 // (other items were commented in a header). |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 void CIAUpdateServer::HandleAllClientsClosed() |
|
92 { |
|
93 TBool closingAllowed = ETrue; |
|
94 CIAUpdateAppUi* appUi = |
|
95 static_cast<CIAUpdateAppUi*>( CEikonEnv::Static()->EikAppUi() ); |
|
96 if ( appUi ) |
|
97 { |
|
98 if ( appUi->Controller() ) |
|
99 { |
|
100 closingAllowed = appUi->Controller()->ClosingAllowedByClient(); |
|
101 } |
|
102 } |
|
103 if ( closingAllowed ) |
|
104 { |
|
105 CAknAppServer::HandleAllClientsClosed(); |
|
106 } |
|
107 else |
|
108 { |
|
109 if ( appUi ) |
|
110 { |
|
111 TRAP_IGNORE( appUi->HandleAllClientsClosedL() ); |
|
112 } |
|
113 } |
|
114 } |
|
115 |
|
116 |
|
117 |
|
118 // End of File |