diff options
author | Dan Winship <danw@gnome.org> | 2014-08-20 10:08:18 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-09-04 09:45:51 -0400 |
commit | d285ea2be90800e976501966fcd6c62fee3eac91 (patch) | |
tree | 8a93ffc2dcd5e22414165dcd26f8f6bb7a4d6c56 /examples/C/glib/add-connection-libnm.c | |
parent | f853d24195f6eb7d32188e357f1f41336834fa96 (diff) | |
download | NetworkManager-danw/gdbus-non-libnm.tar.gz |
examples: port dbus-glib-based examples to gdbusdanw/gdbus-non-libnm
Port the dbus-glib-based examples to GDBus.
Also, don't use libnm in them at all; there's not much point in
examples that use the D-Bus API directly if they're just going to fall
back to libnm for the hard stuff... (And also, this avoids the problem
that GDBus uses GVariant, while the libnm-core APIs currently still
use GHashTables.)
Also fix up some comment grammar and copyright style, and add emacs
modelines where missing.
Also rename the existing GDBus-based examples to have names ending in
"-gdbus", not "-GDBus", since there's no reason to gratuitously
capitalize here.
Diffstat (limited to 'examples/C/glib/add-connection-libnm.c')
-rw-r--r-- | examples/C/glib/add-connection-libnm.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/C/glib/add-connection-libnm.c b/examples/C/glib/add-connection-libnm.c index f390bfa159..2b0143d35a 100644 --- a/examples/C/glib/add-connection-libnm.c +++ b/examples/C/glib/add-connection-libnm.c @@ -14,14 +14,14 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2011 Red Hat, Inc. + * Copyright 2011 Red Hat, Inc. */ /* - * The example shows how to add a new connection using libnm. - * Contrast this example with add-connection-dbus-glib.c, which is a bit lower - * level and talks directly to NM using dbus-glib. This example is simpler - * because libnm handles much of the low-level stuff for you. + * The example shows how to add a new connection using libnm. Contrast this + * example with add-connection-gdbus.c, which is a bit lower level and talks + * directly to NM using GDBus. This example is simpler because libnm handles + * much of the low-level stuff for you. * * Compile with: * gcc -Wall `pkg-config --libs --cflags glib-2.0 libnm` add-connection-libnm.c -o add-connection-libnm @@ -98,7 +98,8 @@ add_connection (NMRemoteSettings *settings, GMainLoop *loop, const char *con_nam } -int main (int argc, char *argv[]) +int +main (int argc, char *argv[]) { NMRemoteSettings *settings; GMainLoop *loop; |