OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef REMOTING_HOST_SERVER_LOG_ENTRY_H_ | |
6 #define REMOTING_HOST_SERVER_LOG_ENTRY_H_ | |
7 | |
8 #include <map> | |
9 #include <string> | |
10 | |
11 namespace buzz { | |
12 class XmlElement; | |
13 } // namespace buzz | |
14 | |
15 namespace remoting { | |
16 | |
17 class ServerLogEntry { | |
18 public: | |
19 // Constructs a log entry for a session state change. | |
20 // Currently this is either connection or disconnection. | |
21 static ServerLogEntry* MakeSessionStateChange(bool connection); | |
22 | |
23 ~ServerLogEntry(); | |
24 | |
25 // Adds fields describing the host to this log entry. | |
26 void AddHostFields(); | |
27 | |
28 // Converts this object to an XML stanza. | |
29 // The caller takes ownership of the stanza. | |
30 buzz::XmlElement* ToStanza() const; | |
31 | |
32 private: | |
33 ServerLogEntry(); | |
34 void Set(const char* key, const char* value); | |
35 | |
36 static const char* GetValueSessionState(bool connected); | |
37 | |
38 typedef std::map<std::string, std::string> Dict; | |
Sergey Ulanov
2011/11/17 01:16:33
types should be defined after "private:"
Maybe cal
simonmorris
2011/11/18 19:23:04
Done.
| |
39 Dict dict_; | |
Sergey Ulanov
2011/11/17 01:16:33
dict_ is ambiguous name. Maybe values_.
simonmorris
2011/11/18 19:23:04
Done.
| |
40 }; | |
41 | |
42 } // namespace remoting | |
43 | |
44 #endif | |
OLD | NEW |