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 | 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 | 434 | void pw3270_dbus_get_clipboard(PW3270Dbus *object, DBusGMethodInvocation *context) |
| 422 | 435 | { |
| 423 | 436 | gchar *text; | ... | ... |
src/plugins/dbus3270/pw3270dbus.xml
| ... | ... | @@ -118,6 +118,17 @@ |
| 118 | 118 | <arg type="i" name="addr" direction="in" /> |
| 119 | 119 | <arg type="i" name="result" direction="out" /> |
| 120 | 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 | 132 | <method name="setToggle"> |
| 122 | 133 | <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/> |
| 123 | 134 | <arg type="i" name="id" direction="in" /> | ... | ... |
src/plugins/dbus3270/service.h
| ... | ... | @@ -88,7 +88,10 @@ |
| 88 | 88 | |
| 89 | 89 | void pw3270_dbus_get_field_start(PW3270Dbus *object, int baddr, DBusGMethodInvocation *context); |
| 90 | 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 | 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 | 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 | 40 | set) |
| 37 | 41 | dbus-send --session --print-reply --dest=$DEST.$SESSION $BPATH $DEST.setTextAt int32:$2 int32:$3 string:$4 |
| 38 | 42 | ;; | ... | ... |