--- a/bindings/ruby/rblm-constants.c Thu Apr 10 13:43:01 2008 +0200
+++ b/bindings/ruby/rblm-constants.c Thu Apr 10 14:13:14 2008 +0200
@@ -4,6 +4,7 @@
VALUE lm_mMessageSubType;
VALUE lm_mDisconnectReason;
VALUE lm_mConnectionState;
+VALUE lm_mProxyType;
LmConnectionState
rb_lm_connection_state_from_ruby_object (VALUE obj)
@@ -74,6 +75,21 @@
return type;
}
+LmProxyType
+rb_lm_proxy_type_from_ruby_object (VALUE obj)
+{
+ LmProxyType type;
+
+ type = FIX2INT (obj);
+ if (type < LM_PROXY_TYPE_NONE || type > LM_PROXY_TYPE_HTTP) {
+ rb_raise (rb_eArgError,
+ "invalid LmProxyType: %d (expected %d <= LmProxyType <= %d)",
+ type, LM_PROXY_TYPE_NONE, LM_PROXY_TYPE_HTTP);
+ }
+
+ return type;
+}
+
void
Init_lm_constants (VALUE lm_mLM)
{
@@ -152,4 +168,11 @@
rb_define_const (lm_mConnectionState, "AUTHENTICATED",
INT2FIX (LM_CONNECTION_STATE_AUTHENTICATED));
+ /* LmProxyType */
+ lm_mProxyType = rb_define_module_under (lm_mLM, "ProxyType");
+
+ rb_define_const (lm_mProxyType, "NONE",
+ INT2FIX (LM_PROXY_TYPE_NONE));
+ rb_define_const (lm_mProxyType, "HTTP",
+ INT2FIX (LM_PROXY_TYPE_HTTP));
}
--- a/bindings/ruby/rblm-proxy.c Thu Apr 10 13:43:01 2008 +0200
+++ b/bindings/ruby/rblm-proxy.c Thu Apr 10 14:13:14 2008 +0200
@@ -1,6 +1,10 @@
#include "rblm.h"
+VALUE lm_cProxy;
+
extern void
Init_lm_proxy (VALUE lm_mLM)
-{}
+{
+ lm_cProxy = rb_define_class_under (lm_mLM, "Proxy", rb_cObject);
+}
--- a/bindings/ruby/rblm-ssl.c Thu Apr 10 13:43:01 2008 +0200
+++ b/bindings/ruby/rblm-ssl.c Thu Apr 10 14:13:14 2008 +0200
@@ -1,6 +1,10 @@
#include "rblm.h"
+VALUE lm_cSSL;
+
extern void
Init_lm_ssl (VALUE lm_mLM)
-{}
+{
+ lm_cSSL = rb_define_class_under (lm_mLM, "SSL", rb_cObject);
+}