| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
It shall not be possible to find a glibmm header file
with #include <xxx.h> instead of #include <glibmm/xxx.h>.
Not fully fixed until https://github.com/mesonbuild/meson/issues/8562
has been fixed.
|
|
|
|
|
|
| |
In Meson builds, we don't even generate giomm/unixfdlist.h unless we are
building for *nix, and we aren't using the items there on non-*nix
builds.
|
|
|
|
|
|
|
| |
Add a std::mutex that guarantees that two threads don't create C++
wrappers for the same GDBusConnection instance.
Fixes #56
|
|
|
|
| |
Bug 786824
|
|
|
|
| |
This will make it easier to change the underlying RefPtr type.
|
|
|
|
| |
This seems to work.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gio/src/dbusconnection.[hg|ccg]: Some string parameters in some C functions
accept nullptr, others don't.
call(), call_sync(): bus_name: Pass nullptr for an empty string.
emit_signal(): Only destination_bus_name can be nullptr.
Other string parameters: Pass c_str().
The bug in call() and call_sync() was noticed by Gerlof Fokkema on gtkmm-list.
The bug in emit_signal() is an overreaction to bug 645072. All string
parameters were changed to pass nullptr, but only destination_bus_name
should have been changed.
|
|
|
|
| |
Use Glib::c_str_or_nullptr(s) instead of s.empty() ? nullptr : s.c_str().
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Because that's what the C documentation requires, and the implementation
doesn't accept "" to mean the same thing, though that would be
convenient:
https://developer.gnome.org/gio/stable/GDBusConnection.html#g-dbus-connection-signal-subscribe
Noticed by Christof Meerwald on gtkmm-list.
|
| |
|
| |
|
|
|
|
|
|
| |
* gio/src/dbusconnection.[ccg|hg]:
* gio/src/dbusproxy.[ccg|hg]: Change G_OS_LINUX to G_OS_UNIX. Glib does not
define G_OS_LINUX. Correct function declarations for DBus::Proxy::call().
|
|
|
|
|
|
| |
* gio/src/dbusconnection.ccg:
g_dbus_connection_call_with_unix_fd_list() was mistyped. I wonder why
the compiler did not complain.
|
|
|
|
|
|
|
|
|
|
| |
* gio/src/dbusconnection.{hg,ccg}: Add the methods using gmmproc's
output parameter functionality. Also add the cancellable and
non-cancellable asynchronous call() methods that were #ifdef'ed out
because of the missing call_finish() method.
* tools/m4/convert_gio.m4: Add a necessary enum conversion.
Bug #662371.
|
| |
|
|
|
|
|
|
|
|
|
| |
* gio/src/dbusconnection.[hg|ccg]: Add call(), call_with_unix_fd_finish(),
and call_finishcall_sync() method overloads that wrap
g_dbus_connection_call_with_unix_fd_list(),
g_dbus_connection_call_with_unix_fd_list_finish() and
g_dbus_connection_call_with_unix_fd_list_sync()
* tools/m4/convert_gio.m4: Add a necessary conversion.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gio/src/application.[hg|ccg]:
* gio/src/bufferedinputstream.[hg|ccg]:
* gio/src/datainputstream.[hg|ccg]:
* gio/src/dataoutputstream.[hg|ccg]:
* gio/src/dbusconnection.[hg|ccg]:
* gio/src/fileenumerator.[hg|ccg]:
* gio/src/initable.[hg|ccg]:
* gio/src/inputstream.[hg|ccg]:
* gio/src/iostream.[hg|ccg]:
* gio/src/outputstream.[hg|ccg]:
* gio/src/resolver.[hg|ccg]:
* gio/src/seekable.[hg|ccg]:
* gio/src/socket.[hg|ccg]:
* gio/src/socketaddressenumerator.[hg|ccg]:
* gio/src/socketclient.[hg|ccg]: This relatively new gmmproc syntax lets
us avoid the manual implementations and declarations just to have
overloads without the Cancellable parameters.
* gio/src/unixconnection.hg: This had no method overloads without
Cancellable parameters but now it does.
|
|
|
|
|
|
|
| |
* gio/src/dbusconnection.{ccg,hg}: Add the two new methods, wrapping
the two functions in the GMenuModel exporter API:
http://developer.gnome.org/gio/2.31/gio-GMenuModel-exporter.html
* tools/m4/convert_gio.m4: Add necessary conversions.
|
|
|
|
|
|
| |
* gio/src/dbusconnection.{ccg,hg}: Add the two new methods, wrapping
the two functions in the new GActionGroup exporter API:
http://developer.gnome.org/gio/2.31/gio-GActionGroup-exporter.html
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tools/m4/base.m4: Include <glibmm/ustring.h> and <sigc++/sigc++.h>
by default in header files of generated files in modules other than
glibmm. This should make compilation faster for those modules.
* gio/src/*.{h,cc}g:
* gio/giomm/slot_async.cc: Adjust includes according to the above
change.
Bug #662597
|
|
|
|
|
|
|
|
|
|
| |
* gio/src/dbusconnection.{ccg,hg}: Remove the newly added call()
methods with a UnixFDList parameter until the call_finish() method
with a UnixFDList parameter is added also.
* gio/src/credentials.hg:
* gio/src/dbusmessage.ccg:
* gio/src/dbusmessage.hg: Typos.
|
|
|
|
|
| |
* gio/src/dbusconnection.{ccg,hg}: Add cancellable and
non-cancellable UnixFDList call() methods.
|
|
|
|
|
| |
* gio/src/dbusconnection.ccg (emit_signal): Explain why empty strings
are converted to NULL when passed to the C API.
|
|
|
|
|
|
|
|
| |
* gio/src/dbusconnection.ccg (emit_signal): Pass NULL to the C
function call where strings are empty allowing emitting signals to all
listeners.
Bug #645072 (Yannick Guesnet).
|
|
|
|
|
| |
* gio/src/dbusconnection.[hg|ccg]: This makes sense now that the C API's
documentation was improved in bug #646419.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gio/src/dbusconnection.[hg|ccg]: register_object(), register_subtree():
Take the VTable by reference, not pointer. register_object() can take a NULL
but that needs documentation (see the bug mentioned) and a future method
overload.
* gio/src/dbusmethodinvocation.ccg: get_parameters(): Return a
VariantContainerBase instead of taking a VariantBase output parameter,
because this is always a tuple. Well, I think so: See the bug mentioned.
* gio/src/dbusmethodinvocation.hg: return_value(): Take a VariantContainerBase
instead of a VariantBase, because this is always a tuple.
return_gerror(), return_error_literal(): Rename them both to return_error().
* glib/src/variant.hg: VariantContainerBase::create_tuple(): Add a method
overload that takes a single VariantBase, for convenience, so that applications
don't need to create a single-item vector.
* examples/dbus/busserver.cc: Adapted.
* examples/dbus/busserver.cc: Rename to server.cc and actually implement it,
though I am currently confused about whether this server's object should be
available on an existing bus. Maybe we should use Gio::DBus::own_name()
instead of Gio::DBus::Server.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gio/src/dbusconnection.[hg|ccg]:
* gio/src/dbusproxy.ccg.[hg|ccg]: call_sync(), call(), call_finish():
Use VariantContainerBase, instead of VariantBase, for GVariants that are
documented as being tuples. Because the type is known we can also use
it as a simple return type instead of an output parameter.
* tools/m4/convert_gio.m4: Added a necessary conversion.
* examples/dbus/peer.cc:
* examples/dbus/userbus.cc: Adapted. These already correctly assumed that
the type should be VariantContainerBase.
|
|
|
|
|
|
|
| |
* gio/src/dbusinterfacevtable.[hg|ccg]:
* gio/src/dbussubtreevtable.[hg|ccg]: Moved code here from
* gio/src/dbusconnection.[hg|ccg].
* gio/src/filelist.am: Mention the new files.
|
|
|
|
|
|
|
|
| |
* gio/src/dbusconnection.ccg: DBusInterfaceVTable_SetProperty_giomm_callback(),
DBusInterfaceVTable_GetProperty_giomm_callback(): Copy the GError instead of
just copying the pointer, because it will be freed along with the parent
Glib::Error.
Bug #644008 (Yannick.Guesnet)
|
|
|
|
|
|
|
|
| |
* gio/src/error.[hg|ccg]: Move Gio::DBus::Error to
* gio/src/dbuserror.[hg|ccg]: and temporarily rename it to Gio::DBusError
because generate_wrap_init.pl.in is wrapping only on of Gio::Error and
Gio::DBus::Error. Unfortunately, we need to fix the generation to handle
this properly even when it is called Gio::DBus::DBusError.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gio/giomm.h:
* gio/src/dbus*.[hg|ccg]
* gio/src/error.hg: Rename all DBus* classes to remove the prefix, putting
them in a Gio::DBus namespace.
This required the use of the new _GMMPROC_EXTRA_NAMESPACE macro, to avoid
generating a confused wrap_init.cc.
Along the way, I removed unnecessary class predeclarations, instead including
the relevant header, because that is more convenient for users of the API.
* gio/src/dbuserror.[hg|ccg]: Renamed to dbuserrorutils.[hg|ccg] and
renamed the Error namespace to ErrorUtils, to avoid a clash with the
Gio::DBus::Error exception.
* gio/src/filelist.am:
* tools/m4/convert_gio.m4: Changed some conversions.
* examples/dbus/busserver.cc:
* examples/dbus/peer.cc:
* examples/dbus/userbus.cc: Adapted.
This is generally more organized. A prefix, instead of a namespace, looked
generally wrong to C++ coders.
|
|
|
|
|
|
| |
* gio/src/dbusconnection.{ccg,hg} (send_message): Add new method
without the "out_serial" param.
* gio/src/unixfdlist.hg (append): Add exception docs to method.
|
|
|
|
|
|
|
|
|
|
|
| |
* gio/src/dbusconnection.ccg: Modify the callbacks so that if a C
string parameter might be NULL, it is passed to the slots as an empty
string (""). This avoids possible exceptions from constructing a
Glib::ustring from NULL.
* gio/src/dbusconnection.hg: Typos.
* examples/dbus/peer.cc: Add the usage examples from the C API's
example.
|
|
|
|
|
|
|
| |
* gio/src/dbusconnection.ccg
(DBusConnection_Message_Filter_giomm_callback): Since the sender can
be NULL, check for that so that creating a Glib::ustring from a NULL
does not cause exceptions.
|
|
|
|
|
|
|
|
|
|
| |
* gio/src/dbusconnection.{ccg,hg} (call*): Place the bus_name
parameter before the timeout_msec parameter to make it easier to
specifiy a bus name without having to set a timeout value.
* gio/src/dbusaddress.hg (get_for_bus_sync): Correct declarations to
return std::string instead of Glib::ustring in accordance with the
last commit.
|
|
|
|
|
|
|
|
|
|
| |
* gio/src/dbusaddress.{ccg,hg}:
* gio/src/dbusconnection.{ccg,hg}:
* gio/src/dbusserver.{ccg,hg}: Use std::string instead of
Glib::ustring for address parameters just to avoid possible errors
since DBus address could be a filename path as the "Addresses"
section of the DBus introduction seems to imply:
http://www.freedesktop.org/wiki/IntroductionToDBus.
|
|
|
|
|
|
|
|
|
| |
* gio/src/dbusaddress.{ccg,hg}:
* gio/src/dbusconnection.{ccg,hg}:
* gio/src/dbusserver.{ccg,hg}:
* gio/src/dbusutils.{ccg,hg}: Use std::string instead of Glib::ustring
for guid's since std::string's API is probably adequate enough for
their use.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gio/src/dbusconnection.{ccg,hg}: Reorder the VariantBase
'parameters' parameter in the call*() methods to come after the
method_name parameter.
* gio/src/dbusintrospection.hg: Use refreturn for methods where the C
API does not automatically reference the return.
* gio/src/dbusserver.{ccg,hg}: Add non-observable constructors and
create() methods.
* glib/src/variant.{ccg,hg} (create_tuple): Renamed from create().
Write this method to be more specific for tuples (it's probably the
only case where this method might be used). Dealing with tuples still
feels awkward with the method. Maybe there's a better way.
* examples/Makefile.am:
* examples/dbus/peer.cc:
* examples/dbus/userbus.cc:
* examples/dbus/well-known-address-client.cc: Add the new
server/client peer example (named peer). The example crashes because
the C API seems to not deal with empty strings "" well, but at least
there is now an example. Making sure it runs well is necessary. Also
rename the previous example to userbus.cc.
|
|
|
|
|
|
|
|
| |
* gio/src/dbusconnection.ccg: Make sure that the callbacks that set a
GError* do not try to access a NULL pointer if NULL has been passed
as the GError** parameter.
Bug #637587 (Yannick Guesnet)
|
|
|
|
|
|
|
|
| |
* gio/src/dbusconnection.ccg: Have to previously modified callbacks
that deal with getting/setting properties return all Glib::Errors
and not just Gio::DBusError types.
Bug #637587 (Yannick Guesnet)
|
|
|
|
|
|
|
|
| |
* gio/src/dbusconnection.ccg: Modify the callbacks that deal with
getting/setting properties for a DBus interface to set the GError*
parameter if it is a DBus related GError. This should allow receiving
DBus exceptions if the slot throws one with respect to not being able
to successfully get/set a property.
|
|
|
|
|
|
| |
* gio/src/dbusconnection.ccg: Use the gobj() of the
DBusInterfaceVTable instead of casting it to a GDBusInterfaceVTable in
the callbacks and in the register_object() method.
|
|
|
|
| |
* gio/src/dbusconnection.ccg: This is more consistent with other code.
|
|
|
|
|
|
| |
* gio/src/dbusconnection.[hg|ccg]: Use a _ suffix on member variables to
avoid confusion with method parameters of the same name, though this does not
seem to be what is causing bug #637587.
|
|
|
|
|
|
|
|
|
|
| |
* gio/src/dbusconnection.{ccg,hg}: Add the new methods along with a
corresponding class (like the one for register_object()). Added
method docs. Modified the registration methods so that the vtable is
passed and not a struct containing the slots. Please note that this
API feels like it could be made better before glibmm goes stable. In
particular, it might be nice and (maybe even possible) to not require
that the *VTable instances be global.
|
|
|
|
|
|
|
|
|
| |
* gio/src/dbusconnection.{ccg,hg}: Add register_object() and
unregister_object() methods. Use a C++ wrapper class for the
GDBusInterfaceVTable structure so that it is possible to use slots for
the registration.
Fixes Bug #637587 (Yannick Guesnet)
|
|
|
|
|
|
|
|
| |
* gio/src/dbusconnection.ccg:
* gio/src/dbusproxy.ccg: There's no need to put the newly constructed
DBusConnection|DBusProxy in a Glib::RefPtr<> and then take an extra
reference. Simply constructing the object is enough to guarantee that
the object continues existing until the SlotAsyncReady slot is called.
|
|
|
|
|
| |
* gio/src/dbusconnection.{ccg,hg}: Add constructors and create methods
that don't require a DBusAuthObservable paramter.
|