From 7ff513acf2c45e6029a961c46c81217ffe6787e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Alburquerque?= Date: Wed, 8 Dec 2010 20:36:59 -0500 Subject: DBus: Client Example: Choose a better name for the source file. * examples/dbus/client.cc: Renamed to: * examples/dbus/well-known-address-client.cc: * examples/Makefile.am: Corrected according to renaming above. --- examples/Makefile.am | 6 ++--- examples/dbus/client.cc | 34 ----------------------------- examples/dbus/well-known-address-client.cc | 35 ++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 37 deletions(-) delete mode 100644 examples/dbus/client.cc create mode 100644 examples/dbus/well-known-address-client.cc (limited to 'examples') diff --git a/examples/Makefile.am b/examples/Makefile.am index 9db5d2ee..d8733af9 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -20,7 +20,7 @@ AUTOMAKE_OPTIONS = subdir-objects check_PROGRAMS = \ child_watch/child_watch \ compose/example \ - dbus/client \ + dbus/well-known-address-client \ iochannel_stream/example \ keyfile/example \ markup/parser \ @@ -74,8 +74,8 @@ thread_threadpool_SOURCES = thread/threadpool.cc thread_threadpool_LDADD = $(thread_ldadd) # giomm examples -dbus_client_SOURCES = dbus/client.cc -dbus_client_LDADD = $(giomm_ldadd) +dbus_well_known_address_client_SOURCES = dbus/well-known-address-client.cc +dbus_well_known_address_client_LDADD = $(giomm_ldadd) network_resolver_SOURCES = network/resolver.cc network_resolver_LDADD = $(giomm_ldadd) diff --git a/examples/dbus/client.cc b/examples/dbus/client.cc deleted file mode 100644 index db084aa6..00000000 --- a/examples/dbus/client.cc +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 2010 The giomm Development Team - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - -int main(int, char**) -{ - std::locale::global(std::locale("")); - Gio::init(); - - // Get the user session bus connection. - Glib::RefPtr connection = - Gio::DBusConnection::get_sync(Gio::BUS_TYPE_SESSION); - - // Print out the unique name of the connection to the user session bus. - std::cout << connection->get_unique_name() << std::endl; - - return 0; -} diff --git a/examples/dbus/well-known-address-client.cc b/examples/dbus/well-known-address-client.cc new file mode 100644 index 00000000..31058153 --- /dev/null +++ b/examples/dbus/well-known-address-client.cc @@ -0,0 +1,35 @@ +/* Copyright (C) 2010 The giomm Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include + +int main(int, char**) +{ + std::locale::global(std::locale("")); + Gio::init(); + + // Get the user session bus connection. + Glib::RefPtr connection = + Gio::DBusConnection::get_sync(Gio::BUS_TYPE_SESSION); + + // Print out the unique name of the connection to the user session bus. + std::cout << connection->get_unique_name() << std::endl; + + return 0; +} -- cgit v1.2.1