2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * @author Zbigniew Kostrzewa (z.kostrzewa@samsung.com)
20 #ifndef WRTPLUGINS_SYSTEM_IENVIRONMENT_H_
21 #define WRTPLUGINS_SYSTEM_IENVIRONMENT_H_
24 #include <dpl/noncopyable.h>
26 namespace WrtPlugins {
29 class IEnvironment : private DPL::Noncopyable
32 static IEnvironment& getInstance();
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.
43 virtual std::string getLanguage() const = 0;
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.
52 virtual std::string getOsVersion() const = 0;
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.
61 virtual std::string getSoftwareVersion() const = 0;
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.
69 virtual std::string getHardwareName() const = 0;
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.
78 virtual std::string getVendorName() const = 0;
81 virtual ~IEnvironment() = 0;
87 #endif // WRTPLUGINS_SYSTEM_IENVIRONMENT_H_