diff --git a/pw3270.cbp b/pw3270.cbp
index 4e5030a..1eef358 100644
--- a/pw3270.cbp
+++ b/pw3270.cbp
@@ -287,6 +287,8 @@
+
+
diff --git a/src/plugins/rx3270/rexx_methods.cc b/src/plugins/rx3270/rexx_methods.cc
index a938ee9..04cace9 100644
--- a/src/plugins/rx3270/rexx_methods.cc
+++ b/src/plugins/rx3270/rexx_methods.cc
@@ -74,3 +74,117 @@ RexxMethod2(int, rx3270_method_sleep, CSELF, sessionPtr, int, seconds)
return -1;
return hSession->wait(seconds);
}
+
+RexxMethod1(int, rx3270_method_is_connected, CSELF, sessionPtr)
+{
+ rx3270 *hSession = (rx3270 *) sessionPtr;
+ if(!hSession)
+ return -1;
+ return hSession->is_connected();
+}
+
+RexxMethod1(int, rx3270_method_is_ready, CSELF, sessionPtr)
+{
+ rx3270 *hSession = (rx3270 *) sessionPtr;
+ if(!hSession)
+ return -1;
+ return hSession->is_ready();
+}
+
+RexxMethod2(int, rx3270_method_wait_for_ready, CSELF, sessionPtr, int, seconds)
+{
+ rx3270 *hSession = (rx3270 *) sessionPtr;
+ if(!hSession)
+ return -1;
+ return hSession->wait_for_ready(seconds);
+}
+
+RexxMethod3(int, rx3270_method_set_cursor, CSELF, sessionPtr, int, row, int, col)
+{
+ rx3270 *hSession = (rx3270 *) sessionPtr;
+ if(!hSession)
+ return -1;
+ return hSession->set_cursor_position(row,col);
+}
+
+RexxMethod1(int, rx3270_method_enter, CSELF, sessionPtr)
+{
+ rx3270 *hSession = (rx3270 *) sessionPtr;
+ if(!hSession)
+ return -1;
+ return hSession->enter();
+}
+
+RexxMethod2(int, rx3270_method_pfkey, CSELF, sessionPtr, int, key)
+{
+ rx3270 *hSession = (rx3270 *) sessionPtr;
+ if(!hSession)
+ return -1;
+ return hSession->pfkey(key);
+}
+
+RexxMethod2(int, rx3270_method_pakey, CSELF, sessionPtr, int, key)
+{
+ rx3270 *hSession = (rx3270 *) sessionPtr;
+ if(!hSession)
+ return -1;
+ return hSession->pakey(key);
+}
+
+RexxMethod4(RexxStringObject, rx3270_method_get_text_at, CSELF, sessionPtr, int, row, int, col, int, sz)
+{
+ rx3270 * session = (rx3270 *) sessionPtr;
+
+ if(session)
+ {
+ char * str = session->get_text_at(row,col,sz);
+
+ if(str)
+ {
+ char * text = session->get_local_string(str);
+ RexxStringObject ret = context->String((CSTRING) text);
+ free(str);
+ free(text);
+ return ret;
+ }
+ }
+
+ return context->String("");
+}
+
+
+RexxMethod4(int, rx3270_method_set_text_at, CSELF, sessionPtr, int, row, int, col, CSTRING, text)
+{
+ rx3270 * session = (rx3270 *) sessionPtr;
+
+ if(session)
+ {
+ char * str = session->get_3270_string(text);
+ int rc;
+ rc = session->set_text_at(row,col,str);
+ free(str);
+ return rc;
+ }
+ return -1;
+}
+
+RexxMethod4(int, rx3270_method_cmp_text_at, CSELF, sessionPtr, int, row, int, col, CSTRING, key)
+{
+ int rc = 0;
+ rx3270 * session = (rx3270 *) sessionPtr;
+
+ if(session)
+ {
+ char * str = session->get_text_at(row,col,strlen(key));
+ if(str)
+ {
+ char * text = session->get_3270_string(key);
+ rc = strcasecmp(str,text);
+ free(text);
+ }
+ free(str);
+ }
+
+ return rc;
+}
+
diff --git a/src/plugins/rx3270/rx3270.cls b/src/plugins/rx3270/rx3270.cls
index e767d09..cd7ddcc 100644
--- a/src/plugins/rx3270/rx3270.cls
+++ b/src/plugins/rx3270/rx3270.cls
@@ -42,3 +42,18 @@
::METHOD SLEEP EXTERNAL "LIBRARY rx3270 rx3270_method_sleep"
+::METHOD CONNECTED EXTERNAL "LIBRARY rx3270 rx3270_method_is_connected"
+::METHOD READY EXTERNAL "LIBRARY rx3270 rx3270_method_is_ready"
+
+::METHOD WAITFORREADY EXTERNAL "LIBRARY rx3270 rx3270_method_wait_for_ready"
+
+::METHOD SETCURSOR EXTERNAL "LIBRARY rx3270 rx3270_method_set_cursor"
+
+::METHOD ENTER EXTERNAL "LIBRARY rx3270 rx3270_method_enter"
+::METHOD PFKEY EXTERNAL "LIBRARY rx3270 rx3270_method_pfkey"
+::METHOD PFKEY EXTERNAL "LIBRARY rx3270 rx3270_method_pakey"
+
+::METHOD GETTEXTAT EXTERNAL "LIBRARY rx3270 rx3270_method_get_text_at"
+::METHOD SETTEXTAT EXTERNAL "LIBRARY rx3270 rx3270_method_set_text_at"
+::METHOD CMPTEXTAT EXTERNAL "LIBRARY rx3270 rx3270_method_cmp_text_at"
+
diff --git a/src/plugins/rx3270/rx3270.h b/src/plugins/rx3270/rx3270.h
index b65b80c..09d40c1 100644
--- a/src/plugins/rx3270/rx3270.h
+++ b/src/plugins/rx3270/rx3270.h
@@ -75,6 +75,16 @@
REXX_METHOD_PROTOTYPE(rx3270_method_connect);
REXX_METHOD_PROTOTYPE(rx3270_method_disconnect);
REXX_METHOD_PROTOTYPE(rx3270_method_sleep);
+ REXX_METHOD_PROTOTYPE(rx3270_method_is_connected);
+ REXX_METHOD_PROTOTYPE(rx3270_method_is_ready);
+ REXX_METHOD_PROTOTYPE(rx3270_method_wait_for_ready);
+ REXX_METHOD_PROTOTYPE(rx3270_method_set_cursor);
+ REXX_METHOD_PROTOTYPE(rx3270_method_enter);
+ REXX_METHOD_PROTOTYPE(rx3270_method_pfkey);
+ REXX_METHOD_PROTOTYPE(rx3270_method_pakey);
+ REXX_METHOD_PROTOTYPE(rx3270_method_get_text_at);
+ REXX_METHOD_PROTOTYPE(rx3270_method_set_text_at);
+ REXX_METHOD_PROTOTYPE(rx3270_method_cmp_text_at);
/*---[ Globals ]---------------------------------------------------------------------------------------------*/
diff --git a/src/plugins/rx3270/rxapimain.cc b/src/plugins/rx3270/rxapimain.cc
index e3dbf8c..0a6e3c1 100644
--- a/src/plugins/rx3270/rxapimain.cc
+++ b/src/plugins/rx3270/rxapimain.cc
@@ -111,11 +111,22 @@ RexxRoutineEntry rx3270_functions[] =
RexxMethodEntry rx3270_methods[] =
{
- REXX_METHOD(rx3270_method_init, rx3270_method_init ),
- REXX_METHOD(rx3270_method_uninit, rx3270_method_uninit ),
- REXX_METHOD(rx3270_method_connect, rx3270_method_connect ),
- REXX_METHOD(rx3270_method_disconnect, rx3270_method_disconnect ),
- REXX_METHOD(rx3270_method_sleep, rx3270_method_sleep ),
+ REXX_METHOD(rx3270_method_init, rx3270_method_init ),
+ REXX_METHOD(rx3270_method_uninit, rx3270_method_uninit ),
+ REXX_METHOD(rx3270_method_connect, rx3270_method_connect ),
+ REXX_METHOD(rx3270_method_disconnect, rx3270_method_disconnect ),
+ REXX_METHOD(rx3270_method_sleep, rx3270_method_sleep ),
+ REXX_METHOD(rx3270_method_is_connected, rx3270_method_is_connected ),
+ REXX_METHOD(rx3270_method_is_ready, rx3270_method_is_ready ),
+ REXX_METHOD(rx3270_method_wait_for_ready, rx3270_method_wait_for_ready ),
+ REXX_METHOD(rx3270_method_set_cursor, rx3270_method_set_cursor ),
+ REXX_METHOD(rx3270_method_enter, rx3270_method_enter ),
+ REXX_METHOD(rx3270_method_pfkey, rx3270_method_pfkey ),
+ REXX_METHOD(rx3270_method_pakey, rx3270_method_pakey ),
+ REXX_METHOD(rx3270_method_get_text_at, rx3270_method_get_text_at ),
+ REXX_METHOD(rx3270_method_set_text_at, rx3270_method_set_text_at ),
+ REXX_METHOD(rx3270_method_cmp_text_at, rx3270_method_cmp_text_at ),
+
REXX_LAST_METHOD()
};
--
libgit2 0.21.2