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_EXAMPLES_PEERCONNECTION_CLIENT_PEER_CONNECTION_CLIENT_H_ | 11 #ifndef WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_PEER_CONNECTION_CLIENT_H_ |
12 #define WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_PEER_CONNECTION_CLIENT_H_ | 12 #define WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_PEER_CONNECTION_CLIENT_H_ |
13 #pragma once | 13 #pragma once |
14 | 14 |
15 #include <map> | 15 #include <map> |
16 #include <memory> | 16 #include <memory> |
17 #include <string> | 17 #include <string> |
18 | 18 |
19 #include "webrtc/base/nethelpers.h" | 19 #include "webrtc/base/nethelpers.h" |
20 #include "webrtc/base/physicalsocketserver.h" | 20 #include "webrtc/base/physicalsocketserver.h" |
21 #include "webrtc/base/scoped_ptr.h" | |
22 #include "webrtc/base/signalthread.h" | 21 #include "webrtc/base/signalthread.h" |
23 #include "webrtc/base/sigslot.h" | 22 #include "webrtc/base/sigslot.h" |
24 | 23 |
25 typedef std::map<int, std::string> Peers; | 24 typedef std::map<int, std::string> Peers; |
26 | 25 |
27 struct PeerConnectionClientObserver { | 26 struct PeerConnectionClientObserver { |
28 virtual void OnSignedIn() = 0; // Called when we're logged on. | 27 virtual void OnSignedIn() = 0; // Called when we're logged on. |
29 virtual void OnDisconnected() = 0; | 28 virtual void OnDisconnected() = 0; |
30 virtual void OnPeerConnected(int id, const std::string& name) = 0; | 29 virtual void OnPeerConnected(int id, const std::string& name) = 0; |
31 virtual void OnPeerDisconnected(int peer_id) = 0; | 30 virtual void OnPeerDisconnected(int peer_id) = 0; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 std::string onconnect_data_; | 114 std::string onconnect_data_; |
116 std::string control_data_; | 115 std::string control_data_; |
117 std::string notification_data_; | 116 std::string notification_data_; |
118 std::string client_name_; | 117 std::string client_name_; |
119 Peers peers_; | 118 Peers peers_; |
120 State state_; | 119 State state_; |
121 int my_id_; | 120 int my_id_; |
122 }; | 121 }; |
123 | 122 |
124 #endif // WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_PEER_CONNECTION_CLIENT_H_ | 123 #endif // WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_PEER_CONNECTION_CLIENT_H_ |
OLD | NEW |