[Release] wrt-plugins-common_0.3.74
[platform/framework/web/wrt-plugins-common.git] / src / modules / API / DEPRACATED / Display / IManager.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *    Licensed under the Apache License, Version 2.0 (the "License");
5  *    you may not use this file except in compliance with the License.
6  *    You may obtain a copy of the License at
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *    Unless required by applicable law or agreed to in writing, software
11  *    distributed under the License is distributed on an "AS IS" BASIS,
12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *    See the License for the specific language governing permissions and
14  *    limitations under the License.
15  */
16 /**
17  * @author       Zbigniew Kostrzewa (z.kostrzewa@samsung.com)
18  */
19
20 #ifndef WRTPLUGINS_DISPLAY_IMANAGER_H_
21 #define WRTPLUGINS_DISPLAY_IMANAGER_H_
22
23 #include <cstddef>
24
25 namespace WrtPlugins {
26 namespace Api {
27 namespace Display {
28 class IScreen;
29
30 class IManager
31 {
32   public:
33     static IManager& getInstance();
34
35   public:
36     virtual ~IManager() = 0;
37
38     /**
39      * Gets interface to specified screen.
40      * @param index Index of a screen to get (1-based)
41      * @return Screen interface.
42      * @throw UnsupportedException If current platform doesn't support it.
43      * @throw OutOfRangeException If specified screen doesn't exist.
44      * @throw PlatformException If error in platform occurs.
45      * @remarks On some platforms passing 0 as screen index may result in
46      * returning
47      *          some global screen interface. Other may return default screen.
48      * @remarks Ownership is NOT passed to the caller.
49      */
50     virtual IScreen* getScreen(std::size_t index) const = 0;
51
52     /**
53      * Gets number of supported screens.
54      * @return Screens count.
55      */
56     virtual std::size_t getScreensCount() const = 0;
57 };
58 } // Display
59 } // Api
60 } // WrtPlugins
61
62 #endif // WRTPLUGINS_DISPLAY_IMANAGER_H_