208 |
208 |
209 Data_Get_Struct (self, LmConnection, conn); |
209 Data_Get_Struct (self, LmConnection, conn); |
210 |
210 |
211 lm_connection_set_port (conn, NUM2UINT (port)); |
211 lm_connection_set_port (conn, NUM2UINT (port)); |
212 |
212 |
|
213 return Qnil; |
|
214 } |
|
215 |
|
216 VALUE |
|
217 conn_get_state (VALUE self) |
|
218 { |
|
219 LmConnection *conn; |
|
220 |
|
221 Data_Get_Struct (self, LmConnection, conn); |
|
222 |
|
223 /* TODO: FIXME */ |
213 return Qnil; |
224 return Qnil; |
214 } |
225 } |
215 |
226 |
216 void |
227 void |
217 Init_lm_connection (VALUE lm_mLM) |
228 Init_lm_connection (VALUE lm_mLM) |
235 rb_define_method (lm_mConnection, "server=", conn_set_server, 1); |
246 rb_define_method (lm_mConnection, "server=", conn_set_server, 1); |
236 rb_define_method (lm_mConnection, "jid", conn_get_jid, 0); |
247 rb_define_method (lm_mConnection, "jid", conn_get_jid, 0); |
237 rb_define_method (lm_mConnection, "jid=", conn_set_jid, 1); |
248 rb_define_method (lm_mConnection, "jid=", conn_set_jid, 1); |
238 rb_define_method (lm_mConnection, "port", conn_get_port, 0); |
249 rb_define_method (lm_mConnection, "port", conn_get_port, 0); |
239 rb_define_method (lm_mConnection, "port=", conn_set_port, 1); |
250 rb_define_method (lm_mConnection, "port=", conn_set_port, 1); |
240 } |
251 |
|
252 /* |
|
253 rb_define_method (lm_mConnection, "ssl", conn_get_ssl, 0); |
|
254 rb_define_method (lm_mConnection, "ssl=", conn_set_ssl, 1); |
|
255 rb_define_method (lm_mConnection, "proxy", conn_get_proxy, 0); |
|
256 rb_define_method (lm_mConnection, "proxy=", conn_set_proxy, 1); |
|
257 */ |
|
258 |
|
259 /* Use one send message and check if there is a block passed? */ |
|
260 /* |
|
261 rb_define_method (lm_mConnection, "send", conn_send, 1); |
|
262 rb_define_method (lm_mConnection, "send_with_reply", conn_send_with_reply, -1); |
|
263 rb_define_method (lm_mConnection, "send_raw", conn_send_raw, 1); |
|
264 */ |
|
265 |
|
266 rb_define_method (lm_mConnection, "state", conn_get_state, 0); |
|
267 } |