|
1 /*! |
|
2 * Copyright (c) 2010 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: Defines interface for manipulating telephony call commands. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef XQTELUICOMMANDEXTENSION_H |
|
19 #define XQTELUICOMMANDEXTENSION_H |
|
20 |
|
21 #include <QObject> |
|
22 #include <hbaction.h> |
|
23 |
|
24 |
|
25 #ifdef BUILD_DLL |
|
26 #define DLL_EXPORT Q_DECL_EXPORT |
|
27 #else |
|
28 #define DLL_EXPORT Q_DECL_IMPORT |
|
29 #endif |
|
30 |
|
31 /*! |
|
32 XQTelUiCommandExtension |
|
33 Defines interface for manipulating telephony call commands. |
|
34 |
|
35 */ |
|
36 class DLL_EXPORT XQTelUiCommandExtension |
|
37 { |
|
38 |
|
39 public: |
|
40 |
|
41 /*! |
|
42 Specifies call states. |
|
43 */ |
|
44 enum CallState |
|
45 { |
|
46 None = 0, |
|
47 Disconnecting = 1, // Call is disconnecting |
|
48 Active = 2, // Call is active |
|
49 OnHold = 3, // Call is on hold |
|
50 Incoming = 4, // Call is ringing |
|
51 Outgoing = 5 // Call is dialling or connecting |
|
52 }; |
|
53 |
|
54 /*! |
|
55 Capsulates call info. |
|
56 */ |
|
57 class CallInfo |
|
58 { |
|
59 public: |
|
60 |
|
61 // Service provider settings item Id |
|
62 int mServiceId; |
|
63 |
|
64 // Calls state |
|
65 int mCallState; |
|
66 |
|
67 // Is call header expanded |
|
68 bool mIsExpanded; |
|
69 |
|
70 }; |
|
71 |
|
72 /*! |
|
73 Capsulates Tool Bar command info. |
|
74 */ |
|
75 class ToolBarCommand |
|
76 { |
|
77 public: |
|
78 |
|
79 // Tool Bar command Id |
|
80 int mCommandId; |
|
81 |
|
82 // Is command enabled |
|
83 bool mIsEnabled; |
|
84 |
|
85 }; |
|
86 |
|
87 /*! |
|
88 \fn void modifyMenuItemList(QList<int> &menuCmdList) |
|
89 |
|
90 Modifies menu command list. CallInfo contains current call information and |
|
91 menuCmdList contains current list of menu commands. |
|
92 Interface can add new commands which should be hanled by telephony |
|
93 call handling or remove commands if list contains unsupported call |
|
94 commands. |
|
95 */ |
|
96 virtual void modifyMenuCommandList(const QList<CallInfo> &callInfo, |
|
97 QList<int> &menuCmdList) = 0; |
|
98 |
|
99 /*! |
|
100 \fn void modifyButtonCommandList(QList<int> &menuCmdList) |
|
101 |
|
102 Modifies push button command list. CallInfo contains current call |
|
103 information and buttonCmdList contains current list of push |
|
104 button commands. |
|
105 Interface can remove commands if list contains unsupported call |
|
106 commands (For example if service doesn't support conference call) |
|
107 or add commads which should be handled by telephony call |
|
108 handling (maximum amount of push button commands is 2 and list |
|
109 index 0 is used for right button). |
|
110 */ |
|
111 virtual void modifyPushButtonCommandList(const QList<CallInfo> &callInfo, |
|
112 QList<int> &buttonCmdList) = 0; |
|
113 |
|
114 |
|
115 /*! |
|
116 \fn void modifyToolBarCommandList(QList<int> &menuCmdList) |
|
117 |
|
118 Modifies tool bar command list. CallInfo contains current call |
|
119 information and toolBarCmdList contains current list of tool |
|
120 bar commands. |
|
121 Interface can remove/disable commands if the command list contains |
|
122 unsupported call commands (For example if service doesn't support |
|
123 conference call) or add commads which should be handled by telephony |
|
124 call handling (maximum amount of tool bar commands is 4 and list |
|
125 index 0 is used for right button). |
|
126 */ |
|
127 virtual void modifyToolBarCommandList(const QList<CallInfo> &callInfo, |
|
128 QList<ToolBarCommand> &toolBarCmdList) = 0; |
|
129 |
|
130 /*! |
|
131 \fn void addMenuActions(QList<HbAction*> &menuActions) |
|
132 |
|
133 Adds custom actions to the call menu. CallInfo contains current call |
|
134 information. Interface could add own actions to the menu actions |
|
135 list and actions will be added to the call menu. |
|
136 Interface is the responsible for handling action triggers. |
|
137 Ownership of the actions in not transferred. |
|
138 */ |
|
139 virtual void addMenuActions(const QList<CallInfo> &callInfo, |
|
140 QList<HbAction*> &menuActions) = 0; |
|
141 |
|
142 /*! |
|
143 \fn void releaseMenu() |
|
144 |
|
145 Releases menu actions. Method is called when menu is not needed |
|
146 anymore and interface can release own menu actions. |
|
147 */ |
|
148 virtual void releaseMenu() = 0; |
|
149 |
|
150 /*! |
|
151 \fn void release() |
|
152 |
|
153 Releases plugin. Method is called when menu extension plugin is |
|
154 not needed anymore and interface can release all resources and |
|
155 plugin itself. |
|
156 */ |
|
157 virtual void release() = 0; |
|
158 |
|
159 }; |
|
160 |
|
161 Q_DECLARE_INTERFACE(XQTelUiCommandExtension, "com.nokia.telephony.XQTelUiCommandExtension/1.0" ); |
|
162 |
|
163 #endif // XQTELUICOMMANDEXTENSION_H |
|
164 |