equal
deleted
inserted
replaced
19 #ifndef _KJS_DEVICELIWITERABLE_H_ |
19 #ifndef _KJS_DEVICELIWITERABLE_H_ |
20 #define _KJS_DEVICELIWITERABLE_H_ |
20 #define _KJS_DEVICELIWITERABLE_H_ |
21 |
21 |
22 // INCLUDES |
22 // INCLUDES |
23 #include <object.h> |
23 #include <object.h> |
|
24 #include "Device.h" |
24 |
25 |
25 /** |
26 /** |
26 * DeviceLiwIterable |
27 * DeviceLiwIterable |
27 * |
28 * |
28 * @lib jsdevice.dll |
29 * @lib jsdevice.dll |
29 * @since 5.0 |
30 * @since 5.0 |
30 */ |
31 */ |
31 namespace KJS |
32 namespace KJS |
32 { |
33 { |
33 class CDeviceLiwBinding; |
34 class CDeviceLiwBinding; |
34 class DeviceLiwIterablePrivate; |
35 class DeviceLiwIterable; |
|
36 |
|
37 class DeviceLiwIterablePrivate : public DevicePrivateBase |
|
38 { |
|
39 friend class DeviceLiwIterable; |
|
40 friend class DeviceLiwIterableFunc; |
|
41 public: |
|
42 DeviceLiwIterablePrivate(DeviceLiwIterable* jsobj, const CLiwIterable* m_iterable, CDeviceLiwBinding* liwBinding); |
|
43 ~DeviceLiwIterablePrivate(); |
|
44 CDeviceLiwBinding* m_liwBinding; // not Owned |
|
45 Identifier m_propName; |
|
46 CLiwIterable* m_iterable; // not owned |
|
47 ExecState* m_exec; // not owned |
|
48 DeviceLiwIterable* m_jsobj; // not owned |
|
49 }; |
|
50 |
35 class DeviceLiwIterable : public JSObject |
51 class DeviceLiwIterable : public JSObject |
36 { |
52 { |
|
53 friend class DeviceLiwIterablePrivate; |
37 friend class DeviceLiwIterableFunc; |
54 friend class DeviceLiwIterableFunc; |
38 public: // constructor and destructor |
55 public: // constructor and destructor |
39 |
56 |
40 /** |
57 /** |
41 * Constructor |
58 * Constructor |
79 /** |
96 /** |
80 * whether this object is valid |
97 * whether this object is valid |
81 * @return boolean |
98 * @return boolean |
82 * @since 5.0 |
99 * @since 5.0 |
83 */ |
100 */ |
84 const bool isValid() const { return m_valid; } |
101 const TBool isValid() const { return m_valid; } |
85 |
102 |
|
103 /** |
|
104 * getIterableData |
|
105 * @return DevicePrivateBase* |
|
106 * @since 7.x |
|
107 */ |
|
108 DevicePrivateBase* getIterableData() { return m_privateData; } |
|
109 |
86 /** |
110 /** |
87 * close jsobject array |
111 * close jsobject array |
88 * @return |
112 * @return |
89 * @since 5.0 |
113 * @since 5.0 |
90 **/ |
114 **/ |
91 void Close(ExecState* exec , bool unmark); |
115 void Close(); |
92 |
116 |
93 static const ClassInfo info; |
117 static const ClassInfo info; |
94 |
118 |
95 enum |
119 enum |
96 { |
120 { |
107 virtual UString toString( ExecState* exec ) const; |
131 virtual UString toString( ExecState* exec ) const; |
108 |
132 |
109 |
133 |
110 private: |
134 private: |
111 DeviceLiwIterablePrivate* m_privateData; // private object to hold data |
135 DeviceLiwIterablePrivate* m_privateData; // private object to hold data |
112 bool m_valid; // object is valid or not |
136 TBool m_valid; // object is valid or not |
113 }; |
|
114 |
|
115 class DeviceLiwIterablePrivate |
|
116 { |
|
117 friend class DeviceLiwIterable; |
|
118 friend class DeviceLiwIterableFunc; |
|
119 public: |
|
120 DeviceLiwIterablePrivate(const CLiwIterable* m_iterable, CDeviceLiwBinding* liwBinding); |
|
121 ~DeviceLiwIterablePrivate() { Close(); } |
|
122 void Close(); |
|
123 CDeviceLiwBinding* m_liwBinding; // not Owned |
|
124 Identifier m_propName; |
|
125 CLiwIterable* m_iterable; // not owned |
|
126 ExecState* m_exec; // not owned |
|
127 RPointerArray<JSObject>* m_jsobjArray; // owned |
|
128 }; |
137 }; |
129 |
138 |
130 class DeviceLiwIterableFunc : public JSObject |
139 class DeviceLiwIterableFunc : public JSObject |
131 { |
140 { |
132 public: // constructor and destructor |
141 public: // constructor and destructor |