glib2 1.1.9-x86-mingw32 → 1.2.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +26 -4
- data/ext/glib2/glib2.def +3 -1
- data/ext/glib2/rbgcompat.h +0 -15
- data/ext/glib2/rbglib.h +11 -3
- data/ext/glib2/rbglib_source.c +6 -1
- data/ext/glib2/rbgobj_boxed.c +65 -48
- data/ext/glib2/rbgobj_convert.c +29 -14
- data/ext/glib2/rbgobj_value.c +42 -0
- data/ext/glib2/rbgobject.c +7 -4
- data/ext/glib2/rbgobject.h +15 -9
- data/lib/1.8/glib2.so +0 -0
- data/lib/1.9/glib2.so +0 -0
- data/lib/gnome2-raketask.rb +6 -1
- data/lib/gnome2-win32-binary-build-task.rb +40 -10
- data/vendor/local/bin/certtool.exe +0 -0
- data/vendor/local/bin/danetool.exe +0 -0
- data/vendor/local/bin/gdbus-codegen +1 -1
- data/vendor/local/bin/gdbus.exe +0 -0
- data/vendor/local/bin/gio-querymodules.exe +0 -0
- data/vendor/local/bin/glib-compile-resources.exe +0 -0
- data/vendor/local/bin/glib-compile-schemas.exe +0 -0
- data/vendor/local/bin/glib-genmarshal.exe +0 -0
- data/vendor/local/bin/glib-gettextize +1 -1
- data/vendor/local/bin/glib-mkenums +1 -1
- data/vendor/local/bin/gnutls-cli-debug.exe +0 -0
- data/vendor/local/bin/gnutls-cli.exe +0 -0
- data/vendor/local/bin/gnutls-serv.exe +0 -0
- data/vendor/local/bin/gobject-query.exe +0 -0
- data/vendor/local/bin/gresource.exe +0 -0
- data/vendor/local/bin/gsettings.exe +0 -0
- data/vendor/local/bin/gspawn-win32-helper-console.exe +0 -0
- data/vendor/local/bin/gspawn-win32-helper.exe +0 -0
- data/vendor/local/bin/libgio-2.0-0.dll +0 -0
- data/vendor/local/bin/libglib-2.0-0.dll +0 -0
- data/vendor/local/bin/libgmodule-2.0-0.dll +0 -0
- data/vendor/local/bin/libgmp-10.dll +0 -0
- data/vendor/local/bin/libgnutls-28.dll +0 -0
- data/vendor/local/bin/libgnutls-openssl-27.dll +0 -0
- data/vendor/local/bin/libgnutls-openssl-28.def +87 -93
- data/vendor/local/bin/libgnutlsxx-28.dll +0 -0
- data/vendor/local/bin/libgobject-2.0-0.dll +0 -0
- data/vendor/local/bin/libgthread-2.0-0.dll +0 -0
- data/vendor/local/bin/libhogweed-2-2.dll +0 -0
- data/vendor/local/bin/libnettle-4-4.dll +0 -0
- data/vendor/local/bin/nettle-hash.exe +0 -0
- data/vendor/local/bin/nettle-lfib-stream.exe +0 -0
- data/vendor/local/bin/ocsptool.exe +0 -0
- data/vendor/local/bin/pkcs1-conv.exe +0 -0
- data/vendor/local/bin/psktool.exe +0 -0
- data/vendor/local/bin/sexp-conv.exe +0 -0
- data/vendor/local/bin/srptool.exe +0 -0
- data/vendor/local/{lib/libffi-3.0.6/include → include}/ffi.h +0 -0
- data/vendor/local/{lib/libffi-3.0.6/include → include}/ffitarget.h +0 -0
- data/vendor/local/include/glib-2.0/gio/gactionmap.h +0 -4
- data/vendor/local/include/glib-2.0/gio/gappinfo.h +1 -3
- data/vendor/local/include/glib-2.0/gio/gapplication.h +0 -1
- data/vendor/local/include/glib-2.0/gio/gapplicationcommandline.h +0 -4
- data/vendor/local/include/glib-2.0/gio/gcontenttype.h +0 -1
- data/vendor/local/include/glib-2.0/gio/gdbusnamewatching.h +1 -6
- data/vendor/local/include/glib-2.0/gio/gfile.h +0 -3
- data/vendor/local/include/glib-2.0/gio/gfileenumerator.h +0 -3
- data/vendor/local/include/glib-2.0/gio/gfileinfo.h +0 -2
- data/vendor/local/include/glib-2.0/gio/ginetaddressmask.h +0 -6
- data/vendor/local/include/glib-2.0/gio/gio.h +0 -1
- data/vendor/local/include/glib-2.0/gio/gioenums.h +1 -3
- data/vendor/local/include/glib-2.0/gio/giomodule.h +0 -5
- data/vendor/local/include/glib-2.0/gio/gioscheduler.h +0 -4
- data/vendor/local/include/glib-2.0/gio/giotypes.h +0 -1
- data/vendor/local/include/glib-2.0/gio/gmemoryoutputstream.h +0 -2
- data/vendor/local/include/glib-2.0/gio/gmenu.h +0 -27
- data/vendor/local/include/glib-2.0/gio/gmenumodel.h +0 -19
- data/vendor/local/include/glib-2.0/gio/gresource.h +0 -2
- data/vendor/local/include/glib-2.0/gio/gsettingsschema.h +0 -4
- data/vendor/local/include/glib-2.0/gio/gsimpleaction.h +0 -1
- data/vendor/local/include/glib-2.0/gio/gsimpleactiongroup.h +0 -1
- data/vendor/local/include/glib-2.0/gio/gsocket.h +0 -13
- data/vendor/local/include/glib-2.0/glib/deprecated/gthread.h +0 -1
- data/vendor/local/include/glib-2.0/glib/gchecksum.h +1 -3
- data/vendor/local/include/glib-2.0/glib/gconvert.h +9 -24
- data/vendor/local/include/glib-2.0/glib/gdir.h +8 -10
- data/vendor/local/include/glib-2.0/glib/genviron.h +8 -12
- data/vendor/local/include/glib-2.0/glib/gfileutils.h +15 -20
- data/vendor/local/include/glib-2.0/glib/giochannel.h +4 -14
- data/vendor/local/include/glib-2.0/glib/gslice.h +0 -4
- data/vendor/local/include/glib-2.0/glib/gspawn.h +10 -46
- data/vendor/local/include/glib-2.0/glib/gtestutils.h +0 -1
- data/vendor/local/include/glib-2.0/glib/gunicode.h +5 -5
- data/vendor/local/include/glib-2.0/glib/gutils.h +14 -14
- data/vendor/local/include/glib-2.0/glib/gvariant.h +0 -8
- data/vendor/local/include/glib-2.0/glib/gversionmacros.h +0 -24
- data/vendor/local/include/glib-2.0/glib/gwin32.h +7 -14
- data/vendor/local/include/glib-2.0/gmodule.h +7 -11
- data/vendor/local/include/glib-2.0/gobject/glib-types.h +0 -33
- data/vendor/local/include/glib-2.0/gobject/gobject.h +7 -7
- data/vendor/local/include/glib-2.0/gobject/gtype.h +7 -13
- data/vendor/local/{share/glib-2.0 → lib/gdbus-2.0}/codegen/__init__.py +0 -0
- data/vendor/local/lib/gdbus-2.0/codegen/__init__.pyc +0 -0
- data/vendor/local/lib/gdbus-2.0/codegen/__init__.pyo +0 -0
- data/vendor/local/{share/glib-2.0 → lib/gdbus-2.0}/codegen/codegen.py +0 -0
- data/vendor/local/{share/glib-2.0 → lib/gdbus-2.0}/codegen/codegen.pyc +0 -0
- data/vendor/local/{share/glib-2.0 → lib/gdbus-2.0}/codegen/codegen.pyo +0 -0
- data/vendor/local/{share/glib-2.0 → lib/gdbus-2.0}/codegen/codegen_docbook.py +0 -0
- data/vendor/local/{share/glib-2.0 → lib/gdbus-2.0}/codegen/codegen_docbook.pyc +0 -0
- data/vendor/local/{share/glib-2.0 → lib/gdbus-2.0}/codegen/codegen_docbook.pyo +0 -0
- data/vendor/local/{share/glib-2.0 → lib/gdbus-2.0}/codegen/codegen_main.py +0 -2
- data/vendor/local/{share/glib-2.0 → lib/gdbus-2.0}/codegen/codegen_main.pyc +0 -0
- data/vendor/local/{share/glib-2.0 → lib/gdbus-2.0}/codegen/codegen_main.pyo +0 -0
- data/vendor/local/{share/glib-2.0 → lib/gdbus-2.0}/codegen/config.py +1 -1
- data/vendor/local/lib/gdbus-2.0/codegen/config.pyc +0 -0
- data/vendor/local/lib/gdbus-2.0/codegen/config.pyo +0 -0
- data/vendor/local/{share/glib-2.0 → lib/gdbus-2.0}/codegen/dbustypes.py +0 -0
- data/vendor/local/{share/glib-2.0 → lib/gdbus-2.0}/codegen/dbustypes.pyc +0 -0
- data/vendor/local/{share/glib-2.0 → lib/gdbus-2.0}/codegen/dbustypes.pyo +0 -0
- data/vendor/local/{share/glib-2.0 → lib/gdbus-2.0}/codegen/parser.py +0 -0
- data/vendor/local/{share/glib-2.0 → lib/gdbus-2.0}/codegen/parser.pyc +0 -0
- data/vendor/local/{share/glib-2.0 → lib/gdbus-2.0}/codegen/parser.pyo +0 -0
- data/vendor/local/{share/glib-2.0 → lib/gdbus-2.0}/codegen/utils.py +0 -0
- data/vendor/local/lib/gdbus-2.0/codegen/utils.pyc +0 -0
- data/vendor/local/lib/gdbus-2.0/codegen/utils.pyo +0 -0
- data/vendor/local/lib/gio-2.0.def +2 -41
- data/vendor/local/lib/gio/modules/libgiognutls.a +0 -0
- data/vendor/local/lib/gio/modules/libgiognutls.dll +0 -0
- data/vendor/local/lib/gio/modules/libgiognutls.dll.a +0 -0
- data/vendor/local/lib/gio/modules/libgiognutls.la +1 -1
- data/vendor/local/lib/glib-2.0.def +0 -2
- data/vendor/local/lib/glib-2.0/include/glibconfig.h +1 -1
- data/vendor/local/lib/gobject-2.0.def +0 -4
- data/vendor/local/lib/libgio-2.0.dll.a +0 -0
- data/vendor/local/lib/libgio-2.0.la +4 -4
- data/vendor/local/lib/libglib-2.0.dll.a +0 -0
- data/vendor/local/lib/libglib-2.0.la +3 -3
- data/vendor/local/lib/libgmodule-2.0.dll.a +0 -0
- data/vendor/local/lib/libgmodule-2.0.la +3 -3
- data/vendor/local/lib/libgmp.dll.a +0 -0
- data/vendor/local/lib/libgnutls-openssl.a +0 -0
- data/vendor/local/lib/libgnutls-openssl.dll.a +0 -0
- data/vendor/local/lib/libgnutls.a +0 -0
- data/vendor/local/lib/libgnutls.dll.a +0 -0
- data/vendor/local/lib/libgnutlsxx.a +0 -0
- data/vendor/local/lib/libgnutlsxx.dll.a +0 -0
- data/vendor/local/lib/libgobject-2.0.dll.a +0 -0
- data/vendor/local/lib/libgobject-2.0.la +4 -4
- data/vendor/local/lib/libgthread-2.0.dll.a +0 -0
- data/vendor/local/lib/libgthread-2.0.la +3 -3
- data/vendor/local/lib/libhogweed.a +0 -0
- data/vendor/local/lib/libhogweed.dll.a +0 -0
- data/vendor/local/lib/libnettle.a +0 -0
- data/vendor/local/lib/libnettle.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/gio-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gio-windows-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/glib-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gmodule-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gmodule-export-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gmodule-no-export-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gobject-2.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gthread-2.0.pc +1 -1
- data/vendor/local/share/gdb/auto-load/{libglib-2.0.so.0.3503.0-gdb.py → libglib-2.0.so.0.3400.3-gdb.py} +0 -0
- data/vendor/local/share/gdb/auto-load/{libgobject-2.0.so.0.3503.0-gdb.py → libgobject-2.0.so.0.3400.3-gdb.py} +0 -0
- data/vendor/local/share/glib-2.0/gdb/glib.py +4 -0
- data/vendor/local/share/glib-2.0/gettext/mkinstalldirs +2 -2
- data/vendor/local/share/glib-2.0/gettext/po/Makefile.in.in +17 -5
- data/vendor/local/share/gtk-doc/html/gio/GActionMap.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/GAppInfo.html +1 -27
- data/vendor/local/share/gtk-doc/html/gio/GApplication.html +15 -8
- data/vendor/local/share/gtk-doc/html/gio/GApplicationCommandLine.html +6 -47
- data/vendor/local/share/gtk-doc/html/gio/GAsyncInitable.html +37 -21
- data/vendor/local/share/gtk-doc/html/gio/GAsyncResult.html +4 -16
- data/vendor/local/share/gtk-doc/html/gio/GBufferedInputStream.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/GDBusAuthObserver.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/GDBusConnection.html +32 -16
- data/vendor/local/share/gtk-doc/html/gio/GDBusInterfaceSkeleton.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/GDBusMethodInvocation.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/GDBusObjectManagerClient.html +2 -4
- data/vendor/local/share/gtk-doc/html/gio/GDBusProxy.html +10 -6
- data/vendor/local/share/gtk-doc/html/gio/GDBusServer.html +7 -3
- data/vendor/local/share/gtk-doc/html/gio/GDataInputStream.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/GFile.html +17 -65
- data/vendor/local/share/gtk-doc/html/gio/GFileEnumerator.html +2 -59
- data/vendor/local/share/gtk-doc/html/gio/GFileInfo.html +1 -29
- data/vendor/local/share/gtk-doc/html/gio/GFileInputStream.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/GInputStream.html +4 -4
- data/vendor/local/share/gtk-doc/html/gio/GMemoryOutputStream.html +0 -13
- data/vendor/local/share/gtk-doc/html/gio/GMount.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/GProxyAddress.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/GSettings.html +5 -5
- data/vendor/local/share/gtk-doc/html/gio/GSimpleAction.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/GSimpleAsyncResult.html +4 -12
- data/vendor/local/share/gtk-doc/html/gio/GSocket.html +1 -137
- data/vendor/local/share/gtk-doc/html/gio/GTestDBus.html +2 -3
- data/vendor/local/share/gtk-doc/html/gio/GTlsConnection.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/GVolume.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-26.html +0 -4
- data/vendor/local/share/gtk-doc/html/gio/api-index-deprecated.html +0 -19
- data/vendor/local/share/gtk-doc/html/gio/api-index-full.html +0 -180
- data/vendor/local/share/gtk-doc/html/gio/async.html +0 -3
- data/vendor/local/share/gtk-doc/html/gio/ch01.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/ch02.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/ch03.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/ch29.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/ch30.html +4 -4
- data/vendor/local/share/gtk-doc/html/gio/ch30s02.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/ch30s03.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/ch31.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/ch31s02.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/ch31s03.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/ch31s04.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/ch31s05.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/ch31s06.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/ch31s07.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/ch32.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/ch32s02.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/ch32s03.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/ch32s04.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/ch32s05.html +17 -9
- data/vendor/local/share/gtk-doc/html/gio/gdbus-codegen.html +11 -11
- data/vendor/local/share/gtk-doc/html/gio/gdbus-org.gtk.GDBus.Example.ObjectManager.Animal.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gdbus.html +6 -6
- data/vendor/local/share/gtk-doc/html/gio/gio-D-Bus-Introspection-Data.html +5 -5
- data/vendor/local/share/gtk-doc/html/gio/gio-D-Bus-Utilities.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/gio-Desktop-file-based-GAppInfo.html +0 -109
- data/vendor/local/share/gtk-doc/html/gio/gio-GDBusError.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/gio-GFileAttribute.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gio-GIOError.html +1 -7
- data/vendor/local/share/gtk-doc/html/gio/gio-GIOScheduler.html +12 -29
- data/vendor/local/share/gtk-doc/html/gio/gio-GResource.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/gio-Owning-Bus-Names.html +7 -3
- data/vendor/local/share/gtk-doc/html/gio/gio-Watching-Bus-Names.html +8 -10
- data/vendor/local/share/gtk-doc/html/gio/gio-hierarchy.html +0 -1
- data/vendor/local/share/gtk-doc/html/gio/gio-querymodules.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/gio.devhelp2 +11 -64
- data/vendor/local/share/gtk-doc/html/gio/glib-compile-resources.html +3 -15
- data/vendor/local/share/gtk-doc/html/gio/glib-compile-schemas.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gresource-tool.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/gsettings-tool.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/highlevel-socket.html +2 -2
- data/vendor/local/share/gtk-doc/html/gio/index.html +4 -10
- data/vendor/local/share/gtk-doc/html/gio/index.sgml +0 -59
- data/vendor/local/share/gtk-doc/html/gio/migrating.html +3 -3
- data/vendor/local/share/gtk-doc/html/gio/networking.html +0 -3
- data/vendor/local/share/gtk-doc/html/gio/pt01.html +1 -1
- data/vendor/local/share/gtk-doc/html/gio/pt02.html +1 -7
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-34.html +0 -4
- data/vendor/local/share/gtk-doc/html/glib/api-index-full.html +1 -21
- data/vendor/local/share/gtk-doc/html/glib/glib-Arrays.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Byte-Arrays.html +1 -1
- data/vendor/local/share/gtk-doc/html/glib/glib-Data-Checksums.html +4 -13
- data/vendor/local/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Deprecated-Thread-APIs.html +11 -7
- data/vendor/local/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Dynamic-Loading-of-Modules.html +1 -1
- data/vendor/local/share/gtk-doc/html/glib/glib-GVariant.html +10 -86
- data/vendor/local/share/gtk-doc/html/glib/glib-Hash-Tables.html +46 -5
- data/vendor/local/share/gtk-doc/html/glib/glib-IO-Channels.html +7 -11
- data/vendor/local/share/gtk-doc/html/glib/glib-Keyed-Data-Lists.html +3 -3
- data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Slices.html +4 -4
- data/vendor/local/share/gtk-doc/html/glib/glib-Message-Logging.html +3 -3
- data/vendor/local/share/gtk-doc/html/glib/glib-Miscellaneous-Utility-Functions.html +34 -27
- data/vendor/local/share/gtk-doc/html/glib/glib-Pointer-Arrays.html +1 -1
- data/vendor/local/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Spawning-Processes.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-Testing.html +2 -23
- data/vendor/local/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html +14 -14
- data/vendor/local/share/gtk-doc/html/glib/glib-Threads.html +6 -6
- data/vendor/local/share/gtk-doc/html/glib/glib-UNIX-specific-utilities-and-integration.html +7 -13
- data/vendor/local/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html +5 -9
- data/vendor/local/share/gtk-doc/html/glib/glib-Version-Information.html +4 -28
- data/vendor/local/share/gtk-doc/html/glib/glib-Warnings-and-Assertions.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-building.html +1 -1
- data/vendor/local/share/gtk-doc/html/glib/glib-changes.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/glib-compiling.html +1 -1
- data/vendor/local/share/gtk-doc/html/glib/glib-gettextize.html +3 -3
- data/vendor/local/share/gtk-doc/html/glib/glib-programming.html +3 -3
- data/vendor/local/share/gtk-doc/html/glib/glib-regex-syntax.html +45 -45
- data/vendor/local/share/gtk-doc/html/glib/glib-resources.html +3 -3
- data/vendor/local/share/gtk-doc/html/glib/glib-running.html +6 -6
- data/vendor/local/share/gtk-doc/html/glib/glib.devhelp2 +25 -32
- data/vendor/local/share/gtk-doc/html/glib/gtester-report.html +3 -3
- data/vendor/local/share/gtk-doc/html/glib/gtester.html +3 -3
- data/vendor/local/share/gtk-doc/html/glib/gvariant-format-strings.html +12 -12
- data/vendor/local/share/gtk-doc/html/glib/gvariant-text.html +2 -2
- data/vendor/local/share/gtk-doc/html/glib/index.html +1 -1
- data/vendor/local/share/gtk-doc/html/glib/index.sgml +0 -7
- data/vendor/local/share/gtk-doc/html/gobject/api-index-deprecated.html +0 -12
- data/vendor/local/share/gtk-doc/html/gobject/api-index-full.html +0 -12
- data/vendor/local/share/gtk-doc/html/gobject/ch01s02.html +4 -4
- data/vendor/local/share/gtk-doc/html/gobject/chapter-gtype.html +4 -4
- data/vendor/local/share/gtk-doc/html/gobject/chapter-intro.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/chapter-signal.html +8 -8
- data/vendor/local/share/gtk-doc/html/gobject/glib-genmarshal.html +6 -6
- data/vendor/local/share/gtk-doc/html/gobject/glib-mkenums.html +5 -5
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Boxed-Types.html +0 -22
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Generic-values.html +5 -1
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Signals.html +32 -6
- data/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html +6 -6
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Type-Information.html +24 -51
- data/vendor/local/share/gtk-doc/html/gobject/gobject-properties.html +4 -4
- data/vendor/local/share/gtk-doc/html/gobject/gobject-query.html +3 -3
- data/vendor/local/share/gtk-doc/html/gobject/gobject.devhelp2 +8 -11
- data/vendor/local/share/gtk-doc/html/gobject/gtype-conventions.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-chainup.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-methods.html +3 -3
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject.html +3 -3
- data/vendor/local/share/gtk-doc/html/gobject/howto-interface-properties.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/howto-signals.html +2 -2
- data/vendor/local/share/gtk-doc/html/gobject/index.html +7 -7
- data/vendor/local/share/gtk-doc/html/gobject/index.sgml +0 -3
- data/vendor/local/share/gtk-doc/html/gobject/pr01.html +1 -1
- data/vendor/local/share/gtk-doc/html/gobject/pt01.html +4 -4
- data/vendor/local/share/gtk-doc/html/gobject/pt02.html +4 -4
- data/vendor/local/share/gtk-doc/html/gobject/pt03.html +1 -1
- data/vendor/local/share/gtk-doc/html/gobject/rn01.html +1 -1
- data/vendor/local/share/gtk-doc/html/gobject/rn02.html +1 -1
- data/vendor/local/share/gtk-doc/html/gobject/signal.html +4 -4
- data/vendor/local/share/locale/as/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/cs/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/da/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/es/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/es/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/gl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/gu/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/he/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/he/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/kn/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/lt/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/lt/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/nb/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/or/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/pl/LC_MESSAGES/glib-networking.mo +0 -0
- data/vendor/local/share/locale/pl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sk/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sr@latin/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/man/man1/gdbus-codegen.1 +1 -1
- data/vendor/local/share/man/man1/gdbus.1 +1 -1
- data/vendor/local/share/man/man1/gio-querymodules.1 +1 -1
- data/vendor/local/share/man/man1/glib-compile-resources.1 +1 -13
- data/vendor/local/share/man/man1/glib-compile-schemas.1 +1 -1
- data/vendor/local/share/man/man1/glib-genmarshal.1 +1 -1
- data/vendor/local/share/man/man1/glib-gettextize.1 +1 -1
- data/vendor/local/share/man/man1/glib-mkenums.1 +1 -1
- data/vendor/local/share/man/man1/gobject-query.1 +1 -1
- data/vendor/local/share/man/man1/gresource.1 +1 -1
- data/vendor/local/share/man/man1/gsettings.1 +1 -1
- data/vendor/local/share/man/man1/gtester-report.1 +1 -1
- data/vendor/local/share/man/man1/gtester.1 +1 -1
- metadata +33 -197
- data/ext/glib2/rbgobj_fundamental.c +0 -43
- data/vendor/local/bin/asn1Coding.exe +0 -0
- data/vendor/local/bin/asn1Decoding.exe +0 -0
- data/vendor/local/bin/asn1Parser.exe +0 -0
- data/vendor/local/bin/dumpsexp.exe +0 -0
- data/vendor/local/bin/gpg-error.exe +0 -0
- data/vendor/local/bin/hmac256.exe +0 -0
- data/vendor/local/bin/libgcrypt-11.dll +0 -0
- data/vendor/local/bin/libgcrypt-config +0 -177
- data/vendor/local/bin/libgnutls-26.dll +0 -0
- data/vendor/local/bin/libgnutls-extra-26.dll +0 -0
- data/vendor/local/bin/libgnutls-openssl-26.dll +0 -0
- data/vendor/local/bin/libgpg-error-0.dll +0 -0
- data/vendor/local/bin/libtasn1-3.dll +0 -0
- data/vendor/local/etc/bash_completion.d/gdbus-bash-completion.sh +0 -33
- data/vendor/local/etc/bash_completion.d/gsettings-bash-completion.sh +0 -67
- data/vendor/local/gnutls.README.txt +0 -6
- data/vendor/local/include/gcrypt-module.h +0 -226
- data/vendor/local/include/gcrypt.h +0 -1826
- data/vendor/local/include/glib-2.0/gio/gnetworking.h +0 -83
- data/vendor/local/include/glib-2.0/gio/gtask.h +0 -160
- data/vendor/local/include/glib-2.0/glib/gcache.h +0 -69
- data/vendor/local/include/glib-2.0/glib/gcompletion.h +0 -81
- data/vendor/local/include/glib-2.0/glib/grel.h +0 -101
- data/vendor/local/include/gnutls/extra.h +0 -137
- data/vendor/local/include/gpg-error.h +0 -651
- data/vendor/local/include/libtasn1.h +0 -246
- data/vendor/local/lib/gio-2.0.lib +0 -0
- data/vendor/local/lib/glib-2.0.lib +0 -0
- data/vendor/local/lib/gmodule-2.0.lib +0 -0
- data/vendor/local/lib/gobject-2.0.lib +0 -0
- data/vendor/local/lib/gthread-2.0.lib +0 -0
- data/vendor/local/lib/libgcrypt.def +0 -237
- data/vendor/local/lib/libgcrypt.dll.a +0 -0
- data/vendor/local/lib/libgnutls-extra.dll.a +0 -0
- data/vendor/local/lib/libgpg-error.dll.a +0 -0
- data/vendor/local/lib/libtasn1.dll.a +0 -0
- data/vendor/local/manifest/glib-dev_2.28.8-1_win32.mft +0 -619
- data/vendor/local/manifest/glib_2.28.8-1_win32.mft +0 -103
- data/vendor/local/manifest/gnutls-dev_2.4.2-1_win32.mft +0 -593
- data/vendor/local/manifest/gnutls_2.4.2-1_win32.mft +0 -8
- data/vendor/local/share/aclocal/gpg-error.m4 +0 -65
- data/vendor/local/share/aclocal/libgcrypt.m4 +0 -108
- data/vendor/local/share/aclocal/libgnutls-extra.m4 +0 -161
- data/vendor/local/share/aclocal/libgnutls.m4 +0 -160
- data/vendor/local/share/aclocal/libtasn1.m4 +0 -160
- data/vendor/local/share/common-lisp/source/gpg-error/gpg-error-codes.lisp +0 -417
- data/vendor/local/share/common-lisp/source/gpg-error/gpg-error-package.lisp +0 -64
- data/vendor/local/share/common-lisp/source/gpg-error/gpg-error.asd +0 -36
- data/vendor/local/share/common-lisp/source/gpg-error/gpg-error.lisp +0 -236
- data/vendor/local/share/doc/glib-2.28.8/COPYING +0 -482
- data/vendor/local/share/doc/glib-dev-2.28.8/COPYING +0 -482
- data/vendor/local/share/glib-2.0/codegen/__init__.pyc +0 -0
- data/vendor/local/share/glib-2.0/codegen/__init__.pyo +0 -0
- data/vendor/local/share/glib-2.0/codegen/config.pyc +0 -0
- data/vendor/local/share/glib-2.0/codegen/config.pyo +0 -0
- data/vendor/local/share/glib-2.0/codegen/utils.pyc +0 -0
- data/vendor/local/share/glib-2.0/codegen/utils.pyo +0 -0
- data/vendor/local/share/gtk-doc/html/gio/GDBusError.html +0 -879
- data/vendor/local/share/gtk-doc/html/gio/GTask.html +0 -2296
- data/vendor/local/share/gtk-doc/html/gio/ch26.html +0 -75
- data/vendor/local/share/gtk-doc/html/gio/ch27.html +0 -217
- data/vendor/local/share/gtk-doc/html/gio/ch27s02.html +0 -41
- data/vendor/local/share/gtk-doc/html/gio/ch27s03.html +0 -39
- data/vendor/local/share/gtk-doc/html/gio/ch28.html +0 -57
- data/vendor/local/share/gtk-doc/html/gio/ch28s02.html +0 -59
- data/vendor/local/share/gtk-doc/html/gio/ch28s03.html +0 -159
- data/vendor/local/share/gtk-doc/html/gio/ch28s04.html +0 -46
- data/vendor/local/share/gtk-doc/html/gio/ch28s05.html +0 -48
- data/vendor/local/share/gtk-doc/html/gio/ch28s06.html +0 -279
- data/vendor/local/share/gtk-doc/html/gio/ch28s07.html +0 -160
- data/vendor/local/share/gtk-doc/html/gio/ch29s02.html +0 -130
- data/vendor/local/share/gtk-doc/html/gio/ch29s03.html +0 -202
- data/vendor/local/share/gtk-doc/html/gio/ch29s04.html +0 -96
- data/vendor/local/share/gtk-doc/html/gio/ch29s05.html +0 -823
- data/vendor/local/share/gtk-doc/html/gio/ch29s06.html +0 -828
- data/vendor/local/share/gtk-doc/html/gio/gio-gnetworking.h.html +0 -91
- data/vendor/local/share/gtk-doc/html/gio/gio.devhelp +0 -1956
- data/vendor/local/share/gtk-doc/html/glib/glib-Limits-of-Basic-Types.html +0 -389
- data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Allocators.html +0 -137
- data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Chunks.html +0 -679
- data/vendor/local/share/gtk-doc/html/glib/glib.devhelp +0 -2218
- data/vendor/local/share/gtk-doc/html/gobject/ch06s03.html +0 -113
- data/vendor/local/share/gtk-doc/html/gobject/gobject.devhelp +0 -766
- data/vendor/local/share/info/gcrypt.info +0 -6243
- data/vendor/local/share/info/gnutls-certificate-user-use-case.png +0 -0
- data/vendor/local/share/info/gnutls-extensions_st.png +0 -0
- data/vendor/local/share/info/gnutls-mod_auth_st.png +0 -0
- data/vendor/local/share/info/gnutls-objects.png +0 -0
- data/vendor/local/share/info/libtasn1.info +0 -2993
- data/vendor/local/share/man/man1/asn1Coding.1 +0 -46
- data/vendor/local/share/man/man1/asn1Decoding.1 +0 -41
- data/vendor/local/share/man/man1/asn1Parser.1 +0 -49
- data/vendor/local/share/man/man3/asn1_array2tree.3 +0 -47
- data/vendor/local/share/man/man3/asn1_bit_der.3 +0 -39
- data/vendor/local/share/man/man3/asn1_check_version.3 +0 -39
- data/vendor/local/share/man/man3/asn1_copy_node.3 +0 -39
- data/vendor/local/share/man/man3/asn1_create_element.3 +0 -45
- data/vendor/local/share/man/man3/asn1_delete_element.3 +0 -39
- data/vendor/local/share/man/man3/asn1_delete_structure.3 +0 -37
- data/vendor/local/share/man/man3/asn1_der_coding.3 +0 -52
- data/vendor/local/share/man/man3/asn1_der_decoding.3 +0 -50
- data/vendor/local/share/man/man3/asn1_der_decoding_element.3 +0 -54
- data/vendor/local/share/man/man3/asn1_der_decoding_startEnd.3 +0 -58
- data/vendor/local/share/man/man3/asn1_expand_any_defined_by.3 +0 -45
- data/vendor/local/share/man/man3/asn1_expand_octet_string.3 +0 -51
- data/vendor/local/share/man/man3/asn1_find_node.3 +0 -38
- data/vendor/local/share/man/man3/asn1_find_structure_from_oid.3 +0 -37
- data/vendor/local/share/man/man3/asn1_get_bit_der.3 +0 -43
- data/vendor/local/share/man/man3/asn1_get_length_der.3 +0 -38
- data/vendor/local/share/man/man3/asn1_get_octet_der.3 +0 -43
- data/vendor/local/share/man/man3/asn1_get_tag_der.3 +0 -41
- data/vendor/local/share/man/man3/asn1_length_der.3 +0 -36
- data/vendor/local/share/man/man3/asn1_number_of_elements.3 +0 -43
- data/vendor/local/share/man/man3/asn1_octet_der.3 +0 -37
- data/vendor/local/share/man/man3/asn1_parser2array.3 +0 -58
- data/vendor/local/share/man/man3/asn1_parser2tree.3 +0 -55
- data/vendor/local/share/man/man3/asn1_print_structure.3 +0 -40
- data/vendor/local/share/man/man3/asn1_read_tag.3 +0 -46
- data/vendor/local/share/man/man3/asn1_read_value.3 +0 -92
- data/vendor/local/share/man/man3/asn1_write_value.3 +0 -136
- data/vendor/local/share/man/man3/gnutls_certificate_client_set_retrieve_function.3 +0 -58
- data/vendor/local/share/man/man3/gnutls_certificate_get_openpgp_keyring.3 +0 -37
- data/vendor/local/share/man/man3/gnutls_certificate_get_x509_cas.3 +0 -40
- data/vendor/local/share/man/man3/gnutls_certificate_get_x509_crls.3 +0 -40
- data/vendor/local/share/man/man3/gnutls_certificate_server_set_retrieve_function.3 +0 -47
- data/vendor/local/share/man/man3/gnutls_certificate_verify_peers.3 +0 -44
- data/vendor/local/share/man/man3/gnutls_crypto_cipher_register.3 +0 -45
- data/vendor/local/share/man/man3/gnutls_crypto_digest_register.3 +0 -45
- data/vendor/local/share/man/man3/gnutls_crypto_mac_register.3 +0 -45
- data/vendor/local/share/man/man3/gnutls_crypto_rnd_register.3 +0 -43
- data/vendor/local/share/man/man3/gnutls_extra_check_version.3 +0 -36
- data/vendor/local/share/man/man3/gnutls_free.3 +0 -34
- data/vendor/local/share/man/man3/gnutls_global_init_extra.3 +0 -38
- data/vendor/local/share/man/man3/gnutls_ia_allocate_client_credentials.3 +0 -42
- data/vendor/local/share/man/man3/gnutls_ia_allocate_server_credentials.3 +0 -42
- data/vendor/local/share/man/man3/gnutls_ia_enable.3 +0 -53
- data/vendor/local/share/man/man3/gnutls_ia_endphase_send.3 +0 -43
- data/vendor/local/share/man/man3/gnutls_ia_extract_inner_secret.3 +0 -44
- data/vendor/local/share/man/man3/gnutls_ia_free_client_credentials.3 +0 -34
- data/vendor/local/share/man/man3/gnutls_ia_free_server_credentials.3 +0 -34
- data/vendor/local/share/man/man3/gnutls_ia_generate_challenge.3 +0 -40
- data/vendor/local/share/man/man3/gnutls_ia_get_client_avp_ptr.3 +0 -36
- data/vendor/local/share/man/man3/gnutls_ia_get_server_avp_ptr.3 +0 -36
- data/vendor/local/share/man/man3/gnutls_ia_handshake.3 +0 -36
- data/vendor/local/share/man/man3/gnutls_ia_handshake_p.3 +0 -37
- data/vendor/local/share/man/man3/gnutls_ia_permute_inner_secret.3 +0 -43
- data/vendor/local/share/man/man3/gnutls_ia_recv.3 +0 -57
- data/vendor/local/share/man/man3/gnutls_ia_send.3 +0 -56
- data/vendor/local/share/man/man3/gnutls_ia_set_client_avp_function.3 +0 -61
- data/vendor/local/share/man/man3/gnutls_ia_set_client_avp_ptr.3 +0 -36
- data/vendor/local/share/man/man3/gnutls_ia_set_server_avp_function.3 +0 -68
- data/vendor/local/share/man/man3/gnutls_ia_set_server_avp_ptr.3 +0 -36
- data/vendor/local/share/man/man3/gnutls_ia_verify_endphase.3 +0 -45
- data/vendor/local/share/man/man3/gnutls_malloc.3 +0 -37
- data/vendor/local/share/man/man3/gnutls_openpgp_privkey_get_subkey_expiration_time.3 +0 -40
- data/vendor/local/share/man/man3/gnutls_oprfi_enable_client.3 +0 -42
- data/vendor/local/share/man/man3/gnutls_oprfi_enable_server.3 +0 -49
- data/vendor/local/share/man/man3/gnutls_psk_netconf_derive_key.3 +0 -44
- data/vendor/local/share/man/man3/gnutls_session_get_client_random.3 +0 -40
- data/vendor/local/share/man/man3/gnutls_session_get_master_secret.3 +0 -43
- data/vendor/local/share/man/man3/gnutls_session_get_server_random.3 +0 -40
- data/vendor/local/share/man/man3/gnutls_sign_algorithm_get_name.3 +0 -35
- data/vendor/local/share/man/man3/gnutls_transport_set_global_errno.3 +0 -47
- data/vendor/local/share/man/man3/gnutls_transport_set_lowat.3 +0 -40
- data/vendor/local/share/man/man3/gnutls_x509_privkey_verify_data.3 +0 -43
- data/vendor/local/share/man/man3/libtasn1_perror.3 +0 -32
- data/vendor/local/share/man/man3/libtasn1_strerror.3 +0 -35
- data/vendor/local/src/dieterv/packaging/glib_2.28.8-1_win32.log +0 -2919
- data/vendor/local/src/dieterv/packaging/glib_2.28.8-1_win32.sh +0 -157
@@ -1,828 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
5
|
-
<title>Exporting objects</title>
|
6
|
-
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
7
|
-
<link rel="home" href="index.html" title="GIO Reference Manual">
|
8
|
-
<link rel="up" href="ch29.html" title="Migrating to GDBus">
|
9
|
-
<link rel="prev" href="ch29s05.html" title="Client-side GObject bindings">
|
10
|
-
<link rel="next" href="gio-hierarchy.html" title="Object Hierarchy">
|
11
|
-
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
|
12
|
-
<link rel="stylesheet" href="style.css" type="text/css">
|
13
|
-
</head>
|
14
|
-
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
15
|
-
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
|
16
|
-
<td><a accesskey="p" href="ch29s05.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
17
|
-
<td><a accesskey="u" href="ch29.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
|
18
|
-
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
|
19
|
-
<th width="100%" align="center">GIO Reference Manual</th>
|
20
|
-
<td><a accesskey="n" href="gio-hierarchy.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
21
|
-
</tr></table>
|
22
|
-
<div class="section">
|
23
|
-
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
24
|
-
<a name="id387070"></a>Exporting objects</h2></div></div></div>
|
25
|
-
<p>
|
26
|
-
With dbus-glib, exporting an object over D-Bus works by generating
|
27
|
-
a bunch of glue code from your introspection XML with
|
28
|
-
<span class="command"><strong>dbus-binding-tool</strong></span>. The glue code gets included in
|
29
|
-
your source, and you need to call
|
30
|
-
</p>
|
31
|
-
<div class="informalexample">
|
32
|
-
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
33
|
-
<tbody>
|
34
|
-
<tr>
|
35
|
-
<td class="listing_lines" align="right"><pre>1
|
36
|
-
2</pre></td>
|
37
|
-
<td class="listing_code"><pre class="programlisting"><span class="function"><a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBus-GObject-related-functions.html#dbus-g-object-type-install-info">dbus_g_object_type_install_info</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">TYPE_MYOBJECT</span><span class="symbol">,</span>
|
38
|
-
<span class="normal"> </span><span class="symbol">&</span><span class="normal">dbus_glib_myobject_object_info</span><span class="symbol">);</span></pre></td>
|
39
|
-
</tr>
|
40
|
-
</tbody>
|
41
|
-
</table>
|
42
|
-
</div>
|
43
|
-
|
44
|
-
<p>
|
45
|
-
in your <code class="function">class_init()</code> function to tell dbus-glib about your type.
|
46
|
-
To actually export an instance, you call
|
47
|
-
</p>
|
48
|
-
<div class="informalexample">
|
49
|
-
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
50
|
-
<tbody>
|
51
|
-
<tr>
|
52
|
-
<td class="listing_lines" align="right"><pre>1
|
53
|
-
2
|
54
|
-
3</pre></td>
|
55
|
-
<td class="listing_code"><pre class="programlisting"><span class="function"><a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGConnection.html#dbus-g-connection-register-g-object">dbus_g_connection_register_g_object</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">system_bus_connection</span><span class="symbol">,</span>
|
56
|
-
<span class="normal"> my_object_path</span><span class="symbol">,</span>
|
57
|
-
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#G-OBJECT:CAPS">G_OBJECT</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">my_object</span><span class="symbol">));</span></pre></td>
|
58
|
-
</tr>
|
59
|
-
</tbody>
|
60
|
-
</table>
|
61
|
-
</div>
|
62
|
-
|
63
|
-
<p>
|
64
|
-
|
65
|
-
</p>
|
66
|
-
<p>
|
67
|
-
The GDBus way of exporting an object works by embedding the
|
68
|
-
introspection XML in the source, creating introspection data
|
69
|
-
structures from it with <a class="link" href="gio-D-Bus-Introspection-Data.html#g-dbus-node-info-new-for-xml" title="g_dbus_node_info_new_for_xml ()"><code class="function">g_dbus_node_info_new_for_xml()</code></a>, and
|
70
|
-
passing that along when you register the object:
|
71
|
-
</p>
|
72
|
-
<div class="informalexample">
|
73
|
-
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
74
|
-
<tbody>
|
75
|
-
<tr>
|
76
|
-
<td class="listing_lines" align="right"><pre>1
|
77
|
-
2
|
78
|
-
3
|
79
|
-
4
|
80
|
-
5
|
81
|
-
6
|
82
|
-
7
|
83
|
-
8
|
84
|
-
9
|
85
|
-
10
|
86
|
-
11
|
87
|
-
12
|
88
|
-
13
|
89
|
-
14
|
90
|
-
15
|
91
|
-
16
|
92
|
-
17
|
93
|
-
18
|
94
|
-
19
|
95
|
-
20
|
96
|
-
21
|
97
|
-
22</pre></td>
|
98
|
-
<td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> introspection_xml</span><span class="symbol">[]</span><span class="normal"> </span><span class="symbol">=</span>
|
99
|
-
<span class="normal"> </span><span class="string">"<node>"</span>
|
100
|
-
<span class="normal"> </span><span class="string">" <interface name='org.gtk.GDBus.TestPeerInterface'>"</span>
|
101
|
-
<span class="normal"> </span><span class="string">" <method name='HelloWorld'>"</span>
|
102
|
-
<span class="normal"> </span><span class="string">" <arg type='s' name='greeting' direction='in'/>"</span>
|
103
|
-
<span class="normal"> </span><span class="string">" <arg type='s' name='response' direction='out'/>"</span>
|
104
|
-
<span class="normal"> </span><span class="string">" </method>"</span>
|
105
|
-
<span class="normal"> </span><span class="string">" </interface>"</span>
|
106
|
-
<span class="normal"> </span><span class="string">"</node>"</span><span class="symbol">;</span>
|
107
|
-
|
108
|
-
<span class="comment">/* parse introspection data */</span>
|
109
|
-
<span class="normal">introspection_data </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gio-D-Bus-Introspection-Data.html#g-dbus-node-info-new-for-xml">g_dbus_node_info_new_for_xml</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">introspection_xml</span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
|
110
|
-
|
111
|
-
<span class="symbol">/</span>
|
112
|
-
<span class="normal">id </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GDBusConnection.html#g-dbus-connection-register-object">g_dbus_connection_register_object</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">connection</span><span class="symbol">,</span>
|
113
|
-
<span class="normal"> </span><span class="string">"/org/gtk/GDBus/TestObject"</span><span class="symbol">,</span>
|
114
|
-
<span class="normal"> </span><span class="string">"org.gtk.GDBus.TestPeerInterface"</span><span class="symbol">,</span>
|
115
|
-
<span class="normal"> introspection_data</span><span class="symbol">-></span><span class="normal">interfaces</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">],</span>
|
116
|
-
<span class="normal"> </span><span class="symbol">&</span><span class="normal">interface_vtable</span><span class="symbol">,</span>
|
117
|
-
<span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span><span class="normal"> </span><span class="comment">/* user_data */</span>
|
118
|
-
<span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span><span class="normal"> </span><span class="comment">/* user_data_free_func */</span>
|
119
|
-
<span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span><span class="normal"> </span><span class="comment">/* GError** */</span></pre></td>
|
120
|
-
</tr>
|
121
|
-
</tbody>
|
122
|
-
</table>
|
123
|
-
</div>
|
124
|
-
|
125
|
-
<p>
|
126
|
-
</p>
|
127
|
-
<p>
|
128
|
-
The actual implementation of the exported object is done by specifying
|
129
|
-
a <a class="link" href="GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a> that has <code class="function">method_call()</code>, <code class="function">get_property()</code> and
|
130
|
-
<code class="function">set_property()</code> methods. There is no direct support beyond that for
|
131
|
-
exporting <a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObjects</span></a>, so there is quite a bit of manual work involved,
|
132
|
-
as you can see in the following example.
|
133
|
-
</p>
|
134
|
-
<p>
|
135
|
-
Since the VTable methods don't have any direct <a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> support, we
|
136
|
-
pass the exported object as <em class="parameter"><code>user_data</code></em>. Also note that we have to handle
|
137
|
-
the emission of the PropertiesChanged signal ourselves, by connecting
|
138
|
-
to ::notify.
|
139
|
-
</p>
|
140
|
-
<div class="example">
|
141
|
-
<a name="gdbus-export"></a><p class="title"><b>Example 20. Exporting a GObject</b></p>
|
142
|
-
<div class="example-contents">
|
143
|
-
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
144
|
-
<tbody>
|
145
|
-
<tr>
|
146
|
-
<td class="listing_lines" align="right"><pre>1
|
147
|
-
2
|
148
|
-
3
|
149
|
-
4
|
150
|
-
5
|
151
|
-
6
|
152
|
-
7
|
153
|
-
8
|
154
|
-
9
|
155
|
-
10
|
156
|
-
11
|
157
|
-
12
|
158
|
-
13
|
159
|
-
14
|
160
|
-
15
|
161
|
-
16
|
162
|
-
17
|
163
|
-
18
|
164
|
-
19
|
165
|
-
20
|
166
|
-
21
|
167
|
-
22
|
168
|
-
23
|
169
|
-
24
|
170
|
-
25
|
171
|
-
26
|
172
|
-
27
|
173
|
-
28
|
174
|
-
29
|
175
|
-
30
|
176
|
-
31
|
177
|
-
32
|
178
|
-
33
|
179
|
-
34
|
180
|
-
35
|
181
|
-
36
|
182
|
-
37
|
183
|
-
38
|
184
|
-
39
|
185
|
-
40
|
186
|
-
41
|
187
|
-
42
|
188
|
-
43
|
189
|
-
44
|
190
|
-
45
|
191
|
-
46
|
192
|
-
47
|
193
|
-
48
|
194
|
-
49
|
195
|
-
50
|
196
|
-
51
|
197
|
-
52
|
198
|
-
53
|
199
|
-
54
|
200
|
-
55
|
201
|
-
56
|
202
|
-
57
|
203
|
-
58
|
204
|
-
59
|
205
|
-
60
|
206
|
-
61
|
207
|
-
62
|
208
|
-
63
|
209
|
-
64
|
210
|
-
65
|
211
|
-
66
|
212
|
-
67
|
213
|
-
68
|
214
|
-
69
|
215
|
-
70
|
216
|
-
71
|
217
|
-
72
|
218
|
-
73
|
219
|
-
74
|
220
|
-
75
|
221
|
-
76
|
222
|
-
77
|
223
|
-
78
|
224
|
-
79
|
225
|
-
80
|
226
|
-
81
|
227
|
-
82
|
228
|
-
83
|
229
|
-
84
|
230
|
-
85
|
231
|
-
86
|
232
|
-
87
|
233
|
-
88
|
234
|
-
89
|
235
|
-
90
|
236
|
-
91
|
237
|
-
92
|
238
|
-
93
|
239
|
-
94
|
240
|
-
95
|
241
|
-
96
|
242
|
-
97
|
243
|
-
98
|
244
|
-
99
|
245
|
-
100
|
246
|
-
101
|
247
|
-
102
|
248
|
-
103
|
249
|
-
104
|
250
|
-
105
|
251
|
-
106
|
252
|
-
107
|
253
|
-
108
|
254
|
-
109
|
255
|
-
110
|
256
|
-
111
|
257
|
-
112
|
258
|
-
113
|
259
|
-
114
|
260
|
-
115
|
261
|
-
116
|
262
|
-
117
|
263
|
-
118
|
264
|
-
119
|
265
|
-
120
|
266
|
-
121
|
267
|
-
122
|
268
|
-
123
|
269
|
-
124
|
270
|
-
125
|
271
|
-
126
|
272
|
-
127
|
273
|
-
128
|
274
|
-
129
|
275
|
-
130
|
276
|
-
131
|
277
|
-
132
|
278
|
-
133
|
279
|
-
134
|
280
|
-
135
|
281
|
-
136
|
282
|
-
137
|
283
|
-
138
|
284
|
-
139
|
285
|
-
140
|
286
|
-
141
|
287
|
-
142
|
288
|
-
143
|
289
|
-
144
|
290
|
-
145
|
291
|
-
146
|
292
|
-
147
|
293
|
-
148
|
294
|
-
149
|
295
|
-
150
|
296
|
-
151
|
297
|
-
152
|
298
|
-
153
|
299
|
-
154
|
300
|
-
155
|
301
|
-
156
|
302
|
-
157
|
303
|
-
158
|
304
|
-
159
|
305
|
-
160
|
306
|
-
161
|
307
|
-
162
|
308
|
-
163
|
309
|
-
164
|
310
|
-
165
|
311
|
-
166
|
312
|
-
167
|
313
|
-
168
|
314
|
-
169
|
315
|
-
170
|
316
|
-
171
|
317
|
-
172
|
318
|
-
173
|
319
|
-
174
|
320
|
-
175
|
321
|
-
176
|
322
|
-
177
|
323
|
-
178
|
324
|
-
179
|
325
|
-
180
|
326
|
-
181
|
327
|
-
182
|
328
|
-
183
|
329
|
-
184
|
330
|
-
185
|
331
|
-
186
|
332
|
-
187
|
333
|
-
188
|
334
|
-
189
|
335
|
-
190
|
336
|
-
191
|
337
|
-
192
|
338
|
-
193
|
339
|
-
194
|
340
|
-
195
|
341
|
-
196
|
342
|
-
197
|
343
|
-
198
|
344
|
-
199
|
345
|
-
200
|
346
|
-
201
|
347
|
-
202
|
348
|
-
203
|
349
|
-
204
|
350
|
-
205
|
351
|
-
206
|
352
|
-
207
|
353
|
-
208
|
354
|
-
209
|
355
|
-
210
|
356
|
-
211
|
357
|
-
212
|
358
|
-
213
|
359
|
-
214
|
360
|
-
215
|
361
|
-
216
|
362
|
-
217
|
363
|
-
218
|
364
|
-
219
|
365
|
-
220
|
366
|
-
221
|
367
|
-
222
|
368
|
-
223
|
369
|
-
224
|
370
|
-
225
|
371
|
-
226
|
372
|
-
227
|
373
|
-
228
|
374
|
-
229
|
375
|
-
230
|
376
|
-
231
|
377
|
-
232
|
378
|
-
233
|
379
|
-
234
|
380
|
-
235
|
381
|
-
236
|
382
|
-
237
|
383
|
-
238
|
384
|
-
239
|
385
|
-
240
|
386
|
-
241
|
387
|
-
242
|
388
|
-
243
|
389
|
-
244
|
390
|
-
245
|
391
|
-
246
|
392
|
-
247
|
393
|
-
248
|
394
|
-
249
|
395
|
-
250
|
396
|
-
251
|
397
|
-
252
|
398
|
-
253
|
399
|
-
254
|
400
|
-
255
|
401
|
-
256
|
402
|
-
257
|
403
|
-
258
|
404
|
-
259
|
405
|
-
260
|
406
|
-
261
|
407
|
-
262
|
408
|
-
263
|
409
|
-
264
|
410
|
-
265
|
411
|
-
266
|
412
|
-
267
|
413
|
-
268
|
414
|
-
269
|
415
|
-
270
|
416
|
-
271
|
417
|
-
272
|
418
|
-
273
|
419
|
-
274
|
420
|
-
275
|
421
|
-
276
|
422
|
-
277
|
423
|
-
278
|
424
|
-
279
|
425
|
-
280
|
426
|
-
281
|
427
|
-
282
|
428
|
-
283
|
429
|
-
284
|
430
|
-
285
|
431
|
-
286
|
432
|
-
287
|
433
|
-
288
|
434
|
-
289
|
435
|
-
290
|
436
|
-
291
|
437
|
-
292
|
438
|
-
293
|
439
|
-
294
|
440
|
-
295
|
441
|
-
296
|
442
|
-
297
|
443
|
-
298
|
444
|
-
299
|
445
|
-
300
|
446
|
-
301
|
447
|
-
302
|
448
|
-
303
|
449
|
-
304
|
450
|
-
305
|
451
|
-
306
|
452
|
-
307
|
453
|
-
308
|
454
|
-
309
|
455
|
-
310
|
456
|
-
311
|
457
|
-
312
|
458
|
-
313
|
459
|
-
314
|
460
|
-
315
|
461
|
-
316
|
462
|
-
317
|
463
|
-
318
|
464
|
-
319
|
465
|
-
320
|
466
|
-
321
|
467
|
-
322
|
468
|
-
323
|
469
|
-
324
|
470
|
-
325
|
471
|
-
326
|
472
|
-
327
|
473
|
-
328
|
474
|
-
329
|
475
|
-
330
|
476
|
-
331
|
477
|
-
332
|
478
|
-
333
|
479
|
-
334
|
480
|
-
335</pre></td>
|
481
|
-
<td class="listing_code"><pre class="programlisting"><span class="preproc">#include</span><span class="normal"> </span><span class="string"><gio/gio.h></span>
|
482
|
-
<span class="preproc">#include</span><span class="normal"> </span><span class="string"><stdlib.h></span>
|
483
|
-
|
484
|
-
<span class="comment">/* ---------------------------------------------------------------------------------------------------- */</span>
|
485
|
-
|
486
|
-
<span class="comment">/* The object we want to export */</span>
|
487
|
-
<span class="keyword">typedef</span><span class="normal"> </span><span class="keyword">struct</span><span class="normal"> </span><span class="classname">_MyObjectClass</span><span class="normal"> MyObjectClass</span><span class="symbol">;</span>
|
488
|
-
<span class="keyword">typedef</span><span class="normal"> </span><span class="keyword">struct</span><span class="normal"> </span><span class="classname">_MyObject</span><span class="normal"> MyObject</span><span class="symbol">;</span>
|
489
|
-
|
490
|
-
<span class="keyword">struct</span><span class="normal"> </span><span class="classname">_MyObjectClass</span>
|
491
|
-
<span class="cbracket">{</span>
|
492
|
-
<span class="normal"> </span><span class="usertype">GObjectClass</span><span class="normal"> parent_class</span><span class="symbol">;</span>
|
493
|
-
<span class="cbracket">}</span><span class="symbol">;</span>
|
494
|
-
|
495
|
-
<span class="keyword">struct</span><span class="normal"> </span><span class="classname">_MyObject</span>
|
496
|
-
<span class="cbracket">{</span>
|
497
|
-
<span class="normal"> </span><span class="usertype">GObject</span><span class="normal"> parent_instance</span><span class="symbol">;</span>
|
498
|
-
|
499
|
-
<span class="normal"> </span><span class="usertype">gint</span><span class="normal"> count</span><span class="symbol">;</span>
|
500
|
-
<span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">name</span><span class="symbol">;</span>
|
501
|
-
<span class="cbracket">}</span><span class="symbol">;</span>
|
502
|
-
|
503
|
-
<span class="keyword">enum</span>
|
504
|
-
<span class="cbracket">{</span>
|
505
|
-
<span class="normal"> PROP_0</span><span class="symbol">,</span>
|
506
|
-
<span class="normal"> PROP_COUNT</span><span class="symbol">,</span>
|
507
|
-
<span class="normal"> PROP_NAME</span>
|
508
|
-
<span class="cbracket">}</span><span class="symbol">;</span>
|
509
|
-
|
510
|
-
<span class="function"><a href="../gobject/gobject-Type-Information.html#G-DEFINE-TYPE:CAPS">G_DEFINE_TYPE</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">MyObject</span><span class="symbol">,</span><span class="normal"> my_object</span><span class="symbol">,</span><span class="normal"> <a href="../gobject/gobject-Type-Information.html#G-TYPE-OBJECT:CAPS">G_TYPE_OBJECT</a></span><span class="symbol">);</span>
|
511
|
-
|
512
|
-
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
|
513
|
-
<span class="function">my_object_finalize</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">object</span><span class="symbol">)</span>
|
514
|
-
<span class="cbracket">{</span>
|
515
|
-
<span class="normal"> </span><span class="usertype">MyObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">myobj </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">MyObject</span><span class="symbol">*)</span><span class="normal">object</span><span class="symbol">;</span>
|
516
|
-
|
517
|
-
<span class="normal"> </span><span class="function"><a href="../glib/glib-Memory-Allocation.html#g-free">g_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">myobj</span><span class="symbol">-></span><span class="normal">name</span><span class="symbol">);</span>
|
518
|
-
|
519
|
-
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#G-OBJECT-CLASS:CAPS">G_OBJECT_CLASS</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">my_object_parent_class</span><span class="symbol">)-></span><span class="function">finalize</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">object</span><span class="symbol">);</span>
|
520
|
-
<span class="cbracket">}</span>
|
521
|
-
|
522
|
-
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
|
523
|
-
<span class="function">my_object_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">MyObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">object</span><span class="symbol">)</span>
|
524
|
-
<span class="cbracket">{</span>
|
525
|
-
<span class="normal"> object</span><span class="symbol">-></span><span class="normal">count </span><span class="symbol">=</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span>
|
526
|
-
<span class="normal"> object</span><span class="symbol">-></span><span class="normal">name </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
|
527
|
-
<span class="cbracket">}</span>
|
528
|
-
|
529
|
-
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
|
530
|
-
<span class="function">my_object_get_property</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">object</span><span class="symbol">,</span>
|
531
|
-
<span class="normal"> </span><span class="usertype">guint</span><span class="normal"> prop_id</span><span class="symbol">,</span>
|
532
|
-
<span class="normal"> </span><span class="usertype">GValue</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">value</span><span class="symbol">,</span>
|
533
|
-
<span class="normal"> </span><span class="usertype">GParamSpec</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">pspec</span><span class="symbol">)</span>
|
534
|
-
<span class="cbracket">{</span>
|
535
|
-
<span class="normal"> </span><span class="usertype">MyObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">myobj </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">MyObject</span><span class="symbol">*)</span><span class="normal">object</span><span class="symbol">;</span>
|
536
|
-
|
537
|
-
<span class="normal"> </span><span class="keyword">switch</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">prop_id</span><span class="symbol">)</span>
|
538
|
-
<span class="normal"> </span><span class="cbracket">{</span>
|
539
|
-
<span class="normal"> </span><span class="keyword">case</span><span class="normal"> PROP_COUNT</span><span class="symbol">:</span>
|
540
|
-
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#g-value-set-int">g_value_set_int</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">value</span><span class="symbol">,</span><span class="normal"> myobj</span><span class="symbol">-></span><span class="normal">count</span><span class="symbol">);</span>
|
541
|
-
<span class="normal"> </span><span class="keyword">break</span><span class="symbol">;</span>
|
542
|
-
|
543
|
-
<span class="normal"> </span><span class="keyword">case</span><span class="normal"> PROP_NAME</span><span class="symbol">:</span>
|
544
|
-
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#g-value-set-string">g_value_set_string</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">value</span><span class="symbol">,</span><span class="normal"> myobj</span><span class="symbol">-></span><span class="normal">name</span><span class="symbol">);</span>
|
545
|
-
<span class="normal"> </span><span class="keyword">break</span><span class="symbol">;</span>
|
546
|
-
|
547
|
-
<span class="label"> default:</span>
|
548
|
-
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#G-OBJECT-WARN-INVALID-PROPERTY-ID:CAPS">G_OBJECT_WARN_INVALID_PROPERTY_ID</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">object</span><span class="symbol">,</span><span class="normal"> prop_id</span><span class="symbol">,</span><span class="normal"> pspec</span><span class="symbol">);</span>
|
549
|
-
<span class="normal"> </span><span class="cbracket">}</span>
|
550
|
-
<span class="cbracket">}</span>
|
551
|
-
|
552
|
-
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
|
553
|
-
<span class="function">my_object_set_property</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">object</span><span class="symbol">,</span>
|
554
|
-
<span class="normal"> </span><span class="usertype">guint</span><span class="normal"> prop_id</span><span class="symbol">,</span>
|
555
|
-
<span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">GValue</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">value</span><span class="symbol">,</span>
|
556
|
-
<span class="normal"> </span><span class="usertype">GParamSpec</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">pspec</span><span class="symbol">)</span>
|
557
|
-
<span class="cbracket">{</span>
|
558
|
-
<span class="normal"> </span><span class="usertype">MyObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">myobj </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">MyObject</span><span class="symbol">*)</span><span class="normal">object</span><span class="symbol">;</span>
|
559
|
-
|
560
|
-
<span class="normal"> </span><span class="keyword">switch</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">prop_id</span><span class="symbol">)</span>
|
561
|
-
<span class="normal"> </span><span class="cbracket">{</span>
|
562
|
-
<span class="normal"> </span><span class="keyword">case</span><span class="normal"> PROP_COUNT</span><span class="symbol">:</span>
|
563
|
-
<span class="normal"> myobj</span><span class="symbol">-></span><span class="normal">count </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#g-value-get-int">g_value_get_int</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">value</span><span class="symbol">);</span>
|
564
|
-
<span class="normal"> </span><span class="keyword">break</span><span class="symbol">;</span>
|
565
|
-
|
566
|
-
<span class="normal"> </span><span class="keyword">case</span><span class="normal"> PROP_NAME</span><span class="symbol">:</span>
|
567
|
-
<span class="normal"> </span><span class="function"><a href="../glib/glib-Memory-Allocation.html#g-free">g_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">myobj</span><span class="symbol">-></span><span class="normal">name</span><span class="symbol">);</span>
|
568
|
-
<span class="normal"> myobj</span><span class="symbol">-></span><span class="normal">name </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#g-value-dup-string">g_value_dup_string</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">value</span><span class="symbol">);</span>
|
569
|
-
<span class="normal"> </span><span class="keyword">break</span><span class="symbol">;</span>
|
570
|
-
|
571
|
-
<span class="label"> default:</span>
|
572
|
-
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#G-OBJECT-WARN-INVALID-PROPERTY-ID:CAPS">G_OBJECT_WARN_INVALID_PROPERTY_ID</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">object</span><span class="symbol">,</span><span class="normal"> prop_id</span><span class="symbol">,</span><span class="normal"> pspec</span><span class="symbol">);</span>
|
573
|
-
<span class="normal"> </span><span class="cbracket">}</span>
|
574
|
-
<span class="cbracket">}</span>
|
575
|
-
|
576
|
-
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
|
577
|
-
<span class="function">my_object_class_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">MyObjectClass</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">class</span><span class="symbol">)</span>
|
578
|
-
<span class="cbracket">{</span>
|
579
|
-
<span class="normal"> </span><span class="usertype">GObjectClass</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">gobject_class </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#G-OBJECT-CLASS:CAPS">G_OBJECT_CLASS</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">class</span><span class="symbol">);</span>
|
580
|
-
|
581
|
-
<span class="normal"> gobject_class</span><span class="symbol">-></span><span class="normal">finalize </span><span class="symbol">=</span><span class="normal"> my_object_finalize</span><span class="symbol">;</span>
|
582
|
-
<span class="normal"> gobject_class</span><span class="symbol">-></span><span class="normal">set_property </span><span class="symbol">=</span><span class="normal"> my_object_set_property</span><span class="symbol">;</span>
|
583
|
-
<span class="normal"> gobject_class</span><span class="symbol">-></span><span class="normal">get_property </span><span class="symbol">=</span><span class="normal"> my_object_get_property</span><span class="symbol">;</span>
|
584
|
-
|
585
|
-
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-class-install-property">g_object_class_install_property</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">gobject_class</span><span class="symbol">,</span>
|
586
|
-
<span class="normal"> PROP_COUNT</span><span class="symbol">,</span>
|
587
|
-
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#g-param-spec-int">g_param_spec_int</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"count"</span><span class="symbol">,</span>
|
588
|
-
<span class="normal"> </span><span class="string">"Count"</span><span class="symbol">,</span>
|
589
|
-
<span class="normal"> </span><span class="string">"Count"</span><span class="symbol">,</span>
|
590
|
-
<span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">99999</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span>
|
591
|
-
<span class="normal"> <a href="../gobject/gobject-GParamSpec.html#G-PARAM-READWRITE:CAPS">G_PARAM_READWRITE</a></span><span class="symbol">));</span>
|
592
|
-
|
593
|
-
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-class-install-property">g_object_class_install_property</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">gobject_class</span><span class="symbol">,</span>
|
594
|
-
<span class="normal"> PROP_NAME</span><span class="symbol">,</span>
|
595
|
-
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#g-param-spec-string">g_param_spec_string</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"name"</span><span class="symbol">,</span>
|
596
|
-
<span class="normal"> </span><span class="string">"Name"</span><span class="symbol">,</span>
|
597
|
-
<span class="normal"> </span><span class="string">"Name"</span><span class="symbol">,</span>
|
598
|
-
<span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
|
599
|
-
<span class="normal"> <a href="../gobject/gobject-GParamSpec.html#G-PARAM-READWRITE:CAPS">G_PARAM_READWRITE</a></span><span class="symbol">));</span>
|
600
|
-
<span class="cbracket">}</span>
|
601
|
-
|
602
|
-
<span class="comment">/* A method that we want to export */</span>
|
603
|
-
<span class="type">void</span>
|
604
|
-
<span class="function">my_object_change_count</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">MyObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">myobj</span><span class="symbol">,</span>
|
605
|
-
<span class="normal"> </span><span class="usertype">gint</span><span class="normal"> change</span><span class="symbol">)</span>
|
606
|
-
<span class="cbracket">{</span>
|
607
|
-
<span class="normal"> myobj</span><span class="symbol">-></span><span class="normal">count </span><span class="symbol">=</span><span class="normal"> </span><span class="number">2</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> myobj</span><span class="symbol">-></span><span class="normal">count </span><span class="symbol">+</span><span class="normal"> change</span><span class="symbol">;</span>
|
608
|
-
|
609
|
-
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-notify">g_object_notify</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#G-OBJECT:CAPS">G_OBJECT</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">myobj</span><span class="symbol">),</span><span class="normal"> </span><span class="string">"count"</span><span class="symbol">);</span>
|
610
|
-
<span class="cbracket">}</span>
|
611
|
-
|
612
|
-
<span class="comment">/* ---------------------------------------------------------------------------------------------------- */</span>
|
613
|
-
|
614
|
-
<span class="keyword">static</span><span class="normal"> </span><span class="usertype">GDBusNodeInfo</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">introspection_data </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
|
615
|
-
|
616
|
-
<span class="comment">/* Introspection data for the service we are exporting */</span>
|
617
|
-
<span class="keyword">static</span><span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> introspection_xml</span><span class="symbol">[]</span><span class="normal"> </span><span class="symbol">=</span>
|
618
|
-
<span class="normal"> </span><span class="string">"<node>"</span>
|
619
|
-
<span class="normal"> </span><span class="string">" <interface name='org.myorg.MyObject'>"</span>
|
620
|
-
<span class="normal"> </span><span class="string">" <method name='ChangeCount'>"</span>
|
621
|
-
<span class="normal"> </span><span class="string">" <arg type='i' name='change' direction='in'/>"</span>
|
622
|
-
<span class="normal"> </span><span class="string">" </method>"</span>
|
623
|
-
<span class="normal"> </span><span class="string">" <property type='i' name='Count' access='read'/>"</span>
|
624
|
-
<span class="normal"> </span><span class="string">" <property type='s' name='Name' access='readwrite'/>"</span>
|
625
|
-
<span class="normal"> </span><span class="string">" </interface>"</span>
|
626
|
-
<span class="normal"> </span><span class="string">"</node>"</span><span class="symbol">;</span>
|
627
|
-
|
628
|
-
|
629
|
-
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
|
630
|
-
<span class="function">handle_method_call</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GDBusConnection</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">connection</span><span class="symbol">,</span>
|
631
|
-
<span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">sender</span><span class="symbol">,</span>
|
632
|
-
<span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">object_path</span><span class="symbol">,</span>
|
633
|
-
<span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">interface_name</span><span class="symbol">,</span>
|
634
|
-
<span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">method_name</span><span class="symbol">,</span>
|
635
|
-
<span class="normal"> </span><span class="usertype">GVariant</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">parameters</span><span class="symbol">,</span>
|
636
|
-
<span class="normal"> </span><span class="usertype">GDBusMethodInvocation</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">invocation</span><span class="symbol">,</span>
|
637
|
-
<span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
|
638
|
-
<span class="cbracket">{</span>
|
639
|
-
<span class="normal"> </span><span class="usertype">MyObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">myobj </span><span class="symbol">=</span><span class="normal"> user_data</span><span class="symbol">;</span>
|
640
|
-
|
641
|
-
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">method_name</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"ChangeCount"</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">==</span><span class="normal"> </span><span class="number">0</span><span class="symbol">)</span>
|
642
|
-
<span class="normal"> </span><span class="cbracket">{</span>
|
643
|
-
<span class="normal"> </span><span class="usertype">gint</span><span class="normal"> change</span><span class="symbol">;</span>
|
644
|
-
<span class="normal"> </span><span class="function"><a href="../glib/glib-GVariant.html#g-variant-get">g_variant_get</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">parameters</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"(i)"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">change</span><span class="symbol">);</span>
|
645
|
-
|
646
|
-
<span class="normal"> </span><span class="function">my_object_change_count</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">myobj</span><span class="symbol">,</span><span class="normal"> change</span><span class="symbol">);</span>
|
647
|
-
|
648
|
-
<span class="normal"> </span><span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-value">g_dbus_method_invocation_return_value</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">invocation</span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
|
649
|
-
<span class="normal"> </span><span class="cbracket">}</span>
|
650
|
-
<span class="cbracket">}</span>
|
651
|
-
|
652
|
-
<span class="keyword">static</span><span class="normal"> <a href="../glib/glib-GVariant.html#GVariant">GVariant</a> </span><span class="symbol">*</span>
|
653
|
-
<span class="function">handle_get_property</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GDBusConnection</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">connection</span><span class="symbol">,</span>
|
654
|
-
<span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">sender</span><span class="symbol">,</span>
|
655
|
-
<span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">object_path</span><span class="symbol">,</span>
|
656
|
-
<span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">interface_name</span><span class="symbol">,</span>
|
657
|
-
<span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">property_name</span><span class="symbol">,</span>
|
658
|
-
<span class="normal"> </span><span class="usertype">GError</span><span class="normal"> </span><span class="symbol">**</span><span class="normal">error</span><span class="symbol">,</span>
|
659
|
-
<span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
|
660
|
-
<span class="cbracket">{</span>
|
661
|
-
<span class="normal"> </span><span class="usertype">GVariant</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">ret</span><span class="symbol">;</span>
|
662
|
-
<span class="normal"> </span><span class="usertype">MyObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">myobj </span><span class="symbol">=</span><span class="normal"> user_data</span><span class="symbol">;</span>
|
663
|
-
|
664
|
-
<span class="normal"> ret </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
|
665
|
-
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">property_name</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Count"</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">==</span><span class="normal"> </span><span class="number">0</span><span class="symbol">)</span>
|
666
|
-
<span class="normal"> </span><span class="cbracket">{</span>
|
667
|
-
<span class="normal"> ret </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-GVariant.html#g-variant-new-int32">g_variant_new_int32</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">myobj</span><span class="symbol">-></span><span class="normal">count</span><span class="symbol">);</span>
|
668
|
-
<span class="normal"> </span><span class="cbracket">}</span>
|
669
|
-
<span class="normal"> </span><span class="keyword">else</span><span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">property_name</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Name"</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">==</span><span class="normal"> </span><span class="number">0</span><span class="symbol">)</span>
|
670
|
-
<span class="normal"> </span><span class="cbracket">{</span>
|
671
|
-
<span class="normal"> ret </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-GVariant.html#g-variant-new-string">g_variant_new_string</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">myobj</span><span class="symbol">-></span><span class="normal">name </span><span class="symbol">?</span><span class="normal"> myobj</span><span class="symbol">-></span><span class="normal">name </span><span class="symbol">:</span><span class="normal"> </span><span class="string">""</span><span class="symbol">);</span>
|
672
|
-
<span class="normal"> </span><span class="cbracket">}</span>
|
673
|
-
|
674
|
-
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> ret</span><span class="symbol">;</span>
|
675
|
-
<span class="cbracket">}</span>
|
676
|
-
|
677
|
-
<span class="keyword">static</span><span class="normal"> <a href="../glib/glib-Basic-Types.html#gboolean">gboolean</a></span>
|
678
|
-
<span class="function">handle_set_property</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GDBusConnection</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">connection</span><span class="symbol">,</span>
|
679
|
-
<span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">sender</span><span class="symbol">,</span>
|
680
|
-
<span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">object_path</span><span class="symbol">,</span>
|
681
|
-
<span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">interface_name</span><span class="symbol">,</span>
|
682
|
-
<span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">property_name</span><span class="symbol">,</span>
|
683
|
-
<span class="normal"> </span><span class="usertype">GVariant</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">value</span><span class="symbol">,</span>
|
684
|
-
<span class="normal"> </span><span class="usertype">GError</span><span class="normal"> </span><span class="symbol">**</span><span class="normal">error</span><span class="symbol">,</span>
|
685
|
-
<span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
|
686
|
-
<span class="cbracket">{</span>
|
687
|
-
<span class="normal"> </span><span class="usertype">MyObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">myobj </span><span class="symbol">=</span><span class="normal"> user_data</span><span class="symbol">;</span>
|
688
|
-
|
689
|
-
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">property_name</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Count"</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">==</span><span class="normal"> </span><span class="number">0</span><span class="symbol">)</span>
|
690
|
-
<span class="normal"> </span><span class="cbracket">{</span>
|
691
|
-
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-set">g_object_set</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">myobj</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"count"</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="../glib/glib-GVariant.html#g-variant-get-int32">g_variant_get_int32</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">value</span><span class="symbol">),</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
|
692
|
-
<span class="normal"> </span><span class="cbracket">}</span>
|
693
|
-
<span class="normal"> </span><span class="keyword">else</span><span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">property_name</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Name"</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">==</span><span class="normal"> </span><span class="number">0</span><span class="symbol">)</span>
|
694
|
-
<span class="normal"> </span><span class="cbracket">{</span>
|
695
|
-
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-set">g_object_set</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">myobj</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"name"</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="../glib/glib-GVariant.html#g-variant-get-string">g_variant_get_string</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">value</span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">),</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
|
696
|
-
<span class="normal"> </span><span class="cbracket">}</span>
|
697
|
-
|
698
|
-
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">;</span>
|
699
|
-
<span class="cbracket">}</span>
|
700
|
-
|
701
|
-
|
702
|
-
<span class="comment">/* for now */</span>
|
703
|
-
<span class="keyword">static</span><span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">GDBusInterfaceVTable</span><span class="normal"> interface_vtable </span><span class="symbol">=</span>
|
704
|
-
<span class="cbracket">{</span>
|
705
|
-
<span class="normal"> handle_method_call</span><span class="symbol">,</span>
|
706
|
-
<span class="normal"> handle_get_property</span><span class="symbol">,</span>
|
707
|
-
<span class="normal"> handle_set_property</span>
|
708
|
-
<span class="cbracket">}</span><span class="symbol">;</span>
|
709
|
-
|
710
|
-
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
|
711
|
-
<span class="function">send_property_change</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">obj</span><span class="symbol">,</span>
|
712
|
-
<span class="normal"> </span><span class="usertype">GParamSpec</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">pspec</span><span class="symbol">,</span>
|
713
|
-
<span class="normal"> </span><span class="usertype">GDBusConnection</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">connection</span><span class="symbol">)</span>
|
714
|
-
<span class="cbracket">{</span>
|
715
|
-
<span class="normal"> </span><span class="usertype">GVariantBuilder</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">builder</span><span class="symbol">;</span>
|
716
|
-
<span class="normal"> </span><span class="usertype">GVariantBuilder</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">invalidated_builder</span><span class="symbol">;</span>
|
717
|
-
<span class="normal"> </span><span class="usertype">MyObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">myobj </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">MyObject </span><span class="symbol">*)</span><span class="normal">obj</span><span class="symbol">;</span>
|
718
|
-
|
719
|
-
<span class="normal"> builder </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-GVariant.html#g-variant-builder-new">g_variant_builder_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE-ARRAY:CAPS">G_VARIANT_TYPE_ARRAY</a></span><span class="symbol">);</span>
|
720
|
-
<span class="normal"> invalidated_builder </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-GVariant.html#g-variant-builder-new">g_variant_builder_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="../glib/glib-GVariantType.html#G-VARIANT-TYPE:CAPS">G_VARIANT_TYPE</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"as"</span><span class="symbol">));</span>
|
721
|
-
|
722
|
-
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">pspec</span><span class="symbol">-></span><span class="normal">name</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"count"</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">==</span><span class="normal"> </span><span class="number">0</span><span class="symbol">)</span>
|
723
|
-
<span class="normal"> </span><span class="function"><a href="../glib/glib-GVariant.html#g-variant-builder-add">g_variant_builder_add</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">builder</span><span class="symbol">,</span>
|
724
|
-
<span class="normal"> </span><span class="string">"{sv}"</span><span class="symbol">,</span>
|
725
|
-
<span class="normal"> </span><span class="string">"Count"</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="../glib/glib-GVariant.html#g-variant-new-int32">g_variant_new_int32</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">myobj</span><span class="symbol">-></span><span class="normal">count</span><span class="symbol">));</span>
|
726
|
-
<span class="normal"> </span><span class="keyword">else</span><span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">pspec</span><span class="symbol">-></span><span class="normal">name</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"name"</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">==</span><span class="normal"> </span><span class="number">0</span><span class="symbol">)</span>
|
727
|
-
<span class="normal"> </span><span class="function"><a href="../glib/glib-GVariant.html#g-variant-builder-add">g_variant_builder_add</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">builder</span><span class="symbol">,</span>
|
728
|
-
<span class="normal"> </span><span class="string">"{sv}"</span><span class="symbol">,</span>
|
729
|
-
<span class="normal"> </span><span class="string">"Name"</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="../glib/glib-GVariant.html#g-variant-new-string">g_variant_new_string</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">myobj</span><span class="symbol">-></span><span class="normal">name </span><span class="symbol">?</span><span class="normal"> myobj</span><span class="symbol">-></span><span class="normal">name </span><span class="symbol">:</span><span class="normal"> </span><span class="string">""</span><span class="symbol">));</span>
|
730
|
-
|
731
|
-
<span class="normal"> </span><span class="function"><a href="GDBusConnection.html#g-dbus-connection-emit-signal">g_dbus_connection_emit_signal</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">connection</span><span class="symbol">,</span>
|
732
|
-
<span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
|
733
|
-
<span class="normal"> </span><span class="string">"/org/myorg/MyObject"</span><span class="symbol">,</span>
|
734
|
-
<span class="normal"> </span><span class="string">"org.freedesktop.DBus.Properties"</span><span class="symbol">,</span>
|
735
|
-
<span class="normal"> </span><span class="string">"PropertiesChanged"</span><span class="symbol">,</span>
|
736
|
-
<span class="normal"> </span><span class="function"><a href="../glib/glib-GVariant.html#g-variant-new">g_variant_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"(sa{sv}as)"</span><span class="symbol">,</span>
|
737
|
-
<span class="normal"> </span><span class="string">"org.myorg.MyObject"</span><span class="symbol">,</span>
|
738
|
-
<span class="normal"> builder</span><span class="symbol">,</span>
|
739
|
-
<span class="normal"> invalidated_builder</span><span class="symbol">),</span>
|
740
|
-
<span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
|
741
|
-
<span class="cbracket">}</span>
|
742
|
-
|
743
|
-
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
|
744
|
-
<span class="function">on_bus_acquired</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GDBusConnection</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">connection</span><span class="symbol">,</span>
|
745
|
-
<span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">name</span><span class="symbol">,</span>
|
746
|
-
<span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
|
747
|
-
<span class="cbracket">{</span>
|
748
|
-
<span class="normal"> </span><span class="usertype">MyObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">myobj </span><span class="symbol">=</span><span class="normal"> user_data</span><span class="symbol">;</span>
|
749
|
-
<span class="normal"> </span><span class="usertype">guint</span><span class="normal"> registration_id</span><span class="symbol">;</span>
|
750
|
-
|
751
|
-
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">myobj</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"notify"</span><span class="symbol">,</span>
|
752
|
-
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">send_property_change</span><span class="symbol">),</span><span class="normal"> connection</span><span class="symbol">);</span>
|
753
|
-
<span class="normal"> registration_id </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GDBusConnection.html#g-dbus-connection-register-object">g_dbus_connection_register_object</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">connection</span><span class="symbol">,</span>
|
754
|
-
<span class="normal"> </span><span class="string">"/org/myorg/MyObject"</span><span class="symbol">,</span>
|
755
|
-
<span class="normal"> introspection_data</span><span class="symbol">-></span><span class="normal">interfaces</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">],</span>
|
756
|
-
<span class="normal"> </span><span class="symbol">&</span><span class="normal">interface_vtable</span><span class="symbol">,</span>
|
757
|
-
<span class="normal"> myobj</span><span class="symbol">,</span>
|
758
|
-
<span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span><span class="normal"> </span><span class="comment">/* user_data_free_func */</span>
|
759
|
-
<span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span><span class="normal"> </span><span class="comment">/* GError** */</span>
|
760
|
-
<span class="normal"> </span><span class="function"><a href="../glib/glib-Testing.html#g-assert">g_assert</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">registration_id </span><span class="symbol">></span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span>
|
761
|
-
<span class="cbracket">}</span>
|
762
|
-
|
763
|
-
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
|
764
|
-
<span class="function">on_name_acquired</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GDBusConnection</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">connection</span><span class="symbol">,</span>
|
765
|
-
<span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">name</span><span class="symbol">,</span>
|
766
|
-
<span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
|
767
|
-
<span class="cbracket">{</span>
|
768
|
-
<span class="cbracket">}</span>
|
769
|
-
|
770
|
-
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
|
771
|
-
<span class="function">on_name_lost</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GDBusConnection</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">connection</span><span class="symbol">,</span>
|
772
|
-
<span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">name</span><span class="symbol">,</span>
|
773
|
-
<span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
|
774
|
-
<span class="cbracket">{</span>
|
775
|
-
<span class="normal"> </span><span class="function">exit</span><span class="normal"> </span><span class="symbol">(</span><span class="number">1</span><span class="symbol">);</span>
|
776
|
-
<span class="cbracket">}</span>
|
777
|
-
|
778
|
-
<span class="type">int</span>
|
779
|
-
<span class="function">main</span><span class="normal"> </span><span class="symbol">(</span><span class="type">int</span><span class="normal"> argc</span><span class="symbol">,</span><span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">argv</span><span class="symbol">[])</span>
|
780
|
-
<span class="cbracket">{</span>
|
781
|
-
<span class="normal"> </span><span class="usertype">guint</span><span class="normal"> owner_id</span><span class="symbol">;</span>
|
782
|
-
<span class="normal"> </span><span class="usertype">GMainLoop</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">loop</span><span class="symbol">;</span>
|
783
|
-
<span class="normal"> </span><span class="usertype">MyObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">myobj</span><span class="symbol">;</span>
|
784
|
-
|
785
|
-
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-Type-Information.html#g-type-init">g_type_init</a></span><span class="normal"> </span><span class="symbol">();</span>
|
786
|
-
|
787
|
-
<span class="normal"> </span><span class="comment">/* We are lazy here - we don't want to manually provide</span>
|
788
|
-
<span class="comment"> * the introspection data structures - so we just build</span>
|
789
|
-
<span class="comment"> * them from XML.</span>
|
790
|
-
<span class="comment"> */</span>
|
791
|
-
<span class="normal"> introspection_data </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gio-D-Bus-Introspection-Data.html#g-dbus-node-info-new-for-xml">g_dbus_node_info_new_for_xml</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">introspection_xml</span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
|
792
|
-
<span class="normal"> </span><span class="function"><a href="../glib/glib-Testing.html#g-assert">g_assert</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">introspection_data </span><span class="symbol">!=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
|
793
|
-
|
794
|
-
<span class="normal"> myobj </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-new">g_object_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">my_object_get_type</span><span class="normal"> </span><span class="symbol">(),</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
|
795
|
-
|
796
|
-
<span class="normal"> owner_id </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gio-Owning-Bus-Names.html#g-bus-own-name">g_bus_own_name</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="GDBusConnection.html#G-BUS-TYPE-SESSION:CAPS">G_BUS_TYPE_SESSION</a></span><span class="symbol">,</span>
|
797
|
-
<span class="normal"> </span><span class="string">"org.myorg.MyObject"</span><span class="symbol">,</span>
|
798
|
-
<span class="normal"> <a href="gio-Owning-Bus-Names.html#G-BUS-NAME-OWNER-FLAGS-NONE:CAPS">G_BUS_NAME_OWNER_FLAGS_NONE</a></span><span class="symbol">,</span>
|
799
|
-
<span class="normal"> on_bus_acquired</span><span class="symbol">,</span>
|
800
|
-
<span class="normal"> on_name_acquired</span><span class="symbol">,</span>
|
801
|
-
<span class="normal"> on_name_lost</span><span class="symbol">,</span>
|
802
|
-
<span class="normal"> myobj</span><span class="symbol">,</span>
|
803
|
-
<span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
|
804
|
-
|
805
|
-
<span class="normal"> loop </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-The-Main-Event-Loop.html#g-main-loop-new">g_main_loop_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">);</span>
|
806
|
-
<span class="normal"> </span><span class="function"><a href="../glib/glib-The-Main-Event-Loop.html#g-main-loop-run">g_main_loop_run</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">loop</span><span class="symbol">);</span>
|
807
|
-
|
808
|
-
<span class="normal"> </span><span class="function"><a href="gio-Owning-Bus-Names.html#g-bus-unown-name">g_bus_unown_name</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">owner_id</span><span class="symbol">);</span>
|
809
|
-
|
810
|
-
<span class="normal"> </span><span class="function"><a href="gio-D-Bus-Introspection-Data.html#g-dbus-node-info-unref">g_dbus_node_info_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">introspection_data</span><span class="symbol">);</span>
|
811
|
-
|
812
|
-
<span class="normal"> </span><span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">myobj</span><span class="symbol">);</span>
|
813
|
-
|
814
|
-
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span>
|
815
|
-
<span class="cbracket">}</span></pre></td>
|
816
|
-
</tr>
|
817
|
-
</tbody>
|
818
|
-
</table>
|
819
|
-
</div>
|
820
|
-
|
821
|
-
</div>
|
822
|
-
<br class="example-break">
|
823
|
-
</div>
|
824
|
-
<div class="footer">
|
825
|
-
<hr>
|
826
|
-
Generated by GTK-Doc V1.17</div>
|
827
|
-
</body>
|
828
|
-
</html>
|