OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef REMOTING_HOST_LOG_TO_SERVER_H_ | 5 #ifndef REMOTING_HOST_LOG_TO_SERVER_H_ |
6 #define REMOTING_HOST_LOG_TO_SERVER_H_ | 6 #define REMOTING_HOST_LOG_TO_SERVER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 SignalStrategy* signal_strategy); | 42 SignalStrategy* signal_strategy); |
43 virtual ~LogToServer(); | 43 virtual ~LogToServer(); |
44 | 44 |
45 // Logs a session state change. Currently, this is either | 45 // Logs a session state change. Currently, this is either |
46 // connection or disconnection. | 46 // connection or disconnection. |
47 void LogSessionStateChange(const std::string& jid, bool connected); | 47 void LogSessionStateChange(const std::string& jid, bool connected); |
48 | 48 |
49 // SignalStrategy::Listener interface. | 49 // SignalStrategy::Listener interface. |
50 virtual void OnSignalStrategyStateChange( | 50 virtual void OnSignalStrategyStateChange( |
51 SignalStrategy::State state) OVERRIDE; | 51 SignalStrategy::State state) OVERRIDE; |
| 52 virtual bool OnSignalStrategyIncomingStanza( |
| 53 const buzz::XmlElement* stanza) OVERRIDE; |
52 | 54 |
53 // HostStatusObserver interface. | 55 // HostStatusObserver interface. |
54 virtual void OnClientConnected(const std::string& jid) OVERRIDE; | 56 virtual void OnClientConnected(const std::string& jid) OVERRIDE; |
55 virtual void OnClientDisconnected(const std::string& jid) OVERRIDE; | 57 virtual void OnClientDisconnected(const std::string& jid) OVERRIDE; |
56 virtual void OnClientRouteChange( | 58 virtual void OnClientRouteChange( |
57 const std::string& jid, | 59 const std::string& jid, |
58 const std::string& channel_name, | 60 const std::string& channel_name, |
59 const protocol::TransportRoute& route) OVERRIDE; | 61 const protocol::TransportRoute& route) OVERRIDE; |
60 | 62 |
61 private: | 63 private: |
62 void Log(const ServerLogEntry& entry); | 64 void Log(const ServerLogEntry& entry); |
63 void SendPendingEntries(); | 65 void SendPendingEntries(); |
64 | 66 |
65 scoped_refptr<ChromotingHost> host_; | 67 scoped_refptr<ChromotingHost> host_; |
66 ServerLogEntry::Mode mode_; | 68 ServerLogEntry::Mode mode_; |
67 SignalStrategy* signal_strategy_; | 69 SignalStrategy* signal_strategy_; |
68 scoped_ptr<IqSender> iq_sender_; | 70 scoped_ptr<IqSender> iq_sender_; |
69 // A map from client JID to the route type of that client's connection to | 71 // A map from client JID to the route type of that client's connection to |
70 // this host. | 72 // this host. |
71 std::map<std::string, protocol::TransportRoute::RouteType> | 73 std::map<std::string, protocol::TransportRoute::RouteType> |
72 connection_route_type_; | 74 connection_route_type_; |
73 std::deque<ServerLogEntry> pending_entries_; | 75 std::deque<ServerLogEntry> pending_entries_; |
74 | 76 |
75 DISALLOW_COPY_AND_ASSIGN(LogToServer); | 77 DISALLOW_COPY_AND_ASSIGN(LogToServer); |
76 }; | 78 }; |
77 | 79 |
78 } // namespace remoting | 80 } // namespace remoting |
79 | 81 |
80 #endif // REMOTING_HOST_LOG_TO_SERVER_H_ | 82 #endif // REMOTING_HOST_LOG_TO_SERVER_H_ |
OLD | NEW |