|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 // AKNEIKSRVC.CPP |
|
18 // |
|
19 |
|
20 #include <e32std.h> |
|
21 #include <e32math.h> |
|
22 #include <eiksrvc.h> |
|
23 #include <eiksvdef.h> |
|
24 #include <s32mem.h> |
|
25 #include "akneiksrvc.h" |
|
26 #include <akneiksrvs.h> |
|
27 |
|
28 GLDEF_C void PanicServer(TEikAppUiServPanic aPanic) |
|
29 { |
|
30 _LIT(KPanicCat,"EIKON-SERVER"); |
|
31 User::Panic(KPanicCat,aPanic); |
|
32 } |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 EXPORT_C RAknEikAppUiSession::RAknEikAppUiSession() |
|
38 { |
|
39 } |
|
40 |
|
41 EXPORT_C TInt RAknEikAppUiSession::ShutdownApps(const TUid aRequesterUID, const TInt aTimeoutInMicroseconds) const |
|
42 { |
|
43 TIpcArgs args( aRequesterUID.iUid, aTimeoutInMicroseconds ); |
|
44 return SendReceive(EAknEikAppUiShutdownApps, args); |
|
45 } |
|
46 |
|
47 EXPORT_C TInt RAknEikAppUiSession::SetSgcParams(TInt /*aWgId*/, TBitFlags /*aAppFlags*/, TInt /*aSpLayout*/, TInt /*aSpFlags*/) |
|
48 { |
|
49 return KErrNotSupported; |
|
50 } |
|
51 |
|
52 EXPORT_C TInt RAknEikAppUiSession::BlockServerStatusPaneRedraws() |
|
53 { |
|
54 return KErrNone; |
|
55 } |
|
56 |
|
57 EXPORT_C TInt RAknEikAppUiSession::RedrawServerStatusPane() |
|
58 { |
|
59 return KErrNotSupported; |
|
60 } |
|
61 |
|
62 EXPORT_C TInt RAknEikAppUiSession::PrepareForAppExit(TInt /*aWgId*/) |
|
63 { |
|
64 return KErrNotSupported; |
|
65 } |
|
66 |
|
67 EXPORT_C TInt RAknEikAppUiSession::SetSystemFaded(TBool /*aFade*/) |
|
68 { |
|
69 return KErrNotSupported; |
|
70 } |
|
71 |
|
72 EXPORT_C TInt RAknEikAppUiSession::IsSystemFaded(TBool& /*aFade*/) const |
|
73 { |
|
74 return KErrNotSupported; |
|
75 } |
|
76 |
|
77 TInt RAknEikAppUiSession::DoNotifierControllerCommand(TInt aCommand) |
|
78 { |
|
79 TPckgC<TInt> arg(aCommand); |
|
80 SendReceive(EEikAppUiExtension, TIpcArgs(EAknNotifierControllerCmd, &arg)); |
|
81 return 0; |
|
82 } |
|
83 |
|
84 EXPORT_C TInt RAknEikAppUiSession::AllowNotifierAppServersToLoad() |
|
85 { |
|
86 return SendReceive(EEikAppUiExtension, TIpcArgs(EAknCapServerStartupComplete, &KNullDesC8)); |
|
87 } |
|
88 |
|
89 EXPORT_C TInt RAknEikAppUiSession::DoSynchWaitForAknCapServer() |
|
90 { |
|
91 TInt err(KErrNone); |
|
92 TBool connectedLocally(EFalse); |
|
93 if (Handle() == 0) |
|
94 { |
|
95 err = Connect(); |
|
96 connectedLocally = ETrue; |
|
97 } |
|
98 |
|
99 __ASSERT_ALWAYS(err == KErrNone, User::Invariant()); |
|
100 |
|
101 TRequestStatus status; |
|
102 SendReceive(EEikAppUiExtension,TIpcArgs(EAknSignalAknCapServerReady, &KNullDesC8), status); |
|
103 User::WaitForRequest(status); |
|
104 if (connectedLocally) |
|
105 { |
|
106 Close(); |
|
107 } |
|
108 |
|
109 return status.Int(); |
|
110 } |