OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 public sigslot::has_slots<> | 112 public sigslot::has_slots<> |
113 { | 113 { |
114 public: | 114 public: |
115 XmppTask(XmppTaskParentInterface* parent, | 115 XmppTask(XmppTaskParentInterface* parent, |
116 XmppEngine::HandlerLevel level = XmppEngine::HL_NONE); | 116 XmppEngine::HandlerLevel level = XmppEngine::HL_NONE); |
117 virtual ~XmppTask(); | 117 virtual ~XmppTask(); |
118 | 118 |
119 std::string task_id() const { return id_; } | 119 std::string task_id() const { return id_; } |
120 void set_task_id(std::string id) { id_ = id; } | 120 void set_task_id(std::string id) { id_ = id; } |
121 | 121 |
122 #ifdef _DEBUG | 122 #if !defined(NDEBUG) |
123 void set_debug_force_timeout(const bool f) { debug_force_timeout_ = f; } | 123 void set_debug_force_timeout(const bool f) { debug_force_timeout_ = f; } |
124 #endif | 124 #endif |
125 | 125 |
126 virtual bool HandleStanza(const XmlElement* stanza) { return false; } | 126 virtual bool HandleStanza(const XmlElement* stanza) { return false; } |
127 | 127 |
128 protected: | 128 protected: |
129 XmppReturnStatus SendStanza(const XmlElement* stanza); | 129 XmppReturnStatus SendStanza(const XmlElement* stanza); |
130 XmppReturnStatus SetResult(const std::string& code); | 130 XmppReturnStatus SetResult(const std::string& code); |
131 XmppReturnStatus SendStanzaError(const XmlElement* element_original, | 131 XmppReturnStatus SendStanzaError(const XmlElement* element_original, |
132 XmppStanzaError code, | 132 XmppStanzaError code, |
(...skipping 22 matching lines...) Expand all Loading... |
155 int per_x_seconds); | 155 int per_x_seconds); |
156 | 156 |
157 private: | 157 private: |
158 void StopImpl(); | 158 void StopImpl(); |
159 | 159 |
160 bool stopped_; | 160 bool stopped_; |
161 std::deque<XmlElement*> stanza_queue_; | 161 std::deque<XmlElement*> stanza_queue_; |
162 rtc::scoped_ptr<XmlElement> next_stanza_; | 162 rtc::scoped_ptr<XmlElement> next_stanza_; |
163 std::string id_; | 163 std::string id_; |
164 | 164 |
165 #ifdef _DEBUG | 165 #if !defined(NDEBUG) |
166 bool debug_force_timeout_; | 166 bool debug_force_timeout_; |
167 #endif | 167 #endif |
168 }; | 168 }; |
169 | 169 |
170 } // namespace buzz | 170 } // namespace buzz |
171 | 171 |
172 #endif // WEBRTC_LIBJINGLE_XMPP_XMPPTASK_H_ | 172 #endif // WEBRTC_LIBJINGLE_XMPP_XMPPTASK_H_ |
OLD | NEW |