1 // Copyright 2019 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 PLATFORM_IMPL_TEXT_TRACE_LOGGING_PLATFORM_H_
6 #define PLATFORM_IMPL_TEXT_TRACE_LOGGING_PLATFORM_H_
7 
8 #include "platform/api/trace_logging_platform.h"
9 
10 namespace openscreen {
11 
12 class TextTraceLoggingPlatform : public TraceLoggingPlatform {
13  public:
14   TextTraceLoggingPlatform();
15   ~TextTraceLoggingPlatform() override;
16 
17   bool IsTraceLoggingEnabled(TraceCategory::Value category) override;
18 
19   void LogTrace(const char* name,
20                 const uint32_t line,
21                 const char* file,
22                 Clock::time_point start_time,
23                 Clock::time_point end_time,
24                 TraceIdHierarchy ids,
25                 Error::Code error) override;
26 
27   void LogAsyncStart(const char* name,
28                      const uint32_t line,
29                      const char* file,
30                      Clock::time_point timestamp,
31                      TraceIdHierarchy ids) override;
32 
33   void LogAsyncEnd(const uint32_t line,
34                    const char* file,
35                    Clock::time_point timestamp,
36                    TraceId trace_id,
37                    Error::Code error) override;
38 };
39 
40 }  // namespace openscreen
41 
42 #endif  // PLATFORM_IMPL_TEXT_TRACE_LOGGING_PLATFORM_H_
43