Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: remoting/jingle_glue/server_log_entry.h

Issue 390983003: Remove remoting/jingle_glue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 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_JINGLE_GLUE_SERVER_LOG_ENTRY_H_
6 #define REMOTING_JINGLE_GLUE_SERVER_LOG_ENTRY_H_
7
8 #include <map>
9 #include <string>
10
11 #include "base/memory/scoped_ptr.h"
12
13 namespace buzz {
14 class XmlElement;
15 } // namespace buzz
16
17 namespace remoting {
18
19 // Utility class for building log entries to send to the remoting bot. This is
20 // a wrapper around a key/value map and is copyable so it can be used in STL
21 // containers.
22 class ServerLogEntry {
23 public:
24 // The mode of a connection.
25 enum Mode {
26 IT2ME,
27 ME2ME
28 };
29
30 ServerLogEntry();
31 ~ServerLogEntry();
32
33 // Sets an arbitrary key/value entry.
34 void Set(const std::string& key, const std::string& value);
35
36 // Adds a field describing the CPU type of the platform.
37 void AddCpuField();
38
39 // Adds a field describing the mode of a connection to this log entry.
40 void AddModeField(Mode mode);
41
42 // Adds a field describing the role (client/host).
43 void AddRoleField(const char* role);
44
45 // Adds a field describing the type of log entry.
46 void AddEventNameField(const char* name);
47
48 // Constructs a log stanza. The caller should add one or more log entry
49 // stanzas as children of this stanza, before sending the log stanza to
50 // the remoting bot.
51 static scoped_ptr<buzz::XmlElement> MakeStanza();
52
53 // Converts this object to an XML stanza.
54 scoped_ptr<buzz::XmlElement> ToStanza() const;
55
56 private:
57 typedef std::map<std::string, std::string> ValuesMap;
58
59 ValuesMap values_map_;
60 };
61
62 } // namespace remoting
63
64 #endif // REMOTING_JINGLE_GLUE_SERVER_LOG_ENTRY_H_
OLDNEW
« no previous file with comments | « remoting/jingle_glue/network_settings_unittest.cc ('k') | remoting/jingle_glue/server_log_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698