Home | History | Annotate | Download | only in client
      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_CLIENT_SERVER_LOG_ENTRY_CLIENT_H_
      6 #define REMOTING_CLIENT_SERVER_LOG_ENTRY_CLIENT_H_
      7 
      8 #include "base/time/time.h"
      9 #include "remoting/protocol/connection_to_host.h"
     10 #include "remoting/protocol/errors.h"
     11 
     12 namespace remoting {
     13 
     14 class ChromotingStats;
     15 class ServerLogEntry;
     16 
     17 // Constructs a log entry for a session state change.
     18 scoped_ptr<ServerLogEntry> MakeLogEntryForSessionStateChange(
     19     protocol::ConnectionToHost::State state,
     20     protocol::ErrorCode error);
     21 
     22 // Constructs a log entry for reporting statistics.
     23 scoped_ptr<ServerLogEntry> MakeLogEntryForStatistics(
     24     ChromotingStats* statistics);
     25 
     26 // Constructs a log entry for reporting session ID is old.
     27 scoped_ptr<ServerLogEntry> MakeLogEntryForSessionIdOld(
     28     const std::string& session_id);
     29 
     30 // Constructs a log entry for reporting session ID is old.
     31 scoped_ptr<ServerLogEntry> MakeLogEntryForSessionIdNew(
     32     const std::string& session_id);
     33 
     34 void AddClientFieldsToLogEntry(ServerLogEntry* entry);
     35 void AddSessionIdToLogEntry(ServerLogEntry* entry, const std::string& id);
     36 void AddSessionDurationToLogEntry(ServerLogEntry* entry,
     37                                   base::TimeDelta duration);
     38 
     39 }  // namespace remoting
     40 
     41 #endif  // REMOTING_CLIENT_SERVER_LOG_ENTRY_CLIENT_H_
     42