8585a924a604c2f4249306c874a29aa493a04c8e
[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 // INTERNAL INCLUDES
22 #include <dali/integration-api/core.h>
23 #include <dali/integration-api/gl-abstraction.h>
24 #include <base/interfaces/egl-factory-interface.h>
25 #include <base/interfaces/trigger-event-interface.h>
26 #include <base/interfaces/performance-interface.h>
27 #include <base/interfaces/vsync-monitor-interface.h>
28 #include <base/interfaces/kernel-trace-interface.h>
29 #include <render-surface-impl.h> // @todo move to base/interfaces
30
31
32 namespace Dali
33 {
34
35 namespace Internal
36 {
37
38 namespace Adaptor
39 {
40
41 /**
42  * A class to contain various interfaces provided by the adaptor which
43  * can be used by the cross platform parts of adaptor.
44  * E.g. any files held in adaptors/base/ directory
45  *
46  */
47 class AdaptorInternalServices
48 {
49
50 public:
51
52   /**
53    * @return core
54    */
55   virtual Dali::Integration::Core& GetCore() = 0;
56
57   /**
58    * @return platform abstraction
59    */
60   virtual Dali::Integration::PlatformAbstraction& GetPlatformAbstractionInterface()  = 0;
61
62   /**
63    * @return gles abstraction
64    */
65   virtual Dali::Integration::GlAbstraction& GetGlesInterface()  = 0;
66
67   /**
68    * @return egl factory
69    */
70   virtual EglFactoryInterface& GetEGLFactoryInterface() const  = 0;
71
72   /**
73    * @return trigger event
74    */
75   virtual TriggerEventInterface& GetTriggerEventInterface()  = 0;
76
77   /**
78    * @return render surface
79    */
80   virtual RenderSurface* GetRenderSurfaceInterface()  = 0;
81
82   /**
83    * @return vsync monitor interface
84    */
85   virtual VSyncMonitorInterface* GetVSyncMonitorInterface()  = 0;
86
87   /**
88    * @return performance interface
89    */
90   virtual PerformanceInterface* GetPerformanceInterface()  = 0;
91
92   /**
93    * @return kernel trace interface
94    */
95   virtual KernelTraceInterface& GetKernelTraceInterface()  = 0;
96
97 protected:
98
99   /**
100    * constructor
101    */
102   AdaptorInternalServices()
103   {
104   };
105
106   /**
107    * virtual destructor
108    */
109   virtual ~AdaptorInternalServices()
110   {
111   };
112
113   // Undefined copy constructor.
114   AdaptorInternalServices( const AdaptorInternalServices& );
115
116   // Undefined assignment operator.
117   AdaptorInternalServices& operator=( const AdaptorInternalServices& );
118 };
119
120 } // namespace Internal
121
122 } // namespace Adaptor
123
124 } // namespace Dali
125
126 #endif // __DALI_INTERNAL_ADAPTOR_INTERNAL_SERVICES_H__