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: Wraps phone menu extensions. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef PHONECOMMANDEXTENSIONWRAPPER_H |
|
19 #define PHONECOMMANDEXTENSIONWRAPPER_H |
|
20 |
|
21 #include <QObject> |
|
22 #include <QString> |
|
23 #include <hbaction.h> |
|
24 #include <xqteluicommandextension.h> |
|
25 |
|
26 |
|
27 class PhoneCommandExtensionWrapper : public QObject |
|
28 { |
|
29 Q_OBJECT |
|
30 |
|
31 public: |
|
32 |
|
33 /*! |
|
34 \fn PhoneMenuExtensionWrapper (QObject *parent) |
|
35 */ |
|
36 PhoneCommandExtensionWrapper(int pluginUid); |
|
37 |
|
38 /*! |
|
39 Destructor |
|
40 */ |
|
41 virtual ~PhoneCommandExtensionWrapper(); |
|
42 |
|
43 /*! |
|
44 \fn void showGlobalNote () |
|
45 |
|
46 This method shows global note. |
|
47 |
|
48 */ |
|
49 int pluginUid(); |
|
50 |
|
51 /*! |
|
52 \fn void modifyMenuItemList(QList<int> &menuCmdList) |
|
53 |
|
54 Modifies menu command list. List contains current list |
|
55 of menu commands. Interface can add new commands which should be hanled |
|
56 by call handling or remove commands if list contains unsupported call |
|
57 commands. |
|
58 */ |
|
59 void modifyMenuCommandList( |
|
60 const QList<XQTelUiCommandExtension::CallInfo> &callInfo, |
|
61 QList<int> &menuCmdList); |
|
62 |
|
63 /*! |
|
64 \fn void modifyButtonCommandList(QList<int> &menuCmdList) |
|
65 |
|
66 Modifies push button command list. CallInfo contains current call |
|
67 information and buttonCmdList contains current list of push |
|
68 button commands. |
|
69 Interface can remove commands if list contains unsupported call |
|
70 commands (For example if service doesn't support conference call) |
|
71 or add commads which should be handled by telephony call |
|
72 handling (maximum amount of push button commands is two). |
|
73 */ |
|
74 void modifyPushButtonCommandList( |
|
75 const QList<XQTelUiCommandExtension::CallInfo> &callInfo, |
|
76 QList<int> &buttonCmdList); |
|
77 |
|
78 /*! |
|
79 \fn void addMenuActions(QList<HbAction*> &menuActions) |
|
80 |
|
81 Adds actions to menu. Interface adds own actions to the list which |
|
82 should be added to the call menu. |
|
83 Interface is the responsible for handling action triggers. |
|
84 Ownership of the actions in not transferred. |
|
85 */ |
|
86 void addMenuActions( |
|
87 const QList<XQTelUiCommandExtension::CallInfo> &callInfo, |
|
88 QList<HbAction*> &menuActions); |
|
89 |
|
90 /*! |
|
91 \fn void releaseMenu() |
|
92 |
|
93 Releases menu actions. Method is called when menu is not needed |
|
94 anymore and interface can release own menu actions. |
|
95 */ |
|
96 void releaseMenu(); |
|
97 |
|
98 /*! |
|
99 \fn void release() |
|
100 |
|
101 Releases plugin. Method is called when menu plugin is not needed |
|
102 anymore and interface can release all resources. |
|
103 */ |
|
104 void release(); |
|
105 |
|
106 /*! |
|
107 \fn void getCallInfoList() |
|
108 |
|
109 Gets call list information by call state and |
|
110 service id map. |
|
111 */ |
|
112 void getCallInfoList( QList<XQTelUiCommandExtension::CallInfo> &callInfo, |
|
113 QMap<int,int> callStates, |
|
114 QMap<int,int> serviceIds, |
|
115 int expandedCall); |
|
116 |
|
117 private: |
|
118 |
|
119 /*! |
|
120 \fn void mapCallState() |
|
121 |
|
122 Converts phoneengine call state to ui command extension |
|
123 call state. |
|
124 |
|
125 returns converted call state. |
|
126 */ |
|
127 XQTelUiCommandExtension::CallState mapCallState( int callState ); |
|
128 |
|
129 private: |
|
130 |
|
131 XQTelUiCommandExtension *m_plugin; |
|
132 int m_pluginUid; |
|
133 |
|
134 }; |
|
135 |
|
136 #endif // PHONECOMMANDEXTENSIONWRAPPER_H |
|