OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2011 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_PUBSUBSTATECLIENT_H_ | 11 #ifndef WEBRTC_LIBJINGLE_XMPP_PUBSUBSTATECLIENT_H_ |
12 #define WEBRTC_LIBJINGLE_XMPP_PUBSUBSTATECLIENT_H_ | 12 #define WEBRTC_LIBJINGLE_XMPP_PUBSUBSTATECLIENT_H_ |
13 | 13 |
14 #include <map> | 14 #include <map> |
15 #include <memory> | 15 #include <memory> |
16 #include <string> | 16 #include <string> |
17 #include <vector> | 17 #include <vector> |
18 | 18 |
19 #include "webrtc/libjingle/xmllite/qname.h" | 19 #include "webrtc/libjingle/xmllite/qname.h" |
20 #include "webrtc/libjingle/xmllite/xmlelement.h" | 20 #include "webrtc/libjingle/xmllite/xmlelement.h" |
21 #include "webrtc/libjingle/xmpp/constants.h" | 21 #include "webrtc/libjingle/xmpp/constants.h" |
22 #include "webrtc/libjingle/xmpp/jid.h" | 22 #include "webrtc/libjingle/xmpp/jid.h" |
23 #include "webrtc/libjingle/xmpp/pubsubclient.h" | 23 #include "webrtc/libjingle/xmpp/pubsubclient.h" |
24 #include "webrtc/base/constructormagic.h" | 24 #include "webrtc/base/constructormagic.h" |
| 25 #include "webrtc/base/scoped_ptr.h" |
25 #include "webrtc/base/sigslot.h" | 26 #include "webrtc/base/sigslot.h" |
26 #include "webrtc/base/sigslotrepeater.h" | 27 #include "webrtc/base/sigslotrepeater.h" |
27 | 28 |
28 namespace buzz { | 29 namespace buzz { |
29 | 30 |
30 // To handle retracts correctly, we need to remember certain details | 31 // To handle retracts correctly, we need to remember certain details |
31 // about an item. We could just cache the entire XML element, but | 32 // about an item. We could just cache the entire XML element, but |
32 // that would take more memory and require re-parsing. | 33 // that would take more memory and require re-parsing. |
33 struct StateItemInfo { | 34 struct StateItemInfo { |
34 std::string published_nick; | 35 std::string published_nick; |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 // key => state | 263 // key => state |
263 std::map<std::string, C> state_by_key_; | 264 std::map<std::string, C> state_by_key_; |
264 // itemid => StateItemInfo | 265 // itemid => StateItemInfo |
265 std::map<std::string, StateItemInfo> info_by_itemid_; | 266 std::map<std::string, StateItemInfo> info_by_itemid_; |
266 | 267 |
267 RTC_DISALLOW_COPY_AND_ASSIGN(PubSubStateClient); | 268 RTC_DISALLOW_COPY_AND_ASSIGN(PubSubStateClient); |
268 }; | 269 }; |
269 } // namespace buzz | 270 } // namespace buzz |
270 | 271 |
271 #endif // WEBRTC_LIBJINGLE_XMPP_PUBSUBSTATECLIENT_H_ | 272 #endif // WEBRTC_LIBJINGLE_XMPP_PUBSUBSTATECLIENT_H_ |
OLD | NEW |