~phablet-team/messaging-framework/maintain-connection-state

« back to all changes in this revision

Viewing changes to include/messaging/qt/tp/text_channel.h

mergedĀ lp:~phablet-team/messaging-framework/include-message-when-group-cancelled

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#include <messaging/chat.h>
21
21
#include <messaging/messenger.h>
22
22
#include <messaging/qt/runtime.h>
 
23
 
 
24
#include <messaging/qt/tp/interfaces/base_channel_destroyable.h>
 
25
#include <messaging/qt/tp/interfaces/base_channel_roles.h>
23
26
#include <messaging/qt/tp/interfaces/types.h>
 
27
#include <messaging/qt/tp/interfaces/constants.h>
24
28
 
25
29
#include <TelepathyQt/BaseChannel>
26
30
#include <TelepathyQt/Types>
45
49
        , public messaging::Chat::Observer
46
50
        , public messaging::GroupManager::Observer
47
51
{
 
52
    Q_OBJECT
48
53
public:
49
54
    /// @brief Safes us some typing.
50
55
    typedef Tp::SharedPtr<TextChannel> Ptr;
72
77
    /// @brief on_group_created when the group has been created ok in the server
73
78
    void on_group_created() override;
74
79
 
75
 
    /// @brief on_group_creation_rejected when the group creation has been rejected by the server
76
 
    void on_group_creation_rejected() override;
77
 
 
78
80
    /// @brief on_group_cancelled when the group is no longer valid
79
 
    void on_group_cancelled(CancelGroupReason reason) override;
80
 
 
81
 
    /// @brief on_group_quit when confirmed leaving a group
82
 
    void on_group_quit() override;
 
81
    void on_group_cancelled(CancelGroupReason reason, const std::string &message) override;
83
82
 
84
83
    /// @brief on_group_title_changed when group title has changed in the server
85
84
    void on_group_title_changed(const std::string& new_title,
107
106
    /// @brief on_participant_ends_typing is invoked when a participant in this chat ends composing a message
108
107
    void on_participant_ends_typing(const std::shared_ptr<User> &user) override;
109
108
 
 
109
public Q_SLOTS:
 
110
    void delay_close();
110
111
 
111
112
private:
112
113
    TextChannel(Connection* tp_connection,
143
144
        /// @brief on_group_created when the group has been created ok in the server
144
145
        void on_group_created() override;
145
146
 
146
 
        /// @brief on_group_creation_rejected when the group creation has been rejected by the server
147
 
        void on_group_creation_rejected() override;
148
 
 
149
147
        /// @brief on_group_cancelled when the group is no longer valid
150
 
        void on_group_cancelled(CancelGroupReason reason) override;
151
 
 
152
 
        /// @brief on_group_quit when confirmed leaving a group
153
 
        void on_group_quit() override;
 
148
        void on_group_cancelled(CancelGroupReason reason, const std::string &message) override;
154
149
 
155
150
        /// @brief on_group_title_changed when group title has changed in the server
156
151
        void on_group_title_changed(const std::string& new_title,