summaryrefslogtreecommitdiffstats
path: root/remoting/host/server_log_entry_host.h
blob: 1fef4c1108c3ea06ac992a3f7cfe7b5fe654f855 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2014 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_HOST_H_
#define REMOTING_HOST_SERVER_LOG_ENTRY_HOST_H_

#include "remoting/protocol/transport.h"

namespace remoting {

class ServerLogEntry;

// Constructs a log entry for a session state change.
// Currently this is either connection or disconnection.
scoped_ptr<ServerLogEntry> MakeLogEntryForSessionStateChange(
    bool connected);

// Constructs a log entry for a heartbeat.
scoped_ptr<ServerLogEntry> MakeLogEntryForHeartbeat();

// Adds fields describing the host to this log entry.
void AddHostFieldsToLogEntry(ServerLogEntry* entry);

// Adds a field describing connection type (direct/stun/relay).
void AddConnectionTypeToLogEntry(ServerLogEntry* entry,
                                 protocol::TransportRoute::RouteType type);

}  // namespace remoting

#endif  // REMOTING_HOST_SERVER_LOG_ENTRY_HOST_H_