Commit 8c9dbdb4e7923c9897b2aa797233b00d3c6ab20c
1 parent
f2cb8889
Exists in
master
and in
5 other branches
Incluindo suporte a ações por nome na HLLAPI
Showing
4 changed files
with
11 additions
and
1 deletions
Show diff stats
src/include/pw3270/hllapi.h
@@ -107,6 +107,8 @@ extern "C" { | @@ -107,6 +107,8 @@ extern "C" { | ||
107 | HLLAPI_API_CALL hllapi_erase_eol(void); | 107 | HLLAPI_API_CALL hllapi_erase_eol(void); |
108 | HLLAPI_API_CALL hllapi_erase_input(void); | 108 | HLLAPI_API_CALL hllapi_erase_input(void); |
109 | 109 | ||
110 | + HLLAPI_API_CALL hllapi_action(LPSTR buffer); | ||
111 | + | ||
110 | HLLAPI_API_CALL hllapi_print(void); | 112 | HLLAPI_API_CALL hllapi_print(void); |
111 | 113 | ||
112 | HLLAPI_API_CALL hllapi(const LPWORD func, LPSTR str, LPWORD length, LPWORD rc); | 114 | HLLAPI_API_CALL hllapi(const LPWORD func, LPSTR str, LPWORD length, LPWORD rc); |
src/plugins/dbus3270/test.sh
@@ -41,6 +41,10 @@ run_command() | @@ -41,6 +41,10 @@ run_command() | ||
41 | dbus-send --session --print-reply --dest=$DEST.$SESSION $BPATH $DEST.setTextAt int32:$2 int32:$3 string:$4 | 41 | dbus-send --session --print-reply --dest=$DEST.$SESSION $BPATH $DEST.setTextAt int32:$2 int32:$3 string:$4 |
42 | ;; | 42 | ;; |
43 | 43 | ||
44 | + action) | ||
45 | + dbus-send --session --print-reply --dest=$DEST.$SESSION $BPATH $DEST.action string:$2 | ||
46 | + ;; | ||
47 | + | ||
44 | enter) | 48 | enter) |
45 | dbus-send --session --print-reply --dest=$DEST.$SESSION $BPATH $DEST.enter | 49 | dbus-send --session --print-reply --dest=$DEST.$SESSION $BPATH $DEST.enter |
46 | ;; | 50 | ;; |
src/plugins/hllapi/calls.cc
@@ -314,6 +314,10 @@ | @@ -314,6 +314,10 @@ | ||
314 | return HLLAPI_STATUS_SUCCESS; | 314 | return HLLAPI_STATUS_SUCCESS; |
315 | } | 315 | } |
316 | 316 | ||
317 | + HLLAPI_API_CALL hllapi_action(LPSTR buffer) { | ||
318 | + session::get_default()->action((const char *) buffer); | ||
319 | + return HLLAPI_STATUS_SUCCESS; | ||
320 | + } | ||
317 | 321 | ||
318 | HLLAPI_API_CALL hllapi_print(void) | 322 | HLLAPI_API_CALL hllapi_print(void) |
319 | { | 323 | { |
src/plugins/hllapi/pluginmain.c
@@ -388,7 +388,7 @@ | @@ -388,7 +388,7 @@ | ||
388 | 388 | ||
389 | case HLLAPI_PACKET_ACTION: | 389 | case HLLAPI_PACKET_ACTION: |
390 | send_result(source,lib3270_action(lib3270_get_default_session_handle(), | 390 | send_result(source,lib3270_action(lib3270_get_default_session_handle(), |
391 | - (const char *) ((struct hllapi_packet_text *) source->buffer)->text); | 391 | + (const char *) ((struct hllapi_packet_text *) source->buffer)->text)); |
392 | break; | 392 | break; |
393 | 393 | ||
394 | 394 |