|
1 /* |
|
2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __WRT_PLATFORM_H |
|
21 #define __WRT_PLATFORM_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "config.h" |
|
25 #include <e32base.h> |
|
26 #include <kjs/object.h> |
|
27 |
|
28 // CONSTANTS |
|
29 |
|
30 // MACROS |
|
31 |
|
32 // DATA TYPES |
|
33 |
|
34 // FUNCTION PROTOTYPES |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * JSWrtPlatform |
|
40 * |
|
41 * @lib widgetengine.dll |
|
42 * @since 5.0 |
|
43 */ |
|
44 namespace KJS { |
|
45 |
|
46 class ExecState; |
|
47 |
|
48 struct WrtPlatformPrivate |
|
49 { |
|
50 WrtPlatformPrivate() {} |
|
51 |
|
52 virtual ~WrtPlatformPrivate() {} |
|
53 |
|
54 UString m_sisVersion; |
|
55 UString m_manufacturer; |
|
56 UString m_model; |
|
57 // UString m_revision; |
|
58 // UString m_serialNumber; |
|
59 }; |
|
60 |
|
61 class JSWrtPlatform: public JSObject |
|
62 { |
|
63 |
|
64 public: |
|
65 JSWrtPlatform( ExecState* exec ); |
|
66 virtual ~JSWrtPlatform(); |
|
67 |
|
68 //From JSObject |
|
69 public: |
|
70 JSType type() const; |
|
71 JSValue* getValueProperty(KJS::ExecState*, int token) const; |
|
72 bool getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot); |
|
73 |
|
74 const ClassInfo* classInfo() const { return &info; } |
|
75 static const ClassInfo info; |
|
76 |
|
77 virtual UString toString(ExecState *exec) const; |
|
78 |
|
79 enum { |
|
80 id, |
|
81 romVersion, |
|
82 packageVersion, |
|
83 manufacturer, /** Phone manufacturer identification, in character string format. */ |
|
84 model, /** Phone model identification, in character string format. */ |
|
85 // revision /** Phone revision identification, in character string format. */ |
|
86 // serialNumber /** Phone serial number (IMEI or ESN), in character string format. */ |
|
87 }; |
|
88 |
|
89 private: |
|
90 UString SISVersionL(); |
|
91 void GetPhoneInfoL(); |
|
92 |
|
93 private: |
|
94 WrtPlatformPrivate* pltPriv; |
|
95 }; |
|
96 |
|
97 }; |
|
98 |
|
99 #include "WrtPlatform.lut.h" |
|
100 |
|
101 #endif |