c5da7f051d286cfbea559585810c6c7b323a228a
[platform/core/uifw/dali-adaptor.git] / dali / internal / trace / common / trace-manager-impl.h
1 #ifndef DALI_INTERNAL_TRACE_MANAGER_IMPL_H
2 #define DALI_INTERNAL_TRACE_MANAGER_IMPL_H
3
4 /*
5  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/integration-api/trace.h>
23
24 // INTERNAL INCLUDES
25
26
27 namespace Dali
28 {
29
30 namespace Internal
31 {
32
33 namespace Adaptor
34 {
35 class PerformanceInterface;
36
37 class TraceManager
38 {
39 public:
40
41   /**
42    * Explicit Constructor
43    */
44   explicit TraceManager( PerformanceInterface* performanceInterface );
45
46   /**
47    * Constructor
48    */
49   TraceManager() = default;
50
51   /**
52    * Virtual Destructor
53    */
54   virtual ~TraceManager() = default;
55
56   /**
57    * Second phase initialisation of TraceManager
58    */
59   bool Initialise();
60
61   /**
62    * Used for network server logging on Ubuntu
63    */
64   PerformanceInterface* mPerformanceInterface;
65
66 protected:
67
68   /**
69    * Obtain the platform dependent LogContextFunction method used for tracing
70    */
71   Dali::Integration::Trace::LogContextFunction GetLogContextFunction() { return nullptr; };
72
73 private:
74
75   /**
76    * Set / Install the platform dependent trace function
77    * @param logContextFunction - Platform dependent trace function
78    */
79   void SetTraceLogContextFunction( const Dali::Integration::Trace::LogContextFunction& logContextFunction );
80
81   TraceManager( const TraceManager& ) = delete;
82   TraceManager& operator=( TraceManager& )  = delete;
83 };
84
85 } // namespace Adaptor
86
87 } // namespace Internal
88
89 } // namespace Dali
90
91 #endif // DALI_INTERNAL_TRACE_MANAGER_IMPL_H