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.
5 #ifndef REMOTING_CLIENT_SERVER_LOG_ENTRY_CLIENT_H_
6 #define REMOTING_CLIENT_SERVER_LOG_ENTRY_CLIENT_H_
8 #include "base/time/time.h"
9 #include "remoting/protocol/connection_to_host.h"
10 #include "remoting/protocol/errors.h"
17 class PerformanceTracker
;
18 } // namespace protocol
20 // Constructs a log entry for a session state change.
21 scoped_ptr
<ServerLogEntry
> MakeLogEntryForSessionStateChange(
22 protocol::ConnectionToHost::State state
,
23 protocol::ErrorCode error
);
25 // Constructs a log entry for reporting statistics.
26 scoped_ptr
<ServerLogEntry
> MakeLogEntryForStatistics(
27 protocol::PerformanceTracker
* statistics
);
29 // Constructs a log entry for reporting session ID is old.
30 scoped_ptr
<ServerLogEntry
> MakeLogEntryForSessionIdOld(
31 const std::string
& session_id
);
33 // Constructs a log entry for reporting session ID is old.
34 scoped_ptr
<ServerLogEntry
> MakeLogEntryForSessionIdNew(
35 const std::string
& session_id
);
37 void AddClientFieldsToLogEntry(ServerLogEntry
* entry
);
38 void AddSessionIdToLogEntry(ServerLogEntry
* entry
, const std::string
& id
);
39 void AddSessionDurationToLogEntry(ServerLogEntry
* entry
,
40 base::TimeDelta duration
);
42 } // namespace remoting
44 #endif // REMOTING_CLIENT_SERVER_LOG_ENTRY_CLIENT_H_