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_HOST_SERVER_LOG_ENTRY_HOST_H_ 6#define REMOTING_HOST_SERVER_LOG_ENTRY_HOST_H_ 7 8#include "remoting/host/host_exit_codes.h" 9#include "remoting/host/host_status_sender.h" 10#include "remoting/protocol/transport.h" 11 12namespace remoting { 13 14class ServerLogEntry; 15 16// Constructs a log entry for a session state change. 17// Currently this is either connection or disconnection. 18scoped_ptr<ServerLogEntry> MakeLogEntryForSessionStateChange( 19 bool connected); 20 21// Constructs a log entry for a heartbeat. 22scoped_ptr<ServerLogEntry> MakeLogEntryForHeartbeat(); 23 24// Constructs a log entry for a host status message. 25scoped_ptr<ServerLogEntry> MakeLogEntryForHostStatus( 26 HostStatusSender::HostStatus host_status, HostExitCodes exit_code); 27 28// Adds fields describing the host to this log entry. 29void AddHostFieldsToLogEntry(ServerLogEntry* entry); 30 31// Adds a field describing connection type (direct/stun/relay). 32void AddConnectionTypeToLogEntry(ServerLogEntry* entry, 33 protocol::TransportRoute::RouteType type); 34 35} // namespace remoting 36 37#endif // REMOTING_HOST_SERVER_LOG_ENTRY_HOST_H_ 38