Commit 5933730c5b8c40c9e478edda790eec38a71a2936
1 parent
250f57e2
Exists in
master
and in
5 other branches
Trabalhando no plugin DBUS
Showing
6 changed files
with
16 additions
and
5 deletions
Show diff stats
configure.ac
... | ... | @@ -348,7 +348,7 @@ AC_SUBST(GLIB_CFLAGS) |
348 | 348 | |
349 | 349 | #--[ Check DBUS ]--------------------------------------------------------------------------------------------------------------------------------------------- |
350 | 350 | |
351 | -PKG_CHECK_MODULES( [DBUS], [dbus-glib-1], AC_DEFINE(HAVE_DBUS) ) | |
351 | +PKG_CHECK_MODULES( [DBUS], [dbus-glib-1], AC_DEFINE(HAVE_DBUS), AC_MSG_NOTICE([No DBUS support.]) ) | |
352 | 352 | AC_SUBST(DBUS_LIBS) |
353 | 353 | AC_SUBST(DBUS_CFLAGS) |
354 | 354 | ... | ... |
po/pt_BR.po
... | ... | @@ -5,7 +5,7 @@ msgid "" |
5 | 5 | msgstr "" |
6 | 6 | "Project-Id-Version: pw3270 5.0\n" |
7 | 7 | "Report-Msgid-Bugs-To: \n" |
8 | -"POT-Creation-Date: 2013-02-15 16:38-0200\n" | |
8 | +"POT-Creation-Date: 2013-02-19 17:42-0300\n" | |
9 | 9 | "PO-Revision-Date: 2013-01-14 09:49-0200\n" |
10 | 10 | "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n" |
11 | 11 | "Language-Team: Português <>\n" | ... | ... |
src/include/lib3270/log.h
... | ... | @@ -56,6 +56,7 @@ |
56 | 56 | LIB3270_EXPORT void lib3270_write_va_log(H3270 *session, const char *module, const char *fmt, va_list arg); |
57 | 57 | |
58 | 58 | #ifdef DEBUG |
59 | + #include <stdio.h> | |
59 | 60 | #define trace( fmt, ... ) fprintf(stderr, "%s(%d) " fmt "\n", __FILE__, __LINE__, __VA_ARGS__ ); fflush(stderr); |
60 | 61 | #else |
61 | 62 | #define trace(x, ...) // __VA_ARGS__ | ... | ... |
src/plugins/3270dbus/gobject.c
... | ... | @@ -74,24 +74,30 @@ PW3270Dbus * pw3270_dbus_new(void) |
74 | 74 | |
75 | 75 | void pw3270_dbus_get_revision(PW3270Dbus *object, DBusGMethodInvocation *context) |
76 | 76 | { |
77 | + trace("%s object=%p context=%p",__FUNCTION__,object,context); | |
77 | 78 | dbus_g_method_return(context,PACKAGE_REVISION); |
78 | 79 | } |
79 | 80 | |
80 | 81 | void pw3270_dbus_connect(PW3270Dbus *object, const gchar *uri, DBusGMethodInvocation *context) |
81 | 82 | { |
83 | + trace("%s object=%p context=%p",__FUNCTION__,object,context); | |
84 | + | |
82 | 85 | g_message("Connecting to \"%s\" by remote request",uri); |
83 | 86 | dbus_g_method_return(context,lib3270_connect(pw3270_dbus_get_session_handle(PW3270_DBUS(object)),uri,0)); |
84 | 87 | } |
85 | 88 | |
86 | 89 | void pw3270_dbus_disconnect(PW3270Dbus *object, DBusGMethodInvocation *context) |
87 | 90 | { |
91 | + trace("%s object=%p context=%p",__FUNCTION__,object,context); | |
92 | + | |
88 | 93 | g_message("Disconnecting by remote request"); |
89 | 94 | lib3270_disconnect(pw3270_dbus_get_session_handle(object)); |
90 | 95 | dbus_g_method_return(context,0); |
91 | 96 | } |
92 | 97 | |
93 | -void pw3270_dbus_get_program_message(PW3270Dbus *object, DBusGMethodInvocation *context) | |
98 | +void pw3270_dbus_get_message_id(PW3270Dbus *object, DBusGMethodInvocation *context) | |
94 | 99 | { |
100 | + trace("%s object=%p context=%p",__FUNCTION__,object,context); | |
95 | 101 | dbus_g_method_return(context,lib3270_get_program_message(pw3270_dbus_get_session_handle(object))); |
96 | 102 | } |
97 | 103 | |
... | ... | @@ -105,6 +111,8 @@ int pw3270_dbus_check_valid_state(PW3270Dbus *object, DBusGMethodInvocation *con |
105 | 111 | H3270 * hSession = pw3270_dbus_get_session_handle(object); |
106 | 112 | GError * error = NULL; |
107 | 113 | |
114 | + trace("%s object=%p context=%p",__FUNCTION__,object,context); | |
115 | + | |
108 | 116 | if(!lib3270_is_connected(hSession)) |
109 | 117 | { |
110 | 118 | error = pw3270_dbus_get_error_from_errno(ENOTCONN); |
... | ... | @@ -164,6 +172,8 @@ void pw3270_dbus_get_screen_contents(PW3270Dbus *object, DBusGMethodInvocation * |
164 | 172 | gchar * utftext; |
165 | 173 | H3270 * hSession = pw3270_dbus_get_session_handle(object); |
166 | 174 | |
175 | + trace("%s object=%p context=%p",__FUNCTION__,object,context); | |
176 | + | |
167 | 177 | if(pw3270_dbus_check_valid_state(object,context)) |
168 | 178 | return; |
169 | 179 | ... | ... |
src/plugins/3270dbus/pw3270dbus.xml
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 | <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/> |
19 | 19 | <arg type="i" name="result" direction="out" /> |
20 | 20 | </method> |
21 | - <method name="getProgramMessage"> | |
21 | + <method name="getMessageID"> | |
22 | 22 | <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/> |
23 | 23 | <arg type="i" name="status" direction="out" /> |
24 | 24 | </method> | ... | ... |
src/plugins/3270dbus/service.h
... | ... | @@ -70,7 +70,7 @@ |
70 | 70 | void pw3270_dbus_quit(PW3270Dbus *object, DBusGMethodInvocation *context); |
71 | 71 | void pw3270_dbus_connect(PW3270Dbus *object, const gchar *uri, DBusGMethodInvocation *context); |
72 | 72 | void pw3270_dbus_disconnect(PW3270Dbus *object, DBusGMethodInvocation *context); |
73 | - void pw3270_dbus_get_program_message(PW3270Dbus *object, DBusGMethodInvocation *context); | |
73 | + void pw3270_dbus_get_message_id(PW3270Dbus *object, DBusGMethodInvocation *context); | |
74 | 74 | void pw3270_dbus_get_screen_contents(PW3270Dbus *object, DBusGMethodInvocation *context); |
75 | 75 | H3270 * pw3270_dbus_get_session_handle(PW3270Dbus *object); |
76 | 76 | GError * pw3270_dbus_get_error_from_errno(int code); | ... | ... |