tizen beta release
[framework/web/wrt-plugins-common.git] / src / modules / API / DEPRACATED / Device / 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_DEVICE_IMANAGER_H_
21 #define WRTPLUGINS_DEVICE_IMANAGER_H_
22
23 #include <string>
24 #include <dpl/noncopyable.h>
25
26 namespace WrtPlugins {
27 namespace Api {
28 namespace Device {
29 class IClamshell;
30 class IKeypad;
31
32 class IManager : private DPL::Noncopyable
33 {
34   public:
35     static IManager& getInstance();
36
37   public:
38     virtual ~IManager() = 0;
39
40     /**
41      * Gets if device is equipped with clamshell.
42      * @return True if clamshell is supported, false otherwise.
43      */
44     virtual bool hasClamshell() const = 0;
45
46     /**
47      * Gets clamshell interface.
48      * @return Clamshell interface.
49      * @throw UnsupportedException If platform doesn't support it.
50      * @throw PlatformException If error in platform occurs.
51      * @remarks Ownership does NOT follow caller.
52      */
53     virtual IClamshell* getClamshell() const = 0;
54
55     /**
56      * Gets if device is equipped with keypad.
57      * @return True if keypad is present, false otherwise.
58      */
59     virtual bool hasKeypad() const = 0;
60
61     /**
62      * Gets keypad interface.
63      * @return Keypad interface.
64      * @throw UnsupportedException If platform doesn't support it.
65      * @throw PlatformException If error in platform occurs.
66      * @remarks Ownership does NOT follow caller.
67      */
68     virtual IKeypad* getKeypad() const = 0;
69
70     /**
71      * Gets IMEI number.
72      * @return IMEI number.
73      * @throw UnsupportedException If platform doesn't support it.
74      * @throw PlatformException If error in platform occurs.
75      */
76     virtual std::string getImei() const = 0;
77 };
78 } // Device
79 } // Api
80 } // WrtPlugins
81
82 #endif // WRTPLUGINS_DEVICE_IMANAGER_H_