Added wrt files, prior to converting into Qt/C++.
[ptas] / wrt / misc / rss / preview / script / lib / systeminfo.js
1 /**\r
2         This API is used to provide system related data.\r
3         It takes the sysObject as an argument that is the embeded API in the main HTML file.\r
4         While using this API outside mobile environment, User or developer need not to take any extara action in oprder to support SYSAPI.\r
5 */\r
6 \r
7 function systemAPI(sysObject)\r
8 {\r
9         /*\r
10          *      System Language information services\r
11          */\r
12         sysObject.language = 'EN';\r
13 \r
14 \r
15 \r
16 \r
17         /*\r
18          *      Power information services\r
19          */\r
20         \r
21         //      Properties\r
22         sysObject.chargelevel = 5;\r
23         sysObject.chargerconnected = 0;\r
24 \r
25         //      Event triggers\r
26         sysObject.onchargelevel = null;\r
27         sysObject.onchargerconnected = null;\r
28 \r
29 \r
30 \r
31         /*\r
32          *      Beep tone control services\r
33          */     \r
34         sysObject.beep = function(frequency, duration){ }\r
35 \r
36 \r
37 \r
38         /*\r
39          *      Network Information services\r
40          */\r
41         \r
42         //      value range between: {0-7}\r
43         sysObject.signalbars = 7;\r
44 \r
45         sysObject.networkname = 'No network';\r
46 \r
47         //      value range between: {0-7}\r
48         sysObject.networkregistrationstatus = 0;\r
49         \r
50 \r
51 \r
52         /*\r
53          *      Display and keypad illumination information and control services\r
54          */\r
55 \r
56         //      Properties\r
57         sysObject.lightminintensity = 1;\r
58         sysObject.lightmaxintensity = 100;\r
59         sysObject.lightdefaultintensity = 0;\r
60         \r
61         sysObject.lightinfiniteduration = 0;\r
62         sysObject.lightmaxduration = 1;\r
63         sysObject.lightdefaultcycletime = 0;\r
64 \r
65         sysObject.lighttargetprimarydisplayandkeyboard = 0x3;\r
66         sysObject.lighttargetsystem = 1;\r
67 \r
68         //      functions\r
69         sysObject.lighton       = function(lighttarget, duration, intensity, fadein){   }\r
70         sysObject.lightblink    = function(lighttarget, duration, onduration, offduration, intensity){  }\r
71         sysObject.lightoff      = function(lighttarget, duration, fadeout){     }\r
72 \r
73 \r
74 \r
75         /*\r
76          *      Vibration information and control services\r
77          */\r
78         sysObject.vibraminintensity = 1;\r
79         sysObject.vibramaxintensity = 10;\r
80         sysObject.vibramaxduration = 100;\r
81         \r
82         //      Vibration setting in the user profile is off.\r
83         sysObject.vibrasettings = 2; \r
84 \r
85         sysObject.startvibra    = function(duration, intensity){        }\r
86 \r
87         sysObject.stopvibra     = function(){   }\r
88 \r
89 \r
90 \r
91 \r
92         /*\r
93          *      Memory and file system information services\r
94          */\r
95         sysObject.totalram = 32;        \r
96         sysObject.freeram = 10; \r
97         sysObject.drivelist = 'C';      \r
98 \r
99         sysObject.drivesize     = function(drive){      return 64;      }\r
100         \r
101         sysObject.drivefree     = function(drive){      return 32;      }\r
102 \r
103 }\r
104 \r
105 \r
106 //      make TRUE systeminfo.js script loaded\r
107 window.parent.NOKIA.scriptsLoaded.systeminfo = true;