From 58a9177fcd741c862bcd1fa03373d417d664ebba Mon Sep 17 00:00:00 2001 From: PerryWerneck Date: Sat, 10 Dec 2016 17:32:32 -0200 Subject: [PATCH] Incluindo mais métodos da API. --- src/native/actions.cc | 20 ++++++++++++++++++++ src/native/network.cc | 3 +++ src/native/private.h | 12 +++++++++++- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/native/actions.cc b/src/native/actions.cc index 1b1bb02..a390ea9 100644 --- a/src/native/actions.cc +++ b/src/native/actions.cc @@ -43,3 +43,23 @@ int tn3270_pakey(h3270::session *ses, int key) { return ses->pakey(key); } +int tn3270_action(h3270::session *ses, const char *name) { + return ses->action(name); +} + +int tn3270_erase(h3270::session *ses) { + return ses->erase(); +} + +int tn3270_erase_eof(h3270::session *ses) { + return ses->erase_eof(); +} + +int tn3270_erase_eol(h3270::session *ses) { + return ses->erase_eol(); +} + +int tn3270_erase_input(h3270::session *ses) { + return ses->erase_input(); +} + diff --git a/src/native/network.cc b/src/native/network.cc index fd14dc5..2902ed6 100644 --- a/src/native/network.cc +++ b/src/native/network.cc @@ -44,4 +44,7 @@ int tn3270_is_connected(h3270::session *ses) { return (int) ses->is_connected(); } +int tn3270_is_ready(h3270::session *ses) { + return (int) ses->is_ready(); +} diff --git a/src/native/private.h b/src/native/private.h index f073632..3a425eb 100644 --- a/src/native/private.h +++ b/src/native/private.h @@ -78,6 +78,17 @@ DLL_PUBLIC int tn3270_connect(h3270::session *ses, const char *host, time_t wait); DLL_PUBLIC int tn3270_disconnect(h3270::session *ses); DLL_PUBLIC int tn3270_is_connected(h3270::session *ses); + DLL_PUBLIC int tn3270_is_ready(h3270::session *ses); + + DLL_PUBLIC int tn3270_set_cursor_addr(h3270::session *ses, int addr); + DLL_PUBLIC int tn3270_get_cursor_addr(h3270::session *ses); + + DLL_PUBLIC int tn3270_action(h3270::session *ses, const char *name); + + DLL_PUBLIC int tn3270_erase(h3270::session *ses); + DLL_PUBLIC int tn3270_erase_eof(h3270::session *ses); + DLL_PUBLIC int tn3270_erase_eol(h3270::session *ses); + DLL_PUBLIC int tn3270_erase_input(h3270::session *ses); DLL_PUBLIC int tn3270_wait_for_ready(h3270::session *ses, int seconds); DLL_PUBLIC int tn3270_wait(h3270::session *ses, int seconds); @@ -96,7 +107,6 @@ DLL_PUBLIC int tn3270_set_unlock_delay(h3270::session *ses, int ms); DLL_PUBLIC int tn3270_set_cursor_position(h3270::session *ses, int row, int col); - DLL_PUBLIC int tn3270_set_cursor_addr(h3270::session *ses, int addr); DLL_PUBLIC int tn3270_enter(h3270::session *ses); DLL_PUBLIC int tn3270_pfkey(h3270::session *ses, int key); -- libgit2 0.21.2