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: Bubble wrapper. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef PHONEBUBBLEWRAPPER_H |
|
19 #define PHONEBUBBLEWRAPPER_H |
|
20 |
|
21 #include <exception> // must be before e32base.h so uncaught_exception gets defined |
|
22 #include <e32base.h> |
|
23 #include <QObject> |
|
24 #include <QMap> |
|
25 |
|
26 class BubbleManagerIF; |
|
27 class HbAction; |
|
28 |
|
29 class PhoneBubbleWrapper : public QObject |
|
30 { |
|
31 Q_OBJECT |
|
32 |
|
33 public: |
|
34 |
|
35 /** |
|
36 * Constructor |
|
37 */ |
|
38 PhoneBubbleWrapper (BubbleManagerIF& bubble, QObject *parent = 0); |
|
39 |
|
40 /** |
|
41 * Destructor |
|
42 */ |
|
43 virtual ~PhoneBubbleWrapper (); |
|
44 |
|
45 void updateCallState (int callId, int newState); |
|
46 |
|
47 int callId (int state); |
|
48 |
|
49 int createCallHeader (int callId); |
|
50 |
|
51 void removeCallHeader (int callId); |
|
52 |
|
53 void setState (int callId, int bubble, int callState); |
|
54 |
|
55 void setLabel (int bubble, const TDesC &text); |
|
56 |
|
57 void setCli (int bubble, const TDesC &cliText); |
|
58 |
|
59 void setSecondaryCli (int bubble, const TDesC &cliText); |
|
60 |
|
61 void setCallType (int bubble, int callType); |
|
62 |
|
63 BubbleManagerIF& bubbleManager (); |
|
64 |
|
65 int bubbleId (int callId); |
|
66 |
|
67 void setDivert (int bubble, bool enabled); |
|
68 |
|
69 void setCiphering(int bubble, bool indicatorAllowed, bool enabled); |
|
70 |
|
71 int activeCallCount(); |
|
72 |
|
73 QMap<int, int> callStates() const; |
|
74 |
|
75 QMap<int, int> bubbles() const; |
|
76 |
|
77 int createConferenceBubble(int callId, int callState, |
|
78 const TDesC &labelText, const TDesC &cliText); |
|
79 |
|
80 void setConferenceCallId(int callId); |
|
81 |
|
82 QList<int> conferenceCallList() const; |
|
83 |
|
84 void removeConferenceCallId(int callId); |
|
85 |
|
86 bool conferenceCallId(int callId) const; |
|
87 |
|
88 void removeCallFromConference(int callId); |
|
89 |
|
90 void removeConferenceBubble(); |
|
91 |
|
92 int callIdByBubbleId(int bubbleId); |
|
93 |
|
94 void addToConferenceBubble(); |
|
95 |
|
96 void setServiceId(int callId, int serviceId); |
|
97 |
|
98 int serviceIdByCallId(int callId) const; |
|
99 |
|
100 QMap<int,int> serviceIds() const; |
|
101 |
|
102 private: |
|
103 |
|
104 int callIdForConference(); |
|
105 |
|
106 bool getCallIdsForConference(int &first, int &second); |
|
107 |
|
108 private: |
|
109 |
|
110 BubbleManagerIF& m_bubbleManager; |
|
111 |
|
112 // Call id - call state map |
|
113 QMap<int, int> m_callStates; |
|
114 |
|
115 // Call id - bubble id map |
|
116 QMap<int, int> m_bubbles; |
|
117 |
|
118 // Call id - service id map |
|
119 QMap<int, int> m_services; |
|
120 |
|
121 // Conference call id list |
|
122 QList<int> m_conferenceList; |
|
123 }; |
|
124 |
|
125 #endif // PHONEBUBBLEWRAPPER_H |
|