1 /* |
|
2 * Copyright (c) 2002 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: PSY configuration UI application launching implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // System Include |
|
20 #include <eikserverapp.h> |
|
21 |
|
22 // User Include |
|
23 #include "locpsyconfigclientwrapper.h" |
|
24 #include "locpsyconfigclientimpl.h" |
|
25 |
|
26 // ----------------------------------------------------------------------------- |
|
27 // CLocPsyConfigUiServiceClientImpl::CLocPsyConfigUiServiceClientImpl |
|
28 // ----------------------------------------------------------------------------- |
|
29 // |
|
30 CLocPsyConfigUiServiceClientImpl::CLocPsyConfigUiServiceClientImpl( |
|
31 CLocPsyConfigUiReg& aRegInfo, |
|
32 MAknServerAppExitObserver& aObserver ) |
|
33 :iObserver(&aObserver),iAppRegInfo(aRegInfo) |
|
34 { |
|
35 } |
|
36 |
|
37 // ----------------------------------------------------------------------------- |
|
38 // CLocPsyConfigUiServiceClientImpl::~CLocPsyConfigUiServiceClientImpl |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 CLocPsyConfigUiServiceClientImpl::~CLocPsyConfigUiServiceClientImpl() |
|
42 { |
|
43 if(iLaunchAppService) |
|
44 { |
|
45 delete iLaunchAppService; |
|
46 } |
|
47 } |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // CLocPsyConfigUiServiceClient* CLocPsyConfigUiServiceClient::NewLC |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 CLocPsyConfigUiServiceClient* CLocPsyConfigUiServiceClient::NewLC( |
|
54 CLocPsyConfigUiReg& aReg, |
|
55 MAknServerAppExitObserver& aObserver ) |
|
56 { |
|
57 CLocPsyConfigUiServiceClientImpl* self = |
|
58 new(ELeave) CLocPsyConfigUiServiceClientImpl( aReg, aObserver ); |
|
59 CleanupStack::PushL(self); |
|
60 // No second phase construction |
|
61 return self; |
|
62 } |
|
63 |
|
64 // ----------------------------------------------------------------------------- |
|
65 // CLocPsyConfigUiServiceClientImpl::StartServerL |
|
66 // ----------------------------------------------------------------------------- |
|
67 // |
|
68 void CLocPsyConfigUiServiceClientImpl::StartServerL() |
|
69 { |
|
70 iLaunchAppService = CAknLaunchAppService::NewL( iAppRegInfo.AppUid(), iObserver, NULL ); |
|
71 } |
|
72 |
|
73 // ----------------------------------------------------------------------------- |
|
74 // CLocPsyConfigUiServiceClientImpl::AppUid |
|
75 // ----------------------------------------------------------------------------- |
|
76 // |
|
77 TInt CLocPsyConfigUiServiceClientImpl::PsyId() |
|
78 { |
|
79 return iAppRegInfo.RegId(); |
|
80 } |
|
81 |
|
82 // ----------------------------------------------------------------------------- |
|
83 // CLocPsyConfigUiServiceClient::AppUid |
|
84 // ----------------------------------------------------------------------------- |
|
85 // |
|
86 TUid CLocPsyConfigUiServiceClientImpl::AppUid() |
|
87 { |
|
88 return iAppRegInfo.AppUid(); |
|
89 } |
|
90 |
|
91 // ----------------------------------------------------------------------------- |
|
92 // CLocPsyConfigUiServiceClientImpl::CloseServe |
|
93 // ----------------------------------------------------------------------------- |
|
94 // |
|
95 void CLocPsyConfigUiServiceClientImpl::CloseServer( TInt reason ) |
|
96 { |
|
97 iObserver->HandleServerAppExit(reason); |
|
98 } |
|