~mterry/telephony-service/start-on

« back to all changes in this revision

Viewing changes to handler/tests/mock/connection.h

  • Committer: CI bot
  • Author(s): Gustavo Pichorim Boiko
  • Date: 2014-04-02 12:41:29 UTC
  • mfrom: (765.2.24 telephony-service-conf_call)
  • Revision ID: ps-jenkins@lists.canonical.com-20140402124129-oywt8u6u9f4253bg
Add support for handling conference calls. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
class MockTextChannel;
39
39
class MockCallChannel;
40
40
class MockConnectionDBus;
 
41
class MockConferenceCallChannel;
41
42
 
42
43
class MockConnection : public Tp::BaseConnection
43
44
{
62
63
    Tp::BaseConnectionSimplePresenceInterfacePtr simplePresenceIface;
63
64
    Tp::BaseConnectionContactsInterfacePtr contactsIface;
64
65
    uint newHandle(const QString &identifier);
 
66
    QMap<QString, MockCallChannel*> callChannels();
65
67
 
66
68
    uint ensureHandle(const QString &id);
67
69
    Tp::BaseChannelPtr createTextChannel(uint targetHandleType,
68
70
                                         uint targetHandle, Tp::DBusError *error);
69
71
    Tp::BaseChannelPtr createCallChannel(uint targetHandleType,
70
 
                                         uint targetHandle, Tp::DBusError *error);
 
72
                                         uint targetHandle,
 
73
                                         const QVariantMap &hints,
 
74
                                         Tp::DBusError *error);
71
75
 
72
76
    ~MockConnection();
73
77
 
78
82
    void callEnded(const QString &callerId);
79
83
    void callStateChanged(const QString &callerId, const QString &objectPath, const QString &state);
80
84
 
 
85
    void conferenceCreated(const QString &objectPath);
 
86
    void channelMerged(const QString &objectPath);
 
87
    void channelSplitted(const QString &objectPath);
 
88
    void channelSplitted(const QDBusObjectPath &objectPath);
 
89
 
81
90
public Q_SLOTS:
82
91
    void placeIncomingMessage(const QString &message, const QVariantMap &info);
83
92
    void hangupCall(const QString &callerId);
84
93
    void setCallState(const QString &phoneNumber, const QString &state);
85
94
    void onTextChannelClosed();
86
95
    void onCallChannelClosed();
 
96
    void onCallChannelDestroyed();
87
97
    void onCallStateChanged(MockCallChannel *channel, const QString &state);
88
98
    void onMessageRead(const QString &id);
89
99
 
 
100
    void onConferenceCallChannelClosed();
 
101
    void onCallChannelSplitted();
 
102
 
90
103
private:
91
104
    void addMMSToService(const QString &path, const QVariantMap &properties, const QString &servicePath);
92
105
    QMap<uint, QString> mHandles;
102
115
 
103
116
    MockConnectionDBus *mDBus;
104
117
    QStringList mIncomingCalls;
 
118
    MockConferenceCallChannel *mConferenceCall;
105
119
};
106
120
 
107
121
#endif