Commit 0c2eb328d17c4c2c114deb90de637300f3872557
1 parent
42e6c7b2
Exists in
master
and in
5 other branches
Corrigindo módulo dbus
Showing
4 changed files
with
32 additions
and
1 deletions
Show diff stats
src/plugins/dbus3270/gobject.c
| @@ -418,6 +418,19 @@ void pw3270_dbus_pa_key(PW3270Dbus *object, int key, DBusGMethodInvocation *cont | @@ -418,6 +418,19 @@ void pw3270_dbus_pa_key(PW3270Dbus *object, int key, DBusGMethodInvocation *cont | ||
| 418 | dbus_g_method_return(context,lib3270_get_next_unprotected(pw3270_dbus_get_session_handle(object),baddr)); | 418 | dbus_g_method_return(context,lib3270_get_next_unprotected(pw3270_dbus_get_session_handle(object),baddr)); |
| 419 | } | 419 | } |
| 420 | 420 | ||
| 421 | + void pw3270_dbus_get_is_protected(PW3270Dbus *object, int baddr, DBusGMethodInvocation *context) | ||
| 422 | + { | ||
| 423 | + trace("%s object=%p context=%p",__FUNCTION__,object,context); | ||
| 424 | + dbus_g_method_return(context,lib3270_get_is_protected(pw3270_dbus_get_session_handle(object),baddr)); | ||
| 425 | + } | ||
| 426 | + | ||
| 427 | + void pw3270_dbus_get_is_protected_at(PW3270Dbus *object, int row, int col, DBusGMethodInvocation *context) | ||
| 428 | + { | ||
| 429 | + trace("%s object=%p context=%p",__FUNCTION__,object,context); | ||
| 430 | + dbus_g_method_return(context,lib3270_get_is_protected_at(pw3270_dbus_get_session_handle(object),row,col)); | ||
| 431 | + } | ||
| 432 | + | ||
| 433 | + | ||
| 421 | void pw3270_dbus_get_clipboard(PW3270Dbus *object, DBusGMethodInvocation *context) | 434 | void pw3270_dbus_get_clipboard(PW3270Dbus *object, DBusGMethodInvocation *context) |
| 422 | { | 435 | { |
| 423 | gchar *text; | 436 | gchar *text; |
src/plugins/dbus3270/pw3270dbus.xml
| @@ -118,6 +118,17 @@ | @@ -118,6 +118,17 @@ | ||
| 118 | <arg type="i" name="addr" direction="in" /> | 118 | <arg type="i" name="addr" direction="in" /> |
| 119 | <arg type="i" name="result" direction="out" /> | 119 | <arg type="i" name="result" direction="out" /> |
| 120 | </method> | 120 | </method> |
| 121 | + <method name="getIsProtected"> | ||
| 122 | + <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/> | ||
| 123 | + <arg type="i" name="addr" direction="in" /> | ||
| 124 | + <arg type="i" name="result" direction="out" /> | ||
| 125 | + </method> | ||
| 126 | + <method name="getIsProtectedAt"> | ||
| 127 | + <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/> | ||
| 128 | + <arg type="i" name="row" direction="in" /> | ||
| 129 | + <arg type="i" name="col" direction="in" /> | ||
| 130 | + <arg type="i" name="result" direction="out" /> | ||
| 131 | + </method> | ||
| 121 | <method name="setToggle"> | 132 | <method name="setToggle"> |
| 122 | <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/> | 133 | <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/> |
| 123 | <arg type="i" name="id" direction="in" /> | 134 | <arg type="i" name="id" direction="in" /> |
src/plugins/dbus3270/service.h
| @@ -88,7 +88,10 @@ | @@ -88,7 +88,10 @@ | ||
| 88 | 88 | ||
| 89 | void pw3270_dbus_get_field_start(PW3270Dbus *object, int baddr, DBusGMethodInvocation *context); | 89 | void pw3270_dbus_get_field_start(PW3270Dbus *object, int baddr, DBusGMethodInvocation *context); |
| 90 | void pw3270_dbus_get_field_length(PW3270Dbus *object, int baddr, DBusGMethodInvocation *context); | 90 | void pw3270_dbus_get_field_length(PW3270Dbus *object, int baddr, DBusGMethodInvocation *context); |
| 91 | - void pw3270_dbus_get_next_unprotected(PW3270Dbus *object, int baddr, DBusGMethodInvocation *context); | 91 | + void pw3270_dbus_get_next_unprotected(PW3270Dbus *object, int baddr, DBusGMethodInvocation *context); |
| 92 | + | ||
| 93 | + void pw3270_dbus_get_is_protected(PW3270Dbus *object, int baddr, DBusGMethodInvocation *context); | ||
| 94 | + void pw3270_dbus_get_is_protected_at(PW3270Dbus *object, int row, int col, DBusGMethodInvocation *context); | ||
| 92 | 95 | ||
| 93 | void pw3270_dbus_set_script(PW3270Dbus *object, const gchar *text, int mode, DBusGMethodInvocation *context); | 96 | void pw3270_dbus_set_script(PW3270Dbus *object, const gchar *text, int mode, DBusGMethodInvocation *context); |
| 94 | 97 |
src/plugins/dbus3270/test.sh
| @@ -33,6 +33,10 @@ run_command() | @@ -33,6 +33,10 @@ run_command() | ||
| 33 | dbus-send --session --print-reply --dest=$DEST.$SESSION $BPATH $DEST.getScreenContents | 33 | dbus-send --session --print-reply --dest=$DEST.$SESSION $BPATH $DEST.getScreenContents |
| 34 | ;; | 34 | ;; |
| 35 | 35 | ||
| 36 | + protect) | ||
| 37 | + dbus-send --session --print-reply --dest=$DEST.$SESSION $BPATH $DEST.getIsProtectedAt int32:$2 int32:$3 | ||
| 38 | + ;; | ||
| 39 | + | ||
| 36 | set) | 40 | set) |
| 37 | 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 |
| 38 | ;; | 42 | ;; |