18 |
18 |
19 #ifndef _KJS_LIWIINTERFACE_H_ |
19 #ifndef _KJS_LIWIINTERFACE_H_ |
20 #define _KJS_LIWIINTERFACE_H_ |
20 #define _KJS_LIWIINTERFACE_H_ |
21 |
21 |
22 #include <object.h> |
22 #include <object.h> |
|
23 #include "Device.h" |
23 |
24 |
24 namespace KJS |
25 namespace KJS |
25 { |
26 { |
26 class MDeviceBinding; |
27 class MDeviceBinding; |
27 class MDevicePeer; |
28 class MDevicePeer; |
28 class ServiceEventHandler; |
29 class ServiceEventHandler; |
29 class DeviceLiwInterfacePrivate; |
30 class DeviceLiwInterface; |
30 class DeviceLiwResult; |
31 class DeviceLiwResult; |
|
32 |
|
33 class DeviceLiwInterfacePrivate : public DevicePrivateBase |
|
34 { |
|
35 friend class DeviceLiwInterface; |
|
36 friend class DeviceLiwInterfaceFunc; |
|
37 public: |
|
38 DeviceLiwInterfacePrivate(DeviceLiwInterface* jsobj, MDeviceBinding* deviceBinding, MDevicePeer* devicePeer); |
|
39 ~DeviceLiwInterfacePrivate(); |
|
40 MDeviceBinding* m_deviceBinding; // not owned |
|
41 MDevicePeer* m_devicePeer; // owned |
|
42 Identifier m_interfaceName; |
|
43 ExecState* m_exec; // not owned |
|
44 DeviceLiwInterface* m_jsobj; // not owned |
|
45 }; |
31 |
46 |
32 class DeviceLiwInterface : public JSObject |
47 class DeviceLiwInterface : public JSObject |
33 { |
48 { |
34 friend class DeviceLiwInterfaceFunc; |
49 friend class DeviceLiwInterfacePrivate; |
|
50 friend class DeviceLiwInterfaceFunc; |
35 public: // constructor and destructor |
51 public: // constructor and destructor |
36 |
52 |
37 /** |
53 /** |
38 * Constructor |
54 * Constructor |
39 * @return none |
55 * @return none |
80 const Identifier& propertyName, const List& aArgs ); |
96 const Identifier& propertyName, const List& aArgs ); |
81 |
97 |
82 /** |
98 /** |
83 * Close |
99 * Close |
84 **/ |
100 **/ |
85 void Close(ExecState* exec); |
101 void Close(); |
86 |
102 |
87 /** |
103 /** |
88 * isValid |
104 * isValid |
89 */ |
105 */ |
90 bool isValid() const { return m_valid; } |
106 TBool isValid() const { return m_valid; } |
91 |
107 |
92 |
108 /** |
|
109 * getInterfaceData |
|
110 * @return DevicePrivateBase* |
|
111 * @since 7.x |
|
112 */ |
|
113 DevicePrivateBase* getInterfaceData() { return m_privateData; } |
|
114 |
93 /** |
115 /** |
94 * IsRunningCallBack |
116 * IsRunningCallBack |
95 */ |
117 */ |
96 TBool IsRunningCallBack() const; |
118 TBool IsRunningCallBack() const; |
97 |
119 |
104 |
126 |
105 static const ClassInfo info; |
127 static const ClassInfo info; |
106 |
128 |
107 private: |
129 private: |
108 DeviceLiwInterfacePrivate* m_privateData; // private object to hold data |
130 DeviceLiwInterfacePrivate* m_privateData; // private object to hold data |
109 bool m_valid; // object is valid or not |
131 TBool m_valid; // object is valid or not |
110 |
132 |
111 }; |
133 }; |
112 |
134 |
113 class DeviceLiwInterfacePrivate |
|
114 { |
|
115 friend class DeviceLiwInterface; |
|
116 friend class DeviceLiwInterfaceFunc; |
|
117 public: |
|
118 DeviceLiwInterfacePrivate(MDeviceBinding* deviceBinding, MDevicePeer* devicePeer); |
|
119 ~DeviceLiwInterfacePrivate() { Close(); } |
|
120 void Close(); |
|
121 MDeviceBinding* m_deviceBinding; // not owned |
|
122 MDevicePeer* m_devicePeer; // owned |
|
123 Identifier m_interfaceName; |
|
124 RPointerArray<DeviceLiwResult>* m_resultObjArray;// owned |
|
125 ExecState* m_exec; // not owned |
|
126 }; |
|
127 |
|
128 |
|
129 class DeviceLiwInterfaceFunc : public JSObject |
135 class DeviceLiwInterfaceFunc : public JSObject |
130 { |
136 { |
131 public: // constructor and destructor |
137 public: // constructor and destructor |
132 |
138 |
133 /** |
139 /** |