merge with master
[platform/framework/web/wrt-plugins-common.git] / src / modules / API / DEPRACATED / System / IEnvironment.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_SYSTEM_IENVIRONMENT_H_
21 #define WRTPLUGINS_SYSTEM_IENVIRONMENT_H_
22
23 #include <string>
24 #include <dpl/noncopyable.h>
25
26 namespace WrtPlugins {
27 namespace Api {
28 namespace System {
29 class IEnvironment : private DPL::Noncopyable
30 {
31   public:
32     static IEnvironment& getInstance();
33
34   public:
35     /**
36      * Gets language code for current locale.
37      * @return Language code (ISO-639-1).
38      * @throw UnsupportedException If platform doesn't support it.
39      * @throw PlatformException If error in platform occurs.
40      * @remarks For Linux-based platforms this could be contents of LANG
41      *          environment variable.
42      */
43     virtual std::string getLanguage() const = 0;
44
45     /**
46      * Gets version of the operation system.
47      * @return Operating system version.
48      * @throw UnsupportedException If platform doesn't support it.
49      * @throw PlatformException If error in platform occurs.
50      * @remarks On UNIX/Linux-based system this could be versions of kernel.
51      */
52     virtual std::string getOsVersion() const = 0;
53
54     /**
55      * Gets version of software.
56      * @return Software version.
57      * @throw UnsupportedException If platform doesn't support it.
58      * @throw PlatformException If error in platform occurs.
59      * @remarks On some platform this could be the same as OsVersion.
60      */
61     virtual std::string getSoftwareVersion() const = 0;
62
63     /**
64      * Gets name of hardware.
65      * @return Hardware name.
66      * @throw UnsupportedException If platform doesn't support it.
67      * @throw PlatformException If error in platform occurs.
68      */
69     virtual std::string getHardwareName() const = 0;
70
71     /**
72      * Gets name of the vendor.
73      * @return Vendor's name.
74      * @throw UnsupportedException If platform doesn't support it.
75      * @throw PlatformException If error in platform occurs.
76      * @remarks This could be either vendor of kernel, software or device.
77      */
78     virtual std::string getVendorName() const = 0;
79
80   public:
81     virtual ~IEnvironment() = 0;
82 };
83 } // System
84 } // Api
85 } // WrtPlugins
86
87 #endif // WRTPLUGINS_SYSTEM_IENVIRONMENT_H_