Added thread safe ttrace support
[platform/core/uifw/dali-adaptor.git] / adaptors / base / interfaces / adaptor-internal-services.h
1 #ifndef __DALI_INTERNAL_ADAPTOR_INTERNAL_SERVICES_H__
2 #define __DALI_INTERNAL_ADAPTOR_INTERNAL_SERVICES_H__
3
4 /*
5  * Copyright (c) 2014 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/core.h>
23 #include <dali/integration-api/gl-abstraction.h>
24
25 // INTERNAL INCLUDES
26 #include <trigger-event-interface.h>
27 #include <trigger-event-factory-interface.h>
28 #include <base/interfaces/egl-factory-interface.h>
29 #include <base/interfaces/socket-factory-interface.h>
30 #include <base/interfaces/performance-interface.h>
31 #include <base/interfaces/vsync-monitor-interface.h>
32 #include <base/interfaces/trace-interface.h>
33 #include <render-surface.h>
34
35
36 namespace Dali
37 {
38
39 namespace Internal
40 {
41
42 namespace Adaptor
43 {
44
45 /**
46  * A class to contain various interfaces provided by the adaptor which
47  * can be used by the cross platform parts of adaptor.
48  * E.g. any files held in adaptors/base/ directory
49  *
50  */
51 class AdaptorInternalServices
52 {
53
54 public:
55
56   /**
57    * @return core
58    */
59   virtual Dali::Integration::Core& GetCore() = 0;
60
61   /**
62    * @return platform abstraction
63    */
64   virtual Dali::Integration::PlatformAbstraction& GetPlatformAbstractionInterface()  = 0;
65
66   /**
67    * @return gles abstraction
68    */
69   virtual Dali::Integration::GlAbstraction& GetGlesInterface()  = 0;
70
71   /**
72    * @return egl factory
73    */
74   virtual EglFactoryInterface& GetEGLFactoryInterface() const  = 0;
75
76   /**
77    * @return trigger event
78    */
79   virtual TriggerEventInterface& GetTriggerEventInterface()  = 0;
80
81   /**
82    * @return trigger event factory interface
83    */
84   virtual TriggerEventFactoryInterface& GetTriggerEventFactoryInterface() = 0;
85
86   /**
87    * @return socket factory interface
88    */
89   virtual SocketFactoryInterface& GetSocketFactoryInterface() = 0;
90
91   /**
92    * @return render surface
93    */
94   virtual RenderSurface* GetRenderSurfaceInterface()  = 0;
95
96   /**
97    * @return vsync monitor interface
98    */
99   virtual VSyncMonitorInterface* GetVSyncMonitorInterface()  = 0;
100
101   /**
102    * @return performance interface
103    */
104   virtual PerformanceInterface* GetPerformanceInterface()  = 0;
105
106   /**
107    * @return interface for logging to the kernel ( e.g. using ftrace )
108    */
109   virtual TraceInterface& GetKernelTraceInterface()  = 0;
110
111   /**
112    * @return system trace interface, e.g. for using Tizen Trace (ttrace) or Android Trace (atrace)
113    */
114   virtual TraceInterface& GetSystemTraceInterface()  = 0;
115
116
117 protected:
118
119   /**
120    * constructor
121    */
122   AdaptorInternalServices()
123   {
124   };
125
126   /**
127    * virtual destructor
128    */
129   virtual ~AdaptorInternalServices()
130   {
131   };
132
133   // Undefined copy constructor.
134   AdaptorInternalServices( const AdaptorInternalServices& );
135
136   // Undefined assignment operator.
137   AdaptorInternalServices& operator=( const AdaptorInternalServices& );
138 };
139
140 } // namespace Internal
141
142 } // namespace Adaptor
143
144 } // namespace Dali
145
146 #endif // __DALI_INTERNAL_ADAPTOR_INTERNAL_SERVICES_H__