|
1 /* |
|
2 * Copyright (c) 2008 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 menus using ECOM |
|
15 * plugin. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef TELMENUEXTENSION_H |
|
21 #define TELMENUEXTENSION_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <teltouchpaneextension.h> |
|
26 |
|
27 // CONSTANTS |
|
28 // Constants used in ECOM implementation |
|
29 const TUid KTelMenuExtensionInterfaceUid = { 0x2001E2A0 }; |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CEikMenuPane; |
|
33 |
|
34 /** |
|
35 * Plugin interface class for manipulating telephony |
|
36 * menu items. |
|
37 * |
|
38 * Menu customization * |
|
39 * Plug-in is loaded by using service table value for most active call. |
|
40 * |
|
41 * Command customization * |
|
42 * Plug-in can dimm existing commands or create new command. If default |
|
43 * implementation doesnt handle command, plug-in is loaded and |
|
44 * HandleCommandL is called. |
|
45 * |
|
46 * @since S60 5.1 |
|
47 */ |
|
48 class CTelMenuExtension : public CBase |
|
49 { |
|
50 public: // Data |
|
51 |
|
52 /** |
|
53 * Specifies call types |
|
54 */ |
|
55 enum TCallType |
|
56 { |
|
57 EUninitialized = 0, |
|
58 ECsVoice = 1, // Circuit switched voice call |
|
59 ECsFax = 2, // Fax call |
|
60 ECsData = 3, // Circuit switched data call |
|
61 ECsVideo = 4, // Multimedia/Video call |
|
62 EPsVoice = 5 // Voice over IP call |
|
63 }; |
|
64 |
|
65 /** |
|
66 * Specifies call states |
|
67 */ |
|
68 enum TCallState |
|
69 { |
|
70 ENone = 0, |
|
71 EDisconnecting = 1, // Call is disconnecting |
|
72 EActive = 2, // Call is active |
|
73 EOnHold = 3, // Call is on hold |
|
74 EIncoming = 4, // Call is ringing |
|
75 EOutgoing = 5 // Call is dialling or connecting |
|
76 }; |
|
77 |
|
78 /** |
|
79 * Capsulates call info. |
|
80 */ |
|
81 class TCallInfo |
|
82 { |
|
83 public: |
|
84 // Call id, specified by phoneengine |
|
85 // Conference call can be determined by using this integer |
|
86 // Check phoneengine API |
|
87 TInt iCallId; |
|
88 |
|
89 // Service provider settings item Id |
|
90 TUint iServiceId; |
|
91 |
|
92 // Calls state |
|
93 TCallState iCallState; |
|
94 |
|
95 // Calls type |
|
96 TCallType iCallType; |
|
97 }; |
|
98 |
|
99 |
|
100 public: |
|
101 |
|
102 /** |
|
103 * Create new plugin having the given UID. |
|
104 * |
|
105 * @leave Uses Leave code KErrNotFound if implementation is not found. |
|
106 * @param aImplementationUid Implementation UID of the plugin to be |
|
107 * created. |
|
108 */ |
|
109 static CTelMenuExtension* NewL( |
|
110 TUid aImplementationUid ); |
|
111 |
|
112 /** |
|
113 * Destructor |
|
114 */ |
|
115 virtual inline ~CTelMenuExtension(); |
|
116 |
|
117 |
|
118 /** |
|
119 * Modifys given menu pane. Removes unsupported options from call menu and |
|
120 * adds custom menu commands to the menu. |
|
121 * |
|
122 * @param aCallArray - Array holding information of all ongoing calls. |
|
123 * @param aMenuPane - A modifyable menu pane. |
|
124 */ |
|
125 virtual void ModifyExtensionsCallMenuL( |
|
126 const RArray<CTelMenuExtension::TCallInfo>& aCallArray, |
|
127 CEikMenuPane& aMenuPane ) = 0; |
|
128 |
|
129 /** |
|
130 * Modifys given touch pane buttons. Dimms unsupported buttons from the |
|
131 * pane. |
|
132 * |
|
133 * @param aCallArray - Array holding information of all ongoing calls. |
|
134 * @param aTouchPane - A touch pane interface. |
|
135 */ |
|
136 virtual void ModifyExtensionsTouchPaneButtonsL( |
|
137 const RArray<CTelMenuExtension::TCallInfo>& aCallArray, |
|
138 MTelTouchPaneExtension& aTouchPane ) = 0; |
|
139 |
|
140 /** |
|
141 * Handles custom menu commands. |
|
142 * |
|
143 * @param aCommand It is the code of the command to be handled. |
|
144 * @return boolean value was the command handled (ETrue) or not (EFalse). |
|
145 */ |
|
146 virtual TBool HandleCommandL( TInt aCommand ) = 0; |
|
147 |
|
148 |
|
149 private: // data |
|
150 |
|
151 /** |
|
152 * ECOM plugin instance UID. |
|
153 */ |
|
154 TUid iDtor_ID_Key; |
|
155 }; |
|
156 |
|
157 #include "telmenuextension.inl" |
|
158 |
|
159 |
|
160 #endif // TELMENUEXTENSION_H |
|
161 |
|
162 //End of file |