Index: remoting/host/server_log_entry.h |
diff --git a/remoting/host/server_log_entry.h b/remoting/host/server_log_entry.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9384fe638126b2a352a98993f4a1273fd3f4248a |
--- /dev/null |
+++ b/remoting/host/server_log_entry.h |
@@ -0,0 +1,44 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef REMOTING_HOST_SERVER_LOG_ENTRY_H_ |
+#define REMOTING_HOST_SERVER_LOG_ENTRY_H_ |
+ |
+#include <map> |
+#include <string> |
+ |
+namespace buzz { |
+class XmlElement; |
+} // namespace buzz |
+ |
+namespace remoting { |
+ |
+class ServerLogEntry { |
+ public: |
+ // Constructs a log entry for a session state change. |
+ // Currently this is either connection or disconnection. |
+ static ServerLogEntry* MakeSessionStateChange(bool connection); |
+ |
+ ~ServerLogEntry(); |
+ |
+ // Adds fields describing the host to this log entry. |
+ void AddHostFields(); |
+ |
+ // Converts this object to an XML stanza. |
+ // The caller takes ownership of the stanza. |
+ buzz::XmlElement* ToStanza() const; |
+ |
+ private: |
+ ServerLogEntry(); |
+ void Set(const char* key, const char* value); |
+ |
+ static const char* GetValueSessionState(bool connected); |
+ |
+ 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.
|
+ Dict dict_; |
Sergey Ulanov
2011/11/17 01:16:33
dict_ is ambiguous name. Maybe values_.
simonmorris
2011/11/18 19:23:04
Done.
|
+}; |
+ |
+} // namespace remoting |
+ |
+#endif |