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