Merge "Add to set Available Orientations" into devel/master
[platform/core/uifw/dali-adaptor.git] / dali / internal / system / common / configuration-manager.h
1 #ifndef DALI_INTERNAL_ENVIRONMENT_CONFIGURATION_MANAGER_H
2 #define DALI_INTERNAL_ENVIRONMENT_CONFIGURATION_MANAGER_H
3
4 /*
5  * Copyright (c) 2020 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 <memory>
23 #include <string>
24
25 namespace Dali
26 {
27
28 class FileStream;
29
30 namespace Internal
31 {
32 namespace Adaptor
33 {
34
35 class EglGraphics;
36 class ThreadController;
37
38 /**
39  * This class retrieves and caches the system configuration.
40  *
41  */
42 class ConfigurationManager
43 {
44 public:
45
46   /**
47    * @brief Constructor
48    */
49   ConfigurationManager( std::string systemCachePath, EglGraphics* eglGraphics, ThreadController* threadController );
50
51   /**
52    * @brief Virtual Destructor for interface cleanup
53    */
54   virtual ~ConfigurationManager();
55
56   /**
57    * @brief Get the maximum texture size.
58    * @return The maximum texture size
59    */
60   unsigned int GetMaxTextureSize();
61
62   /**
63    * @brief Check whether multiple window is supported
64    * @return Whether multiple window is supported
65    */
66   bool IsMultipleWindowSupported();
67
68   // Deleted copy constructor.
69   ConfigurationManager( const ConfigurationManager& ) = delete;
70
71   // Deleted move constructor.
72   ConfigurationManager( const ConfigurationManager&& ) = delete;
73
74   // Deleted assignment operator.
75   ConfigurationManager& operator=( const ConfigurationManager& ) = delete;
76
77   // Deleted move assignment operator.
78   ConfigurationManager& operator=( const ConfigurationManager&& ) = delete;
79
80 private: // Data
81
82   std::string mSystemCacheFilePath;              ///< The path of system cache file
83   std::unique_ptr<FileStream> mFileStream;       ///< The file stream to access the system cache
84   EglGraphics* mEglGraphics;                     ///< EGL graphics
85   ThreadController* mThreadController;           ///< The thread controller
86   unsigned int mMaxTextureSize;                  ///< The largest texture that the GL can handle
87   bool mIsMultipleWindowSupported:1;             ///< Whether multiple window is supported by the GLES
88   bool mMaxTextureSizeCached:1;                  ///< Whether we have checked the maximum texture size
89   bool mIsMultipleWindowSupportedCached:1;       ///< Whether we have checked the support of multiple window
90 };
91
92 } // Adaptor
93 } // Internal
94 } // Dali
95
96 #endif // DALI_INTERNAL_ENVIRONMENT_CONFIGURATION_MANAGER_H