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;
109 DeviceCapabilitiesProperties() :
112 nfcReservedPush(false),
114 inputKeyboard(false),
115 inputKeyboardLayout(false),
119 openglestextureFormat(""),
120 openglesVersion1_1(false),
121 openglesVersion2_0(false),
126 nativeApiVersion(""),
129 cameraFrontFlash(false),
131 cameraBackFlash(false),
138 screenOutputRca(false),
139 screenOutputHdmi(false),
140 platformCoreCpuArch(""),
141 platformCoreFpuArch(""),
144 speechRecognition(false),
145 speechSynthesis(false),
146 accelerometer(false),
147 accelerometerWakeup(false),
149 barometerWakeup(false),
151 gyroscopeWakeup(false),
153 magnetometerWakeup(false),
155 photometerWakeup(false),
157 proximityWakeup(false),
159 tiltmeterWakeup(false),
160 dataEncryption(false),
161 graphicsAcceleration(false),
166 screenSizeNormal(false),
167 screenSize480_800(false),
168 screenSize720_1280(false),
170 shellAppWidget(false),
171 visionImageRecognition(false),
172 visionQrcodeGeneration(false),
173 visionQrcodeRecognition(false),
174 visionFaceRecognition(false),
175 secureElement(false),
176 nativeOspCompatible(false),
182 struct BatteryProperties
187 BatteryProperties() :
204 struct StorageUnitProperties
207 unsigned long long capacity;
208 unsigned long long availableCapacity;
212 StorageUnitProperties():
215 availableCapacity(0),
222 struct StorageProperties
224 StorageUnitProperties units[2];
234 struct DisplayProperties
236 unsigned long resolutionWidth;
237 unsigned long resolutionHeight;
238 unsigned long dotsPerInchWidth;
239 unsigned long dotsPerInchHeight;
240 double physicalWidth;
241 double physicalHeight;
244 DisplayProperties() :
248 dotsPerInchHeight(0),
256 struct WifiNetworkProperties
260 std::string ipAddress;
261 std::string ipv6Address;
262 double signalStrength;
264 WifiNetworkProperties() :
274 struct NetworkProperties
276 std::string networkType;
278 NetworkProperties() :
279 networkType("UNKNOWN")
284 struct CellularNetworkProperties
288 std::string ipAddress;
289 std::string ipv6Address;
292 unsigned short cellId;
298 CellularNetworkProperties() :
317 std::string operatorName;
338 struct DeviceOrientationProperties
343 DeviceOrientationProperties() :
345 isAutoRotation(false)
350 struct BuildProperties
353 std::string manufacturer;
354 std::string buildVersion;
364 struct LocaleProperties
366 std::string language;
376 struct PeripheralProperties
378 bool isVideoOutputOn;
380 PeripheralProperties() :
381 isVideoOutputOn(false)
386 typedef DPL::SharedPtr<DeviceCapabilitiesProperties> DeviceCapabilitiesPropertiesPtr;
387 typedef DPL::SharedPtr<BatteryProperties> BatteryPropertiesPtr;
388 typedef DPL::SharedPtr<CpuProperties> CpuPropertiesPtr;
389 typedef DPL::SharedPtr<StorageUnitProperties> StorageUnitPropertiesPtr;
390 typedef DPL::SharedPtr<StorageProperties> StoragePropertiesPtr;
391 typedef DPL::SharedPtr<DisplayProperties> DisplayPropertiesPtr;
392 typedef DPL::SharedPtr<WifiNetworkProperties> WifiNetworkPropertiesPtr;
393 typedef DPL::SharedPtr<NetworkProperties> NetworkPropertiesPtr;
394 typedef DPL::SharedPtr<CellularNetworkProperties> CellularNetworkPropertiesPtr;
395 typedef DPL::SharedPtr<SIMProperties> SIMPropertiesPtr;
396 typedef DPL::SharedPtr<DeviceOrientationProperties> DeviceOrientationPropertiesPtr;
397 typedef DPL::SharedPtr<BuildProperties> BuildPropertiesPtr;
398 typedef DPL::SharedPtr<LocaleProperties> LocalePropertiesPtr;
399 typedef DPL::SharedPtr<PeripheralProperties> PeripheralPropertiesPtr;