| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/src/thread.ccg: create(): Call g_thread_try_new() instead of
g_thread_new(). Throw a Glib::ThreadError when appropriate, instead of calling
Glib::Error::throw_exception(), which would throw Glib::Threads::ThreadError.
* glib/src/threads.ccg:create(): Call g_thread_try_new() instead of
g_thread_new(). Remove parameter 'joinable'.
* glib/src/threads.hg: Remove parameter 'joinable'. Remove comments about
non-joinable threads and thread priorities.
* examples/network/resolver.cc:
* examples/network/socket-client.cc:
* examples/network/socket-server.cc:
* examples/thread/dispatcher.cc:
* examples/thread/dispatcher2.cc:
* examples/thread/thread.cc: Remove parameter 'joinable' in calls to
Glib::Threads::Thread::create(). Bug #640029.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/src/filelist.am:
* glib/src/thread.[hg|ccg]: Deprecate the whole file, adding
deprecation doxygen comments to all API.
* glib/src/threads.[hg|ccg]: A new Threads namespace containing
equivalents for everything in thread.h, implemented using
only non-deprecated glib API. This was necessary because we had
to break the ABI to do this.
* glib/glibmm.h: Include threads.h
* glib/glibmm/main.[h|cc]: Added a wait() method overload that
takes the new types, deprecating the existing wait() method.
* examples/network/resolver.cc:
* examples/network/socket-client.cc:
* examples/network/socket-server.cc:
* examples/thread/dispatcher.cc:
* examples/thread/dispatcher2.cc:
* examples/thread/thread.cc:
* examples/thread/threadpool.cc:
* glib/glibmm/dispatcher.cc:
* glib/glibmm/exceptionhandler.cc:
* glib/glibmm/threadpool.[h|cc]: Use the new Glib::Threads::* types
instead of thread.h.
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/Makefile.am:
* examples/Makefile.am: Disable deprecated API.
* examples/network/socket-client.cc:
* examples/network/socket-server.cc:
* examples/thread/dispatcher.cc:
* examples/thread/dispatcher2.cc:
* examples/thread/thread.cc: Remove calls to Glib::thread_init(), instead
calling Glib::init() where that side-effect was also intended.
|
|
|
|
|
|
|
|
|
| |
* examples/thread/threadpool.cc: The advantage of StaticMutex was that
it would silently do nothing if threads were not initialized. That
was never a useful distinction in this example anyway.
Also remove the deprecated thread_init() call.
* glib/src/thread.ccg: Mutex: Add a TODO about not using the deprecated
API.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/src/thread.hg: undef and then redefine G_DISABLE_DEPRECATED, and
define GLIB_DISABLE_DEPRECATION_WARNINGS, if G_DISABLE_DEPRECATED is
defined, so we can use the deprecated API in this header (though only in
our own deprecated API).
* tools/generate_wrap_init.pl.in: Include glibmm.h instead of glib.h so
we can include thread.h first (via glibmm.h) instead of only later.
This seems more logical than explicitly including thread.h in all
(even non-glibmm) generated wrap_init.cc files.
* tools/m4/base.m4:
* glib/glibmm.h:
* glib/glibmm/dispatcher.cc:
* glib/glibmm/exceptionhandler.cc:
* glib/glibmm/main.cc:
* examples/thread/thread.cc:
* examples/thread/threadpool.cc: Adjust the includes to include thread.h
first.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac: Always use gthread-2.0 because there is now no advantage to
not doing that, because threading is now always enabled in glib.
Remove the separate GTHREAD* variables.
* glib/glibmm/Makefile.am:
* gio/giomm/Makefile.am:
* tests/Makefile.am:
* tools/Makefile.am:
* examples/Makefile.am: Remove use of the GTHREAD* variables..
* examples/network/resolver.cc: Remove the non-threading option and code that
uses it.
|
|
|
|
|
|
| |
* examples/Makefile.am: Instead of hard-coding glib-compile-schemas.
This was an issue in cross-toolchain environments.
Bug #648485.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* examples/dbus/server.cc: Rename this to server_without_bus.cc to make its
purpose clearer. This is not the common case. It is for private peer-to-peer
connections not involving the usual session or system buses, or any bus
for that matter. Meaning, for instance, that it does not assign names or
provide introspection, I think.
* examples/dbus/peer.cc: Removed this because it seems like just a
complicated version of the server_without_bus example, and this is not in sync
with the C versoin. Well, we should probably add a client for the server
example.
|
| |
|
|
|
|
|
|
|
| |
* examples/dbus/server.cc:
* examples/dbus/session_bus_service.cc: Remove code to handle the now
non-existant GetStdOut D-Bus method. That code was left over from an earlier
version of an example.
|
|
|
|
|
|
|
|
|
|
|
| |
* gio/src/dbusintrospection.[hg|ccg]: Add a lookup_interface() method overload
that just returns the first interface, avoiding the need to specify the name
when there is only one interface. The C API will not do this itself:
See bug #646417.
* examples/dbus/peer.cc:
* examples/dbus/server.cc:
* examples/dbus/session_bus_service.cc: Use the new method to simplify the
code slightly.
|
|
|
|
|
|
|
| |
* examples/dbus/session_bus_service.cc: This uses Gio::DBus::own_name().
* examples/Makefile.am: Mention the new test.
* examples/dbus/server.cc: Mention the return (out) value for the GetTime
method here too, and catch an exception.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
| |
* examples/dbus/userbus.cc: Rename to client_bus_listnames.cc to make it
more obvious what it does.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/src/variant.[hg|ccg]: Rename all get() methods that return children
to get_child() to make the API clearer and to avoid ambiguity with get()
methods that return the underlying type instead.
* examples/dbus/peer.cc:
* examples/dbus/userbus.cc:
* tests/glibmm_variant/main.cc: Adapted.
https://bugzilla.gnome.org/show_bug.cgi?id=644207#c7
(Yannick Guesnet)
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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/dbuserror.hg: Rename the class to Error.
* examples/dbus/busserver.cc: Adapated.
* tests/giomm_ioerror_and_iodbuserror/main.cc: Added a test to check that
both Gio::Error and Gio::DBus::Error are working.
* tests/Makefile.am: Set TESTS, so that the test is actually run.
We should add others to this too.
This current fails, so I need to fix the problem in a subsequent commit.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tools/m4/base.m4: Added a SECTION_H_GERROR_PRIVATE section.
* tools/m4/gerror.m4: Import the SECTION_H_GERROR_PRIVATE section.
* gio/src/dbuserror.hg: Put this back into the DBus namespace.
Push a custom friend declaration into the SECTION_H_GERROR_PRIVATE section,
because the standard generated friend declaration would not specify the
correct one.
This still does not rename DBusError to DBus::Error, but this is a step on
the way.
* examples/dbus/busserver.cc: Adapated.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/src/optiongroup.[hg|ccg]: Add add_entry() and add_entry_filename()
that take a slot. Add protected option_arg_callback().
An exception thrown by on_pre_parse() or on_post_parse() is propagated
to the error argument of g_callback_pre_parse() or post_parse_callback().
* glib/src/optionentry.hg: Add description of set_flags().
* examples/options/main.cc: Add more OptionEntries and callback functions
for parsing command option values.
Bug 589197 (Hubert Figuiere)
|
|
|
|
| |
* examples/options/main.cc: Comment-out unused method parameters.
|
|
|
|
|
|
|
|
| |
* glib/src/optiongroup.[hg|ccg]: The C post_parse callback is a static
protected member function, which performs all necessary post-parsing.
OptionGroup::on_post_parse is a dummy function.
* examples/options/main.cc: The on_pre_parse, on_post_parse, and on_error
overrides don't call the base class functions. Bug 588988.
|
|
|
|
|
|
| |
* examples/dbus/busserver.cc: Comment out unused methods, to fix the
build. I guess this example is still in progress. Otherwise, the commented
code should really be removed.
|
|
|
|
|
|
|
|
| |
* examples/Makefile.am:
* examples/dbus/busserver.cc: Add a partial implementation of the
server part of a server/client example that communicate through the
user's bus.
* examples/dbus/peer.cc: Typos.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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/dbusserver.hg: Add the docs from the C API to make sure it
clear to users that when handling the "new-connection" signal that a
reference to the new connection must be kept or the connection will
not be accepted.
* examples/dbus/peer.cc: Make an exception message more general to
cover both a possible exception from the call_sync() call and the
close_sync() call.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* examples/dbus/peer.cc (keep_connection): renamed to curr_connection.
(on_method_call): Place the return value of the method in a tuple
which is then returned.
(curr_connection): Use this variable to manage incoming connections.
The C API docs says that when handling ther DBusServer's
signal_new_connection() a reference to the connection should be kept
and the handler should return true if the connection should be kept.
This variable keeps a reference to the current connection. When the
caller finishes, it closes the connection thus allowing the server to
accept another connection.
(try/catches): Add return statements in the catches that fail so that
execution does not continue.
The example runs successfully with the previous commit and the patch
in bug #639391 filed in the glib bugzilla product page. Hopefully the
request will be accepted.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/src/varianttype.hg:
* glib/src/variant_basictypes.h.m4: Renamed the glibmmVariant doxygen
group to 'Variant'.
* glib/src/variant.{ccg,hg}: Throw a std::out_of_range exception
instead of a std::runtime_error one from methods that throw them
because of indexes being out of bounds.
(Variant< std::pair<K, V> >): Added this specialization to deal with a
dictionary entry variant type.
(Variant< std::map<K, V> >): Added this specialization to deal with
variant dictionary types.
(VariantContainerBase::get): Have this method throw a
std::out_of_range exception if the index is out of range.
(Variant< std::vector<Glib::ustring> >::get)
(Variant< std::vector<std::string> >::get): Free the shallow copy of
the returned string arrays in the get methods of the string variant
arrays as the docs of the C API say.
* gio/src/dbusconnection.hg: Added missing _IGNORE()'s.
* gio/src/dbusproxy.hg: Updated a TODO.
* examples/dbus/well-known-address-client.cc: Typo.
|
|
|
|
|
|
|
|
|
|
| |
* glib/src/variant.{ccg,hg} (get): Use
g_variant_get_bytestring_array() in the get() methods instead of
g_variant_get_strv().
* examples/dbus/well-known-address-client.cc: Use a
VariantContainerBase to get the result of the proxy's call method
instead of a Variant<VariantBase>. Also corrected the comment about
why it is done that way.
|
|
|
|
|
|
| |
* examples/dbus/well-known-address-client.cc: Complete the well known
service example by calling the 'ListNames' method of the user's
session bus.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* examples/dbus/well-known-address-client.cc: Asynchronously create a
DBusProxy which can then be used to call a method on the user's
session bus. This tests asynchronous creation of objects that derive
from the AsyncInitable interface. The reference counting of the newly
created object should be checked because in the SlotAsyncReady slot,
the proxy has a reference count of two when it should possibly be
one (the g_dbus_proxy_new_finish() docs say that in the callback,
unreferencing the proxy destroys it).
|
|
|
|
|
|
|
| |
* examples/dbus/client.cc: Renamed to:
* examples/dbus/well-known-address-client.cc:
* examples/Makefile.am: Corrected according to renaming above.
|
|
|
|
|
|
| |
* examples/dbus/client.cc: Correct a typo in a comment.
* tools/m4/convert_gio.m4: Correct alphabetizing of last enum
conversion.
|
|
|
|
|
| |
* examples/dbus/client.cc: Initial example opening a connection to the
user's bus and then printing its unique name.
|
|
|
|
|
|
|
|
|
| |
* glib/src/variant.[hg|ccg]: VariantBase: Added init(), like Value::init().
This just changes the gobject_, with appropriate unref and ref.
* gio/src/settings.[hg|ccg]: get_value(): Use an output parameter for the
VariantBase, instead of a return value, as we do for Value, allowing the
caller to use a derived (templated) type.
* examples/settings/settings.cc: Show how Variant<> can be used.
|
|
|
|
|
| |
* examples/settings/settings.cc: Remove the unnecessary use of
Glib::ustring::raw().
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* glib/src/variant.[hg|ccg]: ValueBase: Wrap some simple functions
with _WRAP_METHOD().
* glib/src/variant_basictypes.h.m4: Syntax changes, and make the castitem
constructor explicit.
* tools/m4/convert_gio.m4: Added necessary conversion.
We need to decide how to use this in get*() methods and add some tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* examples/Makefile.am: Do not install the schema file of the settings
example to the user's system. Instead, compile the binary shema cache
in a local directory and have the example use that. As a side effect,
this also resolves the "make distcheck" failure when trying to install
the schema.
* examples/settings/settings.cc (main): Do not try to determine the
schema directory from the executable name, as it depends too much on
the libtool setup with the hidden .libs directory being part of the
path name. Requiring the user to change to the example directory is
good enough. Also, initialize the C++ locale on program startup, and
call Gio::init() instead of Glib::init().
(on_key_changed): Call ustring::raw() to suppress the locale-aware
comparison ustring performs by default.
|
|
|
|
|
| |
* examples/settings/settings.cc: Comment out an unused paramter to
fix a compiler warning, to partly fix the distcheck.
|
| |
|
|
|
|
|
|
|
|
|
| |
* configure.ac: Removed the --enable-api-exceptions, --enable-api-properties,
--enable-api-vfuncs and --enable-api-default-signal-handlers options.
* build/reduced.m4: Removed.
* tools/m4/*.m4:
* tools/pm/Output.pm: Remove any use of ifdefs and auto_ptr for reduced API.
* *.[hg|ccg|h|cc]: Remove the idefed code.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2010-04-12 Armin Burgmeier <armin@arbur.net>
* examples/compose/main.cc: Don't use ustring::format with std::fixed
with MSVC 2005 or below (see #599340).
* MSVC_Net2005/examples/compose/compose.vcproj:
* MSVC_Net2005/glibmm.sln:
* MSVC_Net2008/examples/compose/compose.vcproj:
* MSVC_Net2008/glibmm.sln: Added the compose example for both MSVC
versions.
|
| |
|