upload tizen1.0 source
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Systeminfo / SysteminfoPropertyInfo.h
1 /*
2  *
3  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved 
4  * 
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
8  * 
9  * http://www.apache.org/licenses/LICENSE-2.0
10  * 
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.
16  *  
17  */
18
19 #ifndef WRTPLUGINS_API_POWERINFO_H_
20 #define WRTPLUGINS_API_POWERINFO_H_
21
22 #include <JavaScriptCore/JavaScript.h>
23 #include <CommonsJavaScript/PrivateObject.h>
24 #include <CommonsJavaScript/JSUtils.h>
25 #include <CommonsJavaScript/Converter.h>
26 #include <string>
27 #include <dpl/shared_ptr.h>
28
29 namespace TizenApis {
30 namespace Api {
31 namespace Systeminfo {
32
33 struct PowerProperties
34 {
35     double level;
36     bool isCharging;
37
38     PowerProperties() :
39         level(0.0),
40         isCharging(false)
41     {
42     }
43 };
44
45 struct CpuProperties
46 {
47     double load;
48
49     CpuProperties() :
50         load(0.0)
51     {
52     }
53 };
54
55 struct StorageProperties
56 {
57         std::string        type;
58         unsigned long  capacity;
59         unsigned long  availableCapacity;
60         bool           isRemoveable;
61
62         StorageProperties():
63                 type("UNKNOWN"),
64                 capacity(0),
65                 availableCapacity(0),
66                 isRemoveable(false)
67         {
68         }
69 };
70
71 struct DisplayProperties
72 {
73         unsigned long  resolutionWidth;
74         unsigned long  resolutionHeight;
75         unsigned long  dotsPerInchWidth;
76         unsigned long  dotsPerInchHeight;
77         double         physicalWidth;
78         double         physicalHeight;
79         double         brightness;
80
81         DisplayProperties() :
82                 resolutionWidth(0),
83                 resolutionHeight(0),
84                 dotsPerInchWidth(0),
85                 dotsPerInchHeight(0),
86                 physicalWidth(0.0),
87                 physicalHeight(0.0),
88                 brightness(0.0)
89         {
90         }
91 };
92
93 struct DeviceProperties
94 {
95         std::string     imei;
96         std::string     model;
97         std::string     version;
98         std::string     vendor;
99
100         DeviceProperties() :
101                 imei(""),
102                 model(""),
103                 version(""),
104                 vendor("")
105         {
106         }
107 };
108
109 struct WifiNetworkProperties
110 {
111         std::string             status;
112         std::string             ssid;
113         std::string             ipAddress;      
114         double                  signalStrength;
115
116         WifiNetworkProperties() :
117                 status(""),
118                 ssid(""),
119                 ipAddress(""),
120                 signalStrength(0.0)
121         {
122         }
123 };
124
125 struct CellularNetworkProperties
126 {
127         std::string             status;
128         std::string             apn;
129         std::string             ipAddress;
130         unsigned short  mcc;
131         unsigned short  mnc;
132         unsigned short  cellId;
133         unsigned short  lac;
134         std::string             serviceType;
135         bool                    isRoaming;
136
137
138         CellularNetworkProperties() :
139                 status(""),
140                 apn(""),
141                 ipAddress(""),
142                 mcc(0),
143                 mnc(0),
144                 cellId(0),
145                 lac(0),
146                 serviceType(""),                
147                 isRoaming(false)
148         {
149         }
150 };
151
152 }
153 }
154 }
155
156 #endif