|
1 /* |
|
2 * Copyright (c) 2003-2005 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: Implements service API for providers offering menu services |
|
15 * for consumers. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 #include <ecom/ecom.h> |
|
23 #include "AiwServiceIfMenu.h" |
|
24 #include "AiwMenu.h" |
|
25 |
|
26 |
|
27 void CAiwServiceIfMenu::InitializeMenuPaneHookL( |
|
28 CAiwMenuPane* aMenuPane, |
|
29 TInt aIndex, |
|
30 TInt aCascadeId, |
|
31 const CAiwGenericParamList& aInParamList) |
|
32 { |
|
33 iMenuPane = aMenuPane; |
|
34 |
|
35 // Trapping prevents a leaving provider from breaking the whole consumer menu. |
|
36 TRAPD(err, InitializeMenuPaneL(*aMenuPane, aIndex, aCascadeId, aInParamList)); |
|
37 if(err) |
|
38 { |
|
39 #ifdef _DEBUG |
|
40 RDebug::Print(_L("AIW PROVIDER ERROR: CAiwServiceIfMenu::InitializeMenuPaneL() failed, leave code:%d"), err); |
|
41 #endif |
|
42 } |
|
43 } |
|
44 |
|
45 |
|
46 |
|
47 void CAiwServiceIfMenu::HandleMenuCmdHookL( |
|
48 CAiwMenuPane* aMenuPane, |
|
49 TInt aMenuCmdId, |
|
50 const CAiwGenericParamList& aInParamList, |
|
51 CAiwGenericParamList& aOutParamList, |
|
52 TUint aCmdOptions, |
|
53 const MAiwNotifyCallback* aCallback) |
|
54 { |
|
55 if (!iMenuPane) |
|
56 { |
|
57 return; |
|
58 } |
|
59 |
|
60 HandleMenuCmdL(aMenuPane->MenuCmdId(aMenuCmdId), aInParamList, aOutParamList, |
|
61 aCmdOptions, aCallback); |
|
62 } |
|
63 |
|
64 |
|
65 EXPORT_C const CAiwMenuPane* CAiwServiceIfMenu::MenuPane() const |
|
66 { |
|
67 return iMenuPane; |
|
68 } |
|
69 |
|
70 |
|
71 EXPORT_C CAiwServiceIfMenu::~CAiwServiceIfMenu() |
|
72 { |
|
73 } |
|
74 |
|
75 |
|
76 EXPORT_C void* CAiwServiceIfMenu::ExtensionInterface(TUid /*aInterface*/) |
|
77 { |
|
78 return NULL; |
|
79 } |
|
80 |
|
81 // End of file |