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: |
|
15 * |
|
16 */ |
|
17 #ifndef PHONEBUBBLEWRAPPERMOCK_H |
|
18 #define PHONEBUBBLEWRAPPERMOCK_H |
|
19 |
|
20 #include <QObject> |
|
21 #include <QMap> |
|
22 #include <e32cmn.h> |
|
23 #include "bubblemanagerif.h" |
|
24 |
|
25 extern bool m_setDivertCalled; |
|
26 extern bool m_bubblewrapperbool; |
|
27 extern int m_bubblewrapperint; |
|
28 extern bool m_setStateCalled; |
|
29 extern bool m_setLabelCalled; |
|
30 extern bool m_setCliCalled; |
|
31 extern bool m_setSecondaryCliCalled; |
|
32 extern bool m_setCallTypeCalled; |
|
33 extern bool m_createCallHeaderCalled; |
|
34 extern int m_createCallHeaderInt; |
|
35 extern int m_setStateCallId; |
|
36 extern int m_setStateBubbleId; |
|
37 extern int m_setStateCallState; |
|
38 extern const TDesC *m_setLabelText; |
|
39 extern int m_setLabelBubbleId; |
|
40 extern int m_setCliBubbleId; |
|
41 extern const TDesC *m_setCliText; |
|
42 extern int m_setSecondaryCliBubbleId; |
|
43 extern const TDesC *m_setSecondaryCliText; |
|
44 extern int m_setCallTypeBubbleId; |
|
45 extern int m_setCallTypeType; |
|
46 extern bool m_bubbleIdCalled; |
|
47 extern int m_bubbleIdCallId; |
|
48 extern bool m_activeCallCountCalled; |
|
49 extern QMap<int, int> m_callStateMap; |
|
50 extern QMap<int, int> m_bubblesMap; |
|
51 extern QList<int> m_conferenceCallList; |
|
52 extern bool m_creataConferenceCalled; |
|
53 extern bool m_removeConferenceCalled; |
|
54 extern bool m_removeCallFromConference; |
|
55 extern int m_bubble_id; |
|
56 extern QMap<int,int> m_services; |
|
57 extern bool m_setCipheringCalled; |
|
58 |
|
59 |
|
60 class PhoneBubbleWrapper : public QObject |
|
61 { |
|
62 Q_OBJECT |
|
63 |
|
64 public: |
|
65 PhoneBubbleWrapper (BubbleManagerIF& bubble, QObject *parent = 0); |
|
66 virtual ~PhoneBubbleWrapper (); |
|
67 void updateCallState (int callId, int newState); |
|
68 int callId (int state); |
|
69 int createCallHeader (int callId); |
|
70 void removeCallHeader (int callId); |
|
71 void setState (int callId, int bubble, int callState); |
|
72 void setLabel (int bubble, const TDesC &text); |
|
73 void setCli (int bubble, const TDesC &cliText); |
|
74 void setSecondaryCli (int bubble, const TDesC &cliText); |
|
75 void setCallType (int bubble, int callType); |
|
76 BubbleManagerIF& bubbleManager (); |
|
77 int bubbleId (int callId); |
|
78 void setDivert (int bubble, bool enabled); |
|
79 void setCiphering(int bubble, bool indicatorAllowed, bool enabled); |
|
80 int activeCallCount (); |
|
81 |
|
82 const QMap<int, int> callStates() const; |
|
83 |
|
84 QMap<int, int> bubbles(); |
|
85 |
|
86 int createConferenceBubble(int callId, int callState, |
|
87 const TDesC &labelText, const TDesC &cliText); |
|
88 |
|
89 void setConferenceCallId(int callId); |
|
90 |
|
91 QList<int> conferenceCallList(); |
|
92 |
|
93 void removeConferenceCallId(int callId); |
|
94 |
|
95 bool conferenceCallId(int callId); |
|
96 |
|
97 void removeCallFromConference(int callId); |
|
98 |
|
99 void removeConferenceBubble(); |
|
100 |
|
101 int callIdByBubbleId(int bubbleId); |
|
102 |
|
103 void addToConferenceBubble(); |
|
104 |
|
105 void setServiceId(int callId, int serviceId); |
|
106 |
|
107 int serviceIdByCallId(int callId) const; |
|
108 |
|
109 QMap<int,int> serviceIds() const; |
|
110 |
|
111 private: |
|
112 BubbleManagerIF& m_bubble; |
|
113 }; |
|
114 |
|
115 #endif // PHONEBUBBLEWRAPPERMOCK_H |
|