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 |
11 #ifndef WEBRTC_LIBJINGLE_XMPP_XMPPTASK_H_ | 11 #ifndef WEBRTC_LIBJINGLE_XMPP_XMPPTASK_H_ |
12 #define WEBRTC_LIBJINGLE_XMPP_XMPPTASK_H_ | 12 #define WEBRTC_LIBJINGLE_XMPP_XMPPTASK_H_ |
13 | 13 |
14 #include <deque> | 14 #include <deque> |
| 15 #include <memory> |
15 #include <string> | 16 #include <string> |
| 17 |
16 #include "webrtc/libjingle/xmpp/xmppengine.h" | 18 #include "webrtc/libjingle/xmpp/xmppengine.h" |
17 #include "webrtc/base/constructormagic.h" | 19 #include "webrtc/base/constructormagic.h" |
18 #include "webrtc/base/sigslot.h" | 20 #include "webrtc/base/sigslot.h" |
19 #include "webrtc/base/task.h" | 21 #include "webrtc/base/task.h" |
20 #include "webrtc/base/taskparent.h" | 22 #include "webrtc/base/taskparent.h" |
21 | 23 |
22 namespace buzz { | 24 namespace buzz { |
23 | 25 |
24 ///////////////////////////////////////////////////////////////////// | 26 ///////////////////////////////////////////////////////////////////// |
25 // | 27 // |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 // Returns true if the task is under the specified rate limit and updates the | 155 // Returns true if the task is under the specified rate limit and updates the |
154 // rate limit accordingly | 156 // rate limit accordingly |
155 bool VerifyTaskRateLimit(const std::string task_name, int max_count, | 157 bool VerifyTaskRateLimit(const std::string task_name, int max_count, |
156 int per_x_seconds); | 158 int per_x_seconds); |
157 | 159 |
158 private: | 160 private: |
159 void StopImpl(); | 161 void StopImpl(); |
160 | 162 |
161 bool stopped_; | 163 bool stopped_; |
162 std::deque<XmlElement*> stanza_queue_; | 164 std::deque<XmlElement*> stanza_queue_; |
163 rtc::scoped_ptr<XmlElement> next_stanza_; | 165 std::unique_ptr<XmlElement> next_stanza_; |
164 std::string id_; | 166 std::string id_; |
165 | 167 |
166 #if !defined(NDEBUG) | 168 #if !defined(NDEBUG) |
167 bool debug_force_timeout_; | 169 bool debug_force_timeout_; |
168 #endif | 170 #endif |
169 }; | 171 }; |
170 | 172 |
171 } // namespace buzz | 173 } // namespace buzz |
172 | 174 |
173 #endif // WEBRTC_LIBJINGLE_XMPP_XMPPTASK_H_ | 175 #endif // WEBRTC_LIBJINGLE_XMPP_XMPPTASK_H_ |
OLD | NEW |