2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 #ifndef WRTPLUGINS_API_PROPERTY_INFO_H_
19 #define WRTPLUGINS_API_PROPERTY_INFO_H_
21 #include <JavaScriptCore/JavaScript.h>
22 #include <CommonsJavaScript/PrivateObject.h>
23 #include <CommonsJavaScript/JSUtils.h>
24 #include <CommonsJavaScript/Converter.h>
26 #include <dpl/shared_ptr.h>
29 namespace Systeminfo {
31 enum SystemInfosDeviceOrientationStatus {
33 PORTRAIT_SECONDARY = 1,
34 LANDSCAPE_PRIMARY = 2,
35 LANDSCAPE_SECONDARY = 3
38 struct DeviceCapabilitiesProperties
43 unsigned short multiTouchCount;
45 bool inputKeyboardLayout;
49 std::string openglestextureFormat;
50 bool openglesVersion1_1;
51 bool openglesVersion2_0;
53 std::string platformVersion;
54 std::string platformName;
55 std::string webApiVersion;
56 std::string nativeApiVersion;
59 bool cameraFrontFlash;
69 bool screenOutputHdmi;
70 std::string platformCoreCpuArch;
71 std::string platformCoreFpuArch;
74 bool speechRecognition;
77 bool accelerometerWakeup;
83 bool magnetometerWakeup;
85 bool photometerWakeup;
91 bool graphicsAcceleration;
96 bool screenSizeNormal;
97 bool screenSize480_800;
98 bool screenSize720_1280;
101 bool visionImageRecognition;
102 bool visionQrcodeGeneration;
103 bool visionQrcodeRecognition;
104 bool visionFaceRecognition;
106 bool nativeOspCompatible;
108 DeviceCapabilitiesProperties() :
111 nfcReservedPush(false),
113 inputKeyboard(false),
114 inputKeyboardLayout(false),
118 openglestextureFormat(""),
119 openglesVersion1_1(false),
120 openglesVersion2_0(false),
125 nativeApiVersion(""),
128 cameraFrontFlash(false),
130 cameraBackFlash(false),
137 screenOutputRca(false),
138 screenOutputHdmi(false),
139 platformCoreCpuArch(""),
140 platformCoreFpuArch(""),
143 speechRecognition(false),
144 speechSynthesis(false),
145 accelerometer(false),
146 accelerometerWakeup(false),
148 barometerWakeup(false),
150 gyroscopeWakeup(false),
152 magnetometerWakeup(false),
154 photometerWakeup(false),
156 proximityWakeup(false),
158 tiltmeterWakeup(false),
159 dataEncryption(false),
160 graphicsAcceleration(false),
165 screenSizeNormal(false),
166 screenSize480_800(false),
167 screenSize720_1280(false),
169 shellAppWidget(false),
170 visionImageRecognition(false),
171 visionQrcodeGeneration(false),
172 visionQrcodeRecognition(false),
173 visionFaceRecognition(false),
174 secureElement(false),
175 nativeOspCompatible(false)
180 struct BatteryProperties
185 BatteryProperties() :
202 struct StorageProperties
205 unsigned long long capacity;
206 unsigned long long availableCapacity;
213 availableCapacity(0),
220 struct DisplayProperties
222 unsigned long resolutionWidth;
223 unsigned long resolutionHeight;
224 unsigned long dotsPerInchWidth;
225 unsigned long dotsPerInchHeight;
226 double physicalWidth;
227 double physicalHeight;
230 DisplayProperties() :
234 dotsPerInchHeight(0),
242 struct WifiNetworkProperties
246 std::string ipAddress;
247 std::string ipv6Address;
248 double signalStrength;
250 WifiNetworkProperties() :
260 struct NetworkProperties
262 std::string networkType;
264 NetworkProperties() :
265 networkType("UNKNOWN")
270 struct CellularNetworkProperties
274 std::string ipAddress;
275 std::string ipv6Address;
278 unsigned short cellId;
284 CellularNetworkProperties() :
303 std::string operatorName;
324 struct DeviceOrientationProperties
328 DeviceOrientationProperties() :
334 struct BuildProperties
337 std::string manufacturer;
346 struct LocaleProperties
348 std::string language;
358 struct PeripheralProperties
360 bool isVideoOutputOn;
362 PeripheralProperties() :
363 isVideoOutputOn(false)
368 typedef DPL::SharedPtr<DeviceCapabilitiesProperties> DeviceCapabilitiesPropertiesPtr;
369 typedef DPL::SharedPtr<BatteryProperties> BatteryPropertiesPtr;
370 typedef DPL::SharedPtr<CpuProperties> CpuPropertiesPtr;
371 typedef DPL::SharedPtr<StorageProperties> StoragePropertiesPtr;
372 typedef DPL::SharedPtr<DisplayProperties> DisplayPropertiesPtr;
373 typedef DPL::SharedPtr<WifiNetworkProperties> WifiNetworkPropertiesPtr;
374 typedef DPL::SharedPtr<NetworkProperties> NetworkPropertiesPtr;
375 typedef DPL::SharedPtr<CellularNetworkProperties> CellularNetworkPropertiesPtr;
376 typedef DPL::SharedPtr<SIMProperties> SIMPropertiesPtr;
377 typedef DPL::SharedPtr<DeviceOrientationProperties> DeviceOrientationPropertiesPtr;
378 typedef DPL::SharedPtr<BuildProperties> BuildPropertiesPtr;
379 typedef DPL::SharedPtr<LocaleProperties> LocalePropertiesPtr;
380 typedef DPL::SharedPtr<PeripheralProperties> PeripheralPropertiesPtr;