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_SERVER_LOG_ENTRY_H_ | 5 #ifndef REMOTING_HOST_SERVER_LOG_ENTRY_H_ |
6 #define REMOTING_HOST_SERVER_LOG_ENTRY_H_ | 6 #define REMOTING_HOST_SERVER_LOG_ENTRY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... | |
27 static ServerLogEntry* MakeSessionStateChange(bool connection); | 27 static ServerLogEntry* MakeSessionStateChange(bool connection); |
28 | 28 |
29 ~ServerLogEntry(); | 29 ~ServerLogEntry(); |
30 | 30 |
31 // Adds fields describing the host to this log entry. | 31 // Adds fields describing the host to this log entry. |
32 void AddHostFields(); | 32 void AddHostFields(); |
33 | 33 |
34 // Adds a field describing the mode of a connection to this log entry. | 34 // Adds a field describing the mode of a connection to this log entry. |
35 void AddModeField(Mode mode); | 35 void AddModeField(Mode mode); |
36 | 36 |
37 // Adds a filed describing connection type (direct/stun/relay). | |
simonmorris
2012/03/19 22:17:05
"filed" -> "field".
Sergey Ulanov
2012/03/19 23:21:03
Done.
| |
38 void AddConnectionTypeField(const std::string& type); | |
39 | |
37 // Converts this object to an XML stanza. | 40 // Converts this object to an XML stanza. |
38 // The caller takes ownership of the stanza. | 41 // The caller takes ownership of the stanza. |
39 buzz::XmlElement* ToStanza() const; | 42 buzz::XmlElement* ToStanza() const; |
40 | 43 |
41 private: | 44 private: |
42 typedef std::map<std::string, std::string> ValuesMap; | 45 typedef std::map<std::string, std::string> ValuesMap; |
43 | 46 |
44 ServerLogEntry(); | 47 ServerLogEntry(); |
45 void Set(const char* key, const char* value); | 48 void Set(const std::string& key, const std::string& value); |
46 | 49 |
47 static const char* GetValueSessionState(bool connected); | 50 static const char* GetValueSessionState(bool connected); |
48 static const char* GetValueMode(Mode mode); | 51 static const char* GetValueMode(Mode mode); |
49 | 52 |
50 ValuesMap values_map_; | 53 ValuesMap values_map_; |
51 }; | 54 }; |
52 | 55 |
53 } // namespace remoting | 56 } // namespace remoting |
54 | 57 |
55 #endif | 58 #endif |
OLD | NEW |