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;
111 DeviceCapabilitiesProperties() :
114 nfcReservedPush(false),
116 inputKeyboard(false),
117 inputKeyboardLayout(false),
121 openglestextureFormat(""),
122 openglesVersion1_1(false),
123 openglesVersion2_0(false),
128 nativeApiVersion(""),
131 cameraFrontFlash(false),
133 cameraBackFlash(false),
140 screenOutputRca(false),
141 screenOutputHdmi(false),
142 platformCoreCpuArch(""),
143 platformCoreFpuArch(""),
146 speechRecognition(false),
147 speechSynthesis(false),
148 accelerometer(false),
149 accelerometerWakeup(false),
151 barometerWakeup(false),
153 gyroscopeWakeup(false),
155 magnetometerWakeup(false),
157 photometerWakeup(false),
159 proximityWakeup(false),
161 tiltmeterWakeup(false),
162 dataEncryption(false),
163 graphicsAcceleration(false),
168 screenSizeNormal(false),
169 screenSize480_800(false),
170 screenSize720_1280(false),
172 shellAppWidget(false),
173 visionImageRecognition(false),
174 visionQrcodeGeneration(false),
175 visionQrcodeRecognition(false),
176 visionFaceRecognition(false),
177 secureElement(false),
178 nativeOspCompatible(false),
186 struct BatteryProperties
191 BatteryProperties() :
208 struct StorageUnitProperties
211 unsigned long long capacity;
212 unsigned long long availableCapacity;
216 StorageUnitProperties():
219 availableCapacity(0),
226 struct StorageProperties
228 StorageUnitProperties units[2];
238 struct DisplayProperties
240 unsigned long resolutionWidth;
241 unsigned long resolutionHeight;
242 unsigned long dotsPerInchWidth;
243 unsigned long dotsPerInchHeight;
244 double physicalWidth;
245 double physicalHeight;
248 DisplayProperties() :
252 dotsPerInchHeight(0),
260 struct WifiNetworkProperties
264 std::string ipAddress;
265 std::string ipv6Address;
266 double signalStrength;
268 WifiNetworkProperties() :
278 struct NetworkProperties
280 std::string networkType;
282 NetworkProperties() :
283 networkType("UNKNOWN")
288 struct CellularNetworkProperties
292 std::string ipAddress;
293 std::string ipv6Address;
296 unsigned short cellId;
302 CellularNetworkProperties() :
321 std::string operatorName;
342 struct DeviceOrientationProperties
347 DeviceOrientationProperties() :
349 isAutoRotation(false)
354 struct BuildProperties
357 std::string manufacturer;
358 std::string buildVersion;
368 struct LocaleProperties
370 std::string language;
380 struct PeripheralProperties
382 bool isVideoOutputOn;
384 PeripheralProperties() :
385 isVideoOutputOn(false)
390 typedef DPL::SharedPtr<DeviceCapabilitiesProperties> DeviceCapabilitiesPropertiesPtr;
391 typedef DPL::SharedPtr<BatteryProperties> BatteryPropertiesPtr;
392 typedef DPL::SharedPtr<CpuProperties> CpuPropertiesPtr;
393 typedef DPL::SharedPtr<StorageUnitProperties> StorageUnitPropertiesPtr;
394 typedef DPL::SharedPtr<StorageProperties> StoragePropertiesPtr;
395 typedef DPL::SharedPtr<DisplayProperties> DisplayPropertiesPtr;
396 typedef DPL::SharedPtr<WifiNetworkProperties> WifiNetworkPropertiesPtr;
397 typedef DPL::SharedPtr<NetworkProperties> NetworkPropertiesPtr;
398 typedef DPL::SharedPtr<CellularNetworkProperties> CellularNetworkPropertiesPtr;
399 typedef DPL::SharedPtr<SIMProperties> SIMPropertiesPtr;
400 typedef DPL::SharedPtr<DeviceOrientationProperties> DeviceOrientationPropertiesPtr;
401 typedef DPL::SharedPtr<BuildProperties> BuildPropertiesPtr;
402 typedef DPL::SharedPtr<LocaleProperties> LocalePropertiesPtr;
403 typedef DPL::SharedPtr<PeripheralProperties> PeripheralPropertiesPtr;