glib2 2.0.0-x86-mingw32 → 2.0.1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1463) hide show
  1. data/Rakefile +8 -7
  2. data/ext/glib2/extconf.rb +1 -0
  3. data/ext/glib2/glib2.def +7 -0
  4. data/ext/glib2/rbglib.c +32 -1
  5. data/ext/glib2/rbglib.h +18 -1
  6. data/ext/glib2/rbglib_iochannel.c +1 -5
  7. data/ext/glib2/rbglib_utils.c +1 -1
  8. data/ext/glib2/rbgobj_boxed.c +16 -0
  9. data/ext/glib2/rbgobj_object.c +2 -2
  10. data/ext/glib2/rbgobj_type.c +36 -4
  11. data/ext/glib2/rbgobject.c +4 -4
  12. data/ext/glib2/rbgobject.h +11 -5
  13. data/ext/glib2/rbgutil.c +1 -1
  14. data/lib/1.9/glib2.so +0 -0
  15. data/lib/2.0/glib2.so +0 -0
  16. data/lib/gnome2/rake/package-task.rb +1 -1
  17. data/vendor/local/bin/certtool.exe +0 -0
  18. data/vendor/local/bin/danetool.exe +0 -0
  19. data/vendor/local/bin/gdbus.exe +0 -0
  20. data/vendor/local/bin/gio-querymodules.exe +0 -0
  21. data/vendor/local/bin/glib-compile-resources.exe +0 -0
  22. data/vendor/local/bin/glib-compile-schemas.exe +0 -0
  23. data/vendor/local/bin/glib-genmarshal.exe +0 -0
  24. data/vendor/local/bin/glib-gettextize +1 -1
  25. data/vendor/local/bin/glib-mkenums +1 -1
  26. data/vendor/local/bin/gnutls-cli-debug.exe +0 -0
  27. data/vendor/local/bin/gnutls-cli.exe +0 -0
  28. data/vendor/local/bin/gnutls-serv.exe +0 -0
  29. data/vendor/local/bin/gobject-query.exe +0 -0
  30. data/vendor/local/bin/gresource.exe +0 -0
  31. data/vendor/local/bin/gsettings.exe +0 -0
  32. data/vendor/local/bin/gspawn-win32-helper-console.exe +0 -0
  33. data/vendor/local/bin/gspawn-win32-helper.exe +0 -0
  34. data/vendor/local/bin/libgio-2.0-0.dll +0 -0
  35. data/vendor/local/bin/libglib-2.0-0.dll +0 -0
  36. data/vendor/local/bin/libgmodule-2.0-0.dll +0 -0
  37. data/vendor/local/bin/libgmp-10.dll +0 -0
  38. data/vendor/local/bin/libgnutls-28.def +748 -745
  39. data/vendor/local/bin/libgnutls-28.dll +0 -0
  40. data/vendor/local/bin/libgnutls-openssl-27.dll +0 -0
  41. data/vendor/local/bin/libgnutls-xssl-0.dll +0 -0
  42. data/vendor/local/bin/libgnutlsxx-28.dll +0 -0
  43. data/vendor/local/bin/libgobject-2.0-0.dll +0 -0
  44. data/vendor/local/bin/libgthread-2.0-0.dll +0 -0
  45. data/vendor/local/bin/libhogweed-2-2.dll +0 -0
  46. data/vendor/local/bin/libhogweed-2-4.dll +0 -0
  47. data/vendor/local/bin/libnettle-4-4.dll +0 -0
  48. data/vendor/local/bin/libnettle-4-6.dll +0 -0
  49. data/vendor/local/bin/nettle-hash.exe +0 -0
  50. data/vendor/local/bin/nettle-lfib-stream.exe +0 -0
  51. data/vendor/local/bin/ocsptool.exe +0 -0
  52. data/vendor/local/bin/pkcs1-conv.exe +0 -0
  53. data/vendor/local/bin/psktool.exe +0 -0
  54. data/vendor/local/bin/sexp-conv.exe +0 -0
  55. data/vendor/local/bin/srptool.exe +0 -0
  56. data/vendor/local/include/gmp.h +1 -1
  57. data/vendor/local/include/gnutls/abstract.h +34 -11
  58. data/vendor/local/include/gnutls/gnutls.h +20 -4
  59. data/vendor/local/include/gnutls/ocsp.h +1 -1
  60. data/vendor/local/include/gnutls/x509.h +1 -1
  61. data/vendor/local/include/nettle/aes.h +2 -2
  62. data/vendor/local/include/nettle/arcfour.h +2 -2
  63. data/vendor/local/include/nettle/arctwo.h +2 -2
  64. data/vendor/local/include/nettle/asn1.h +2 -2
  65. data/vendor/local/include/nettle/base16.h +2 -2
  66. data/vendor/local/include/nettle/base64.h +2 -2
  67. data/vendor/local/include/nettle/bignum.h +2 -2
  68. data/vendor/local/include/nettle/blowfish.h +2 -2
  69. data/vendor/local/include/nettle/buffer.h +2 -2
  70. data/vendor/local/include/nettle/cast128.h +2 -2
  71. data/vendor/local/include/nettle/cbc.h +2 -2
  72. data/vendor/local/include/nettle/ctr.h +2 -2
  73. data/vendor/local/include/nettle/des-compat.h +2 -2
  74. data/vendor/local/include/nettle/des.h +2 -2
  75. data/vendor/local/include/nettle/dsa.h +4 -3
  76. data/vendor/local/include/nettle/ecc-curve.h +45 -0
  77. data/vendor/local/include/nettle/ecc.h +261 -0
  78. data/vendor/local/include/nettle/ecdsa.h +94 -0
  79. data/vendor/local/include/nettle/gcm.h +2 -2
  80. data/vendor/local/include/nettle/gosthash94.h +88 -0
  81. data/vendor/local/include/nettle/hmac.h +4 -3
  82. data/vendor/local/include/nettle/knuth-lfib.h +2 -2
  83. data/vendor/local/include/nettle/macros.h +31 -9
  84. data/vendor/local/include/nettle/md2.h +2 -2
  85. data/vendor/local/include/nettle/md4.h +2 -2
  86. data/vendor/local/include/nettle/md5-compat.h +2 -2
  87. data/vendor/local/include/nettle/md5.h +2 -2
  88. data/vendor/local/include/nettle/nettle-meta.h +7 -2
  89. data/vendor/local/include/nettle/nettle-types.h +2 -2
  90. data/vendor/local/include/nettle/pbkdf2.h +77 -0
  91. data/vendor/local/include/nettle/pgp.h +2 -2
  92. data/vendor/local/include/nettle/pkcs1.h +2 -2
  93. data/vendor/local/include/nettle/realloc.h +2 -2
  94. data/vendor/local/include/nettle/ripemd160.h +2 -2
  95. data/vendor/local/include/nettle/rsa-compat.h +2 -2
  96. data/vendor/local/include/nettle/rsa.h +4 -3
  97. data/vendor/local/include/nettle/salsa20.h +17 -6
  98. data/vendor/local/include/nettle/serpent.h +2 -2
  99. data/vendor/local/include/nettle/sexp.h +2 -2
  100. data/vendor/local/include/nettle/sha.h +8 -167
  101. data/vendor/local/include/nettle/sha1.h +78 -0
  102. data/vendor/local/include/nettle/sha2.h +156 -0
  103. data/vendor/local/include/nettle/sha3.h +176 -0
  104. data/vendor/local/include/nettle/twofish.h +2 -2
  105. data/vendor/local/include/nettle/umac.h +241 -0
  106. data/vendor/local/include/nettle/yarrow.h +3 -3
  107. data/vendor/local/lib/gio/modules/libgiognutls.a +0 -0
  108. data/vendor/local/lib/gio/modules/libgiognutls.dll +0 -0
  109. data/vendor/local/lib/gio/modules/libgiognutls.dll.a +0 -0
  110. data/vendor/local/lib/glib-2.0/include/glibconfig.h +1 -1
  111. data/vendor/local/lib/libgio-2.0.dll.a +0 -0
  112. data/vendor/local/lib/libgio-2.0.la +1 -1
  113. data/vendor/local/lib/libglib-2.0.dll.a +0 -0
  114. data/vendor/local/lib/libglib-2.0.la +1 -1
  115. data/vendor/local/lib/libgmodule-2.0.dll.a +0 -0
  116. data/vendor/local/lib/libgmodule-2.0.la +1 -1
  117. data/vendor/local/lib/libgmp.dll.a +0 -0
  118. data/vendor/local/lib/libgmp.la +1 -1
  119. data/vendor/local/lib/libgnutls-openssl.a +0 -0
  120. data/vendor/local/lib/libgnutls-openssl.dll.a +0 -0
  121. data/vendor/local/lib/libgnutls-xssl.a +0 -0
  122. data/vendor/local/lib/libgnutls-xssl.dll.a +0 -0
  123. data/vendor/local/lib/libgnutls.a +0 -0
  124. data/vendor/local/lib/libgnutls.dll.a +0 -0
  125. data/vendor/local/lib/libgnutls.la +2 -2
  126. data/vendor/local/lib/libgnutlsxx.a +0 -0
  127. data/vendor/local/lib/libgnutlsxx.dll.a +0 -0
  128. data/vendor/local/lib/libgobject-2.0.dll.a +0 -0
  129. data/vendor/local/lib/libgobject-2.0.la +1 -1
  130. data/vendor/local/lib/libgthread-2.0.dll.a +0 -0
  131. data/vendor/local/lib/libgthread-2.0.la +1 -1
  132. data/vendor/local/lib/libhogweed.a +0 -0
  133. data/vendor/local/lib/libhogweed.dll.a +0 -0
  134. data/vendor/local/lib/libnettle.a +0 -0
  135. data/vendor/local/lib/libnettle.dll.a +0 -0
  136. data/vendor/local/lib/pkgconfig/gio-2.0.pc +2 -2
  137. data/vendor/local/lib/pkgconfig/gio-windows-2.0.pc +1 -1
  138. data/vendor/local/lib/pkgconfig/glib-2.0.pc +1 -1
  139. data/vendor/local/lib/pkgconfig/gmodule-2.0.pc +1 -1
  140. data/vendor/local/lib/pkgconfig/gmodule-export-2.0.pc +1 -1
  141. data/vendor/local/lib/pkgconfig/gmodule-no-export-2.0.pc +1 -1
  142. data/vendor/local/lib/pkgconfig/gnutls.pc +2 -2
  143. data/vendor/local/lib/pkgconfig/gobject-2.0.pc +1 -1
  144. data/vendor/local/lib/pkgconfig/gthread-2.0.pc +1 -1
  145. data/vendor/local/lib/pkgconfig/hogweed.pc +1 -1
  146. data/vendor/local/lib/pkgconfig/nettle.pc +1 -1
  147. data/vendor/local/share/gdb/auto-load/libglib-2.0.so.0.3600.1-gdb.py +10 -0
  148. data/vendor/local/share/gdb/auto-load/libglib-2.0.so.0.3600.2-gdb.py +10 -0
  149. data/vendor/local/share/gdb/auto-load/libgobject-2.0.so.0.3600.1-gdb.py +10 -0
  150. data/vendor/local/share/gdb/auto-load/libgobject-2.0.so.0.3600.2-gdb.py +10 -0
  151. data/vendor/local/share/glib-2.0/codegen/__init__.pyc +0 -0
  152. data/vendor/local/share/glib-2.0/codegen/__init__.pyo +0 -0
  153. data/vendor/local/share/glib-2.0/codegen/codegen.pyc +0 -0
  154. data/vendor/local/share/glib-2.0/codegen/codegen.pyo +0 -0
  155. data/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyc +0 -0
  156. data/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyo +0 -0
  157. data/vendor/local/share/glib-2.0/codegen/codegen_main.pyc +0 -0
  158. data/vendor/local/share/glib-2.0/codegen/codegen_main.pyo +0 -0
  159. data/vendor/local/share/glib-2.0/codegen/config.py +1 -1
  160. data/vendor/local/share/glib-2.0/codegen/config.pyc +0 -0
  161. data/vendor/local/share/glib-2.0/codegen/config.pyo +0 -0
  162. data/vendor/local/share/glib-2.0/codegen/dbustypes.pyc +0 -0
  163. data/vendor/local/share/glib-2.0/codegen/dbustypes.pyo +0 -0
  164. data/vendor/local/share/glib-2.0/codegen/parser.pyc +0 -0
  165. data/vendor/local/share/glib-2.0/codegen/parser.pyo +0 -0
  166. data/vendor/local/share/glib-2.0/codegen/utils.pyc +0 -0
  167. data/vendor/local/share/glib-2.0/codegen/utils.pyo +0 -0
  168. data/vendor/local/share/gtk-doc/html/gio/ExampleAnimal.html +1 -1
  169. data/vendor/local/share/gtk-doc/html/gio/ExampleCat.html +1 -1
  170. data/vendor/local/share/gtk-doc/html/gio/ExampleObject.html +1 -1
  171. data/vendor/local/share/gtk-doc/html/gio/ExampleObjectManagerClient.html +1 -1
  172. data/vendor/local/share/gtk-doc/html/gio/GAction.html +2 -2
  173. data/vendor/local/share/gtk-doc/html/gio/GActionGroup.html +1 -1
  174. data/vendor/local/share/gtk-doc/html/gio/GActionMap.html +27 -27
  175. data/vendor/local/share/gtk-doc/html/gio/GAppInfo.html +2 -2
  176. data/vendor/local/share/gtk-doc/html/gio/GApplication.html +251 -251
  177. data/vendor/local/share/gtk-doc/html/gio/GApplicationCommandLine.html +1 -1
  178. data/vendor/local/share/gtk-doc/html/gio/GAsyncInitable.html +70 -70
  179. data/vendor/local/share/gtk-doc/html/gio/GAsyncResult.html +30 -30
  180. data/vendor/local/share/gtk-doc/html/gio/GBufferedInputStream.html +1 -1
  181. data/vendor/local/share/gtk-doc/html/gio/GBufferedOutputStream.html +1 -1
  182. data/vendor/local/share/gtk-doc/html/gio/GCancellable.html +17 -17
  183. data/vendor/local/share/gtk-doc/html/gio/GCharsetConverter.html +1 -1
  184. data/vendor/local/share/gtk-doc/html/gio/GConverter.html +1 -1
  185. data/vendor/local/share/gtk-doc/html/gio/GCredentials.html +1 -1
  186. data/vendor/local/share/gtk-doc/html/gio/GDBusActionGroup.html +1 -1
  187. data/vendor/local/share/gtk-doc/html/gio/GDBusAuthObserver.html +19 -19
  188. data/vendor/local/share/gtk-doc/html/gio/GDBusConnection.html +1290 -1290
  189. data/vendor/local/share/gtk-doc/html/gio/GDBusInterface.html +1 -1
  190. data/vendor/local/share/gtk-doc/html/gio/GDBusInterfaceSkeleton.html +1 -1
  191. data/vendor/local/share/gtk-doc/html/gio/GDBusMenuModel.html +1 -1
  192. data/vendor/local/share/gtk-doc/html/gio/GDBusMessage.html +1 -1
  193. data/vendor/local/share/gtk-doc/html/gio/GDBusMethodInvocation.html +1 -1
  194. data/vendor/local/share/gtk-doc/html/gio/GDBusObject.html +1 -1
  195. data/vendor/local/share/gtk-doc/html/gio/GDBusObjectManager.html +1 -1
  196. data/vendor/local/share/gtk-doc/html/gio/GDBusObjectManagerClient.html +1 -1
  197. data/vendor/local/share/gtk-doc/html/gio/GDBusObjectManagerServer.html +1 -1
  198. data/vendor/local/share/gtk-doc/html/gio/GDBusObjectProxy.html +1 -1
  199. data/vendor/local/share/gtk-doc/html/gio/GDBusObjectSkeleton.html +1 -1
  200. data/vendor/local/share/gtk-doc/html/gio/GDBusProxy.html +228 -228
  201. data/vendor/local/share/gtk-doc/html/gio/GDBusServer.html +202 -202
  202. data/vendor/local/share/gtk-doc/html/gio/GDataInputStream.html +1 -1
  203. data/vendor/local/share/gtk-doc/html/gio/GDataOutputStream.html +1 -1
  204. data/vendor/local/share/gtk-doc/html/gio/GDrive.html +1 -1
  205. data/vendor/local/share/gtk-doc/html/gio/GEmblem.html +1 -1
  206. data/vendor/local/share/gtk-doc/html/gio/GEmblemedIcon.html +1 -1
  207. data/vendor/local/share/gtk-doc/html/gio/GFile.html +1 -1
  208. data/vendor/local/share/gtk-doc/html/gio/GFileDescriptorBased.html +1 -1
  209. data/vendor/local/share/gtk-doc/html/gio/GFileEnumerator.html +4 -4
  210. data/vendor/local/share/gtk-doc/html/gio/GFileIOStream.html +1 -1
  211. data/vendor/local/share/gtk-doc/html/gio/GFileIcon.html +1 -1
  212. data/vendor/local/share/gtk-doc/html/gio/GFileInfo.html +1 -1
  213. data/vendor/local/share/gtk-doc/html/gio/GFileInputStream.html +1 -1
  214. data/vendor/local/share/gtk-doc/html/gio/GFileMonitor.html +1 -1
  215. data/vendor/local/share/gtk-doc/html/gio/GFileOutputStream.html +1 -1
  216. data/vendor/local/share/gtk-doc/html/gio/GFilenameCompleter.html +1 -1
  217. data/vendor/local/share/gtk-doc/html/gio/GFilterInputStream.html +1 -1
  218. data/vendor/local/share/gtk-doc/html/gio/GFilterOutputStream.html +1 -1
  219. data/vendor/local/share/gtk-doc/html/gio/GIOModule.html +1 -1
  220. data/vendor/local/share/gtk-doc/html/gio/GIOStream.html +1 -1
  221. data/vendor/local/share/gtk-doc/html/gio/GIcon.html +1 -1
  222. data/vendor/local/share/gtk-doc/html/gio/GInetAddress.html +1 -1
  223. data/vendor/local/share/gtk-doc/html/gio/GInetSocketAddress.html +1 -1
  224. data/vendor/local/share/gtk-doc/html/gio/GInitable.html +1 -1
  225. data/vendor/local/share/gtk-doc/html/gio/GInputStream.html +1 -1
  226. data/vendor/local/share/gtk-doc/html/gio/GLoadableIcon.html +1 -1
  227. data/vendor/local/share/gtk-doc/html/gio/GMemoryInputStream.html +1 -1
  228. data/vendor/local/share/gtk-doc/html/gio/GMemoryOutputStream.html +8 -8
  229. data/vendor/local/share/gtk-doc/html/gio/GMenu.html +27 -27
  230. data/vendor/local/share/gtk-doc/html/gio/GMenuModel.html +2 -2
  231. data/vendor/local/share/gtk-doc/html/gio/GMount.html +1 -1
  232. data/vendor/local/share/gtk-doc/html/gio/GMountOperation.html +6 -6
  233. data/vendor/local/share/gtk-doc/html/gio/GNetworkAddress.html +1 -1
  234. data/vendor/local/share/gtk-doc/html/gio/GNetworkMonitor.html +1 -1
  235. data/vendor/local/share/gtk-doc/html/gio/GNetworkService.html +1 -1
  236. data/vendor/local/share/gtk-doc/html/gio/GOutputStream.html +1 -1
  237. data/vendor/local/share/gtk-doc/html/gio/GPermission.html +1 -1
  238. data/vendor/local/share/gtk-doc/html/gio/GPollableInputStream.html +1 -1
  239. data/vendor/local/share/gtk-doc/html/gio/GPollableOutputStream.html +1 -1
  240. data/vendor/local/share/gtk-doc/html/gio/GProxy.html +1 -1
  241. data/vendor/local/share/gtk-doc/html/gio/GProxyAddress.html +1 -1
  242. data/vendor/local/share/gtk-doc/html/gio/GProxyResolver.html +1 -1
  243. data/vendor/local/share/gtk-doc/html/gio/GRemoteActionGroup.html +1 -1
  244. data/vendor/local/share/gtk-doc/html/gio/GResolver.html +1 -1
  245. data/vendor/local/share/gtk-doc/html/gio/GSeekable.html +1 -1
  246. data/vendor/local/share/gtk-doc/html/gio/GSettings.html +114 -114
  247. data/vendor/local/share/gtk-doc/html/gio/GSettingsBackend.html +5 -5
  248. data/vendor/local/share/gtk-doc/html/gio/GSimpleAction.html +13 -13
  249. data/vendor/local/share/gtk-doc/html/gio/GSimpleActionGroup.html +1 -1
  250. data/vendor/local/share/gtk-doc/html/gio/GSimpleAsyncResult.html +76 -76
  251. data/vendor/local/share/gtk-doc/html/gio/GSimplePermission.html +1 -1
  252. data/vendor/local/share/gtk-doc/html/gio/GSimpleProxyResolver.html +1 -1
  253. data/vendor/local/share/gtk-doc/html/gio/GSocket.html +1 -1
  254. data/vendor/local/share/gtk-doc/html/gio/GSocketAddress.html +1 -1
  255. data/vendor/local/share/gtk-doc/html/gio/GSocketClient.html +1 -1
  256. data/vendor/local/share/gtk-doc/html/gio/GSocketConnectable.html +47 -47
  257. data/vendor/local/share/gtk-doc/html/gio/GSocketConnection.html +1 -1
  258. data/vendor/local/share/gtk-doc/html/gio/GSocketControlMessage.html +1 -1
  259. data/vendor/local/share/gtk-doc/html/gio/GSocketListener.html +1 -1
  260. data/vendor/local/share/gtk-doc/html/gio/GSocketService.html +1 -1
  261. data/vendor/local/share/gtk-doc/html/gio/GSrvTarget.html +1 -1
  262. data/vendor/local/share/gtk-doc/html/gio/GTask.html +324 -324
  263. data/vendor/local/share/gtk-doc/html/gio/GTcpConnection.html +1 -1
  264. data/vendor/local/share/gtk-doc/html/gio/GTcpWrapperConnection.html +1 -1
  265. data/vendor/local/share/gtk-doc/html/gio/GTestDBus.html +82 -82
  266. data/vendor/local/share/gtk-doc/html/gio/GThemedIcon.html +17 -17
  267. data/vendor/local/share/gtk-doc/html/gio/GThreadedSocketService.html +1 -1
  268. data/vendor/local/share/gtk-doc/html/gio/GTlsBackend.html +1 -1
  269. data/vendor/local/share/gtk-doc/html/gio/GTlsCertificate.html +1 -1
  270. data/vendor/local/share/gtk-doc/html/gio/GTlsClientConnection.html +1 -1
  271. data/vendor/local/share/gtk-doc/html/gio/GTlsConnection.html +1 -1
  272. data/vendor/local/share/gtk-doc/html/gio/GTlsDatabase.html +1 -1
  273. data/vendor/local/share/gtk-doc/html/gio/GTlsFileDatabase.html +1 -1
  274. data/vendor/local/share/gtk-doc/html/gio/GTlsInteraction.html +1 -1
  275. data/vendor/local/share/gtk-doc/html/gio/GTlsPassword.html +1 -1
  276. data/vendor/local/share/gtk-doc/html/gio/GTlsServerConnection.html +1 -1
  277. data/vendor/local/share/gtk-doc/html/gio/GUnixConnection.html +1 -1
  278. data/vendor/local/share/gtk-doc/html/gio/GUnixCredentialsMessage.html +1 -1
  279. data/vendor/local/share/gtk-doc/html/gio/GUnixFDList.html +1 -1
  280. data/vendor/local/share/gtk-doc/html/gio/GUnixFDMessage.html +1 -1
  281. data/vendor/local/share/gtk-doc/html/gio/GUnixInputStream.html +1 -1
  282. data/vendor/local/share/gtk-doc/html/gio/GUnixOutputStream.html +1 -1
  283. data/vendor/local/share/gtk-doc/html/gio/GUnixSocketAddress.html +1 -1
  284. data/vendor/local/share/gtk-doc/html/gio/GVfs.html +1 -1
  285. data/vendor/local/share/gtk-doc/html/gio/GVolume.html +1 -1
  286. data/vendor/local/share/gtk-doc/html/gio/GVolumeMonitor.html +1 -1
  287. data/vendor/local/share/gtk-doc/html/gio/GZlibCompressor.html +1 -1
  288. data/vendor/local/share/gtk-doc/html/gio/GZlibDecompressor.html +1 -1
  289. data/vendor/local/share/gtk-doc/html/gio/annotation-glossary.html +25 -37
  290. data/vendor/local/share/gtk-doc/html/gio/api-index-2-18.html +1 -1
  291. data/vendor/local/share/gtk-doc/html/gio/api-index-2-20.html +1 -1
  292. data/vendor/local/share/gtk-doc/html/gio/api-index-2-22.html +1 -1
  293. data/vendor/local/share/gtk-doc/html/gio/api-index-2-24.html +1 -1
  294. data/vendor/local/share/gtk-doc/html/gio/api-index-2-26.html +1 -1
  295. data/vendor/local/share/gtk-doc/html/gio/api-index-2-28.html +1 -1
  296. data/vendor/local/share/gtk-doc/html/gio/api-index-2-30.html +1 -1
  297. data/vendor/local/share/gtk-doc/html/gio/api-index-2-32.html +1 -1
  298. data/vendor/local/share/gtk-doc/html/gio/api-index-2-34.html +1 -1
  299. data/vendor/local/share/gtk-doc/html/gio/api-index-2-36.html +1 -1
  300. data/vendor/local/share/gtk-doc/html/gio/api-index-deprecated.html +1 -1
  301. data/vendor/local/share/gtk-doc/html/gio/api-index-full.html +1 -1
  302. data/vendor/local/share/gtk-doc/html/gio/application.html +2 -2
  303. data/vendor/local/share/gtk-doc/html/gio/async.html +2 -2
  304. data/vendor/local/share/gtk-doc/html/gio/ch01.html +1 -1
  305. data/vendor/local/share/gtk-doc/html/gio/ch02.html +1 -1
  306. data/vendor/local/share/gtk-doc/html/gio/ch03.html +2 -2
  307. data/vendor/local/share/gtk-doc/html/gio/ch29.html +1 -1
  308. data/vendor/local/share/gtk-doc/html/gio/ch30.html +31 -31
  309. data/vendor/local/share/gtk-doc/html/gio/ch30s02.html +1 -1
  310. data/vendor/local/share/gtk-doc/html/gio/ch30s03.html +1 -1
  311. data/vendor/local/share/gtk-doc/html/gio/ch31.html +2 -2
  312. data/vendor/local/share/gtk-doc/html/gio/ch31s02.html +3 -3
  313. data/vendor/local/share/gtk-doc/html/gio/ch31s03.html +21 -21
  314. data/vendor/local/share/gtk-doc/html/gio/ch31s04.html +3 -3
  315. data/vendor/local/share/gtk-doc/html/gio/ch31s05.html +2 -2
  316. data/vendor/local/share/gtk-doc/html/gio/ch31s06.html +1 -1
  317. data/vendor/local/share/gtk-doc/html/gio/ch31s07.html +1 -1
  318. data/vendor/local/share/gtk-doc/html/gio/ch32.html +2 -2
  319. data/vendor/local/share/gtk-doc/html/gio/ch32s02.html +1 -1
  320. data/vendor/local/share/gtk-doc/html/gio/ch32s03.html +61 -61
  321. data/vendor/local/share/gtk-doc/html/gio/ch32s04.html +14 -14
  322. data/vendor/local/share/gtk-doc/html/gio/ch32s05.html +391 -391
  323. data/vendor/local/share/gtk-doc/html/gio/conversion.html +2 -2
  324. data/vendor/local/share/gtk-doc/html/gio/extending-gio.html +1 -1
  325. data/vendor/local/share/gtk-doc/html/gio/extending.html +2 -2
  326. data/vendor/local/share/gtk-doc/html/gio/failable_initialization.html +2 -2
  327. data/vendor/local/share/gtk-doc/html/gio/file_mon.html +2 -2
  328. data/vendor/local/share/gtk-doc/html/gio/file_ops.html +2 -2
  329. data/vendor/local/share/gtk-doc/html/gio/gdbus-codegen.html +204 -192
  330. data/vendor/local/share/gtk-doc/html/gio/gdbus-convenience.html +2 -2
  331. data/vendor/local/share/gtk-doc/html/gio/gdbus-lowlevel.html +2 -2
  332. data/vendor/local/share/gtk-doc/html/gio/gdbus-org.gtk.GDBus.Example.ObjectManager.Animal.html +1 -1
  333. data/vendor/local/share/gtk-doc/html/gio/gdbus-org.gtk.GDBus.Example.ObjectManager.Cat.html +1 -1
  334. data/vendor/local/share/gtk-doc/html/gio/gdbus.html +1 -1
  335. data/vendor/local/share/gtk-doc/html/gio/gio-D-Bus-Addresses.html +1 -1
  336. data/vendor/local/share/gtk-doc/html/gio/gio-D-Bus-Introspection-Data.html +1 -1
  337. data/vendor/local/share/gtk-doc/html/gio/gio-D-Bus-Utilities.html +1 -1
  338. data/vendor/local/share/gtk-doc/html/gio/gio-Desktop-file-based-GAppInfo.html +1 -1
  339. data/vendor/local/share/gtk-doc/html/gio/gio-Extension-Points.html +11 -11
  340. data/vendor/local/share/gtk-doc/html/gio/gio-GActionGroup-exporter.html +1 -1
  341. data/vendor/local/share/gtk-doc/html/gio/gio-GContentType.html +1 -1
  342. data/vendor/local/share/gtk-doc/html/gio/gio-GConverterInputstream.html +1 -1
  343. data/vendor/local/share/gtk-doc/html/gio/gio-GConverterOutputstream.html +1 -1
  344. data/vendor/local/share/gtk-doc/html/gio/gio-GDBusError.html +30 -30
  345. data/vendor/local/share/gtk-doc/html/gio/gio-GFileAttribute.html +1 -1
  346. data/vendor/local/share/gtk-doc/html/gio/gio-GIOError.html +1 -1
  347. data/vendor/local/share/gtk-doc/html/gio/gio-GIOScheduler.html +1 -1
  348. data/vendor/local/share/gtk-doc/html/gio/gio-GInetAddressMask.html +1 -1
  349. data/vendor/local/share/gtk-doc/html/gio/gio-GMenuModel-exporter.html +1 -1
  350. data/vendor/local/share/gtk-doc/html/gio/gio-GResource.html +10 -10
  351. data/vendor/local/share/gtk-doc/html/gio/gio-GSettingsSchema-GSettingsSchemaSource.html +41 -41
  352. data/vendor/local/share/gtk-doc/html/gio/gio-GWin32InputStream.html +1 -1
  353. data/vendor/local/share/gtk-doc/html/gio/gio-GWin32OutputStream.html +1 -1
  354. data/vendor/local/share/gtk-doc/html/gio/gio-Owning-Bus-Names.html +74 -74
  355. data/vendor/local/share/gtk-doc/html/gio/gio-TLS-Overview.html +1 -1
  356. data/vendor/local/share/gtk-doc/html/gio/gio-Unix-Mounts.html +1 -1
  357. data/vendor/local/share/gtk-doc/html/gio/gio-Watching-Bus-Names.html +74 -74
  358. data/vendor/local/share/gtk-doc/html/gio/gio-gnetworking.h.html +1 -1
  359. data/vendor/local/share/gtk-doc/html/gio/gio-gpollableutils.html +1 -1
  360. data/vendor/local/share/gtk-doc/html/gio/gio-hierarchy.html +1 -1
  361. data/vendor/local/share/gtk-doc/html/gio/gio-querymodules.html +1 -1
  362. data/vendor/local/share/gtk-doc/html/gio/glib-compile-resources.html +2 -2
  363. data/vendor/local/share/gtk-doc/html/gio/glib-compile-schemas.html +1 -1
  364. data/vendor/local/share/gtk-doc/html/gio/gresource-tool.html +1 -1
  365. data/vendor/local/share/gtk-doc/html/gio/gsettings-tool.html +1 -1
  366. data/vendor/local/share/gtk-doc/html/gio/highlevel-socket.html +2 -2
  367. data/vendor/local/share/gtk-doc/html/gio/icons.html +2 -2
  368. data/vendor/local/share/gtk-doc/html/gio/index.html +3 -3
  369. data/vendor/local/share/gtk-doc/html/gio/migrating.html +2 -2
  370. data/vendor/local/share/gtk-doc/html/gio/networking.html +2 -2
  371. data/vendor/local/share/gtk-doc/html/gio/permissions.html +2 -2
  372. data/vendor/local/share/gtk-doc/html/gio/pt01.html +2 -2
  373. data/vendor/local/share/gtk-doc/html/gio/pt02.html +2 -2
  374. data/vendor/local/share/gtk-doc/html/gio/resolver.html +2 -2
  375. data/vendor/local/share/gtk-doc/html/gio/resources.html +2 -2
  376. data/vendor/local/share/gtk-doc/html/gio/running-gio-apps.html +1 -1
  377. data/vendor/local/share/gtk-doc/html/gio/settings.html +2 -2
  378. data/vendor/local/share/gtk-doc/html/gio/streaming.html +2 -2
  379. data/vendor/local/share/gtk-doc/html/gio/testing.html +2 -2
  380. data/vendor/local/share/gtk-doc/html/gio/tls.html +2 -2
  381. data/vendor/local/share/gtk-doc/html/gio/tools.html +2 -2
  382. data/vendor/local/share/gtk-doc/html/gio/types.html +2 -2
  383. data/vendor/local/share/gtk-doc/html/gio/utils.html +2 -2
  384. data/vendor/local/share/gtk-doc/html/gio/volume_mon.html +2 -2
  385. data/vendor/local/share/gtk-doc/html/glib/annotation-glossary.html +29 -43
  386. data/vendor/local/share/gtk-doc/html/glib/api-index-2-10.html +1 -1
  387. data/vendor/local/share/gtk-doc/html/glib/api-index-2-12.html +1 -1
  388. data/vendor/local/share/gtk-doc/html/glib/api-index-2-14.html +1 -1
  389. data/vendor/local/share/gtk-doc/html/glib/api-index-2-16.html +1 -1
  390. data/vendor/local/share/gtk-doc/html/glib/api-index-2-18.html +1 -1
  391. data/vendor/local/share/gtk-doc/html/glib/api-index-2-2.html +1 -1
  392. data/vendor/local/share/gtk-doc/html/glib/api-index-2-20.html +1 -1
  393. data/vendor/local/share/gtk-doc/html/glib/api-index-2-22.html +1 -1
  394. data/vendor/local/share/gtk-doc/html/glib/api-index-2-24.html +1 -1
  395. data/vendor/local/share/gtk-doc/html/glib/api-index-2-26.html +1 -1
  396. data/vendor/local/share/gtk-doc/html/glib/api-index-2-28.html +1 -1
  397. data/vendor/local/share/gtk-doc/html/glib/api-index-2-30.html +1 -1
  398. data/vendor/local/share/gtk-doc/html/glib/api-index-2-32.html +1 -1
  399. data/vendor/local/share/gtk-doc/html/glib/api-index-2-34.html +1 -1
  400. data/vendor/local/share/gtk-doc/html/glib/api-index-2-36.html +1 -1
  401. data/vendor/local/share/gtk-doc/html/glib/api-index-2-4.html +1 -1
  402. data/vendor/local/share/gtk-doc/html/glib/api-index-2-6.html +1 -1
  403. data/vendor/local/share/gtk-doc/html/glib/api-index-2-8.html +1 -1
  404. data/vendor/local/share/gtk-doc/html/glib/api-index-deprecated.html +1 -1
  405. data/vendor/local/share/gtk-doc/html/glib/api-index-full.html +1 -1
  406. data/vendor/local/share/gtk-doc/html/glib/deprecated.html +2 -2
  407. data/vendor/local/share/gtk-doc/html/glib/glib-Arrays.html +17 -17
  408. data/vendor/local/share/gtk-doc/html/glib/glib-Asynchronous-Queues.html +6 -6
  409. data/vendor/local/share/gtk-doc/html/glib/glib-Atomic-Operations.html +1 -1
  410. data/vendor/local/share/gtk-doc/html/glib/glib-Automatic-String-Completion.html +1 -1
  411. data/vendor/local/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html +1 -1
  412. data/vendor/local/share/gtk-doc/html/glib/glib-Base64-Encoding.html +1 -1
  413. data/vendor/local/share/gtk-doc/html/glib/glib-Basic-Types.html +8 -8
  414. data/vendor/local/share/gtk-doc/html/glib/glib-Bookmark-file-parser.html +24 -24
  415. data/vendor/local/share/gtk-doc/html/glib/glib-Byte-Arrays.html +14 -14
  416. data/vendor/local/share/gtk-doc/html/glib/glib-Byte-Order-Macros.html +1 -1
  417. data/vendor/local/share/gtk-doc/html/glib/glib-Caches.html +1 -1
  418. data/vendor/local/share/gtk-doc/html/glib/glib-Character-Set-Conversion.html +5 -5
  419. data/vendor/local/share/gtk-doc/html/glib/glib-Commandline-option-parser.html +30 -30
  420. data/vendor/local/share/gtk-doc/html/glib/glib-Data-Checksums.html +1 -1
  421. data/vendor/local/share/gtk-doc/html/glib/glib-Data-HMACs.html +1 -1
  422. data/vendor/local/share/gtk-doc/html/glib/glib-Datasets.html +1 -1
  423. data/vendor/local/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html +8 -8
  424. data/vendor/local/share/gtk-doc/html/glib/glib-Deprecated-Thread-APIs.html +53 -53
  425. data/vendor/local/share/gtk-doc/html/glib/glib-Double-ended-Queues.html +2 -2
  426. data/vendor/local/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html +15 -15
  427. data/vendor/local/share/gtk-doc/html/glib/glib-Dynamic-Loading-of-Modules.html +37 -37
  428. data/vendor/local/share/gtk-doc/html/glib/glib-Error-Reporting.html +103 -103
  429. data/vendor/local/share/gtk-doc/html/glib/glib-File-Utilities.html +7 -7
  430. data/vendor/local/share/gtk-doc/html/glib/glib-GDateTime.html +1 -1
  431. data/vendor/local/share/gtk-doc/html/glib/glib-GTimeZone.html +1 -1
  432. data/vendor/local/share/gtk-doc/html/glib/glib-GVariant.html +54 -53
  433. data/vendor/local/share/gtk-doc/html/glib/glib-GVariantType.html +5 -5
  434. data/vendor/local/share/gtk-doc/html/glib/glib-Glob-style-pattern-matching.html +1 -1
  435. data/vendor/local/share/gtk-doc/html/glib/glib-Hash-Tables.html +8 -8
  436. data/vendor/local/share/gtk-doc/html/glib/glib-Hook-Functions.html +1 -1
  437. data/vendor/local/share/gtk-doc/html/glib/glib-Hostname-Utilities.html +1 -1
  438. data/vendor/local/share/gtk-doc/html/glib/glib-I18N.html +30 -30
  439. data/vendor/local/share/gtk-doc/html/glib/glib-IO-Channels.html +1 -1
  440. data/vendor/local/share/gtk-doc/html/glib/glib-Key-value-file-parser.html +14 -14
  441. data/vendor/local/share/gtk-doc/html/glib/glib-Keyed-Data-Lists.html +4 -4
  442. data/vendor/local/share/gtk-doc/html/glib/glib-Lexical-Scanner.html +1 -1
  443. data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Allocation.html +1 -1
  444. data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Slices.html +30 -30
  445. data/vendor/local/share/gtk-doc/html/glib/glib-Message-Logging.html +8 -8
  446. data/vendor/local/share/gtk-doc/html/glib/glib-Miscellaneous-Macros.html +29 -29
  447. data/vendor/local/share/gtk-doc/html/glib/glib-Miscellaneous-Utility-Functions.html +4 -4
  448. data/vendor/local/share/gtk-doc/html/glib/glib-N-ary-Trees.html +1 -1
  449. data/vendor/local/share/gtk-doc/html/glib/glib-Numerical-Definitions.html +1 -1
  450. data/vendor/local/share/gtk-doc/html/glib/glib-Perl-compatible-regular-expressions.html +71 -71
  451. data/vendor/local/share/gtk-doc/html/glib/glib-Pointer-Arrays.html +11 -11
  452. data/vendor/local/share/gtk-doc/html/glib/glib-Quarks.html +1 -1
  453. data/vendor/local/share/gtk-doc/html/glib/glib-Random-Numbers.html +1 -1
  454. data/vendor/local/share/gtk-doc/html/glib/glib-Relations-and-Tuples.html +1 -1
  455. data/vendor/local/share/gtk-doc/html/glib/glib-Sequences.html +1 -1
  456. data/vendor/local/share/gtk-doc/html/glib/glib-Shell-related-Utilities.html +1 -1
  457. data/vendor/local/share/gtk-doc/html/glib/glib-Simple-XML-Subset-Parser.html +70 -70
  458. data/vendor/local/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html +15 -15
  459. data/vendor/local/share/gtk-doc/html/glib/glib-Spawning-Processes.html +3 -3
  460. data/vendor/local/share/gtk-doc/html/glib/glib-Standard-Macros.html +1 -1
  461. data/vendor/local/share/gtk-doc/html/glib/glib-String-Chunks.html +1 -1
  462. data/vendor/local/share/gtk-doc/html/glib/glib-String-Utility-Functions.html +5 -5
  463. data/vendor/local/share/gtk-doc/html/glib/glib-Strings.html +1 -1
  464. data/vendor/local/share/gtk-doc/html/glib/glib-Testing.html +26 -26
  465. data/vendor/local/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html +100 -100
  466. data/vendor/local/share/gtk-doc/html/glib/glib-Thread-Pools.html +1 -1
  467. data/vendor/local/share/gtk-doc/html/glib/glib-Threads.html +141 -141
  468. data/vendor/local/share/gtk-doc/html/glib/glib-Timers.html +1 -1
  469. data/vendor/local/share/gtk-doc/html/glib/glib-Trash-Stacks.html +1 -1
  470. data/vendor/local/share/gtk-doc/html/glib/glib-Type-Conversion-Macros.html +11 -11
  471. data/vendor/local/share/gtk-doc/html/glib/glib-UNIX-specific-utilities-and-integration.html +2 -2
  472. data/vendor/local/share/gtk-doc/html/glib/glib-URI-Functions.html +1 -1
  473. data/vendor/local/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html +6 -6
  474. data/vendor/local/share/gtk-doc/html/glib/glib-Version-Information.html +6 -6
  475. data/vendor/local/share/gtk-doc/html/glib/glib-Warnings-and-Assertions.html +22 -22
  476. data/vendor/local/share/gtk-doc/html/glib/glib-Windows-Compatibility-Functions.html +1 -1
  477. data/vendor/local/share/gtk-doc/html/glib/glib-building.html +1 -1
  478. data/vendor/local/share/gtk-doc/html/glib/glib-changes.html +1 -1
  479. data/vendor/local/share/gtk-doc/html/glib/glib-compiling.html +1 -1
  480. data/vendor/local/share/gtk-doc/html/glib/glib-core.html +2 -2
  481. data/vendor/local/share/gtk-doc/html/glib/glib-cross-compiling.html +1 -1
  482. data/vendor/local/share/gtk-doc/html/glib/glib-data-types.html +2 -2
  483. data/vendor/local/share/gtk-doc/html/glib/glib-fundamentals.html +2 -2
  484. data/vendor/local/share/gtk-doc/html/glib/glib-gettextize.html +1 -1
  485. data/vendor/local/share/gtk-doc/html/glib/glib-programming.html +1 -1
  486. data/vendor/local/share/gtk-doc/html/glib/glib-regex-syntax.html +1 -1
  487. data/vendor/local/share/gtk-doc/html/glib/glib-resources.html +1 -1
  488. data/vendor/local/share/gtk-doc/html/glib/glib-running.html +1 -1
  489. data/vendor/local/share/gtk-doc/html/glib/glib-utilities.html +2 -2
  490. data/vendor/local/share/gtk-doc/html/glib/glib.html +2 -2
  491. data/vendor/local/share/gtk-doc/html/glib/gtester-report.html +7 -1
  492. data/vendor/local/share/gtk-doc/html/glib/gtester.html +1 -1
  493. data/vendor/local/share/gtk-doc/html/glib/gvariant-format-strings.html +142 -142
  494. data/vendor/local/share/gtk-doc/html/glib/gvariant-text.html +8 -8
  495. data/vendor/local/share/gtk-doc/html/glib/index.html +3 -3
  496. data/vendor/local/share/gtk-doc/html/glib/tools.html +2 -2
  497. data/vendor/local/share/gtk-doc/html/gobject/GBinding.html +17 -17
  498. data/vendor/local/share/gtk-doc/html/gobject/GTypeModule.html +49 -49
  499. data/vendor/local/share/gtk-doc/html/gobject/GTypePlugin.html +5 -5
  500. data/vendor/local/share/gtk-doc/html/gobject/annotation-glossary.html +27 -40
  501. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-10.html +1 -1
  502. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-12.html +1 -1
  503. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-14.html +1 -1
  504. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-18.html +1 -1
  505. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-2.html +1 -1
  506. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-22.html +1 -1
  507. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-24.html +1 -1
  508. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-26.html +1 -1
  509. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-28.html +1 -1
  510. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-30.html +1 -1
  511. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-32.html +1 -1
  512. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-34.html +1 -1
  513. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-36.html +1 -1
  514. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-4.html +1 -1
  515. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-6.html +1 -1
  516. data/vendor/local/share/gtk-doc/html/gobject/api-index-2-8.html +1 -1
  517. data/vendor/local/share/gtk-doc/html/gobject/api-index-deprecated.html +1 -1
  518. data/vendor/local/share/gtk-doc/html/gobject/api-index-full.html +1 -1
  519. data/vendor/local/share/gtk-doc/html/gobject/ch01s02.html +3 -3
  520. data/vendor/local/share/gtk-doc/html/gobject/chapter-gobject.html +2 -2
  521. data/vendor/local/share/gtk-doc/html/gobject/chapter-gtype.html +4 -4
  522. data/vendor/local/share/gtk-doc/html/gobject/chapter-intro.html +2 -2
  523. data/vendor/local/share/gtk-doc/html/gobject/chapter-signal.html +5 -5
  524. data/vendor/local/share/gtk-doc/html/gobject/glib-genmarshal.html +8 -1
  525. data/vendor/local/share/gtk-doc/html/gobject/glib-mkenums.html +7 -1
  526. data/vendor/local/share/gtk-doc/html/gobject/gobject-Boxed-Types.html +14 -14
  527. data/vendor/local/share/gtk-doc/html/gobject/gobject-Closures.html +41 -41
  528. data/vendor/local/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html +14 -14
  529. data/vendor/local/share/gtk-doc/html/gobject/gobject-GParamSpec.html +1 -1
  530. data/vendor/local/share/gtk-doc/html/gobject/gobject-Generic-values.html +43 -43
  531. data/vendor/local/share/gtk-doc/html/gobject/gobject-Signals.html +11 -11
  532. data/vendor/local/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html +1 -1
  533. data/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html +118 -118
  534. data/vendor/local/share/gtk-doc/html/gobject/gobject-Type-Information.html +130 -130
  535. data/vendor/local/share/gtk-doc/html/gobject/gobject-Value-arrays.html +8 -6
  536. data/vendor/local/share/gtk-doc/html/gobject/gobject-Varargs-Value-Collection.html +32 -3
  537. data/vendor/local/share/gtk-doc/html/gobject/gobject-memory.html +1 -1
  538. data/vendor/local/share/gtk-doc/html/gobject/gobject-properties.html +94 -94
  539. data/vendor/local/share/gtk-doc/html/gobject/gobject-query.html +1 -1
  540. data/vendor/local/share/gtk-doc/html/gobject/gtype-conventions.html +3 -3
  541. data/vendor/local/share/gtk-doc/html/gobject/gtype-instantiable-classed.html +1 -1
  542. data/vendor/local/share/gtk-doc/html/gobject/gtype-non-instantiable-classed.html +1 -1
  543. data/vendor/local/share/gtk-doc/html/gobject/gtype-non-instantiable.html +1 -1
  544. data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-chainup.html +3 -3
  545. data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-code.html +1 -1
  546. data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-construction.html +23 -23
  547. data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-destruction.html +1 -1
  548. data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-methods.html +1 -1
  549. data/vendor/local/share/gtk-doc/html/gobject/howto-gobject.html +2 -2
  550. data/vendor/local/share/gtk-doc/html/gobject/howto-interface-implement.html +1 -1
  551. data/vendor/local/share/gtk-doc/html/gobject/howto-interface-override.html +1 -1
  552. data/vendor/local/share/gtk-doc/html/gobject/howto-interface-prerequisite.html +1 -1
  553. data/vendor/local/share/gtk-doc/html/gobject/howto-interface-properties.html +3 -3
  554. data/vendor/local/share/gtk-doc/html/gobject/howto-interface.html +2 -2
  555. data/vendor/local/share/gtk-doc/html/gobject/howto-signals.html +4 -4
  556. data/vendor/local/share/gtk-doc/html/gobject/index.html +3 -3
  557. data/vendor/local/share/gtk-doc/html/gobject/index.sgml +1 -1
  558. data/vendor/local/share/gtk-doc/html/gobject/pr01.html +1 -1
  559. data/vendor/local/share/gtk-doc/html/gobject/pt01.html +2 -2
  560. data/vendor/local/share/gtk-doc/html/gobject/pt02.html +2 -2
  561. data/vendor/local/share/gtk-doc/html/gobject/pt03.html +2 -2
  562. data/vendor/local/share/gtk-doc/html/gobject/rn01.html +2 -2
  563. data/vendor/local/share/gtk-doc/html/gobject/rn02.html +2 -2
  564. data/vendor/local/share/gtk-doc/html/gobject/signal.html +4 -4
  565. data/vendor/local/share/gtk-doc/html/gobject/tools-ginspector.html +1 -1
  566. data/vendor/local/share/gtk-doc/html/gobject/tools-gob.html +1 -1
  567. data/vendor/local/share/gtk-doc/html/gobject/tools-gtkdoc.html +1 -1
  568. data/vendor/local/share/gtk-doc/html/gobject/tools-refdb.html +1 -1
  569. data/vendor/local/share/gtk-doc/html/gobject/tools-vala.html +1 -1
  570. data/vendor/local/share/info/gmp.info +151 -151
  571. data/vendor/local/share/info/gmp.info-1 +19 -37
  572. data/vendor/local/share/info/gmp.info-2 +29 -5
  573. data/vendor/local/share/info/gnutls-guile.info +229 -721
  574. data/vendor/local/share/info/gnutls.info +1279 -1274
  575. data/vendor/local/share/info/gnutls.info-1 +2448 -2748
  576. data/vendor/local/share/info/gnutls.info-2 +2743 -2581
  577. data/vendor/local/share/info/gnutls.info-3 +1152 -4484
  578. data/vendor/local/share/info/gnutls.info-4 +4933 -1832
  579. data/vendor/local/share/info/gnutls.info-5 +0 -0
  580. data/vendor/local/share/info/nettle.info +1037 -315
  581. data/vendor/local/share/license/gmp/AUTHORS +13 -13
  582. data/vendor/local/share/locale/cs/LC_MESSAGES/gnutls.mo +0 -0
  583. data/vendor/local/share/locale/de/LC_MESSAGES/gnutls.mo +0 -0
  584. data/vendor/local/share/locale/en@boldquot/LC_MESSAGES/gnutls.mo +0 -0
  585. data/vendor/local/share/locale/en@quot/LC_MESSAGES/gnutls.mo +0 -0
  586. data/vendor/local/share/locale/fi/LC_MESSAGES/gnutls.mo +0 -0
  587. data/vendor/local/share/locale/fr/LC_MESSAGES/gnutls.mo +0 -0
  588. data/vendor/local/share/locale/fur/LC_MESSAGES/glib-networking.mo +0 -0
  589. data/vendor/local/share/locale/id/LC_MESSAGES/glib-networking.mo +0 -0
  590. data/vendor/local/share/locale/id/LC_MESSAGES/glib20.mo +0 -0
  591. data/vendor/local/share/locale/it/LC_MESSAGES/glib20.mo +0 -0
  592. data/vendor/local/share/locale/it/LC_MESSAGES/gnutls.mo +0 -0
  593. data/vendor/local/share/locale/kn/LC_MESSAGES/glib20.mo +0 -0
  594. data/vendor/local/share/locale/lt/LC_MESSAGES/glib20.mo +0 -0
  595. data/vendor/local/share/locale/ms/LC_MESSAGES/gnutls.mo +0 -0
  596. data/vendor/local/share/locale/nb/LC_MESSAGES/glib20.mo +0 -0
  597. data/vendor/local/share/locale/nl/LC_MESSAGES/gnutls.mo +0 -0
  598. data/vendor/local/share/locale/pl/LC_MESSAGES/glib20.mo +0 -0
  599. data/vendor/local/share/locale/pl/LC_MESSAGES/gnutls.mo +0 -0
  600. data/vendor/local/share/locale/sl/LC_MESSAGES/glib20.mo +0 -0
  601. data/vendor/local/share/locale/sr/LC_MESSAGES/glib20.mo +0 -0
  602. data/vendor/local/share/locale/sr@latin/LC_MESSAGES/glib20.mo +0 -0
  603. data/vendor/local/share/locale/sv/LC_MESSAGES/gnutls.mo +0 -0
  604. data/vendor/local/share/locale/tr/LC_MESSAGES/glib-networking.mo +0 -0
  605. data/vendor/local/share/locale/uk/LC_MESSAGES/gnutls.mo +0 -0
  606. data/vendor/local/share/locale/vi/LC_MESSAGES/gnutls.mo +0 -0
  607. data/vendor/local/share/locale/zh_CN/LC_MESSAGES/gnutls.mo +0 -0
  608. data/vendor/local/share/man/man1/certtool.1 +2 -2
  609. data/vendor/local/share/man/man1/gdbus-codegen.1 +14 -7
  610. data/vendor/local/share/man/man1/gdbus.1 +2 -5
  611. data/vendor/local/share/man/man1/gio-querymodules.1 +2 -2
  612. data/vendor/local/share/man/man1/glib-compile-resources.1 +3 -3
  613. data/vendor/local/share/man/man1/glib-compile-schemas.1 +2 -2
  614. data/vendor/local/share/man/man1/glib-genmarshal.1 +9 -3
  615. data/vendor/local/share/man/man1/glib-gettextize.1 +2 -3
  616. data/vendor/local/share/man/man1/glib-mkenums.1 +7 -3
  617. data/vendor/local/share/man/man1/gnutls-cli-debug.1 +2 -2
  618. data/vendor/local/share/man/man1/gnutls-cli.1 +2 -2
  619. data/vendor/local/share/man/man1/gnutls-serv.1 +2 -2
  620. data/vendor/local/share/man/man1/gobject-query.1 +2 -4
  621. data/vendor/local/share/man/man1/gresource.1 +2 -2
  622. data/vendor/local/share/man/man1/gsettings.1 +2 -2
  623. data/vendor/local/share/man/man1/gtester-report.1 +7 -3
  624. data/vendor/local/share/man/man1/gtester.1 +2 -3
  625. data/vendor/local/share/man/man1/ocsptool.1 +2 -2
  626. data/vendor/local/share/man/man1/p11tool.1 +2 -2
  627. data/vendor/local/share/man/man1/psktool.1 +2 -2
  628. data/vendor/local/share/man/man1/srptool.1 +2 -2
  629. data/vendor/local/share/man/man1/tpmtool.1 +2 -2
  630. data/vendor/local/share/man/man3/gnutls_alert_get.3 +1 -1
  631. data/vendor/local/share/man/man3/gnutls_alert_get_name.3 +1 -1
  632. data/vendor/local/share/man/man3/gnutls_alert_get_strname.3 +1 -1
  633. data/vendor/local/share/man/man3/gnutls_alert_send.3 +1 -1
  634. data/vendor/local/share/man/man3/gnutls_alert_send_appropriate.3 +1 -1
  635. data/vendor/local/share/man/man3/gnutls_anon_allocate_client_credentials.3 +1 -1
  636. data/vendor/local/share/man/man3/gnutls_anon_allocate_server_credentials.3 +1 -1
  637. data/vendor/local/share/man/man3/gnutls_anon_free_client_credentials.3 +1 -1
  638. data/vendor/local/share/man/man3/gnutls_anon_free_server_credentials.3 +1 -1
  639. data/vendor/local/share/man/man3/gnutls_anon_set_params_function.3 +1 -1
  640. data/vendor/local/share/man/man3/gnutls_anon_set_server_dh_params.3 +1 -1
  641. data/vendor/local/share/man/man3/gnutls_anon_set_server_params_function.3 +1 -1
  642. data/vendor/local/share/man/man3/gnutls_auth_client_get_type.3 +1 -1
  643. data/vendor/local/share/man/man3/gnutls_auth_get_type.3 +1 -1
  644. data/vendor/local/share/man/man3/gnutls_auth_server_get_type.3 +1 -1
  645. data/vendor/local/share/man/man3/gnutls_bye.3 +1 -1
  646. data/vendor/local/share/man/man3/gnutls_certificate_activation_time_peers.3 +1 -1
  647. data/vendor/local/share/man/man3/gnutls_certificate_allocate_credentials.3 +1 -1
  648. data/vendor/local/share/man/man3/gnutls_certificate_client_get_request_status.3 +1 -1
  649. data/vendor/local/share/man/man3/gnutls_certificate_expiration_time_peers.3 +1 -1
  650. data/vendor/local/share/man/man3/gnutls_certificate_free_ca_names.3 +1 -1
  651. data/vendor/local/share/man/man3/gnutls_certificate_free_cas.3 +1 -1
  652. data/vendor/local/share/man/man3/gnutls_certificate_free_credentials.3 +1 -1
  653. data/vendor/local/share/man/man3/gnutls_certificate_free_crls.3 +1 -1
  654. data/vendor/local/share/man/man3/gnutls_certificate_free_keys.3 +1 -1
  655. data/vendor/local/share/man/man3/gnutls_certificate_get_issuer.3 +1 -1
  656. data/vendor/local/share/man/man3/gnutls_certificate_get_ours.3 +1 -1
  657. data/vendor/local/share/man/man3/gnutls_certificate_get_peers.3 +1 -1
  658. data/vendor/local/share/man/man3/gnutls_certificate_get_peers_subkey_id.3 +1 -1
  659. data/vendor/local/share/man/man3/gnutls_certificate_send_x509_rdn_sequence.3 +1 -1
  660. data/vendor/local/share/man/man3/gnutls_certificate_server_set_request.3 +1 -1
  661. data/vendor/local/share/man/man3/gnutls_certificate_set_dh_params.3 +1 -1
  662. data/vendor/local/share/man/man3/gnutls_certificate_set_key.3 +1 -1
  663. data/vendor/local/share/man/man3/gnutls_certificate_set_ocsp_status_request_file.3 +1 -1
  664. data/vendor/local/share/man/man3/gnutls_certificate_set_ocsp_status_request_function.3 +1 -1
  665. data/vendor/local/share/man/man3/gnutls_certificate_set_openpgp_key.3 +1 -1
  666. data/vendor/local/share/man/man3/gnutls_certificate_set_openpgp_key_file.3 +1 -1
  667. data/vendor/local/share/man/man3/gnutls_certificate_set_openpgp_key_file2.3 +1 -1
  668. data/vendor/local/share/man/man3/gnutls_certificate_set_openpgp_key_mem.3 +1 -1
  669. data/vendor/local/share/man/man3/gnutls_certificate_set_openpgp_key_mem2.3 +1 -1
  670. data/vendor/local/share/man/man3/gnutls_certificate_set_openpgp_keyring_file.3 +1 -1
  671. data/vendor/local/share/man/man3/gnutls_certificate_set_openpgp_keyring_mem.3 +1 -1
  672. data/vendor/local/share/man/man3/gnutls_certificate_set_params_function.3 +1 -1
  673. data/vendor/local/share/man/man3/gnutls_certificate_set_pin_function.3 +1 -1
  674. data/vendor/local/share/man/man3/gnutls_certificate_set_retrieve_function.3 +1 -1
  675. data/vendor/local/share/man/man3/gnutls_certificate_set_retrieve_function2.3 +1 -1
  676. data/vendor/local/share/man/man3/gnutls_certificate_set_rsa_export_params.3 +1 -1
  677. data/vendor/local/share/man/man3/gnutls_certificate_set_verify_flags.3 +1 -1
  678. data/vendor/local/share/man/man3/gnutls_certificate_set_verify_function.3 +1 -1
  679. data/vendor/local/share/man/man3/gnutls_certificate_set_verify_limits.3 +1 -1
  680. data/vendor/local/share/man/man3/gnutls_certificate_set_x509_crl.3 +1 -1
  681. data/vendor/local/share/man/man3/gnutls_certificate_set_x509_crl_file.3 +1 -1
  682. data/vendor/local/share/man/man3/gnutls_certificate_set_x509_crl_mem.3 +1 -1
  683. data/vendor/local/share/man/man3/gnutls_certificate_set_x509_key.3 +1 -1
  684. data/vendor/local/share/man/man3/gnutls_certificate_set_x509_key_file.3 +1 -1
  685. data/vendor/local/share/man/man3/gnutls_certificate_set_x509_key_file2.3 +64 -0
  686. data/vendor/local/share/man/man3/gnutls_certificate_set_x509_key_mem.3 +1 -1
  687. data/vendor/local/share/man/man3/gnutls_certificate_set_x509_key_mem2.3 +67 -0
  688. data/vendor/local/share/man/man3/gnutls_certificate_set_x509_simple_pkcs12_file.3 +1 -1
  689. data/vendor/local/share/man/man3/gnutls_certificate_set_x509_simple_pkcs12_mem.3 +1 -1
  690. data/vendor/local/share/man/man3/gnutls_certificate_set_x509_system_trust.3 +1 -1
  691. data/vendor/local/share/man/man3/gnutls_certificate_set_x509_trust.3 +1 -1
  692. data/vendor/local/share/man/man3/gnutls_certificate_set_x509_trust_file.3 +1 -1
  693. data/vendor/local/share/man/man3/gnutls_certificate_set_x509_trust_mem.3 +1 -1
  694. data/vendor/local/share/man/man3/gnutls_certificate_type_get.3 +1 -1
  695. data/vendor/local/share/man/man3/gnutls_certificate_type_get_id.3 +1 -1
  696. data/vendor/local/share/man/man3/gnutls_certificate_type_get_name.3 +1 -1
  697. data/vendor/local/share/man/man3/gnutls_certificate_type_list.3 +1 -1
  698. data/vendor/local/share/man/man3/gnutls_certificate_type_set_priority.3 +1 -1
  699. data/vendor/local/share/man/man3/gnutls_certificate_verification_status_print.3 +1 -1
  700. data/vendor/local/share/man/man3/gnutls_certificate_verify_peers2.3 +1 -1
  701. data/vendor/local/share/man/man3/gnutls_certificate_verify_peers3.3 +1 -1
  702. data/vendor/local/share/man/man3/gnutls_check_version.3 +1 -1
  703. data/vendor/local/share/man/man3/gnutls_cipher_add_auth.3 +1 -1
  704. data/vendor/local/share/man/man3/gnutls_cipher_decrypt.3 +1 -1
  705. data/vendor/local/share/man/man3/gnutls_cipher_decrypt2.3 +1 -1
  706. data/vendor/local/share/man/man3/gnutls_cipher_deinit.3 +1 -1
  707. data/vendor/local/share/man/man3/gnutls_cipher_encrypt.3 +1 -1
  708. data/vendor/local/share/man/man3/gnutls_cipher_encrypt2.3 +1 -1
  709. data/vendor/local/share/man/man3/gnutls_cipher_get.3 +1 -1
  710. data/vendor/local/share/man/man3/gnutls_cipher_get_block_size.3 +1 -1
  711. data/vendor/local/share/man/man3/gnutls_cipher_get_id.3 +1 -1
  712. data/vendor/local/share/man/man3/gnutls_cipher_get_key_size.3 +1 -1
  713. data/vendor/local/share/man/man3/gnutls_cipher_get_name.3 +1 -1
  714. data/vendor/local/share/man/man3/gnutls_cipher_init.3 +1 -1
  715. data/vendor/local/share/man/man3/gnutls_cipher_list.3 +1 -1
  716. data/vendor/local/share/man/man3/gnutls_cipher_set_iv.3 +1 -1
  717. data/vendor/local/share/man/man3/gnutls_cipher_set_priority.3 +1 -1
  718. data/vendor/local/share/man/man3/gnutls_cipher_suite_get_name.3 +1 -1
  719. data/vendor/local/share/man/man3/gnutls_cipher_suite_info.3 +1 -1
  720. data/vendor/local/share/man/man3/gnutls_cipher_tag.3 +1 -1
  721. data/vendor/local/share/man/man3/gnutls_compression_get.3 +1 -1
  722. data/vendor/local/share/man/man3/gnutls_compression_get_id.3 +1 -1
  723. data/vendor/local/share/man/man3/gnutls_compression_get_name.3 +1 -1
  724. data/vendor/local/share/man/man3/gnutls_compression_list.3 +1 -1
  725. data/vendor/local/share/man/man3/gnutls_compression_set_priority.3 +1 -1
  726. data/vendor/local/share/man/man3/gnutls_credentials_clear.3 +1 -1
  727. data/vendor/local/share/man/man3/gnutls_credentials_set.3 +1 -1
  728. data/vendor/local/share/man/man3/gnutls_db_check_entry.3 +1 -1
  729. data/vendor/local/share/man/man3/gnutls_db_check_entry_time.3 +1 -1
  730. data/vendor/local/share/man/man3/gnutls_db_get_ptr.3 +1 -1
  731. data/vendor/local/share/man/man3/gnutls_db_remove_session.3 +1 -1
  732. data/vendor/local/share/man/man3/gnutls_db_set_cache_expiration.3 +1 -1
  733. data/vendor/local/share/man/man3/gnutls_db_set_ptr.3 +1 -1
  734. data/vendor/local/share/man/man3/gnutls_db_set_remove_function.3 +1 -1
  735. data/vendor/local/share/man/man3/gnutls_db_set_retrieve_function.3 +1 -1
  736. data/vendor/local/share/man/man3/gnutls_db_set_store_function.3 +1 -1
  737. data/vendor/local/share/man/man3/gnutls_deinit.3 +1 -1
  738. data/vendor/local/share/man/man3/gnutls_dh_get_group.3 +1 -1
  739. data/vendor/local/share/man/man3/gnutls_dh_get_peers_public_bits.3 +1 -1
  740. data/vendor/local/share/man/man3/gnutls_dh_get_prime_bits.3 +1 -1
  741. data/vendor/local/share/man/man3/gnutls_dh_get_pubkey.3 +1 -1
  742. data/vendor/local/share/man/man3/gnutls_dh_get_secret_bits.3 +1 -1
  743. data/vendor/local/share/man/man3/gnutls_dh_params_cpy.3 +1 -1
  744. data/vendor/local/share/man/man3/gnutls_dh_params_deinit.3 +1 -1
  745. data/vendor/local/share/man/man3/gnutls_dh_params_export2_pkcs3.3 +1 -1
  746. data/vendor/local/share/man/man3/gnutls_dh_params_export_pkcs3.3 +1 -1
  747. data/vendor/local/share/man/man3/gnutls_dh_params_export_raw.3 +1 -1
  748. data/vendor/local/share/man/man3/gnutls_dh_params_generate2.3 +1 -1
  749. data/vendor/local/share/man/man3/gnutls_dh_params_import_pkcs3.3 +1 -1
  750. data/vendor/local/share/man/man3/gnutls_dh_params_import_raw.3 +1 -1
  751. data/vendor/local/share/man/man3/gnutls_dh_params_init.3 +1 -1
  752. data/vendor/local/share/man/man3/gnutls_dh_set_prime_bits.3 +1 -1
  753. data/vendor/local/share/man/man3/gnutls_dtls_cookie_send.3 +1 -1
  754. data/vendor/local/share/man/man3/gnutls_dtls_cookie_verify.3 +1 -1
  755. data/vendor/local/share/man/man3/gnutls_dtls_get_data_mtu.3 +1 -1
  756. data/vendor/local/share/man/man3/gnutls_dtls_get_mtu.3 +1 -1
  757. data/vendor/local/share/man/man3/gnutls_dtls_get_timeout.3 +1 -1
  758. data/vendor/local/share/man/man3/gnutls_dtls_prestate_set.3 +1 -1
  759. data/vendor/local/share/man/man3/gnutls_dtls_set_data_mtu.3 +1 -1
  760. data/vendor/local/share/man/man3/gnutls_dtls_set_mtu.3 +1 -1
  761. data/vendor/local/share/man/man3/gnutls_dtls_set_timeouts.3 +1 -1
  762. data/vendor/local/share/man/man3/gnutls_ecc_curve_get.3 +1 -1
  763. data/vendor/local/share/man/man3/gnutls_ecc_curve_get_name.3 +1 -1
  764. data/vendor/local/share/man/man3/gnutls_ecc_curve_get_size.3 +1 -1
  765. data/vendor/local/share/man/man3/gnutls_ecc_curve_list.3 +1 -1
  766. data/vendor/local/share/man/man3/gnutls_error_is_fatal.3 +1 -1
  767. data/vendor/local/share/man/man3/gnutls_error_to_alert.3 +1 -1
  768. data/vendor/local/share/man/man3/gnutls_fingerprint.3 +1 -1
  769. data/vendor/local/share/man/man3/gnutls_global_deinit.3 +1 -1
  770. data/vendor/local/share/man/man3/gnutls_global_init.3 +1 -1
  771. data/vendor/local/share/man/man3/gnutls_global_set_audit_log_function.3 +1 -1
  772. data/vendor/local/share/man/man3/gnutls_global_set_log_function.3 +1 -1
  773. data/vendor/local/share/man/man3/gnutls_global_set_log_level.3 +1 -1
  774. data/vendor/local/share/man/man3/gnutls_global_set_mem_functions.3 +1 -1
  775. data/vendor/local/share/man/man3/gnutls_global_set_mutex.3 +1 -1
  776. data/vendor/local/share/man/man3/gnutls_global_set_time_function.3 +1 -1
  777. data/vendor/local/share/man/man3/gnutls_handshake.3 +1 -1
  778. data/vendor/local/share/man/man3/gnutls_handshake_get_last_in.3 +1 -1
  779. data/vendor/local/share/man/man3/gnutls_handshake_get_last_out.3 +1 -1
  780. data/vendor/local/share/man/man3/gnutls_handshake_set_max_packet_length.3 +1 -1
  781. data/vendor/local/share/man/man3/gnutls_handshake_set_post_client_hello_function.3 +1 -1
  782. data/vendor/local/share/man/man3/gnutls_handshake_set_private_extensions.3 +1 -1
  783. data/vendor/local/share/man/man3/gnutls_handshake_set_random.3 +1 -1
  784. data/vendor/local/share/man/man3/gnutls_handshake_set_timeout.3 +1 -1
  785. data/vendor/local/share/man/man3/gnutls_hash.3 +1 -1
  786. data/vendor/local/share/man/man3/gnutls_hash_deinit.3 +1 -1
  787. data/vendor/local/share/man/man3/gnutls_hash_fast.3 +1 -1
  788. data/vendor/local/share/man/man3/gnutls_hash_get_len.3 +1 -1
  789. data/vendor/local/share/man/man3/gnutls_hash_init.3 +1 -1
  790. data/vendor/local/share/man/man3/gnutls_hash_output.3 +3 -2
  791. data/vendor/local/share/man/man3/gnutls_heartbeat_allowed.3 +1 -1
  792. data/vendor/local/share/man/man3/gnutls_heartbeat_enable.3 +1 -1
  793. data/vendor/local/share/man/man3/gnutls_heartbeat_get_timeout.3 +1 -1
  794. data/vendor/local/share/man/man3/gnutls_heartbeat_ping.3 +1 -1
  795. data/vendor/local/share/man/man3/gnutls_heartbeat_pong.3 +1 -1
  796. data/vendor/local/share/man/man3/gnutls_heartbeat_set_timeouts.3 +1 -1
  797. data/vendor/local/share/man/man3/gnutls_hex2bin.3 +1 -1
  798. data/vendor/local/share/man/man3/gnutls_hex_decode.3 +1 -1
  799. data/vendor/local/share/man/man3/gnutls_hex_encode.3 +1 -1
  800. data/vendor/local/share/man/man3/gnutls_hmac.3 +1 -1
  801. data/vendor/local/share/man/man3/gnutls_hmac_deinit.3 +1 -1
  802. data/vendor/local/share/man/man3/gnutls_hmac_fast.3 +1 -1
  803. data/vendor/local/share/man/man3/gnutls_hmac_get_len.3 +1 -1
  804. data/vendor/local/share/man/man3/gnutls_hmac_init.3 +1 -1
  805. data/vendor/local/share/man/man3/gnutls_hmac_output.3 +3 -2
  806. data/vendor/local/share/man/man3/gnutls_init.3 +1 -1
  807. data/vendor/local/share/man/man3/gnutls_key_generate.3 +1 -1
  808. data/vendor/local/share/man/man3/gnutls_kx_get.3 +1 -1
  809. data/vendor/local/share/man/man3/gnutls_kx_get_id.3 +1 -1
  810. data/vendor/local/share/man/man3/gnutls_kx_get_name.3 +1 -1
  811. data/vendor/local/share/man/man3/gnutls_kx_list.3 +1 -1
  812. data/vendor/local/share/man/man3/gnutls_kx_set_priority.3 +1 -1
  813. data/vendor/local/share/man/man3/gnutls_load_file.3 +1 -1
  814. data/vendor/local/share/man/man3/gnutls_mac_get.3 +1 -1
  815. data/vendor/local/share/man/man3/gnutls_mac_get_id.3 +1 -1
  816. data/vendor/local/share/man/man3/gnutls_mac_get_key_size.3 +1 -1
  817. data/vendor/local/share/man/man3/gnutls_mac_get_name.3 +1 -1
  818. data/vendor/local/share/man/man3/gnutls_mac_list.3 +1 -1
  819. data/vendor/local/share/man/man3/gnutls_mac_set_priority.3 +1 -1
  820. data/vendor/local/share/man/man3/gnutls_ocsp_req_add_cert.3 +1 -1
  821. data/vendor/local/share/man/man3/gnutls_ocsp_req_add_cert_id.3 +1 -1
  822. data/vendor/local/share/man/man3/gnutls_ocsp_req_deinit.3 +1 -1
  823. data/vendor/local/share/man/man3/gnutls_ocsp_req_export.3 +1 -1
  824. data/vendor/local/share/man/man3/gnutls_ocsp_req_get_cert_id.3 +1 -1
  825. data/vendor/local/share/man/man3/gnutls_ocsp_req_get_extension.3 +1 -1
  826. data/vendor/local/share/man/man3/gnutls_ocsp_req_get_nonce.3 +1 -1
  827. data/vendor/local/share/man/man3/gnutls_ocsp_req_get_version.3 +1 -1
  828. data/vendor/local/share/man/man3/gnutls_ocsp_req_import.3 +1 -1
  829. data/vendor/local/share/man/man3/gnutls_ocsp_req_init.3 +1 -1
  830. data/vendor/local/share/man/man3/gnutls_ocsp_req_print.3 +1 -1
  831. data/vendor/local/share/man/man3/gnutls_ocsp_req_randomize_nonce.3 +1 -1
  832. data/vendor/local/share/man/man3/gnutls_ocsp_req_set_extension.3 +1 -1
  833. data/vendor/local/share/man/man3/gnutls_ocsp_req_set_nonce.3 +1 -1
  834. data/vendor/local/share/man/man3/gnutls_ocsp_resp_check_crt.3 +1 -1
  835. data/vendor/local/share/man/man3/gnutls_ocsp_resp_deinit.3 +1 -1
  836. data/vendor/local/share/man/man3/gnutls_ocsp_resp_export.3 +1 -1
  837. data/vendor/local/share/man/man3/gnutls_ocsp_resp_get_certs.3 +1 -1
  838. data/vendor/local/share/man/man3/gnutls_ocsp_resp_get_extension.3 +1 -1
  839. data/vendor/local/share/man/man3/gnutls_ocsp_resp_get_nonce.3 +1 -1
  840. data/vendor/local/share/man/man3/gnutls_ocsp_resp_get_produced.3 +1 -1
  841. data/vendor/local/share/man/man3/gnutls_ocsp_resp_get_responder.3 +1 -1
  842. data/vendor/local/share/man/man3/gnutls_ocsp_resp_get_response.3 +1 -1
  843. data/vendor/local/share/man/man3/gnutls_ocsp_resp_get_signature.3 +1 -1
  844. data/vendor/local/share/man/man3/gnutls_ocsp_resp_get_signature_algorithm.3 +1 -1
  845. data/vendor/local/share/man/man3/gnutls_ocsp_resp_get_single.3 +1 -1
  846. data/vendor/local/share/man/man3/gnutls_ocsp_resp_get_status.3 +1 -1
  847. data/vendor/local/share/man/man3/gnutls_ocsp_resp_get_version.3 +1 -1
  848. data/vendor/local/share/man/man3/gnutls_ocsp_resp_import.3 +1 -1
  849. data/vendor/local/share/man/man3/gnutls_ocsp_resp_init.3 +1 -1
  850. data/vendor/local/share/man/man3/gnutls_ocsp_resp_print.3 +1 -1
  851. data/vendor/local/share/man/man3/gnutls_ocsp_resp_verify.3 +1 -1
  852. data/vendor/local/share/man/man3/gnutls_ocsp_resp_verify_direct.3 +1 -1
  853. data/vendor/local/share/man/man3/gnutls_ocsp_status_request_enable_client.3 +1 -1
  854. data/vendor/local/share/man/man3/gnutls_ocsp_status_request_get.3 +1 -1
  855. data/vendor/local/share/man/man3/gnutls_ocsp_status_request_is_checked.3 +1 -1
  856. data/vendor/local/share/man/man3/gnutls_openpgp_crt_check_hostname.3 +1 -1
  857. data/vendor/local/share/man/man3/gnutls_openpgp_crt_deinit.3 +1 -1
  858. data/vendor/local/share/man/man3/gnutls_openpgp_crt_export.3 +1 -1
  859. data/vendor/local/share/man/man3/gnutls_openpgp_crt_export2.3 +1 -1
  860. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_auth_subkey.3 +1 -1
  861. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_creation_time.3 +1 -1
  862. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_expiration_time.3 +1 -1
  863. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_fingerprint.3 +1 -1
  864. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_key_id.3 +1 -1
  865. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_key_usage.3 +1 -1
  866. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_name.3 +1 -1
  867. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_pk_algorithm.3 +1 -1
  868. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_pk_dsa_raw.3 +1 -1
  869. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_pk_rsa_raw.3 +1 -1
  870. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_preferred_key_id.3 +1 -1
  871. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_revoked_status.3 +1 -1
  872. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_subkey_count.3 +1 -1
  873. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_subkey_creation_time.3 +1 -1
  874. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_subkey_expiration_time.3 +1 -1
  875. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_subkey_fingerprint.3 +1 -1
  876. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_subkey_id.3 +1 -1
  877. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_subkey_idx.3 +1 -1
  878. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_subkey_pk_algorithm.3 +1 -1
  879. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_subkey_pk_dsa_raw.3 +1 -1
  880. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_subkey_pk_rsa_raw.3 +1 -1
  881. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_subkey_revoked_status.3 +1 -1
  882. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_subkey_usage.3 +1 -1
  883. data/vendor/local/share/man/man3/gnutls_openpgp_crt_get_version.3 +1 -1
  884. data/vendor/local/share/man/man3/gnutls_openpgp_crt_import.3 +1 -1
  885. data/vendor/local/share/man/man3/gnutls_openpgp_crt_init.3 +1 -1
  886. data/vendor/local/share/man/man3/gnutls_openpgp_crt_print.3 +1 -1
  887. data/vendor/local/share/man/man3/gnutls_openpgp_crt_set_preferred_key_id.3 +1 -1
  888. data/vendor/local/share/man/man3/gnutls_openpgp_crt_verify_ring.3 +1 -1
  889. data/vendor/local/share/man/man3/gnutls_openpgp_crt_verify_self.3 +1 -1
  890. data/vendor/local/share/man/man3/gnutls_openpgp_keyring_check_id.3 +1 -1
  891. data/vendor/local/share/man/man3/gnutls_openpgp_keyring_deinit.3 +1 -1
  892. data/vendor/local/share/man/man3/gnutls_openpgp_keyring_get_crt.3 +1 -1
  893. data/vendor/local/share/man/man3/gnutls_openpgp_keyring_get_crt_count.3 +1 -1
  894. data/vendor/local/share/man/man3/gnutls_openpgp_keyring_import.3 +1 -1
  895. data/vendor/local/share/man/man3/gnutls_openpgp_keyring_init.3 +1 -1
  896. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_deinit.3 +1 -1
  897. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_export.3 +1 -1
  898. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_export2.3 +1 -1
  899. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_export_dsa_raw.3 +1 -1
  900. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_export_rsa_raw.3 +1 -1
  901. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_export_subkey_dsa_raw.3 +1 -1
  902. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_export_subkey_rsa_raw.3 +1 -1
  903. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_get_fingerprint.3 +1 -1
  904. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_get_key_id.3 +1 -1
  905. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_get_pk_algorithm.3 +1 -1
  906. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_get_preferred_key_id.3 +1 -1
  907. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_get_revoked_status.3 +1 -1
  908. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_get_subkey_count.3 +1 -1
  909. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_get_subkey_creation_time.3 +1 -1
  910. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_get_subkey_fingerprint.3 +1 -1
  911. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_get_subkey_id.3 +1 -1
  912. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_get_subkey_idx.3 +1 -1
  913. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_get_subkey_pk_algorithm.3 +1 -1
  914. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_get_subkey_revoked_status.3 +1 -1
  915. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_import.3 +1 -1
  916. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_init.3 +1 -1
  917. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_sec_param.3 +1 -1
  918. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_set_preferred_key_id.3 +1 -1
  919. data/vendor/local/share/man/man3/gnutls_openpgp_privkey_sign_hash.3 +1 -1
  920. data/vendor/local/share/man/man3/gnutls_openpgp_send_cert.3 +1 -1
  921. data/vendor/local/share/man/man3/gnutls_openpgp_set_recv_key_function.3 +1 -1
  922. data/vendor/local/share/man/man3/gnutls_pcert_deinit.3 +1 -1
  923. data/vendor/local/share/man/man3/gnutls_pcert_import_openpgp.3 +1 -1
  924. data/vendor/local/share/man/man3/gnutls_pcert_import_openpgp_raw.3 +1 -1
  925. data/vendor/local/share/man/man3/gnutls_pcert_import_x509.3 +1 -1
  926. data/vendor/local/share/man/man3/gnutls_pcert_import_x509_raw.3 +1 -1
  927. data/vendor/local/share/man/man3/gnutls_pcert_list_import_x509_raw.3 +1 -1
  928. data/vendor/local/share/man/man3/gnutls_pem_base64_decode.3 +1 -1
  929. data/vendor/local/share/man/man3/gnutls_pem_base64_decode_alloc.3 +1 -1
  930. data/vendor/local/share/man/man3/gnutls_pem_base64_encode.3 +1 -1
  931. data/vendor/local/share/man/man3/gnutls_pem_base64_encode_alloc.3 +1 -1
  932. data/vendor/local/share/man/man3/gnutls_perror.3 +1 -1
  933. data/vendor/local/share/man/man3/gnutls_pk_algorithm_get_name.3 +1 -1
  934. data/vendor/local/share/man/man3/gnutls_pk_bits_to_sec_param.3 +1 -1
  935. data/vendor/local/share/man/man3/gnutls_pk_get_id.3 +1 -1
  936. data/vendor/local/share/man/man3/gnutls_pk_get_name.3 +1 -1
  937. data/vendor/local/share/man/man3/gnutls_pk_list.3 +1 -1
  938. data/vendor/local/share/man/man3/gnutls_pk_to_sign.3 +1 -1
  939. data/vendor/local/share/man/man3/gnutls_pkcs11_add_provider.3 +1 -1
  940. data/vendor/local/share/man/man3/gnutls_pkcs11_copy_secret_key.3 +1 -1
  941. data/vendor/local/share/man/man3/gnutls_pkcs11_copy_x509_crt.3 +1 -1
  942. data/vendor/local/share/man/man3/gnutls_pkcs11_copy_x509_privkey.3 +1 -1
  943. data/vendor/local/share/man/man3/gnutls_pkcs11_deinit.3 +1 -1
  944. data/vendor/local/share/man/man3/gnutls_pkcs11_delete_url.3 +1 -1
  945. data/vendor/local/share/man/man3/gnutls_pkcs11_get_pin_function.3 +1 -1
  946. data/vendor/local/share/man/man3/gnutls_pkcs11_init.3 +1 -1
  947. data/vendor/local/share/man/man3/gnutls_pkcs11_obj_deinit.3 +1 -1
  948. data/vendor/local/share/man/man3/gnutls_pkcs11_obj_export.3 +1 -1
  949. data/vendor/local/share/man/man3/gnutls_pkcs11_obj_export2.3 +1 -1
  950. data/vendor/local/share/man/man3/gnutls_pkcs11_obj_export_url.3 +1 -1
  951. data/vendor/local/share/man/man3/gnutls_pkcs11_obj_get_info.3 +1 -1
  952. data/vendor/local/share/man/man3/gnutls_pkcs11_obj_get_type.3 +1 -1
  953. data/vendor/local/share/man/man3/gnutls_pkcs11_obj_import_url.3 +1 -1
  954. data/vendor/local/share/man/man3/gnutls_pkcs11_obj_init.3 +1 -1
  955. data/vendor/local/share/man/man3/gnutls_pkcs11_obj_list_import_url.3 +1 -1
  956. data/vendor/local/share/man/man3/gnutls_pkcs11_obj_list_import_url2.3 +1 -1
  957. data/vendor/local/share/man/man3/gnutls_pkcs11_obj_set_pin_function.3 +1 -1
  958. data/vendor/local/share/man/man3/gnutls_pkcs11_privkey_deinit.3 +1 -1
  959. data/vendor/local/share/man/man3/gnutls_pkcs11_privkey_export_url.3 +1 -1
  960. data/vendor/local/share/man/man3/gnutls_pkcs11_privkey_generate.3 +1 -1
  961. data/vendor/local/share/man/man3/gnutls_pkcs11_privkey_generate2.3 +1 -1
  962. data/vendor/local/share/man/man3/gnutls_pkcs11_privkey_get_info.3 +1 -1
  963. data/vendor/local/share/man/man3/gnutls_pkcs11_privkey_get_pk_algorithm.3 +1 -1
  964. data/vendor/local/share/man/man3/gnutls_pkcs11_privkey_import_url.3 +1 -1
  965. data/vendor/local/share/man/man3/gnutls_pkcs11_privkey_init.3 +1 -1
  966. data/vendor/local/share/man/man3/gnutls_pkcs11_privkey_set_pin_function.3 +1 -1
  967. data/vendor/local/share/man/man3/gnutls_pkcs11_privkey_status.3 +1 -1
  968. data/vendor/local/share/man/man3/gnutls_pkcs11_reinit.3 +1 -1
  969. data/vendor/local/share/man/man3/gnutls_pkcs11_set_pin_function.3 +1 -1
  970. data/vendor/local/share/man/man3/gnutls_pkcs11_set_token_function.3 +1 -1
  971. data/vendor/local/share/man/man3/gnutls_pkcs11_token_get_flags.3 +1 -1
  972. data/vendor/local/share/man/man3/gnutls_pkcs11_token_get_info.3 +1 -1
  973. data/vendor/local/share/man/man3/gnutls_pkcs11_token_get_mechanism.3 +1 -1
  974. data/vendor/local/share/man/man3/gnutls_pkcs11_token_get_url.3 +1 -1
  975. data/vendor/local/share/man/man3/gnutls_pkcs11_token_init.3 +1 -1
  976. data/vendor/local/share/man/man3/gnutls_pkcs11_token_set_pin.3 +1 -1
  977. data/vendor/local/share/man/man3/gnutls_pkcs11_type_get_name.3 +1 -1
  978. data/vendor/local/share/man/man3/gnutls_pkcs12_bag_decrypt.3 +1 -1
  979. data/vendor/local/share/man/man3/gnutls_pkcs12_bag_deinit.3 +1 -1
  980. data/vendor/local/share/man/man3/gnutls_pkcs12_bag_encrypt.3 +1 -1
  981. data/vendor/local/share/man/man3/gnutls_pkcs12_bag_get_count.3 +1 -1
  982. data/vendor/local/share/man/man3/gnutls_pkcs12_bag_get_data.3 +1 -1
  983. data/vendor/local/share/man/man3/gnutls_pkcs12_bag_get_friendly_name.3 +1 -1
  984. data/vendor/local/share/man/man3/gnutls_pkcs12_bag_get_key_id.3 +1 -1
  985. data/vendor/local/share/man/man3/gnutls_pkcs12_bag_get_type.3 +1 -1
  986. data/vendor/local/share/man/man3/gnutls_pkcs12_bag_init.3 +1 -1
  987. data/vendor/local/share/man/man3/gnutls_pkcs12_bag_set_crl.3 +1 -1
  988. data/vendor/local/share/man/man3/gnutls_pkcs12_bag_set_crt.3 +1 -1
  989. data/vendor/local/share/man/man3/gnutls_pkcs12_bag_set_data.3 +1 -1
  990. data/vendor/local/share/man/man3/gnutls_pkcs12_bag_set_friendly_name.3 +1 -1
  991. data/vendor/local/share/man/man3/gnutls_pkcs12_bag_set_key_id.3 +1 -1
  992. data/vendor/local/share/man/man3/gnutls_pkcs12_deinit.3 +1 -1
  993. data/vendor/local/share/man/man3/gnutls_pkcs12_export.3 +1 -1
  994. data/vendor/local/share/man/man3/gnutls_pkcs12_export2.3 +1 -1
  995. data/vendor/local/share/man/man3/gnutls_pkcs12_generate_mac.3 +1 -1
  996. data/vendor/local/share/man/man3/gnutls_pkcs12_get_bag.3 +1 -1
  997. data/vendor/local/share/man/man3/gnutls_pkcs12_import.3 +1 -1
  998. data/vendor/local/share/man/man3/gnutls_pkcs12_init.3 +1 -1
  999. data/vendor/local/share/man/man3/gnutls_pkcs12_set_bag.3 +1 -1
  1000. data/vendor/local/share/man/man3/gnutls_pkcs12_simple_parse.3 +8 -8
  1001. data/vendor/local/share/man/man3/gnutls_pkcs12_verify_mac.3 +1 -1
  1002. data/vendor/local/share/man/man3/gnutls_pkcs7_deinit.3 +1 -1
  1003. data/vendor/local/share/man/man3/gnutls_pkcs7_delete_crl.3 +1 -1
  1004. data/vendor/local/share/man/man3/gnutls_pkcs7_delete_crt.3 +1 -1
  1005. data/vendor/local/share/man/man3/gnutls_pkcs7_export.3 +1 -1
  1006. data/vendor/local/share/man/man3/gnutls_pkcs7_export2.3 +1 -1
  1007. data/vendor/local/share/man/man3/gnutls_pkcs7_get_crl_count.3 +1 -1
  1008. data/vendor/local/share/man/man3/gnutls_pkcs7_get_crl_raw.3 +1 -1
  1009. data/vendor/local/share/man/man3/gnutls_pkcs7_get_crt_count.3 +1 -1
  1010. data/vendor/local/share/man/man3/gnutls_pkcs7_get_crt_raw.3 +1 -1
  1011. data/vendor/local/share/man/man3/gnutls_pkcs7_import.3 +1 -1
  1012. data/vendor/local/share/man/man3/gnutls_pkcs7_init.3 +1 -1
  1013. data/vendor/local/share/man/man3/gnutls_pkcs7_set_crl.3 +1 -1
  1014. data/vendor/local/share/man/man3/gnutls_pkcs7_set_crl_raw.3 +1 -1
  1015. data/vendor/local/share/man/man3/gnutls_pkcs7_set_crt.3 +1 -1
  1016. data/vendor/local/share/man/man3/gnutls_pkcs7_set_crt_raw.3 +1 -1
  1017. data/vendor/local/share/man/man3/gnutls_prf.3 +1 -1
  1018. data/vendor/local/share/man/man3/gnutls_prf_raw.3 +1 -1
  1019. data/vendor/local/share/man/man3/gnutls_priority_certificate_type_list.3 +1 -1
  1020. data/vendor/local/share/man/man3/gnutls_priority_compression_list.3 +1 -1
  1021. data/vendor/local/share/man/man3/gnutls_priority_deinit.3 +1 -1
  1022. data/vendor/local/share/man/man3/gnutls_priority_ecc_curve_list.3 +1 -1
  1023. data/vendor/local/share/man/man3/gnutls_priority_get_cipher_suite_index.3 +1 -1
  1024. data/vendor/local/share/man/man3/gnutls_priority_init.3 +1 -1
  1025. data/vendor/local/share/man/man3/gnutls_priority_protocol_list.3 +1 -1
  1026. data/vendor/local/share/man/man3/gnutls_priority_set.3 +1 -1
  1027. data/vendor/local/share/man/man3/gnutls_priority_set_direct.3 +1 -1
  1028. data/vendor/local/share/man/man3/gnutls_priority_sign_list.3 +1 -1
  1029. data/vendor/local/share/man/man3/gnutls_privkey_decrypt_data.3 +1 -1
  1030. data/vendor/local/share/man/man3/gnutls_privkey_deinit.3 +1 -1
  1031. data/vendor/local/share/man/man3/gnutls_privkey_get_pk_algorithm.3 +1 -1
  1032. data/vendor/local/share/man/man3/gnutls_privkey_get_type.3 +1 -1
  1033. data/vendor/local/share/man/man3/gnutls_privkey_import_ext.3 +1 -1
  1034. data/vendor/local/share/man/man3/gnutls_privkey_import_ext2.3 +1 -1
  1035. data/vendor/local/share/man/man3/gnutls_privkey_import_openpgp.3 +1 -1
  1036. data/vendor/local/share/man/man3/gnutls_privkey_import_openpgp_raw.3 +1 -1
  1037. data/vendor/local/share/man/man3/gnutls_privkey_import_pkcs11.3 +1 -1
  1038. data/vendor/local/share/man/man3/gnutls_privkey_import_pkcs11_url.3 +1 -1
  1039. data/vendor/local/share/man/man3/gnutls_privkey_import_tpm_raw.3 +1 -1
  1040. data/vendor/local/share/man/man3/gnutls_privkey_import_tpm_url.3 +1 -1
  1041. data/vendor/local/share/man/man3/gnutls_privkey_import_url.3 +1 -1
  1042. data/vendor/local/share/man/man3/gnutls_privkey_import_x509.3 +1 -1
  1043. data/vendor/local/share/man/man3/gnutls_privkey_import_x509_raw.3 +2 -2
  1044. data/vendor/local/share/man/man3/gnutls_privkey_init.3 +1 -1
  1045. data/vendor/local/share/man/man3/gnutls_privkey_set_pin_function.3 +1 -1
  1046. data/vendor/local/share/man/man3/gnutls_privkey_sign_data.3 +2 -2
  1047. data/vendor/local/share/man/man3/gnutls_privkey_sign_hash.3 +2 -2
  1048. data/vendor/local/share/man/man3/gnutls_privkey_sign_raw_data.3 +4 -1
  1049. data/vendor/local/share/man/man3/gnutls_privkey_status.3 +1 -1
  1050. data/vendor/local/share/man/man3/gnutls_protocol_get_id.3 +1 -1
  1051. data/vendor/local/share/man/man3/gnutls_protocol_get_name.3 +1 -1
  1052. data/vendor/local/share/man/man3/gnutls_protocol_get_version.3 +1 -1
  1053. data/vendor/local/share/man/man3/gnutls_protocol_list.3 +1 -1
  1054. data/vendor/local/share/man/man3/gnutls_protocol_set_priority.3 +1 -1
  1055. data/vendor/local/share/man/man3/gnutls_psk_allocate_client_credentials.3 +1 -1
  1056. data/vendor/local/share/man/man3/gnutls_psk_allocate_server_credentials.3 +1 -1
  1057. data/vendor/local/share/man/man3/gnutls_psk_client_get_hint.3 +1 -1
  1058. data/vendor/local/share/man/man3/gnutls_psk_free_client_credentials.3 +1 -1
  1059. data/vendor/local/share/man/man3/gnutls_psk_free_server_credentials.3 +1 -1
  1060. data/vendor/local/share/man/man3/gnutls_psk_server_get_username.3 +1 -1
  1061. data/vendor/local/share/man/man3/gnutls_psk_set_client_credentials.3 +1 -1
  1062. data/vendor/local/share/man/man3/gnutls_psk_set_client_credentials_function.3 +1 -1
  1063. data/vendor/local/share/man/man3/gnutls_psk_set_params_function.3 +1 -1
  1064. data/vendor/local/share/man/man3/gnutls_psk_set_server_credentials_file.3 +1 -1
  1065. data/vendor/local/share/man/man3/gnutls_psk_set_server_credentials_function.3 +1 -1
  1066. data/vendor/local/share/man/man3/gnutls_psk_set_server_credentials_hint.3 +1 -1
  1067. data/vendor/local/share/man/man3/gnutls_psk_set_server_dh_params.3 +1 -1
  1068. data/vendor/local/share/man/man3/gnutls_psk_set_server_params_function.3 +1 -1
  1069. data/vendor/local/share/man/man3/gnutls_pubkey_deinit.3 +1 -1
  1070. data/vendor/local/share/man/man3/gnutls_pubkey_encrypt_data.3 +1 -1
  1071. data/vendor/local/share/man/man3/gnutls_pubkey_export.3 +1 -1
  1072. data/vendor/local/share/man/man3/gnutls_pubkey_export2.3 +1 -1
  1073. data/vendor/local/share/man/man3/gnutls_pubkey_get_key_id.3 +1 -1
  1074. data/vendor/local/share/man/man3/gnutls_pubkey_get_key_usage.3 +1 -1
  1075. data/vendor/local/share/man/man3/gnutls_pubkey_get_openpgp_key_id.3 +1 -1
  1076. data/vendor/local/share/man/man3/gnutls_pubkey_get_pk_algorithm.3 +1 -1
  1077. data/vendor/local/share/man/man3/gnutls_pubkey_get_pk_dsa_raw.3 +1 -1
  1078. data/vendor/local/share/man/man3/gnutls_pubkey_get_pk_ecc_raw.3 +1 -1
  1079. data/vendor/local/share/man/man3/gnutls_pubkey_get_pk_ecc_x962.3 +1 -1
  1080. data/vendor/local/share/man/man3/gnutls_pubkey_get_pk_rsa_raw.3 +1 -1
  1081. data/vendor/local/share/man/man3/gnutls_pubkey_get_preferred_hash_algorithm.3 +1 -1
  1082. data/vendor/local/share/man/man3/gnutls_pubkey_get_verify_algorithm.3 +1 -1
  1083. data/vendor/local/share/man/man3/gnutls_pubkey_import.3 +1 -1
  1084. data/vendor/local/share/man/man3/gnutls_pubkey_import_dsa_raw.3 +1 -1
  1085. data/vendor/local/share/man/man3/gnutls_pubkey_import_ecc_raw.3 +1 -1
  1086. data/vendor/local/share/man/man3/gnutls_pubkey_import_ecc_x962.3 +1 -1
  1087. data/vendor/local/share/man/man3/gnutls_pubkey_import_openpgp.3 +1 -1
  1088. data/vendor/local/share/man/man3/gnutls_pubkey_import_openpgp_raw.3 +1 -1
  1089. data/vendor/local/share/man/man3/gnutls_pubkey_import_pkcs11.3 +1 -1
  1090. data/vendor/local/share/man/man3/gnutls_pubkey_import_pkcs11_url.3 +1 -1
  1091. data/vendor/local/share/man/man3/gnutls_pubkey_import_privkey.3 +1 -1
  1092. data/vendor/local/share/man/man3/gnutls_pubkey_import_rsa_raw.3 +1 -1
  1093. data/vendor/local/share/man/man3/gnutls_pubkey_import_tpm_raw.3 +1 -1
  1094. data/vendor/local/share/man/man3/gnutls_pubkey_import_tpm_url.3 +1 -1
  1095. data/vendor/local/share/man/man3/gnutls_pubkey_import_url.3 +1 -1
  1096. data/vendor/local/share/man/man3/gnutls_pubkey_import_x509.3 +1 -1
  1097. data/vendor/local/share/man/man3/gnutls_pubkey_import_x509_crq.3 +1 -1
  1098. data/vendor/local/share/man/man3/gnutls_pubkey_import_x509_raw.3 +1 -1
  1099. data/vendor/local/share/man/man3/gnutls_pubkey_init.3 +1 -1
  1100. data/vendor/local/share/man/man3/gnutls_pubkey_print.3 +1 -1
  1101. data/vendor/local/share/man/man3/gnutls_pubkey_set_key_usage.3 +1 -1
  1102. data/vendor/local/share/man/man3/gnutls_pubkey_set_pin_function.3 +1 -1
  1103. data/vendor/local/share/man/man3/gnutls_pubkey_verify_data.3 +2 -2
  1104. data/vendor/local/share/man/man3/gnutls_pubkey_verify_data2.3 +2 -2
  1105. data/vendor/local/share/man/man3/gnutls_pubkey_verify_hash.3 +2 -2
  1106. data/vendor/local/share/man/man3/gnutls_pubkey_verify_hash2.3 +2 -2
  1107. data/vendor/local/share/man/man3/gnutls_random_art.3 +1 -1
  1108. data/vendor/local/share/man/man3/gnutls_range_split.3 +1 -1
  1109. data/vendor/local/share/man/man3/gnutls_record_can_use_length_hiding.3 +4 -4
  1110. data/vendor/local/share/man/man3/gnutls_record_check_pending.3 +1 -1
  1111. data/vendor/local/share/man/man3/gnutls_record_cork.3 +1 -1
  1112. data/vendor/local/share/man/man3/gnutls_record_disable_padding.3 +1 -1
  1113. data/vendor/local/share/man/man3/gnutls_record_get_direction.3 +1 -1
  1114. data/vendor/local/share/man/man3/gnutls_record_get_discarded.3 +1 -1
  1115. data/vendor/local/share/man/man3/gnutls_record_get_max_size.3 +1 -1
  1116. data/vendor/local/share/man/man3/gnutls_record_recv.3 +1 -1
  1117. data/vendor/local/share/man/man3/gnutls_record_recv_seq.3 +1 -1
  1118. data/vendor/local/share/man/man3/gnutls_record_send.3 +1 -1
  1119. data/vendor/local/share/man/man3/gnutls_record_send_range.3 +1 -1
  1120. data/vendor/local/share/man/man3/gnutls_record_set_max_empty_records.3 +1 -1
  1121. data/vendor/local/share/man/man3/gnutls_record_set_max_size.3 +1 -1
  1122. data/vendor/local/share/man/man3/gnutls_record_set_timeout.3 +1 -1
  1123. data/vendor/local/share/man/man3/gnutls_record_uncork.3 +1 -1
  1124. data/vendor/local/share/man/man3/gnutls_rehandshake.3 +1 -1
  1125. data/vendor/local/share/man/man3/gnutls_rnd.3 +1 -1
  1126. data/vendor/local/share/man/man3/gnutls_rnd_refresh.3 +1 -1
  1127. data/vendor/local/share/man/man3/gnutls_rsa_export_get_modulus_bits.3 +1 -1
  1128. data/vendor/local/share/man/man3/gnutls_rsa_export_get_pubkey.3 +1 -1
  1129. data/vendor/local/share/man/man3/gnutls_rsa_params_cpy.3 +1 -1
  1130. data/vendor/local/share/man/man3/gnutls_rsa_params_deinit.3 +1 -1
  1131. data/vendor/local/share/man/man3/gnutls_rsa_params_export_pkcs1.3 +1 -1
  1132. data/vendor/local/share/man/man3/gnutls_rsa_params_export_raw.3 +1 -1
  1133. data/vendor/local/share/man/man3/gnutls_rsa_params_generate2.3 +1 -1
  1134. data/vendor/local/share/man/man3/gnutls_rsa_params_import_pkcs1.3 +1 -1
  1135. data/vendor/local/share/man/man3/gnutls_rsa_params_import_raw.3 +1 -1
  1136. data/vendor/local/share/man/man3/gnutls_rsa_params_init.3 +1 -1
  1137. data/vendor/local/share/man/man3/gnutls_safe_renegotiation_status.3 +1 -1
  1138. data/vendor/local/share/man/man3/gnutls_sec_param_get_name.3 +1 -1
  1139. data/vendor/local/share/man/man3/gnutls_sec_param_to_pk_bits.3 +1 -1
  1140. data/vendor/local/share/man/man3/gnutls_server_name_get.3 +1 -1
  1141. data/vendor/local/share/man/man3/gnutls_server_name_set.3 +1 -1
  1142. data/vendor/local/share/man/man3/gnutls_session_channel_binding.3 +1 -1
  1143. data/vendor/local/share/man/man3/gnutls_session_enable_compatibility_mode.3 +1 -1
  1144. data/vendor/local/share/man/man3/gnutls_session_force_valid.3 +1 -1
  1145. data/vendor/local/share/man/man3/gnutls_session_get_data.3 +1 -1
  1146. data/vendor/local/share/man/man3/gnutls_session_get_data2.3 +1 -1
  1147. data/vendor/local/share/man/man3/gnutls_session_get_desc.3 +1 -1
  1148. data/vendor/local/share/man/man3/gnutls_session_get_id.3 +1 -1
  1149. data/vendor/local/share/man/man3/gnutls_session_get_id2.3 +1 -1
  1150. data/vendor/local/share/man/man3/gnutls_session_get_ptr.3 +1 -1
  1151. data/vendor/local/share/man/man3/gnutls_session_get_random.3 +1 -1
  1152. data/vendor/local/share/man/man3/gnutls_session_is_resumed.3 +1 -1
  1153. data/vendor/local/share/man/man3/gnutls_session_resumption_requested.3 +1 -1
  1154. data/vendor/local/share/man/man3/gnutls_session_set_data.3 +1 -1
  1155. data/vendor/local/share/man/man3/gnutls_session_set_premaster.3 +1 -1
  1156. data/vendor/local/share/man/man3/gnutls_session_set_ptr.3 +1 -1
  1157. data/vendor/local/share/man/man3/gnutls_session_ticket_enable_client.3 +1 -1
  1158. data/vendor/local/share/man/man3/gnutls_session_ticket_enable_server.3 +1 -1
  1159. data/vendor/local/share/man/man3/gnutls_session_ticket_key_generate.3 +1 -1
  1160. data/vendor/local/share/man/man3/gnutls_set_default_export_priority.3 +1 -1
  1161. data/vendor/local/share/man/man3/gnutls_set_default_priority.3 +1 -1
  1162. data/vendor/local/share/man/man3/gnutls_sign_algorithm_get.3 +2 -2
  1163. data/vendor/local/share/man/man3/gnutls_sign_algorithm_get_client.3 +47 -0
  1164. data/vendor/local/share/man/man3/gnutls_sign_algorithm_get_requested.3 +1 -1
  1165. data/vendor/local/share/man/man3/gnutls_sign_callback_get.3 +1 -1
  1166. data/vendor/local/share/man/man3/gnutls_sign_callback_set.3 +1 -1
  1167. data/vendor/local/share/man/man3/gnutls_sign_get_hash_algorithm.3 +1 -1
  1168. data/vendor/local/share/man/man3/gnutls_sign_get_id.3 +1 -1
  1169. data/vendor/local/share/man/man3/gnutls_sign_get_name.3 +1 -1
  1170. data/vendor/local/share/man/man3/gnutls_sign_get_pk_algorithm.3 +1 -1
  1171. data/vendor/local/share/man/man3/gnutls_sign_is_secure.3 +1 -1
  1172. data/vendor/local/share/man/man3/gnutls_sign_list.3 +1 -1
  1173. data/vendor/local/share/man/man3/gnutls_srp_allocate_client_credentials.3 +1 -1
  1174. data/vendor/local/share/man/man3/gnutls_srp_allocate_server_credentials.3 +1 -1
  1175. data/vendor/local/share/man/man3/gnutls_srp_base64_decode.3 +1 -1
  1176. data/vendor/local/share/man/man3/gnutls_srp_base64_decode_alloc.3 +1 -1
  1177. data/vendor/local/share/man/man3/gnutls_srp_base64_encode.3 +1 -1
  1178. data/vendor/local/share/man/man3/gnutls_srp_base64_encode_alloc.3 +1 -1
  1179. data/vendor/local/share/man/man3/gnutls_srp_free_client_credentials.3 +1 -1
  1180. data/vendor/local/share/man/man3/gnutls_srp_free_server_credentials.3 +1 -1
  1181. data/vendor/local/share/man/man3/gnutls_srp_server_get_username.3 +1 -1
  1182. data/vendor/local/share/man/man3/gnutls_srp_set_client_credentials.3 +1 -1
  1183. data/vendor/local/share/man/man3/gnutls_srp_set_client_credentials_function.3 +1 -1
  1184. data/vendor/local/share/man/man3/gnutls_srp_set_prime_bits.3 +1 -1
  1185. data/vendor/local/share/man/man3/gnutls_srp_set_server_credentials_file.3 +1 -1
  1186. data/vendor/local/share/man/man3/gnutls_srp_set_server_credentials_function.3 +1 -1
  1187. data/vendor/local/share/man/man3/gnutls_srp_verifier.3 +1 -1
  1188. data/vendor/local/share/man/man3/gnutls_srtp_get_keys.3 +1 -1
  1189. data/vendor/local/share/man/man3/gnutls_srtp_get_mki.3 +1 -1
  1190. data/vendor/local/share/man/man3/gnutls_srtp_get_profile_id.3 +1 -1
  1191. data/vendor/local/share/man/man3/gnutls_srtp_get_profile_name.3 +1 -1
  1192. data/vendor/local/share/man/man3/gnutls_srtp_get_selected_profile.3 +1 -1
  1193. data/vendor/local/share/man/man3/gnutls_srtp_set_mki.3 +1 -1
  1194. data/vendor/local/share/man/man3/gnutls_srtp_set_profile.3 +1 -1
  1195. data/vendor/local/share/man/man3/gnutls_srtp_set_profile_direct.3 +1 -1
  1196. data/vendor/local/share/man/man3/gnutls_store_commitment.3 +1 -1
  1197. data/vendor/local/share/man/man3/gnutls_store_pubkey.3 +1 -1
  1198. data/vendor/local/share/man/man3/gnutls_strerror.3 +1 -1
  1199. data/vendor/local/share/man/man3/gnutls_strerror_name.3 +1 -1
  1200. data/vendor/local/share/man/man3/gnutls_supplemental_get_name.3 +1 -1
  1201. data/vendor/local/share/man/man3/gnutls_tdb_deinit.3 +1 -1
  1202. data/vendor/local/share/man/man3/gnutls_tdb_init.3 +1 -1
  1203. data/vendor/local/share/man/man3/gnutls_tdb_set_store_commitment_func.3 +1 -1
  1204. data/vendor/local/share/man/man3/gnutls_tdb_set_store_func.3 +1 -1
  1205. data/vendor/local/share/man/man3/gnutls_tdb_set_verify_func.3 +1 -1
  1206. data/vendor/local/share/man/man3/gnutls_tpm_get_registered.3 +1 -1
  1207. data/vendor/local/share/man/man3/gnutls_tpm_key_list_deinit.3 +1 -1
  1208. data/vendor/local/share/man/man3/gnutls_tpm_key_list_get_url.3 +1 -1
  1209. data/vendor/local/share/man/man3/gnutls_tpm_privkey_delete.3 +1 -1
  1210. data/vendor/local/share/man/man3/gnutls_tpm_privkey_generate.3 +1 -1
  1211. data/vendor/local/share/man/man3/gnutls_transport_get_int.3 +1 -1
  1212. data/vendor/local/share/man/man3/gnutls_transport_get_int2.3 +1 -1
  1213. data/vendor/local/share/man/man3/gnutls_transport_get_ptr.3 +1 -1
  1214. data/vendor/local/share/man/man3/gnutls_transport_get_ptr2.3 +1 -1
  1215. data/vendor/local/share/man/man3/gnutls_transport_set_errno.3 +1 -1
  1216. data/vendor/local/share/man/man3/gnutls_transport_set_errno_function.3 +1 -1
  1217. data/vendor/local/share/man/man3/gnutls_transport_set_int.3 +1 -1
  1218. data/vendor/local/share/man/man3/gnutls_transport_set_int2.3 +1 -1
  1219. data/vendor/local/share/man/man3/gnutls_transport_set_ptr.3 +1 -1
  1220. data/vendor/local/share/man/man3/gnutls_transport_set_ptr2.3 +1 -1
  1221. data/vendor/local/share/man/man3/gnutls_transport_set_pull_function.3 +1 -1
  1222. data/vendor/local/share/man/man3/gnutls_transport_set_pull_timeout_function.3 +5 -3
  1223. data/vendor/local/share/man/man3/gnutls_transport_set_push_function.3 +1 -1
  1224. data/vendor/local/share/man/man3/gnutls_transport_set_vec_push_function.3 +1 -1
  1225. data/vendor/local/share/man/man3/gnutls_url_is_supported.3 +1 -1
  1226. data/vendor/local/share/man/man3/gnutls_verify_stored_pubkey.3 +1 -1
  1227. data/vendor/local/share/man/man3/gnutls_x509_crl_check_issuer.3 +1 -1
  1228. data/vendor/local/share/man/man3/gnutls_x509_crl_deinit.3 +1 -1
  1229. data/vendor/local/share/man/man3/gnutls_x509_crl_export.3 +1 -1
  1230. data/vendor/local/share/man/man3/gnutls_x509_crl_export2.3 +1 -1
  1231. data/vendor/local/share/man/man3/gnutls_x509_crl_get_authority_key_gn_serial.3 +1 -1
  1232. data/vendor/local/share/man/man3/gnutls_x509_crl_get_authority_key_id.3 +1 -1
  1233. data/vendor/local/share/man/man3/gnutls_x509_crl_get_crt_count.3 +1 -1
  1234. data/vendor/local/share/man/man3/gnutls_x509_crl_get_crt_serial.3 +1 -1
  1235. data/vendor/local/share/man/man3/gnutls_x509_crl_get_dn_oid.3 +1 -1
  1236. data/vendor/local/share/man/man3/gnutls_x509_crl_get_extension_data.3 +1 -1
  1237. data/vendor/local/share/man/man3/gnutls_x509_crl_get_extension_info.3 +1 -1
  1238. data/vendor/local/share/man/man3/gnutls_x509_crl_get_extension_oid.3 +1 -1
  1239. data/vendor/local/share/man/man3/gnutls_x509_crl_get_issuer_dn.3 +1 -1
  1240. data/vendor/local/share/man/man3/gnutls_x509_crl_get_issuer_dn2.3 +1 -1
  1241. data/vendor/local/share/man/man3/gnutls_x509_crl_get_issuer_dn_by_oid.3 +1 -1
  1242. data/vendor/local/share/man/man3/gnutls_x509_crl_get_next_update.3 +1 -1
  1243. data/vendor/local/share/man/man3/gnutls_x509_crl_get_number.3 +1 -1
  1244. data/vendor/local/share/man/man3/gnutls_x509_crl_get_raw_issuer_dn.3 +1 -1
  1245. data/vendor/local/share/man/man3/gnutls_x509_crl_get_signature.3 +1 -1
  1246. data/vendor/local/share/man/man3/gnutls_x509_crl_get_signature_algorithm.3 +1 -1
  1247. data/vendor/local/share/man/man3/gnutls_x509_crl_get_this_update.3 +1 -1
  1248. data/vendor/local/share/man/man3/gnutls_x509_crl_get_version.3 +1 -1
  1249. data/vendor/local/share/man/man3/gnutls_x509_crl_import.3 +1 -1
  1250. data/vendor/local/share/man/man3/gnutls_x509_crl_init.3 +1 -1
  1251. data/vendor/local/share/man/man3/gnutls_x509_crl_list_import.3 +1 -1
  1252. data/vendor/local/share/man/man3/gnutls_x509_crl_list_import2.3 +1 -1
  1253. data/vendor/local/share/man/man3/gnutls_x509_crl_print.3 +1 -1
  1254. data/vendor/local/share/man/man3/gnutls_x509_crl_privkey_sign.3 +1 -1
  1255. data/vendor/local/share/man/man3/gnutls_x509_crl_set_authority_key_id.3 +1 -1
  1256. data/vendor/local/share/man/man3/gnutls_x509_crl_set_crt.3 +1 -1
  1257. data/vendor/local/share/man/man3/gnutls_x509_crl_set_crt_serial.3 +1 -1
  1258. data/vendor/local/share/man/man3/gnutls_x509_crl_set_next_update.3 +1 -1
  1259. data/vendor/local/share/man/man3/gnutls_x509_crl_set_number.3 +1 -1
  1260. data/vendor/local/share/man/man3/gnutls_x509_crl_set_this_update.3 +1 -1
  1261. data/vendor/local/share/man/man3/gnutls_x509_crl_set_version.3 +1 -1
  1262. data/vendor/local/share/man/man3/gnutls_x509_crl_sign.3 +1 -1
  1263. data/vendor/local/share/man/man3/gnutls_x509_crl_sign2.3 +1 -1
  1264. data/vendor/local/share/man/man3/gnutls_x509_crl_verify.3 +1 -1
  1265. data/vendor/local/share/man/man3/gnutls_x509_crq_deinit.3 +1 -1
  1266. data/vendor/local/share/man/man3/gnutls_x509_crq_export.3 +1 -1
  1267. data/vendor/local/share/man/man3/gnutls_x509_crq_export2.3 +1 -1
  1268. data/vendor/local/share/man/man3/gnutls_x509_crq_get_attribute_by_oid.3 +1 -1
  1269. data/vendor/local/share/man/man3/gnutls_x509_crq_get_attribute_data.3 +1 -1
  1270. data/vendor/local/share/man/man3/gnutls_x509_crq_get_attribute_info.3 +1 -1
  1271. data/vendor/local/share/man/man3/gnutls_x509_crq_get_basic_constraints.3 +1 -1
  1272. data/vendor/local/share/man/man3/gnutls_x509_crq_get_challenge_password.3 +1 -1
  1273. data/vendor/local/share/man/man3/gnutls_x509_crq_get_dn.3 +1 -1
  1274. data/vendor/local/share/man/man3/gnutls_x509_crq_get_dn2.3 +1 -1
  1275. data/vendor/local/share/man/man3/gnutls_x509_crq_get_dn_by_oid.3 +1 -1
  1276. data/vendor/local/share/man/man3/gnutls_x509_crq_get_dn_oid.3 +1 -1
  1277. data/vendor/local/share/man/man3/gnutls_x509_crq_get_extension_by_oid.3 +1 -1
  1278. data/vendor/local/share/man/man3/gnutls_x509_crq_get_extension_data.3 +1 -1
  1279. data/vendor/local/share/man/man3/gnutls_x509_crq_get_extension_info.3 +1 -1
  1280. data/vendor/local/share/man/man3/gnutls_x509_crq_get_key_id.3 +1 -1
  1281. data/vendor/local/share/man/man3/gnutls_x509_crq_get_key_purpose_oid.3 +1 -1
  1282. data/vendor/local/share/man/man3/gnutls_x509_crq_get_key_rsa_raw.3 +1 -1
  1283. data/vendor/local/share/man/man3/gnutls_x509_crq_get_key_usage.3 +1 -1
  1284. data/vendor/local/share/man/man3/gnutls_x509_crq_get_pk_algorithm.3 +1 -1
  1285. data/vendor/local/share/man/man3/gnutls_x509_crq_get_private_key_usage_period.3 +1 -1
  1286. data/vendor/local/share/man/man3/gnutls_x509_crq_get_subject_alt_name.3 +1 -1
  1287. data/vendor/local/share/man/man3/gnutls_x509_crq_get_subject_alt_othername_oid.3 +1 -1
  1288. data/vendor/local/share/man/man3/gnutls_x509_crq_get_version.3 +1 -1
  1289. data/vendor/local/share/man/man3/gnutls_x509_crq_import.3 +1 -1
  1290. data/vendor/local/share/man/man3/gnutls_x509_crq_init.3 +1 -1
  1291. data/vendor/local/share/man/man3/gnutls_x509_crq_print.3 +1 -1
  1292. data/vendor/local/share/man/man3/gnutls_x509_crq_privkey_sign.3 +1 -1
  1293. data/vendor/local/share/man/man3/gnutls_x509_crq_set_attribute_by_oid.3 +1 -1
  1294. data/vendor/local/share/man/man3/gnutls_x509_crq_set_basic_constraints.3 +1 -1
  1295. data/vendor/local/share/man/man3/gnutls_x509_crq_set_challenge_password.3 +1 -1
  1296. data/vendor/local/share/man/man3/gnutls_x509_crq_set_dn.3 +1 -1
  1297. data/vendor/local/share/man/man3/gnutls_x509_crq_set_dn_by_oid.3 +1 -1
  1298. data/vendor/local/share/man/man3/gnutls_x509_crq_set_key.3 +1 -1
  1299. data/vendor/local/share/man/man3/gnutls_x509_crq_set_key_purpose_oid.3 +1 -1
  1300. data/vendor/local/share/man/man3/gnutls_x509_crq_set_key_rsa_raw.3 +1 -1
  1301. data/vendor/local/share/man/man3/gnutls_x509_crq_set_key_usage.3 +1 -1
  1302. data/vendor/local/share/man/man3/gnutls_x509_crq_set_private_key_usage_period.3 +1 -1
  1303. data/vendor/local/share/man/man3/gnutls_x509_crq_set_pubkey.3 +1 -1
  1304. data/vendor/local/share/man/man3/gnutls_x509_crq_set_subject_alt_name.3 +1 -1
  1305. data/vendor/local/share/man/man3/gnutls_x509_crq_set_version.3 +1 -1
  1306. data/vendor/local/share/man/man3/gnutls_x509_crq_sign.3 +1 -1
  1307. data/vendor/local/share/man/man3/gnutls_x509_crq_sign2.3 +1 -1
  1308. data/vendor/local/share/man/man3/gnutls_x509_crq_verify.3 +1 -1
  1309. data/vendor/local/share/man/man3/gnutls_x509_crt_check_hostname.3 +1 -1
  1310. data/vendor/local/share/man/man3/gnutls_x509_crt_check_issuer.3 +1 -1
  1311. data/vendor/local/share/man/man3/gnutls_x509_crt_check_revocation.3 +1 -1
  1312. data/vendor/local/share/man/man3/gnutls_x509_crt_cpy_crl_dist_points.3 +1 -1
  1313. data/vendor/local/share/man/man3/gnutls_x509_crt_deinit.3 +1 -1
  1314. data/vendor/local/share/man/man3/gnutls_x509_crt_export.3 +1 -1
  1315. data/vendor/local/share/man/man3/gnutls_x509_crt_export2.3 +1 -1
  1316. data/vendor/local/share/man/man3/gnutls_x509_crt_get_activation_time.3 +1 -1
  1317. data/vendor/local/share/man/man3/gnutls_x509_crt_get_authority_info_access.3 +1 -1
  1318. data/vendor/local/share/man/man3/gnutls_x509_crt_get_authority_key_gn_serial.3 +1 -1
  1319. data/vendor/local/share/man/man3/gnutls_x509_crt_get_authority_key_id.3 +1 -1
  1320. data/vendor/local/share/man/man3/gnutls_x509_crt_get_basic_constraints.3 +1 -1
  1321. data/vendor/local/share/man/man3/gnutls_x509_crt_get_ca_status.3 +1 -1
  1322. data/vendor/local/share/man/man3/gnutls_x509_crt_get_crl_dist_points.3 +1 -1
  1323. data/vendor/local/share/man/man3/gnutls_x509_crt_get_dn.3 +1 -1
  1324. data/vendor/local/share/man/man3/gnutls_x509_crt_get_dn2.3 +1 -1
  1325. data/vendor/local/share/man/man3/gnutls_x509_crt_get_dn_by_oid.3 +1 -1
  1326. data/vendor/local/share/man/man3/gnutls_x509_crt_get_dn_oid.3 +1 -1
  1327. data/vendor/local/share/man/man3/gnutls_x509_crt_get_expiration_time.3 +1 -1
  1328. data/vendor/local/share/man/man3/gnutls_x509_crt_get_extension_by_oid.3 +1 -1
  1329. data/vendor/local/share/man/man3/gnutls_x509_crt_get_extension_data.3 +1 -1
  1330. data/vendor/local/share/man/man3/gnutls_x509_crt_get_extension_info.3 +1 -1
  1331. data/vendor/local/share/man/man3/gnutls_x509_crt_get_extension_oid.3 +1 -1
  1332. data/vendor/local/share/man/man3/gnutls_x509_crt_get_fingerprint.3 +1 -1
  1333. data/vendor/local/share/man/man3/gnutls_x509_crt_get_issuer.3 +1 -1
  1334. data/vendor/local/share/man/man3/gnutls_x509_crt_get_issuer_alt_name.3 +1 -1
  1335. data/vendor/local/share/man/man3/gnutls_x509_crt_get_issuer_alt_name2.3 +1 -1
  1336. data/vendor/local/share/man/man3/gnutls_x509_crt_get_issuer_alt_othername_oid.3 +1 -1
  1337. data/vendor/local/share/man/man3/gnutls_x509_crt_get_issuer_dn.3 +1 -1
  1338. data/vendor/local/share/man/man3/gnutls_x509_crt_get_issuer_dn2.3 +1 -1
  1339. data/vendor/local/share/man/man3/gnutls_x509_crt_get_issuer_dn_by_oid.3 +1 -1
  1340. data/vendor/local/share/man/man3/gnutls_x509_crt_get_issuer_dn_oid.3 +1 -1
  1341. data/vendor/local/share/man/man3/gnutls_x509_crt_get_issuer_unique_id.3 +1 -1
  1342. data/vendor/local/share/man/man3/gnutls_x509_crt_get_key_id.3 +1 -1
  1343. data/vendor/local/share/man/man3/gnutls_x509_crt_get_key_purpose_oid.3 +1 -1
  1344. data/vendor/local/share/man/man3/gnutls_x509_crt_get_key_usage.3 +1 -1
  1345. data/vendor/local/share/man/man3/gnutls_x509_crt_get_pk_algorithm.3 +1 -1
  1346. data/vendor/local/share/man/man3/gnutls_x509_crt_get_pk_dsa_raw.3 +1 -1
  1347. data/vendor/local/share/man/man3/gnutls_x509_crt_get_pk_rsa_raw.3 +1 -1
  1348. data/vendor/local/share/man/man3/gnutls_x509_crt_get_policy.3 +1 -1
  1349. data/vendor/local/share/man/man3/gnutls_x509_crt_get_preferred_hash_algorithm.3 +1 -1
  1350. data/vendor/local/share/man/man3/gnutls_x509_crt_get_private_key_usage_period.3 +1 -1
  1351. data/vendor/local/share/man/man3/gnutls_x509_crt_get_proxy.3 +1 -1
  1352. data/vendor/local/share/man/man3/gnutls_x509_crt_get_raw_dn.3 +1 -1
  1353. data/vendor/local/share/man/man3/gnutls_x509_crt_get_raw_issuer_dn.3 +1 -1
  1354. data/vendor/local/share/man/man3/gnutls_x509_crt_get_serial.3 +1 -1
  1355. data/vendor/local/share/man/man3/gnutls_x509_crt_get_signature.3 +1 -1
  1356. data/vendor/local/share/man/man3/gnutls_x509_crt_get_signature_algorithm.3 +1 -1
  1357. data/vendor/local/share/man/man3/gnutls_x509_crt_get_subject.3 +1 -1
  1358. data/vendor/local/share/man/man3/gnutls_x509_crt_get_subject_alt_name.3 +1 -1
  1359. data/vendor/local/share/man/man3/gnutls_x509_crt_get_subject_alt_name2.3 +1 -1
  1360. data/vendor/local/share/man/man3/gnutls_x509_crt_get_subject_alt_othername_oid.3 +1 -1
  1361. data/vendor/local/share/man/man3/gnutls_x509_crt_get_subject_key_id.3 +1 -1
  1362. data/vendor/local/share/man/man3/gnutls_x509_crt_get_subject_unique_id.3 +1 -1
  1363. data/vendor/local/share/man/man3/gnutls_x509_crt_get_verify_algorithm.3 +1 -1
  1364. data/vendor/local/share/man/man3/gnutls_x509_crt_get_version.3 +1 -1
  1365. data/vendor/local/share/man/man3/gnutls_x509_crt_import.3 +1 -1
  1366. data/vendor/local/share/man/man3/gnutls_x509_crt_import_pkcs11.3 +1 -1
  1367. data/vendor/local/share/man/man3/gnutls_x509_crt_import_pkcs11_url.3 +1 -1
  1368. data/vendor/local/share/man/man3/gnutls_x509_crt_init.3 +1 -1
  1369. data/vendor/local/share/man/man3/gnutls_x509_crt_list_import.3 +1 -1
  1370. data/vendor/local/share/man/man3/gnutls_x509_crt_list_import2.3 +1 -1
  1371. data/vendor/local/share/man/man3/gnutls_x509_crt_list_import_pkcs11.3 +1 -1
  1372. data/vendor/local/share/man/man3/gnutls_x509_crt_list_verify.3 +1 -1
  1373. data/vendor/local/share/man/man3/gnutls_x509_crt_print.3 +1 -1
  1374. data/vendor/local/share/man/man3/gnutls_x509_crt_privkey_sign.3 +1 -1
  1375. data/vendor/local/share/man/man3/gnutls_x509_crt_set_activation_time.3 +1 -1
  1376. data/vendor/local/share/man/man3/gnutls_x509_crt_set_authority_info_access.3 +1 -1
  1377. data/vendor/local/share/man/man3/gnutls_x509_crt_set_authority_key_id.3 +1 -1
  1378. data/vendor/local/share/man/man3/gnutls_x509_crt_set_basic_constraints.3 +1 -1
  1379. data/vendor/local/share/man/man3/gnutls_x509_crt_set_ca_status.3 +1 -1
  1380. data/vendor/local/share/man/man3/gnutls_x509_crt_set_crl_dist_points.3 +1 -1
  1381. data/vendor/local/share/man/man3/gnutls_x509_crt_set_crl_dist_points2.3 +1 -1
  1382. data/vendor/local/share/man/man3/gnutls_x509_crt_set_crq.3 +1 -1
  1383. data/vendor/local/share/man/man3/gnutls_x509_crt_set_crq_extensions.3 +1 -1
  1384. data/vendor/local/share/man/man3/gnutls_x509_crt_set_dn.3 +1 -1
  1385. data/vendor/local/share/man/man3/gnutls_x509_crt_set_dn_by_oid.3 +1 -1
  1386. data/vendor/local/share/man/man3/gnutls_x509_crt_set_expiration_time.3 +1 -1
  1387. data/vendor/local/share/man/man3/gnutls_x509_crt_set_extension_by_oid.3 +1 -1
  1388. data/vendor/local/share/man/man3/gnutls_x509_crt_set_issuer_dn.3 +1 -1
  1389. data/vendor/local/share/man/man3/gnutls_x509_crt_set_issuer_dn_by_oid.3 +1 -1
  1390. data/vendor/local/share/man/man3/gnutls_x509_crt_set_key.3 +1 -1
  1391. data/vendor/local/share/man/man3/gnutls_x509_crt_set_key_purpose_oid.3 +1 -1
  1392. data/vendor/local/share/man/man3/gnutls_x509_crt_set_key_usage.3 +1 -1
  1393. data/vendor/local/share/man/man3/gnutls_x509_crt_set_pin_function.3 +1 -1
  1394. data/vendor/local/share/man/man3/gnutls_x509_crt_set_policy.3 +1 -1
  1395. data/vendor/local/share/man/man3/gnutls_x509_crt_set_private_key_usage_period.3 +1 -1
  1396. data/vendor/local/share/man/man3/gnutls_x509_crt_set_proxy.3 +1 -1
  1397. data/vendor/local/share/man/man3/gnutls_x509_crt_set_proxy_dn.3 +1 -1
  1398. data/vendor/local/share/man/man3/gnutls_x509_crt_set_pubkey.3 +1 -1
  1399. data/vendor/local/share/man/man3/gnutls_x509_crt_set_serial.3 +1 -1
  1400. data/vendor/local/share/man/man3/gnutls_x509_crt_set_subject_alt_name.3 +1 -1
  1401. data/vendor/local/share/man/man3/gnutls_x509_crt_set_subject_alternative_name.3 +1 -1
  1402. data/vendor/local/share/man/man3/gnutls_x509_crt_set_subject_key_id.3 +1 -1
  1403. data/vendor/local/share/man/man3/gnutls_x509_crt_set_version.3 +1 -1
  1404. data/vendor/local/share/man/man3/gnutls_x509_crt_sign.3 +1 -1
  1405. data/vendor/local/share/man/man3/gnutls_x509_crt_sign2.3 +1 -1
  1406. data/vendor/local/share/man/man3/gnutls_x509_crt_verify.3 +1 -1
  1407. data/vendor/local/share/man/man3/gnutls_x509_crt_verify_data.3 +1 -1
  1408. data/vendor/local/share/man/man3/gnutls_x509_crt_verify_hash.3 +1 -1
  1409. data/vendor/local/share/man/man3/gnutls_x509_dn_deinit.3 +1 -1
  1410. data/vendor/local/share/man/man3/gnutls_x509_dn_export.3 +1 -1
  1411. data/vendor/local/share/man/man3/gnutls_x509_dn_export2.3 +1 -1
  1412. data/vendor/local/share/man/man3/gnutls_x509_dn_get_rdn_ava.3 +1 -1
  1413. data/vendor/local/share/man/man3/gnutls_x509_dn_import.3 +1 -1
  1414. data/vendor/local/share/man/man3/gnutls_x509_dn_init.3 +1 -1
  1415. data/vendor/local/share/man/man3/gnutls_x509_dn_oid_known.3 +1 -1
  1416. data/vendor/local/share/man/man3/gnutls_x509_dn_oid_name.3 +1 -1
  1417. data/vendor/local/share/man/man3/gnutls_x509_policy_release.3 +1 -1
  1418. data/vendor/local/share/man/man3/gnutls_x509_privkey_cpy.3 +1 -1
  1419. data/vendor/local/share/man/man3/gnutls_x509_privkey_deinit.3 +1 -1
  1420. data/vendor/local/share/man/man3/gnutls_x509_privkey_export.3 +1 -1
  1421. data/vendor/local/share/man/man3/gnutls_x509_privkey_export2.3 +1 -1
  1422. data/vendor/local/share/man/man3/gnutls_x509_privkey_export2_pkcs8.3 +1 -1
  1423. data/vendor/local/share/man/man3/gnutls_x509_privkey_export_dsa_raw.3 +1 -1
  1424. data/vendor/local/share/man/man3/gnutls_x509_privkey_export_ecc_raw.3 +1 -1
  1425. data/vendor/local/share/man/man3/gnutls_x509_privkey_export_pkcs8.3 +1 -1
  1426. data/vendor/local/share/man/man3/gnutls_x509_privkey_export_rsa_raw.3 +1 -1
  1427. data/vendor/local/share/man/man3/gnutls_x509_privkey_export_rsa_raw2.3 +1 -1
  1428. data/vendor/local/share/man/man3/gnutls_x509_privkey_fix.3 +1 -1
  1429. data/vendor/local/share/man/man3/gnutls_x509_privkey_generate.3 +1 -1
  1430. data/vendor/local/share/man/man3/gnutls_x509_privkey_get_key_id.3 +1 -1
  1431. data/vendor/local/share/man/man3/gnutls_x509_privkey_get_pk_algorithm.3 +1 -1
  1432. data/vendor/local/share/man/man3/gnutls_x509_privkey_get_pk_algorithm2.3 +1 -1
  1433. data/vendor/local/share/man/man3/gnutls_x509_privkey_import.3 +1 -1
  1434. data/vendor/local/share/man/man3/gnutls_x509_privkey_import2.3 +2 -2
  1435. data/vendor/local/share/man/man3/gnutls_x509_privkey_import_dsa_raw.3 +1 -1
  1436. data/vendor/local/share/man/man3/gnutls_x509_privkey_import_ecc_raw.3 +1 -1
  1437. data/vendor/local/share/man/man3/gnutls_x509_privkey_import_openssl.3 +1 -1
  1438. data/vendor/local/share/man/man3/gnutls_x509_privkey_import_pkcs8.3 +1 -1
  1439. data/vendor/local/share/man/man3/gnutls_x509_privkey_import_rsa_raw.3 +1 -1
  1440. data/vendor/local/share/man/man3/gnutls_x509_privkey_import_rsa_raw2.3 +1 -1
  1441. data/vendor/local/share/man/man3/gnutls_x509_privkey_init.3 +1 -1
  1442. data/vendor/local/share/man/man3/gnutls_x509_privkey_sec_param.3 +1 -1
  1443. data/vendor/local/share/man/man3/gnutls_x509_privkey_sign_data.3 +1 -1
  1444. data/vendor/local/share/man/man3/gnutls_x509_privkey_sign_hash.3 +1 -1
  1445. data/vendor/local/share/man/man3/gnutls_x509_privkey_verify_params.3 +1 -1
  1446. data/vendor/local/share/man/man3/gnutls_x509_rdn_get.3 +1 -1
  1447. data/vendor/local/share/man/man3/gnutls_x509_rdn_get_by_oid.3 +1 -1
  1448. data/vendor/local/share/man/man3/gnutls_x509_rdn_get_oid.3 +1 -1
  1449. data/vendor/local/share/man/man3/gnutls_x509_trust_list_add_cas.3 +1 -1
  1450. data/vendor/local/share/man/man3/gnutls_x509_trust_list_add_crls.3 +1 -1
  1451. data/vendor/local/share/man/man3/gnutls_x509_trust_list_add_named_crt.3 +1 -1
  1452. data/vendor/local/share/man/man3/gnutls_x509_trust_list_add_system_trust.3 +1 -1
  1453. data/vendor/local/share/man/man3/gnutls_x509_trust_list_add_trust_file.3 +1 -1
  1454. data/vendor/local/share/man/man3/gnutls_x509_trust_list_add_trust_mem.3 +1 -1
  1455. data/vendor/local/share/man/man3/gnutls_x509_trust_list_deinit.3 +1 -1
  1456. data/vendor/local/share/man/man3/gnutls_x509_trust_list_get_issuer.3 +1 -1
  1457. data/vendor/local/share/man/man3/gnutls_x509_trust_list_init.3 +1 -1
  1458. data/vendor/local/share/man/man3/gnutls_x509_trust_list_remove_cas.3 +1 -1
  1459. data/vendor/local/share/man/man3/gnutls_x509_trust_list_remove_trust_file.3 +1 -1
  1460. data/vendor/local/share/man/man3/gnutls_x509_trust_list_remove_trust_mem.3 +1 -1
  1461. data/vendor/local/share/man/man3/gnutls_x509_trust_list_verify_crt.3 +1 -1
  1462. data/vendor/local/share/man/man3/gnutls_x509_trust_list_verify_named_crt.3 +1 -1
  1463. metadata +22 -2
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
  <title>GApplicationCommandLine</title>
6
- <meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
  <link rel="home" href="index.html" title="GIO Reference Manual">
8
8
  <link rel="up" href="application.html" title="Application support">
9
9
  <link rel="prev" href="GApplication.html" title="GApplication">
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
  <title>GAsyncInitable</title>
6
- <meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
  <link rel="home" href="index.html" title="GIO Reference Manual">
8
8
  <link rel="up" href="failable_initialization.html" title="Failable Initialization">
9
9
  <link rel="prev" href="GInitable.html" title="GInitable">
@@ -209,87 +209,87 @@ A typical implementation might look something like this:
209
209
  79
210
210
  80
211
211
  81</pre></td>
212
- <td class="listing_code"><pre class="programlisting"><span class="type">enum</span> {
213
- NOT_INITIALIZED,
214
- INITIALIZING,
215
- INITIALIZED
216
- };
212
+ <td class="listing_code"><pre class="programlisting"><span class="keyword">enum</span><span class="normal"> </span><span class="cbracket">{</span>
213
+ <span class="normal"> NOT_INITIALIZED</span><span class="symbol">,</span>
214
+ <span class="normal"> INITIALIZING</span><span class="symbol">,</span>
215
+ <span class="normal"> INITIALIZED</span>
216
+ <span class="cbracket">}</span><span class="symbol">;</span>
217
217
 
218
- <span class="type">static</span> <span class="type">void</span>
219
- _foo_ready_cb (Foo *self)
220
- {
221
- <span class="type">GList</span> *l;
218
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
219
+ <span class="function">_foo_ready_cb</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">Foo</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">self</span><span class="symbol">)</span>
220
+ <span class="cbracket">{</span>
221
+ <span class="normal"> </span><span class="usertype">GList</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">l</span><span class="symbol">;</span>
222
222
 
223
- self-&gt;priv-&gt;state = INITIALIZED;
223
+ <span class="normal"> self</span><span class="symbol">-&gt;</span><span class="normal">priv</span><span class="symbol">-&gt;</span><span class="normal">state </span><span class="symbol">=</span><span class="normal"> INITIALIZED</span><span class="symbol">;</span>
224
224
 
225
- <span class="keyword">for</span> (l = self-&gt;priv-&gt;init_results; l != <span class="number">NULL</span>; l = l-&gt;next)
226
- {
227
- GTask *task = l-&gt;data;
225
+ <span class="normal"> </span><span class="keyword">for</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">l </span><span class="symbol">=</span><span class="normal"> self</span><span class="symbol">-&gt;</span><span class="normal">priv</span><span class="symbol">-&gt;</span><span class="normal">init_results</span><span class="symbol">;</span><span class="normal"> l </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"> l </span><span class="symbol">=</span><span class="normal"> l</span><span class="symbol">-&gt;</span><span class="normal">next</span><span class="symbol">)</span>
226
+ <span class="normal"> </span><span class="cbracket">{</span>
227
+ <span class="normal"> </span><span class="usertype">GTask</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">task </span><span class="symbol">=</span><span class="normal"> l</span><span class="symbol">-&gt;</span><span class="normal">data</span><span class="symbol">;</span>
228
228
 
229
- <span class="keyword">if</span> (self-&gt;priv-&gt;success)
230
- g_task_return_boolean (task, <span class="number">TRUE</span>);
231
- <span class="keyword">else</span>
232
- g_task_return_new_error (task, ...);
233
- <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> (task);
234
- }
229
+ <span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">self</span><span class="symbol">-&gt;</span><span class="normal">priv</span><span class="symbol">-&gt;</span><span class="normal">success</span><span class="symbol">)</span>
230
+ <span class="normal"> </span><span class="function"><a href="GTask.html#g-task-return-boolean">g_task_return_boolean</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">task</span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">);</span>
231
+ <span class="normal"> </span><span class="keyword">else</span>
232
+ <span class="normal"> </span><span class="function"><a href="GTask.html#g-task-return-new-error">g_task_return_new_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">task</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">...);</span>
233
+ <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">task</span><span class="symbol">);</span>
234
+ <span class="normal"> </span><span class="cbracket">}</span>
235
235
 
236
- <span class="function"><a href="../glib/glib-Doubly-Linked-Lists.html#g-list-free">g_list_free</a></span> (self-&gt;priv-&gt;init_results);
237
- self-&gt;priv-&gt;init_results = <span class="number">NULL</span>;
238
- }
236
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Doubly-Linked-Lists.html#g-list-free">g_list_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">self</span><span class="symbol">-&gt;</span><span class="normal">priv</span><span class="symbol">-&gt;</span><span class="normal">init_results</span><span class="symbol">);</span>
237
+ <span class="normal"> self</span><span class="symbol">-&gt;</span><span class="normal">priv</span><span class="symbol">-&gt;</span><span class="normal">init_results </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
238
+ <span class="cbracket">}</span>
239
239
 
240
- <span class="type">static</span> <span class="type">void</span>
241
- foo_init_async (<span class="type">GAsyncInitable</span> *initable,
242
- <span class="type">int</span> io_priority,
243
- <span class="type">GCancellable</span> *cancellable,
244
- <span class="type">GAsyncReadyCallback</span> callback,
245
- <span class="type">gpointer</span> user_data)
246
- {
247
- Foo *self = FOO (initable);
248
- GTask *task;
240
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
241
+ <span class="function">foo_init_async</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GAsyncInitable</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">initable</span><span class="symbol">,</span>
242
+ <span class="normal"> </span><span class="type">int</span><span class="normal"> io_priority</span><span class="symbol">,</span>
243
+ <span class="normal"> </span><span class="usertype">GCancellable</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">cancellable</span><span class="symbol">,</span>
244
+ <span class="normal"> </span><span class="usertype">GAsyncReadyCallback</span><span class="normal"> callback</span><span class="symbol">,</span>
245
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
246
+ <span class="cbracket">{</span>
247
+ <span class="normal"> </span><span class="usertype">Foo</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">self </span><span class="symbol">=</span><span class="normal"> </span><span class="function">FOO</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">initable</span><span class="symbol">);</span>
248
+ <span class="normal"> </span><span class="usertype">GTask</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">task</span><span class="symbol">;</span>
249
249
 
250
- task = g_task_new (initable, cancellable, callback, user_data);
250
+ <span class="normal"> task </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GTask.html#g-task-new">g_task_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">initable</span><span class="symbol">,</span><span class="normal"> cancellable</span><span class="symbol">,</span><span class="normal"> callback</span><span class="symbol">,</span><span class="normal"> user_data</span><span class="symbol">);</span>
251
251
 
252
- <span class="keyword">switch</span> (self-&gt;priv-&gt;state)
253
- {
254
- <span class="keyword">case</span> NOT_INITIALIZED:
255
- _foo_get_ready (self);
256
- self-&gt;priv-&gt;init_results = <span class="function"><a href="../glib/glib-Doubly-Linked-Lists.html#g-list-append">g_list_append</a></span> (self-&gt;priv-&gt;init_results,
257
- task);
258
- self-&gt;priv-&gt;state = INITIALIZING;
259
- <span class="keyword">break</span>;
260
- <span class="keyword">case</span> INITIALIZING:
261
- self-&gt;priv-&gt;init_results = <span class="function"><a href="../glib/glib-Doubly-Linked-Lists.html#g-list-append">g_list_append</a></span> (self-&gt;priv-&gt;init_results,
262
- task);
263
- <span class="keyword">break</span>;
264
- <span class="keyword">case</span> INITIALIZED:
265
- <span class="keyword">if</span> (!self-&gt;priv-&gt;success)
266
- g_task_return_new_error (task, ...);
267
- <span class="keyword">else</span>
268
- g_task_return_boolean (task, <span class="number">TRUE</span>);
269
- <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> (task);
270
- <span class="keyword">break</span>;
271
- }
272
- }
252
+ <span class="normal"> </span><span class="keyword">switch</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">self</span><span class="symbol">-&gt;</span><span class="normal">priv</span><span class="symbol">-&gt;</span><span class="normal">state</span><span class="symbol">)</span>
253
+ <span class="normal"> </span><span class="cbracket">{</span>
254
+ <span class="normal"> </span><span class="keyword">case</span><span class="normal"> NOT_INITIALIZED</span><span class="symbol">:</span>
255
+ <span class="normal"> </span><span class="function">_foo_get_ready</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">self</span><span class="symbol">);</span>
256
+ <span class="normal"> self</span><span class="symbol">-&gt;</span><span class="normal">priv</span><span class="symbol">-&gt;</span><span class="normal">init_results </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-Doubly-Linked-Lists.html#g-list-append">g_list_append</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">self</span><span class="symbol">-&gt;</span><span class="normal">priv</span><span class="symbol">-&gt;</span><span class="normal">init_results</span><span class="symbol">,</span>
257
+ <span class="normal"> task</span><span class="symbol">);</span>
258
+ <span class="normal"> self</span><span class="symbol">-&gt;</span><span class="normal">priv</span><span class="symbol">-&gt;</span><span class="normal">state </span><span class="symbol">=</span><span class="normal"> INITIALIZING</span><span class="symbol">;</span>
259
+ <span class="normal"> </span><span class="keyword">break</span><span class="symbol">;</span>
260
+ <span class="normal"> </span><span class="keyword">case</span><span class="normal"> INITIALIZING</span><span class="symbol">:</span>
261
+ <span class="normal"> self</span><span class="symbol">-&gt;</span><span class="normal">priv</span><span class="symbol">-&gt;</span><span class="normal">init_results </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-Doubly-Linked-Lists.html#g-list-append">g_list_append</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">self</span><span class="symbol">-&gt;</span><span class="normal">priv</span><span class="symbol">-&gt;</span><span class="normal">init_results</span><span class="symbol">,</span>
262
+ <span class="normal"> task</span><span class="symbol">);</span>
263
+ <span class="normal"> </span><span class="keyword">break</span><span class="symbol">;</span>
264
+ <span class="normal"> </span><span class="keyword">case</span><span class="normal"> INITIALIZED</span><span class="symbol">:</span>
265
+ <span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(!</span><span class="normal">self</span><span class="symbol">-&gt;</span><span class="normal">priv</span><span class="symbol">-&gt;</span><span class="normal">success</span><span class="symbol">)</span>
266
+ <span class="normal"> </span><span class="function"><a href="GTask.html#g-task-return-new-error">g_task_return_new_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">task</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">...);</span>
267
+ <span class="normal"> </span><span class="keyword">else</span>
268
+ <span class="normal"> </span><span class="function"><a href="GTask.html#g-task-return-boolean">g_task_return_boolean</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">task</span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">);</span>
269
+ <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">task</span><span class="symbol">);</span>
270
+ <span class="normal"> </span><span class="keyword">break</span><span class="symbol">;</span>
271
+ <span class="normal"> </span><span class="cbracket">}</span>
272
+ <span class="cbracket">}</span>
273
273
 
274
- <span class="type">static</span> <span class="type">gboolean</span>
275
- foo_init_finish (<span class="type">GAsyncInitable</span> *initable,
276
- <span class="type">GAsyncResult</span> *result,
277
- <span class="type">GError</span> **error)
278
- {
279
- <span class="preproc">g_return_val_if_fail</span> (g_task_is_valid (result, initable), <span class="number">FALSE</span>);
274
+ <span class="keyword">static</span><span class="normal"> <a href="../glib/glib-Basic-Types.html#gboolean">gboolean</a></span>
275
+ <span class="function">foo_init_finish</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GAsyncInitable</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">initable</span><span class="symbol">,</span>
276
+ <span class="normal"> </span><span class="usertype">GAsyncResult</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">result</span><span class="symbol">,</span>
277
+ <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>
278
+ <span class="cbracket">{</span>
279
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Warnings-and-Assertions.html#g-return-val-if-fail">g_return_val_if_fail</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="GTask.html#g-task-is-valid">g_task_is_valid</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">result</span><span class="symbol">,</span><span class="normal"> initable</span><span class="symbol">),</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">);</span>
280
280
 
281
- <span class="keyword">return</span> g_task_propagate_boolean (G_TASK (result), error);
282
- }
281
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="function"><a href="GTask.html#g-task-propagate-boolean">g_task_propagate_boolean</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">G_TASK</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">result</span><span class="symbol">),</span><span class="normal"> error</span><span class="symbol">);</span>
282
+ <span class="cbracket">}</span>
283
283
 
284
- <span class="type">static</span> <span class="type">void</span>
285
- foo_async_initable_iface_init (<span class="type">gpointer</span> g_iface,
286
- <span class="type">gpointer</span> data)
287
- {
288
- <span class="type">GAsyncInitableIface</span> *iface = g_iface;
284
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
285
+ <span class="function">foo_async_initable_iface_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">gpointer</span><span class="normal"> g_iface</span><span class="symbol">,</span>
286
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> data</span><span class="symbol">)</span>
287
+ <span class="cbracket">{</span>
288
+ <span class="normal"> </span><span class="usertype">GAsyncInitableIface</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">iface </span><span class="symbol">=</span><span class="normal"> g_iface</span><span class="symbol">;</span>
289
289
 
290
- iface-&gt;init_async = foo_init_async;
291
- iface-&gt;init_finish = foo_init_finish;
292
- }</pre></td>
290
+ <span class="normal"> iface</span><span class="symbol">-&gt;</span><span class="normal">init_async </span><span class="symbol">=</span><span class="normal"> foo_init_async</span><span class="symbol">;</span>
291
+ <span class="normal"> iface</span><span class="symbol">-&gt;</span><span class="normal">init_finish </span><span class="symbol">=</span><span class="normal"> foo_init_finish</span><span class="symbol">;</span>
292
+ <span class="cbracket">}</span></pre></td>
293
293
  </tr>
294
294
  </tbody>
295
295
  </table>
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
  <title>GAsyncResult</title>
6
- <meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
  <link rel="home" href="index.html" title="GIO Reference Manual">
8
8
  <link rel="up" href="async.html" title="Asynchronous I/O">
9
9
  <link rel="prev" href="GCancellable.html" title="GCancellable">
@@ -155,44 +155,44 @@ Example of a typical asynchronous operation flow:
155
155
  36
156
156
  37
157
157
  38</pre></td>
158
- <td class="listing_code"><pre class="programlisting"><span class="type">void</span> _theoretical_frobnitz_async (Theoretical *t,
159
- <span class="type">GCancellable</span> *c,
160
- <span class="type">GAsyncReadyCallback</span> *cb,
161
- <span class="type">gpointer</span> u);
158
+ <td class="listing_code"><pre class="programlisting"><span class="type">void</span><span class="normal"> </span><span class="function">_theoretical_frobnitz_async</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">Theoretical</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">t</span><span class="symbol">,</span>
159
+ <span class="normal"> </span><span class="usertype">GCancellable</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">c</span><span class="symbol">,</span>
160
+ <span class="normal"> </span><span class="usertype">GAsyncReadyCallback</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">cb</span><span class="symbol">,</span>
161
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> u</span><span class="symbol">);</span>
162
162
 
163
- <span class="type">gboolean</span> _theoretical_frobnitz_finish (Theoretical *t,
164
- <span class="type">GAsyncResult</span> *res,
165
- <span class="type">GError</span> **e);
163
+ <span class="usertype">gboolean</span><span class="normal"> </span><span class="function">_theoretical_frobnitz_finish</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">Theoretical</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">t</span><span class="symbol">,</span>
164
+ <span class="normal"> </span><span class="usertype">GAsyncResult</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">res</span><span class="symbol">,</span>
165
+ <span class="normal"> </span><span class="usertype">GError</span><span class="normal"> </span><span class="symbol">**</span><span class="normal">e</span><span class="symbol">);</span>
166
166
 
167
- <span class="type">static</span> <span class="type">void</span>
168
- frobnitz_result_func (<span class="type">GObject</span> *source_object,
169
- <span class="type">GAsyncResult</span> *res,
170
- <span class="type">gpointer</span> user_data)
171
- {
172
- <span class="type">gboolean</span> success = <span class="number">FALSE</span>;
167
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
168
+ <span class="function">frobnitz_result_func</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">source_object</span><span class="symbol">,</span>
169
+ <span class="normal"> </span><span class="usertype">GAsyncResult</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">res</span><span class="symbol">,</span>
170
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
171
+ <span class="cbracket">{</span>
172
+ <span class="normal"> </span><span class="usertype">gboolean</span><span class="normal"> success </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">;</span>
173
173
 
174
- success = _theoretical_frobnitz_finish (source_object, res, <span class="number">NULL</span>);
174
+ <span class="normal"> success </span><span class="symbol">=</span><span class="normal"> </span><span class="function">_theoretical_frobnitz_finish</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">source_object</span><span class="symbol">,</span><span class="normal"> res</span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
175
175
 
176
- <span class="keyword">if</span> (success)
177
- <span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-printf">g_printf</a></span> (<span class="number">&quot;Hurray!</span><span class="symbol">\n</span><span class="number">&quot;</span>);
178
- <span class="keyword">else</span>
179
- <span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-printf">g_printf</a></span> (<span class="number">&quot;Uh oh!</span><span class="symbol">\n</span><span class="number">&quot;</span>);
176
+ <span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">success</span><span class="symbol">)</span>
177
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-printf">g_printf</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Hurray!</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">);</span>
178
+ <span class="normal"> </span><span class="keyword">else</span>
179
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-printf">g_printf</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Uh oh!</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">);</span>
180
180
 
181
- <span class="comment">/*</span><span class="comment"> ... </span><span class="comment">*/</span>
181
+ <span class="normal"> </span><span class="comment">/* ... */</span>
182
182
 
183
- }
183
+ <span class="cbracket">}</span>
184
184
 
185
- <span class="type">int</span> main (<span class="type">int</span> argc, <span class="type">void</span> *argv[])
186
- {
187
- <span class="comment">/*</span><span class="comment"> ... </span><span class="comment">*/</span>
185
+ <span class="type">int</span><span class="normal"> </span><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">void</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">argv</span><span class="symbol">[])</span>
186
+ <span class="cbracket">{</span>
187
+ <span class="normal"> </span><span class="comment">/* ... */</span>
188
188
 
189
- _theoretical_frobnitz_async (theoretical_data,
190
- <span class="number">NULL</span>,
191
- frobnitz_result_func,
192
- <span class="number">NULL</span>);
189
+ <span class="normal"> </span><span class="function">_theoretical_frobnitz_async</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">theoretical_data</span><span class="symbol">,</span>
190
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
191
+ <span class="normal"> frobnitz_result_func</span><span class="symbol">,</span>
192
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
193
193
 
194
- <span class="comment">/*</span><span class="comment"> ... </span><span class="comment">*/</span>
195
- }</pre></td>
194
+ <span class="normal"> </span><span class="comment">/* ... */</span>
195
+ <span class="cbracket">}</span></pre></td>
196
196
  </tr>
197
197
  </tbody>
198
198
  </table>
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
  <title>GBufferedInputStream</title>
6
- <meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
  <link rel="home" href="index.html" title="GIO Reference Manual">
8
8
  <link rel="up" href="streaming.html" title="Streaming I/O">
9
9
  <link rel="prev" href="GMemoryOutputStream.html" title="GMemoryOutputStream">
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
  <title>GBufferedOutputStream</title>
6
- <meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
  <link rel="home" href="index.html" title="GIO Reference Manual">
8
8
  <link rel="up" href="streaming.html" title="Streaming I/O">
9
9
  <link rel="prev" href="GBufferedInputStream.html" title="GBufferedInputStream">
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
  <title>GCancellable</title>
6
- <meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
  <link rel="home" href="index.html" title="GIO Reference Manual">
8
8
  <link rel="up" href="async.html" title="Asynchronous I/O">
9
9
  <link rel="prev" href="async.html" title="Asynchronous I/O">
@@ -662,27 +662,27 @@ An example of how to us this:
662
662
  19
663
663
  20
664
664
  21</pre></td>
665
- <td class="listing_code"><pre class="programlisting"><span class="comment">/*</span><span class="comment"> Make sure we don't do any unnecessary work if already cancelled </span><span class="comment">*/</span>
666
- <span class="keyword">if</span> (<span class="function"><a href="GCancellable.html#g-cancellable-set-error-if-cancelled">g_cancellable_set_error_if_cancelled</a></span> (cancellable))
667
- <span class="keyword">return</span>;
665
+ <td class="listing_code"><pre class="programlisting"><span class="comment">/* Make sure we don't do any unnecessary work if already cancelled */</span>
666
+ <span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="GCancellable.html#g-cancellable-set-error-if-cancelled">g_cancellable_set_error_if_cancelled</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cancellable</span><span class="symbol">))</span>
667
+ <span class="normal"> </span><span class="keyword">return</span><span class="symbol">;</span>
668
668
 
669
- <span class="comment">/*</span><span class="comment"> Set up all the data needed to be able to</span>
670
- <span class="comment"> * handle cancellation of the operation </span><span class="comment">*/</span>
671
- my_data = my_data_new (...);
669
+ <span class="comment">/* Set up all the data needed to be able to</span>
670
+ <span class="comment"> * handle cancellation of the operation */</span>
671
+ <span class="normal">my_data </span><span class="symbol">=</span><span class="normal"> </span><span class="function">my_data_new</span><span class="normal"> </span><span class="symbol">(...);</span>
672
672
 
673
- id = <span class="number">0</span>;
674
- <span class="keyword">if</span> (cancellable)
675
- id = <span class="function"><a href="GCancellable.html#g-cancellable-connect">g_cancellable_connect</a></span> (cancellable,
676
- <span class="preproc">G_CALLBACK</span> (cancelled_handler)
677
- data, <span class="number">NULL</span>);
673
+ <span class="normal">id </span><span class="symbol">=</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span>
674
+ <span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cancellable</span><span class="symbol">)</span>
675
+ <span class="normal"> id </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GCancellable.html#g-cancellable-connect">g_cancellable_connect</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cancellable</span><span class="symbol">,</span>
676
+ <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">cancelled_handler</span><span class="symbol">)</span>
677
+ <span class="normal"> 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>
678
678
 
679
- <span class="comment">/*</span><span class="comment"> cancellable operation here... </span><span class="comment">*/</span>
679
+ <span class="comment">/* cancellable operation here... */</span>
680
680
 
681
- <span class="function"><a href="GCancellable.html#g-cancellable-disconnect">g_cancellable_disconnect</a></span> (cancellable, id);
681
+ <span class="function"><a href="GCancellable.html#g-cancellable-disconnect">g_cancellable_disconnect</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cancellable</span><span class="symbol">,</span><span class="normal"> id</span><span class="symbol">);</span>
682
682
 
683
- <span class="comment">/*</span><span class="comment"> cancelled_handler is never called after this, it</span>
684
- <span class="comment"> * is now safe to free the data </span><span class="comment">*/</span>
685
- my_data_free (my_data);</pre></td>
683
+ <span class="comment">/* cancelled_handler is never called after this, it</span>
684
+ <span class="comment"> * is now safe to free the data */</span>
685
+ <span class="function">my_data_free</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">my_data</span><span class="symbol">);</span></pre></td>
686
686
  </tr>
687
687
  </tbody>
688
688
  </table>
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
  <title>GCharsetConverter</title>
6
- <meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
  <link rel="home" href="index.html" title="GIO Reference Manual">
8
8
  <link rel="up" href="conversion.html" title="Data conversion">
9
9
  <link rel="prev" href="GConverter.html" title="GConverter">
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
  <title>GConverter</title>
6
- <meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
  <link rel="home" href="index.html" title="GIO Reference Manual">
8
8
  <link rel="up" href="conversion.html" title="Data conversion">
9
9
  <link rel="prev" href="conversion.html" title="Data conversion">
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
  <title>GCredentials</title>
6
- <meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
  <link rel="home" href="index.html" title="GIO Reference Manual">
8
8
  <link rel="up" href="networking.html" title="Low-level network support">
9
9
  <link rel="prev" href="GUnixFDMessage.html" title="GUnixFDMessage">
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
  <title>GDBusActionGroup</title>
6
- <meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
  <link rel="home" href="index.html" title="GIO Reference Manual">
8
8
  <link rel="up" href="application.html" title="Application support">
9
9
  <link rel="prev" href="gio-GActionGroup-exporter.html" title="GActionGroup exporter">
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
  <title>GDBusAuthObserver</title>
6
- <meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
  <link rel="home" href="index.html" title="GIO Reference Manual">
8
8
  <link rel="up" href="gdbus-lowlevel.html" title="Lowlevel D-Bus Support">
9
9
  <link rel="prev" href="GDBusServer.html" title="GDBusServer">
@@ -109,26 +109,26 @@ signal handler like the following:
109
109
  18
110
110
  19
111
111
  20</pre></td>
112
- <td class="listing_code"><pre class="programlisting"><span class="type">static</span> <span class="type">gboolean</span>
113
- on_authorize_authenticated_peer (<span class="type">GDBusAuthObserver</span> *observer,
114
- <span class="type">GIOStream</span> *stream,
115
- <span class="type">GCredentials</span> *credentials,
116
- <span class="type">gpointer</span> user_data)
117
- {
118
- <span class="type">gboolean</span> authorized;
112
+ <td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> <a href="../glib/glib-Basic-Types.html#gboolean">gboolean</a></span>
113
+ <span class="function">on_authorize_authenticated_peer</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GDBusAuthObserver</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">observer</span><span class="symbol">,</span>
114
+ <span class="normal"> </span><span class="usertype">GIOStream</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">stream</span><span class="symbol">,</span>
115
+ <span class="normal"> </span><span class="usertype">GCredentials</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">credentials</span><span class="symbol">,</span>
116
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
117
+ <span class="cbracket">{</span>
118
+ <span class="normal"> </span><span class="usertype">gboolean</span><span class="normal"> authorized</span><span class="symbol">;</span>
119
119
 
120
- authorized = <span class="number">FALSE</span>;
121
- <span class="keyword">if</span> (credentials != <span class="number">NULL</span>)
122
- {
123
- <span class="type">GCredentials</span> *own_credentials;
124
- own_credentials = <span class="function"><a href="GCredentials.html#g-credentials-new">g_credentials_new</a></span> ();
125
- <span class="keyword">if</span> (<span class="function"><a href="GCredentials.html#g-credentials-is-same-user">g_credentials_is_same_user</a></span> (credentials, own_credentials, <span class="number">NULL</span>))
126
- authorized = <span class="number">TRUE</span>;
127
- <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> (own_credentials);
128
- }
120
+ <span class="normal"> authorized </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">;</span>
121
+ <span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">credentials </span><span class="symbol">!=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">)</span>
122
+ <span class="normal"> </span><span class="cbracket">{</span>
123
+ <span class="normal"> </span><span class="usertype">GCredentials</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">own_credentials</span><span class="symbol">;</span>
124
+ <span class="normal"> own_credentials </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GCredentials.html#g-credentials-new">g_credentials_new</a></span><span class="normal"> </span><span class="symbol">();</span>
125
+ <span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="GCredentials.html#g-credentials-is-same-user">g_credentials_is_same_user</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">credentials</span><span class="symbol">,</span><span class="normal"> own_credentials</span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">))</span>
126
+ <span class="normal"> authorized </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">;</span>
127
+ <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">own_credentials</span><span class="symbol">);</span>
128
+ <span class="normal"> </span><span class="cbracket">}</span>
129
129
 
130
- <span class="keyword">return</span> authorized;
131
- }</pre></td>
130
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> authorized</span><span class="symbol">;</span>
131
+ <span class="cbracket">}</span></pre></td>
132
132
  </tr>
133
133
  </tbody>
134
134
  </table>
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
  <title>GDBusConnection</title>
6
- <meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
  <link rel="home" href="index.html" title="GIO Reference Manual">
8
8
  <link rel="up" href="gdbus-lowlevel.html" title="Lowlevel D-Bus Support">
9
9
  <link rel="prev" href="GDBusMessage.html" title="GDBusMessage">
@@ -370,7 +370,7 @@ an D-Bus client, it is often easier to use the <a class="link" href="gio-Owning-
370
370
  <p>
371
371
  As an exception to the usual GLib rule that a particular object must not be
372
372
  used by two threads at the same time, <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a>'s methods may be
373
- called from any thread<a href="#ftn.id-1.4.16.7.8.4.2" class="footnote"><sup class="footnote"><a name="id-1.4.16.7.8.4.2"></a>[1]</sup></a>.
373
+ called from any thread<a href="#ftn.id-1.4.16.7.8.4.2" class="footnote" name="id-1.4.16.7.8.4.2"><sup class="footnote">[1]</sup></a>.
374
374
  </p>
375
375
  <p>
376
376
  Most of the ways to obtain a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> automatically initialize it
@@ -788,396 +788,396 @@ free it with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unre
788
788
  388
789
789
  389
790
790
  390</pre></td>
791
- <td class="listing_code"><pre class="programlisting"><span class="preproc">#include </span><span class="number">&lt;gio/gio.h&gt;</span>
792
- <span class="preproc">#include </span><span class="number">&lt;stdlib.h&gt;</span>
791
+ <td class="listing_code"><pre class="programlisting"><span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;gio/gio.h&gt;</span>
792
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;stdlib.h&gt;</span>
793
793
 
794
- <span class="preproc">#ifdef G_OS_UNIX</span>
795
- <span class="preproc">#include </span><span class="number">&lt;gio/gunixfdlist.h&gt;</span>
796
- <span class="comment">/*</span><span class="comment"> For STDOUT_FILENO </span><span class="comment">*/</span>
797
- <span class="preproc">#include </span><span class="number">&lt;unistd.h&gt;</span>
794
+ <span class="preproc">#ifdef</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#G-OS-UNIX:CAPS">G_OS_UNIX</a></span>
795
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;gio/gunixfdlist.h&gt;</span>
796
+ <span class="comment">/* For STDOUT_FILENO */</span>
797
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;unistd.h&gt;</span>
798
798
  <span class="preproc">#endif</span>
799
799
 
800
- <span class="comment">/*</span><span class="comment"> ---------------------------------------------------------------------------------------------------- </span><span class="comment">*/</span>
801
-
802
- <span class="type">static</span> <span class="type">GDBusNodeInfo</span> *introspection_data = <span class="number">NULL</span>;
803
-
804
- <span class="comment">/*</span><span class="comment"> Introspection data for the service we are exporting </span><span class="comment">*/</span>
805
- <span class="type">static</span> <span class="type">const</span> <span class="type">gchar</span> introspection_xml[] =
806
- <span class="number">&quot;&lt;node&gt;&quot;</span>
807
- <span class="number">&quot; &lt;interface name='org.gtk.GDBus.TestInterface'&gt;&quot;</span>
808
- <span class="number">&quot; &lt;annotation name='org.gtk.GDBus.Annotation' value='OnInterface'/&gt;&quot;</span>
809
- <span class="number">&quot; &lt;annotation name='org.gtk.GDBus.Annotation' value='AlsoOnInterface'/&gt;&quot;</span>
810
- <span class="number">&quot; &lt;method name='HelloWorld'&gt;&quot;</span>
811
- <span class="number">&quot; &lt;annotation name='org.gtk.GDBus.Annotation' value='OnMethod'/&gt;&quot;</span>
812
- <span class="number">&quot; &lt;arg type='s' name='greeting' direction='in'/&gt;&quot;</span>
813
- <span class="number">&quot; &lt;arg type='s' name='response' direction='out'/&gt;&quot;</span>
814
- <span class="number">&quot; &lt;/method&gt;&quot;</span>
815
- <span class="number">&quot; &lt;method name='EmitSignal'&gt;&quot;</span>
816
- <span class="number">&quot; &lt;arg type='d' name='speed_in_mph' direction='in'&gt;&quot;</span>
817
- <span class="number">&quot; &lt;annotation name='org.gtk.GDBus.Annotation' value='OnArg'/&gt;&quot;</span>
818
- <span class="number">&quot; &lt;/arg&gt;&quot;</span>
819
- <span class="number">&quot; &lt;/method&gt;&quot;</span>
820
- <span class="number">&quot; &lt;method name='GimmeStdout'/&gt;&quot;</span>
821
- <span class="number">&quot; &lt;signal name='VelocityChanged'&gt;&quot;</span>
822
- <span class="number">&quot; &lt;annotation name='org.gtk.GDBus.Annotation' value='Onsignal'/&gt;&quot;</span>
823
- <span class="number">&quot; &lt;arg type='d' name='speed_in_mph'/&gt;&quot;</span>
824
- <span class="number">&quot; &lt;arg type='s' name='speed_as_string'&gt;&quot;</span>
825
- <span class="number">&quot; &lt;annotation name='org.gtk.GDBus.Annotation' value='OnArg_NonFirst'/&gt;&quot;</span>
826
- <span class="number">&quot; &lt;/arg&gt;&quot;</span>
827
- <span class="number">&quot; &lt;/signal&gt;&quot;</span>
828
- <span class="number">&quot; &lt;property type='s' name='FluxCapicitorName' access='read'&gt;&quot;</span>
829
- <span class="number">&quot; &lt;annotation name='org.gtk.GDBus.Annotation' value='OnProperty'&gt;&quot;</span>
830
- <span class="number">&quot; &lt;annotation name='org.gtk.GDBus.Annotation' value='OnAnnotation_YesThisIsCrazy'/&gt;&quot;</span>
831
- <span class="number">&quot; &lt;/annotation&gt;&quot;</span>
832
- <span class="number">&quot; &lt;/property&gt;&quot;</span>
833
- <span class="number">&quot; &lt;property type='s' name='Title' access='readwrite'/&gt;&quot;</span>
834
- <span class="number">&quot; &lt;property type='s' name='ReadingAlwaysThrowsError' access='read'/&gt;&quot;</span>
835
- <span class="number">&quot; &lt;property type='s' name='WritingAlwaysThrowsError' access='readwrite'/&gt;&quot;</span>
836
- <span class="number">&quot; &lt;property type='s' name='OnlyWritable' access='write'/&gt;&quot;</span>
837
- <span class="number">&quot; &lt;property type='s' name='Foo' access='read'/&gt;&quot;</span>
838
- <span class="number">&quot; &lt;property type='s' name='Bar' access='read'/&gt;&quot;</span>
839
- <span class="number">&quot; &lt;/interface&gt;&quot;</span>
840
- <span class="number">&quot;&lt;/node&gt;&quot;</span>;
841
-
842
- <span class="comment">/*</span><span class="comment"> ---------------------------------------------------------------------------------------------------- </span><span class="comment">*/</span>
843
-
844
- <span class="type">static</span> <span class="type">void</span>
845
- handle_method_call (<span class="type">GDBusConnection</span> *connection,
846
- <span class="type">const</span> <span class="type">gchar</span> *sender,
847
- <span class="type">const</span> <span class="type">gchar</span> *object_path,
848
- <span class="type">const</span> <span class="type">gchar</span> *interface_name,
849
- <span class="type">const</span> <span class="type">gchar</span> *method_name,
850
- <span class="type">GVariant</span> *parameters,
851
- <span class="type">GDBusMethodInvocation</span> *invocation,
852
- <span class="type">gpointer</span> user_data)
853
- {
854
- <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (method_name, <span class="number">&quot;HelloWorld&quot;</span>) == <span class="number">0</span>)
855
- {
856
- <span class="type">const</span> <span class="type">gchar</span> *greeting;
857
-
858
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-get">g_variant_get</a></span> (parameters, <span class="number">&quot;(&amp;s)&quot;</span>, &amp;greeting);
859
-
860
- <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (greeting, <span class="number">&quot;Return Unregistered&quot;</span>) == <span class="number">0</span>)
861
- {
862
- <span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-error">g_dbus_method_invocation_return_error</a></span> (invocation,
863
- <span class="number">G_IO_ERROR</span>,
864
- <span class="number">G_IO_ERROR_FAILED_HANDLED</span>,
865
- <span class="number">&quot;As requested, here's a GError not registered (G_IO_ERROR_FAILED_HANDLED)&quot;</span>);
866
- }
867
- <span class="keyword">else</span> <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (greeting, <span class="number">&quot;Return Registered&quot;</span>) == <span class="number">0</span>)
868
- {
869
- <span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-error">g_dbus_method_invocation_return_error</a></span> (invocation,
870
- <span class="number">G_DBUS_ERROR</span>,
871
- <span class="number">G_DBUS_ERROR_MATCH_RULE_NOT_FOUND</span>,
872
- <span class="number">&quot;As requested, here's a GError that is registered (G_DBUS_ERROR_MATCH_RULE_NOT_FOUND)&quot;</span>);
873
- }
874
- <span class="keyword">else</span> <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (greeting, <span class="number">&quot;Return Raw&quot;</span>) == <span class="number">0</span>)
875
- {
876
- <span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-dbus-error">g_dbus_method_invocation_return_dbus_error</a></span> (invocation,
877
- <span class="number">&quot;org.gtk.GDBus.SomeErrorName&quot;</span>,
878
- <span class="number">&quot;As requested, here's a raw D-Bus error&quot;</span>);
879
- }
880
- <span class="keyword">else</span>
881
- {
882
- <span class="type">gchar</span> *response;
883
- response = <span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a></span> (<span class="number">&quot;You greeted me with '</span><span class="symbol">%s</span><span class="number">'. Thanks!&quot;</span>, greeting);
884
- <span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-value">g_dbus_method_invocation_return_value</a></span> (invocation,
885
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new">g_variant_new</a></span> (<span class="number">&quot;(s)&quot;</span>, response));
886
- <span class="function"><a href="../glib/glib-Memory-Allocation.html#g-free">g_free</a></span> (response);
887
- }
888
- }
889
- <span class="keyword">else</span> <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (method_name, <span class="number">&quot;EmitSignal&quot;</span>) == <span class="number">0</span>)
890
- {
891
- <span class="type">GError</span> *local_error;
892
- <span class="type">gdouble</span> speed_in_mph;
893
- <span class="type">gchar</span> *speed_as_string;
894
-
895
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-get">g_variant_get</a></span> (parameters, <span class="number">&quot;(d)&quot;</span>, &amp;speed_in_mph);
896
- speed_as_string = <span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a></span> (<span class="number">&quot;</span><span class="symbol">%g</span><span class="number"> mph!&quot;</span>, speed_in_mph);
897
-
898
- local_error = <span class="number">NULL</span>;
899
- <span class="function"><a href="GDBusConnection.html#g-dbus-connection-emit-signal">g_dbus_connection_emit_signal</a></span> (connection,
900
- <span class="number">NULL</span>,
901
- object_path,
902
- interface_name,
903
- <span class="number">&quot;VelocityChanged&quot;</span>,
904
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new">g_variant_new</a></span> (<span class="number">&quot;(ds)&quot;</span>,
905
- speed_in_mph,
906
- speed_as_string),
907
- &amp;local_error);
908
- <span class="preproc">g_assert_no_error</span> (local_error);
909
- <span class="function"><a href="../glib/glib-Memory-Allocation.html#g-free">g_free</a></span> (speed_as_string);
910
-
911
- <span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-value">g_dbus_method_invocation_return_value</a></span> (invocation, <span class="number">NULL</span>);
912
- }
913
- <span class="keyword">else</span> <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (method_name, <span class="number">&quot;GimmeStdout&quot;</span>) == <span class="number">0</span>)
914
- {
915
- <span class="preproc">#ifdef G_OS_UNIX</span>
916
- <span class="keyword">if</span> (<span class="function"><a href="GDBusConnection.html#g-dbus-connection-get-capabilities">g_dbus_connection_get_capabilities</a></span> (connection) &amp; <span class="number">G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING</span>)
917
- {
918
- <span class="type">GDBusMessage</span> *reply;
919
- <span class="type">GUnixFDList</span> *fd_list;
920
- <span class="type">GError</span> *error;
921
-
922
- fd_list = <span class="function"><a href="GUnixFDList.html#g-unix-fd-list-new">g_unix_fd_list_new</a></span> ();
923
- error = <span class="number">NULL</span>;
924
- <span class="function"><a href="GUnixFDList.html#g-unix-fd-list-append">g_unix_fd_list_append</a></span> (fd_list, STDOUT_FILENO, &amp;error);
925
- <span class="preproc">g_assert_no_error</span> (error);
926
-
927
- reply = <span class="function"><a href="GDBusMessage.html#g-dbus-message-new-method-reply">g_dbus_message_new_method_reply</a></span> (<span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-get-message">g_dbus_method_invocation_get_message</a></span> (invocation));
928
- <span class="function"><a href="GDBusMessage.html#g-dbus-message-set-unix-fd-list">g_dbus_message_set_unix_fd_list</a></span> (reply, fd_list);
929
-
930
- error = <span class="number">NULL</span>;
931
- <span class="function"><a href="GDBusConnection.html#g-dbus-connection-send-message">g_dbus_connection_send_message</a></span> (connection,
932
- reply,
933
- <span class="number">G_DBUS_SEND_MESSAGE_FLAGS_NONE</span>,
934
- <span class="number">NULL</span>, <span class="comment">/*</span><span class="comment"> out_serial </span><span class="comment">*/</span>
935
- &amp;error);
936
- <span class="preproc">g_assert_no_error</span> (error);
937
-
938
- <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> (invocation);
939
- <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> (fd_list);
940
- <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> (reply);
941
- }
942
- <span class="keyword">else</span>
943
- {
944
- <span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-dbus-error">g_dbus_method_invocation_return_dbus_error</a></span> (invocation,
945
- <span class="number">&quot;org.gtk.GDBus.Failed&quot;</span>,
946
- <span class="number">&quot;Your message bus daemon does not support file descriptor passing (need D-Bus &gt;= 1.3.0)&quot;</span>);
947
- }
800
+ <span class="comment">/* ---------------------------------------------------------------------------------------------------- */</span>
801
+
802
+ <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>
803
+
804
+ <span class="comment">/* Introspection data for the service we are exporting */</span>
805
+ <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>
806
+ <span class="normal"> </span><span class="string">"&lt;node&gt;"</span>
807
+ <span class="normal"> </span><span class="string">" &lt;interface name='org.gtk.GDBus.TestInterface'&gt;"</span>
808
+ <span class="normal"> </span><span class="string">" &lt;annotation name='org.gtk.GDBus.Annotation' value='OnInterface'/&gt;"</span>
809
+ <span class="normal"> </span><span class="string">" &lt;annotation name='org.gtk.GDBus.Annotation' value='AlsoOnInterface'/&gt;"</span>
810
+ <span class="normal"> </span><span class="string">" &lt;method name='HelloWorld'&gt;"</span>
811
+ <span class="normal"> </span><span class="string">" &lt;annotation name='org.gtk.GDBus.Annotation' value='OnMethod'/&gt;"</span>
812
+ <span class="normal"> </span><span class="string">" &lt;arg type='s' name='greeting' direction='in'/&gt;"</span>
813
+ <span class="normal"> </span><span class="string">" &lt;arg type='s' name='response' direction='out'/&gt;"</span>
814
+ <span class="normal"> </span><span class="string">" &lt;/method&gt;"</span>
815
+ <span class="normal"> </span><span class="string">" &lt;method name='EmitSignal'&gt;"</span>
816
+ <span class="normal"> </span><span class="string">" &lt;arg type='d' name='speed_in_mph' direction='in'&gt;"</span>
817
+ <span class="normal"> </span><span class="string">" &lt;annotation name='org.gtk.GDBus.Annotation' value='OnArg'/&gt;"</span>
818
+ <span class="normal"> </span><span class="string">" &lt;/arg&gt;"</span>
819
+ <span class="normal"> </span><span class="string">" &lt;/method&gt;"</span>
820
+ <span class="normal"> </span><span class="string">" &lt;method name='GimmeStdout'/&gt;"</span>
821
+ <span class="normal"> </span><span class="string">" &lt;signal name='VelocityChanged'&gt;"</span>
822
+ <span class="normal"> </span><span class="string">" &lt;annotation name='org.gtk.GDBus.Annotation' value='Onsignal'/&gt;"</span>
823
+ <span class="normal"> </span><span class="string">" &lt;arg type='d' name='speed_in_mph'/&gt;"</span>
824
+ <span class="normal"> </span><span class="string">" &lt;arg type='s' name='speed_as_string'&gt;"</span>
825
+ <span class="normal"> </span><span class="string">" &lt;annotation name='org.gtk.GDBus.Annotation' value='OnArg_NonFirst'/&gt;"</span>
826
+ <span class="normal"> </span><span class="string">" &lt;/arg&gt;"</span>
827
+ <span class="normal"> </span><span class="string">" &lt;/signal&gt;"</span>
828
+ <span class="normal"> </span><span class="string">" &lt;property type='s' name='FluxCapicitorName' access='read'&gt;"</span>
829
+ <span class="normal"> </span><span class="string">" &lt;annotation name='org.gtk.GDBus.Annotation' value='OnProperty'&gt;"</span>
830
+ <span class="normal"> </span><span class="string">" &lt;annotation name='org.gtk.GDBus.Annotation' value='OnAnnotation_YesThisIsCrazy'/&gt;"</span>
831
+ <span class="normal"> </span><span class="string">" &lt;/annotation&gt;"</span>
832
+ <span class="normal"> </span><span class="string">" &lt;/property&gt;"</span>
833
+ <span class="normal"> </span><span class="string">" &lt;property type='s' name='Title' access='readwrite'/&gt;"</span>
834
+ <span class="normal"> </span><span class="string">" &lt;property type='s' name='ReadingAlwaysThrowsError' access='read'/&gt;"</span>
835
+ <span class="normal"> </span><span class="string">" &lt;property type='s' name='WritingAlwaysThrowsError' access='readwrite'/&gt;"</span>
836
+ <span class="normal"> </span><span class="string">" &lt;property type='s' name='OnlyWritable' access='write'/&gt;"</span>
837
+ <span class="normal"> </span><span class="string">" &lt;property type='s' name='Foo' access='read'/&gt;"</span>
838
+ <span class="normal"> </span><span class="string">" &lt;property type='s' name='Bar' access='read'/&gt;"</span>
839
+ <span class="normal"> </span><span class="string">" &lt;/interface&gt;"</span>
840
+ <span class="normal"> </span><span class="string">"&lt;/node&gt;"</span><span class="symbol">;</span>
841
+
842
+ <span class="comment">/* ---------------------------------------------------------------------------------------------------- */</span>
843
+
844
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
845
+ <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>
846
+ <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>
847
+ <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>
848
+ <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>
849
+ <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>
850
+ <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>
851
+ <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>
852
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
853
+ <span class="cbracket">{</span>
854
+ <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">"HelloWorld"</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>
855
+ <span class="normal"> </span><span class="cbracket">{</span>
856
+ <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">greeting</span><span class="symbol">;</span>
857
+
858
+ <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">"(&amp;s)"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">greeting</span><span class="symbol">);</span>
859
+
860
+ <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">greeting</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Return Unregistered"</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>
861
+ <span class="normal"> </span><span class="cbracket">{</span>
862
+ <span class="normal"> </span><span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-error">g_dbus_method_invocation_return_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">invocation</span><span class="symbol">,</span>
863
+ <span class="normal"> <a href="gio-GIOError.html#G-IO-ERROR:CAPS">G_IO_ERROR</a></span><span class="symbol">,</span>
864
+ <span class="normal"> <a href="gio-GIOError.html#G-IO-ERROR-FAILED-HANDLED:CAPS">G_IO_ERROR_FAILED_HANDLED</a></span><span class="symbol">,</span>
865
+ <span class="normal"> </span><span class="string">"As requested, here's a GError not registered (G_IO_ERROR_FAILED_HANDLED)"</span><span class="symbol">);</span>
866
+ <span class="normal"> </span><span class="cbracket">}</span>
867
+ <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">greeting</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Return Registered"</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>
868
+ <span class="normal"> </span><span class="cbracket">{</span>
869
+ <span class="normal"> </span><span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-error">g_dbus_method_invocation_return_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">invocation</span><span class="symbol">,</span>
870
+ <span class="normal"> <a href="gio-GDBusError.html#G-DBUS-ERROR:CAPS">G_DBUS_ERROR</a></span><span class="symbol">,</span>
871
+ <span class="normal"> <a href="gio-GDBusError.html#G-DBUS-ERROR-MATCH-RULE-NOT-FOUND:CAPS">G_DBUS_ERROR_MATCH_RULE_NOT_FOUND</a></span><span class="symbol">,</span>
872
+ <span class="normal"> </span><span class="string">"As requested, here's a GError that is registered (G_DBUS_ERROR_MATCH_RULE_NOT_FOUND)"</span><span class="symbol">);</span>
873
+ <span class="normal"> </span><span class="cbracket">}</span>
874
+ <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">greeting</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Return Raw"</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>
875
+ <span class="normal"> </span><span class="cbracket">{</span>
876
+ <span class="normal"> </span><span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-dbus-error">g_dbus_method_invocation_return_dbus_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">invocation</span><span class="symbol">,</span>
877
+ <span class="normal"> </span><span class="string">"org.gtk.GDBus.SomeErrorName"</span><span class="symbol">,</span>
878
+ <span class="normal"> </span><span class="string">"As requested, here's a raw D-Bus error"</span><span class="symbol">);</span>
879
+ <span class="normal"> </span><span class="cbracket">}</span>
880
+ <span class="normal"> </span><span class="keyword">else</span>
881
+ <span class="normal"> </span><span class="cbracket">{</span>
882
+ <span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">response</span><span class="symbol">;</span>
883
+ <span class="normal"> response </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"You greeted me with '%s'. Thanks!"</span><span class="symbol">,</span><span class="normal"> greeting</span><span class="symbol">);</span>
884
+ <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>
885
+ <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">"(s)"</span><span class="symbol">,</span><span class="normal"> response</span><span class="symbol">));</span>
886
+ <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">response</span><span class="symbol">);</span>
887
+ <span class="normal"> </span><span class="cbracket">}</span>
888
+ <span class="normal"> </span><span class="cbracket">}</span>
889
+ <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">method_name</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"EmitSignal"</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>
890
+ <span class="normal"> </span><span class="cbracket">{</span>
891
+ <span class="normal"> </span><span class="usertype">GError</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">local_error</span><span class="symbol">;</span>
892
+ <span class="normal"> </span><span class="usertype">gdouble</span><span class="normal"> speed_in_mph</span><span class="symbol">;</span>
893
+ <span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">speed_as_string</span><span class="symbol">;</span>
894
+
895
+ <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">"(d)"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">speed_in_mph</span><span class="symbol">);</span>
896
+ <span class="normal"> speed_as_string </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"%g mph!"</span><span class="symbol">,</span><span class="normal"> speed_in_mph</span><span class="symbol">);</span>
897
+
898
+ <span class="normal"> local_error </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
899
+ <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>
900
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
901
+ <span class="normal"> object_path</span><span class="symbol">,</span>
902
+ <span class="normal"> interface_name</span><span class="symbol">,</span>
903
+ <span class="normal"> </span><span class="string">"VelocityChanged"</span><span class="symbol">,</span>
904
+ <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">"(ds)"</span><span class="symbol">,</span>
905
+ <span class="normal"> speed_in_mph</span><span class="symbol">,</span>
906
+ <span class="normal"> speed_as_string</span><span class="symbol">),</span>
907
+ <span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">local_error</span><span class="symbol">);</span>
908
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Testing.html#g-assert-no-error">g_assert_no_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">local_error</span><span class="symbol">);</span>
909
+ <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">speed_as_string</span><span class="symbol">);</span>
910
+
911
+ <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>
912
+ <span class="normal"> </span><span class="cbracket">}</span>
913
+ <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">method_name</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"GimmeStdout"</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>
914
+ <span class="normal"> </span><span class="cbracket">{</span>
915
+ <span class="preproc">#ifdef</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#G-OS-UNIX:CAPS">G_OS_UNIX</a></span>
916
+ <span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="GDBusConnection.html#g-dbus-connection-get-capabilities">g_dbus_connection_get_capabilities</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">connection</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal"> <a href="GDBusConnection.html#G-DBUS-CAPABILITY-FLAGS-UNIX-FD-PASSING:CAPS">G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING</a></span><span class="symbol">)</span>
917
+ <span class="normal"> </span><span class="cbracket">{</span>
918
+ <span class="normal"> </span><span class="usertype">GDBusMessage</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">reply</span><span class="symbol">;</span>
919
+ <span class="normal"> </span><span class="usertype">GUnixFDList</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">fd_list</span><span class="symbol">;</span>
920
+ <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>
921
+
922
+ <span class="normal"> fd_list </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GUnixFDList.html#g-unix-fd-list-new">g_unix_fd_list_new</a></span><span class="normal"> </span><span class="symbol">();</span>
923
+ <span class="normal"> error </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
924
+ <span class="normal"> </span><span class="function"><a href="GUnixFDList.html#g-unix-fd-list-append">g_unix_fd_list_append</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">fd_list</span><span class="symbol">,</span><span class="normal"> STDOUT_FILENO</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">error</span><span class="symbol">);</span>
925
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Testing.html#g-assert-no-error">g_assert_no_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error</span><span class="symbol">);</span>
926
+
927
+ <span class="normal"> reply </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GDBusMessage.html#g-dbus-message-new-method-reply">g_dbus_message_new_method_reply</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-get-message">g_dbus_method_invocation_get_message</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">invocation</span><span class="symbol">));</span>
928
+ <span class="normal"> </span><span class="function"><a href="GDBusMessage.html#g-dbus-message-set-unix-fd-list">g_dbus_message_set_unix_fd_list</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">reply</span><span class="symbol">,</span><span class="normal"> fd_list</span><span class="symbol">);</span>
929
+
930
+ <span class="normal"> error </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
931
+ <span class="normal"> </span><span class="function"><a href="GDBusConnection.html#g-dbus-connection-send-message">g_dbus_connection_send_message</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">connection</span><span class="symbol">,</span>
932
+ <span class="normal"> reply</span><span class="symbol">,</span>
933
+ <span class="normal"> <a href="GDBusConnection.html#G-DBUS-SEND-MESSAGE-FLAGS-NONE:CAPS">G_DBUS_SEND_MESSAGE_FLAGS_NONE</a></span><span class="symbol">,</span>
934
+ <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">/* out_serial */</span>
935
+ <span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">error</span><span class="symbol">);</span>
936
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Testing.html#g-assert-no-error">g_assert_no_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error</span><span class="symbol">);</span>
937
+
938
+ <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">invocation</span><span class="symbol">);</span>
939
+ <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">fd_list</span><span class="symbol">);</span>
940
+ <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">reply</span><span class="symbol">);</span>
941
+ <span class="normal"> </span><span class="cbracket">}</span>
942
+ <span class="normal"> </span><span class="keyword">else</span>
943
+ <span class="normal"> </span><span class="cbracket">{</span>
944
+ <span class="normal"> </span><span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-dbus-error">g_dbus_method_invocation_return_dbus_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">invocation</span><span class="symbol">,</span>
945
+ <span class="normal"> </span><span class="string">"org.gtk.GDBus.Failed"</span><span class="symbol">,</span>
946
+ <span class="normal"> </span><span class="string">"Your message bus daemon does not support file descriptor passing (need D-Bus &gt;= 1.3.0)"</span><span class="symbol">);</span>
947
+ <span class="normal"> </span><span class="cbracket">}</span>
948
948
  <span class="preproc">#else</span>
949
- <span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-dbus-error">g_dbus_method_invocation_return_dbus_error</a></span> (invocation,
950
- <span class="number">&quot;org.gtk.GDBus.NotOnUnix&quot;</span>,
951
- <span class="number">&quot;Your OS does not support file descriptor passing&quot;</span>);
949
+ <span class="normal"> </span><span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-dbus-error">g_dbus_method_invocation_return_dbus_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">invocation</span><span class="symbol">,</span>
950
+ <span class="normal"> </span><span class="string">"org.gtk.GDBus.NotOnUnix"</span><span class="symbol">,</span>
951
+ <span class="normal"> </span><span class="string">"Your OS does not support file descriptor passing"</span><span class="symbol">);</span>
952
952
  <span class="preproc">#endif</span>
953
- }
954
- }
955
-
956
- <span class="type">static</span> <span class="type">gchar</span> *_global_title = <span class="number">NULL</span>;
957
-
958
- <span class="type">static</span> <span class="type">gboolean</span> swap_a_and_b = <span class="number">FALSE</span>;
959
-
960
- <span class="type">static</span> <span class="type">GVariant</span> *
961
- handle_get_property (<span class="type">GDBusConnection</span> *connection,
962
- <span class="type">const</span> <span class="type">gchar</span> *sender,
963
- <span class="type">const</span> <span class="type">gchar</span> *object_path,
964
- <span class="type">const</span> <span class="type">gchar</span> *interface_name,
965
- <span class="type">const</span> <span class="type">gchar</span> *property_name,
966
- <span class="type">GError</span> **error,
967
- <span class="type">gpointer</span> user_data)
968
- {
969
- <span class="type">GVariant</span> *ret;
970
-
971
- ret = <span class="number">NULL</span>;
972
- <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (property_name, <span class="number">&quot;FluxCapicitorName&quot;</span>) == <span class="number">0</span>)
973
- {
974
- ret = <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new-string">g_variant_new_string</a></span> (<span class="number">&quot;DeLorean&quot;</span>);
975
- }
976
- <span class="keyword">else</span> <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (property_name, <span class="number">&quot;Title&quot;</span>) == <span class="number">0</span>)
977
- {
978
- <span class="keyword">if</span> (_global_title == <span class="number">NULL</span>)
979
- _global_title = <span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span> (<span class="number">&quot;Back To C!&quot;</span>);
980
- ret = <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new-string">g_variant_new_string</a></span> (_global_title);
981
- }
982
- <span class="keyword">else</span> <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (property_name, <span class="number">&quot;ReadingAlwaysThrowsError&quot;</span>) == <span class="number">0</span>)
983
- {
984
- <span class="function"><a href="../glib/glib-Error-Reporting.html#g-set-error">g_set_error</a></span> (error,
985
- <span class="number">G_IO_ERROR</span>,
986
- <span class="number">G_IO_ERROR_FAILED</span>,
987
- <span class="number">&quot;Hello </span><span class="symbol">%s</span><span class="number">. I thought I said reading this property &quot;</span>
988
- <span class="number">&quot;always results in an error. kthxbye&quot;</span>,
989
- sender);
990
- }
991
- <span class="keyword">else</span> <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (property_name, <span class="number">&quot;WritingAlwaysThrowsError&quot;</span>) == <span class="number">0</span>)
992
- {
993
- ret = <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new-string">g_variant_new_string</a></span> (<span class="number">&quot;There's no home like home&quot;</span>);
994
- }
995
- <span class="keyword">else</span> <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (property_name, <span class="number">&quot;Foo&quot;</span>) == <span class="number">0</span>)
996
- {
997
- ret = <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new-string">g_variant_new_string</a></span> (swap_a_and_b ? <span class="number">&quot;Tock&quot;</span> : <span class="number">&quot;Tick&quot;</span>);
998
- }
999
- <span class="keyword">else</span> <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (property_name, <span class="number">&quot;Bar&quot;</span>) == <span class="number">0</span>)
1000
- {
1001
- ret = <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new-string">g_variant_new_string</a></span> (swap_a_and_b ? <span class="number">&quot;Tick&quot;</span> : <span class="number">&quot;Tock&quot;</span>);
1002
- }
1003
-
1004
- <span class="keyword">return</span> ret;
1005
- }
1006
-
1007
- <span class="type">static</span> <span class="type">gboolean</span>
1008
- handle_set_property (<span class="type">GDBusConnection</span> *connection,
1009
- <span class="type">const</span> <span class="type">gchar</span> *sender,
1010
- <span class="type">const</span> <span class="type">gchar</span> *object_path,
1011
- <span class="type">const</span> <span class="type">gchar</span> *interface_name,
1012
- <span class="type">const</span> <span class="type">gchar</span> *property_name,
1013
- <span class="type">GVariant</span> *value,
1014
- <span class="type">GError</span> **error,
1015
- <span class="type">gpointer</span> user_data)
1016
- {
1017
- <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (property_name, <span class="number">&quot;Title&quot;</span>) == <span class="number">0</span>)
1018
- {
1019
- <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (_global_title, <span class="function"><a href="../glib/glib-GVariant.html#g-variant-get-string">g_variant_get_string</a></span> (value, <span class="number">NULL</span>)) != <span class="number">0</span>)
1020
- {
1021
- <span class="type">GVariantBuilder</span> *builder;
1022
- <span class="type">GError</span> *local_error;
1023
-
1024
- <span class="function"><a href="../glib/glib-Memory-Allocation.html#g-free">g_free</a></span> (_global_title);
1025
- _global_title = <span class="function"><a href="../glib/glib-GVariant.html#g-variant-dup-string">g_variant_dup_string</a></span> (value, <span class="number">NULL</span>);
1026
-
1027
- local_error = <span class="number">NULL</span>;
1028
- builder = <span class="function"><a href="../glib/glib-GVariant.html#g-variant-builder-new">g_variant_builder_new</a></span> (<span class="number">G_VARIANT_TYPE_ARRAY</span>);
1029
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-builder-add">g_variant_builder_add</a></span> (builder,
1030
- <span class="number">&quot;{sv}&quot;</span>,
1031
- <span class="number">&quot;Title&quot;</span>,
1032
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new-string">g_variant_new_string</a></span> (_global_title));
1033
- <span class="function"><a href="GDBusConnection.html#g-dbus-connection-emit-signal">g_dbus_connection_emit_signal</a></span> (connection,
1034
- <span class="number">NULL</span>,
1035
- object_path,
1036
- <span class="number">&quot;org.freedesktop.DBus.Properties&quot;</span>,
1037
- <span class="number">&quot;PropertiesChanged&quot;</span>,
1038
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new">g_variant_new</a></span> (<span class="number">&quot;(sa{sv}as)&quot;</span>,
1039
- interface_name,
1040
- builder,
1041
- <span class="number">NULL</span>),
1042
- &amp;local_error);
1043
- <span class="preproc">g_assert_no_error</span> (local_error);
1044
- }
1045
- }
1046
- <span class="keyword">else</span> <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (property_name, <span class="number">&quot;ReadingAlwaysThrowsError&quot;</span>) == <span class="number">0</span>)
1047
- {
1048
- <span class="comment">/*</span><span class="comment"> do nothing - they can't read it after all! </span><span class="comment">*/</span>
1049
- }
1050
- <span class="keyword">else</span> <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (property_name, <span class="number">&quot;WritingAlwaysThrowsError&quot;</span>) == <span class="number">0</span>)
1051
- {
1052
- <span class="function"><a href="../glib/glib-Error-Reporting.html#g-set-error">g_set_error</a></span> (error,
1053
- <span class="number">G_IO_ERROR</span>,
1054
- <span class="number">G_IO_ERROR_FAILED</span>,
1055
- <span class="number">&quot;Hello AGAIN </span><span class="symbol">%s</span><span class="number">. I thought I said writing this property &quot;</span>
1056
- <span class="number">&quot;always results in an error. kthxbye&quot;</span>,
1057
- sender);
1058
- }
1059
-
1060
- <span class="keyword">return</span> *error == <span class="number">NULL</span>;
1061
- }
1062
-
1063
-
1064
- <span class="comment">/*</span><span class="comment"> for now </span><span class="comment">*/</span>
1065
- <span class="type">static</span> <span class="type">const</span> <span class="type">GDBusInterfaceVTable</span> interface_vtable =
1066
- {
1067
- handle_method_call,
1068
- handle_get_property,
1069
- handle_set_property
1070
- };
1071
-
1072
- <span class="comment">/*</span><span class="comment"> ---------------------------------------------------------------------------------------------------- </span><span class="comment">*/</span>
1073
-
1074
- <span class="type">static</span> <span class="type">gboolean</span>
1075
- on_timeout_cb (<span class="type">gpointer</span> user_data)
1076
- {
1077
- <span class="type">GDBusConnection</span> *connection = <span class="preproc">G_DBUS_CONNECTION</span> (user_data);
1078
- <span class="type">GVariantBuilder</span> *builder;
1079
- <span class="type">GVariantBuilder</span> *invalidated_builder;
1080
- <span class="type">GError</span> *error;
1081
-
1082
- swap_a_and_b = !swap_a_and_b;
1083
-
1084
- error = <span class="number">NULL</span>;
1085
- builder = <span class="function"><a href="../glib/glib-GVariant.html#g-variant-builder-new">g_variant_builder_new</a></span> (<span class="number">G_VARIANT_TYPE_ARRAY</span>);
1086
- invalidated_builder = <span class="function"><a href="../glib/glib-GVariant.html#g-variant-builder-new">g_variant_builder_new</a></span> (<span class="preproc">G_VARIANT_TYPE</span> (<span class="number">&quot;as&quot;</span>));
1087
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-builder-add">g_variant_builder_add</a></span> (builder,
1088
- <span class="number">&quot;{sv}&quot;</span>,
1089
- <span class="number">&quot;Foo&quot;</span>,
1090
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new-string">g_variant_new_string</a></span> (swap_a_and_b ? <span class="number">&quot;Tock&quot;</span> : <span class="number">&quot;Tick&quot;</span>));
1091
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-builder-add">g_variant_builder_add</a></span> (builder,
1092
- <span class="number">&quot;{sv}&quot;</span>,
1093
- <span class="number">&quot;Bar&quot;</span>,
1094
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new-string">g_variant_new_string</a></span> (swap_a_and_b ? <span class="number">&quot;Tick&quot;</span> : <span class="number">&quot;Tock&quot;</span>));
1095
- <span class="function"><a href="GDBusConnection.html#g-dbus-connection-emit-signal">g_dbus_connection_emit_signal</a></span> (connection,
1096
- <span class="number">NULL</span>,
1097
- <span class="number">&quot;/org/gtk/GDBus/TestObject&quot;</span>,
1098
- <span class="number">&quot;org.freedesktop.DBus.Properties&quot;</span>,
1099
- <span class="number">&quot;PropertiesChanged&quot;</span>,
1100
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new">g_variant_new</a></span> (<span class="number">&quot;(sa{sv}as)&quot;</span>,
1101
- <span class="number">&quot;org.gtk.GDBus.TestInterface&quot;</span>,
1102
- builder,
1103
- invalidated_builder),
1104
- &amp;error);
1105
- <span class="preproc">g_assert_no_error</span> (error);
1106
-
1107
-
1108
- <span class="keyword">return</span> <span class="number">TRUE</span>;
1109
- }
1110
-
1111
- <span class="comment">/*</span><span class="comment"> ---------------------------------------------------------------------------------------------------- </span><span class="comment">*/</span>
1112
-
1113
- <span class="type">static</span> <span class="type">void</span>
1114
- on_bus_acquired (<span class="type">GDBusConnection</span> *connection,
1115
- <span class="type">const</span> <span class="type">gchar</span> *name,
1116
- <span class="type">gpointer</span> user_data)
1117
- {
1118
- <span class="type">guint</span> registration_id;
1119
-
1120
- registration_id = <span class="function"><a href="GDBusConnection.html#g-dbus-connection-register-object">g_dbus_connection_register_object</a></span> (connection,
1121
- <span class="number">&quot;/org/gtk/GDBus/TestObject&quot;</span>,
1122
- introspection_data-&gt;interfaces[<span class="number">0</span>],
1123
- &amp;interface_vtable,
1124
- <span class="number">NULL</span>, <span class="comment">/*</span><span class="comment"> user_data </span><span class="comment">*/</span>
1125
- <span class="number">NULL</span>, <span class="comment">/*</span><span class="comment"> user_data_free_func </span><span class="comment">*/</span>
1126
- <span class="number">NULL</span>); <span class="comment">/*</span><span class="comment"> GError** </span><span class="comment">*/</span>
1127
- <span class="preproc">g_assert</span> (registration_id &gt; <span class="number">0</span>);
1128
-
1129
- <span class="comment">/*</span><span class="comment"> swap value of properties Foo and Bar every two seconds </span><span class="comment">*/</span>
1130
- <span class="function"><a href="../glib/glib-The-Main-Event-Loop.html#g-timeout-add-seconds">g_timeout_add_seconds</a></span> (<span class="number">2</span>,
1131
- on_timeout_cb,
1132
- connection);
1133
- }
1134
-
1135
- <span class="type">static</span> <span class="type">void</span>
1136
- on_name_acquired (<span class="type">GDBusConnection</span> *connection,
1137
- <span class="type">const</span> <span class="type">gchar</span> *name,
1138
- <span class="type">gpointer</span> user_data)
1139
- {
1140
- }
1141
-
1142
- <span class="type">static</span> <span class="type">void</span>
1143
- on_name_lost (<span class="type">GDBusConnection</span> *connection,
1144
- <span class="type">const</span> <span class="type">gchar</span> *name,
1145
- <span class="type">gpointer</span> user_data)
1146
- {
1147
- exit (<span class="number">1</span>);
1148
- }
953
+ <span class="normal"> </span><span class="cbracket">}</span>
954
+ <span class="cbracket">}</span>
955
+
956
+ <span class="keyword">static</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">_global_title </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
957
+
958
+ <span class="keyword">static</span><span class="normal"> </span><span class="usertype">gboolean</span><span class="normal"> swap_a_and_b </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">;</span>
959
+
960
+ <span class="keyword">static</span><span class="normal"> <a href="../glib/glib-GVariant.html#GVariant">GVariant</a> </span><span class="symbol">*</span>
961
+ <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>
962
+ <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>
963
+ <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>
964
+ <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>
965
+ <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>
966
+ <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>
967
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
968
+ <span class="cbracket">{</span>
969
+ <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>
970
+
971
+ <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>
972
+ <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">"FluxCapicitorName"</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>
973
+ <span class="normal"> </span><span class="cbracket">{</span>
974
+ <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="string">"DeLorean"</span><span class="symbol">);</span>
975
+ <span class="normal"> </span><span class="cbracket">}</span>
976
+ <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">"Title"</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>
977
+ <span class="normal"> </span><span class="cbracket">{</span>
978
+ <span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">_global_title </span><span class="symbol">==</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">)</span>
979
+ <span class="normal"> _global_title </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Back To C!"</span><span class="symbol">);</span>
980
+ <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">_global_title</span><span class="symbol">);</span>
981
+ <span class="normal"> </span><span class="cbracket">}</span>
982
+ <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">"ReadingAlwaysThrowsError"</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>
983
+ <span class="normal"> </span><span class="cbracket">{</span>
984
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Error-Reporting.html#g-set-error">g_set_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error</span><span class="symbol">,</span>
985
+ <span class="normal"> <a href="gio-GIOError.html#G-IO-ERROR:CAPS">G_IO_ERROR</a></span><span class="symbol">,</span>
986
+ <span class="normal"> <a href="gio-GIOError.html#G-IO-ERROR-FAILED:CAPS">G_IO_ERROR_FAILED</a></span><span class="symbol">,</span>
987
+ <span class="normal"> </span><span class="string">"Hello %s. I thought I said reading this property "</span>
988
+ <span class="normal"> </span><span class="string">"always results in an error. kthxbye"</span><span class="symbol">,</span>
989
+ <span class="normal"> sender</span><span class="symbol">);</span>
990
+ <span class="normal"> </span><span class="cbracket">}</span>
991
+ <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">"WritingAlwaysThrowsError"</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>
992
+ <span class="normal"> </span><span class="cbracket">{</span>
993
+ <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="string">"There's no home like home"</span><span class="symbol">);</span>
994
+ <span class="normal"> </span><span class="cbracket">}</span>
995
+ <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">"Foo"</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>
996
+ <span class="normal"> </span><span class="cbracket">{</span>
997
+ <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">swap_a_and_b </span><span class="symbol">?</span><span class="normal"> </span><span class="string">"Tock"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="string">"Tick"</span><span class="symbol">);</span>
998
+ <span class="normal"> </span><span class="cbracket">}</span>
999
+ <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">"Bar"</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>
1000
+ <span class="normal"> </span><span class="cbracket">{</span>
1001
+ <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">swap_a_and_b </span><span class="symbol">?</span><span class="normal"> </span><span class="string">"Tick"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="string">"Tock"</span><span class="symbol">);</span>
1002
+ <span class="normal"> </span><span class="cbracket">}</span>
1003
+
1004
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> ret</span><span class="symbol">;</span>
1005
+ <span class="cbracket">}</span>
1006
+
1007
+ <span class="keyword">static</span><span class="normal"> <a href="../glib/glib-Basic-Types.html#gboolean">gboolean</a></span>
1008
+ <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>
1009
+ <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>
1010
+ <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>
1011
+ <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>
1012
+ <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>
1013
+ <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>
1014
+ <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>
1015
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
1016
+ <span class="cbracket">{</span>
1017
+ <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">"Title"</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>
1018
+ <span class="normal"> </span><span class="cbracket">{</span>
1019
+ <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">_global_title</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"> </span><span class="symbol">!=</span><span class="normal"> </span><span class="number">0</span><span class="symbol">)</span>
1020
+ <span class="normal"> </span><span class="cbracket">{</span>
1021
+ <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>
1022
+ <span class="normal"> </span><span class="usertype">GError</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">local_error</span><span class="symbol">;</span>
1023
+
1024
+ <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">_global_title</span><span class="symbol">);</span>
1025
+ <span class="normal"> _global_title </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-GVariant.html#g-variant-dup-string">g_variant_dup_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>
1026
+
1027
+ <span class="normal"> local_error </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
1028
+ <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>
1029
+ <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>
1030
+ <span class="normal"> </span><span class="string">"{sv}"</span><span class="symbol">,</span>
1031
+ <span class="normal"> </span><span class="string">"Title"</span><span class="symbol">,</span>
1032
+ <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">_global_title</span><span class="symbol">));</span>
1033
+ <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>
1034
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
1035
+ <span class="normal"> object_path</span><span class="symbol">,</span>
1036
+ <span class="normal"> </span><span class="string">"org.freedesktop.DBus.Properties"</span><span class="symbol">,</span>
1037
+ <span class="normal"> </span><span class="string">"PropertiesChanged"</span><span class="symbol">,</span>
1038
+ <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>
1039
+ <span class="normal"> interface_name</span><span class="symbol">,</span>
1040
+ <span class="normal"> builder</span><span class="symbol">,</span>
1041
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">),</span>
1042
+ <span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">local_error</span><span class="symbol">);</span>
1043
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Testing.html#g-assert-no-error">g_assert_no_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">local_error</span><span class="symbol">);</span>
1044
+ <span class="normal"> </span><span class="cbracket">}</span>
1045
+ <span class="normal"> </span><span class="cbracket">}</span>
1046
+ <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">"ReadingAlwaysThrowsError"</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>
1047
+ <span class="normal"> </span><span class="cbracket">{</span>
1048
+ <span class="normal"> </span><span class="comment">/* do nothing - they can't read it after all! */</span>
1049
+ <span class="normal"> </span><span class="cbracket">}</span>
1050
+ <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">"WritingAlwaysThrowsError"</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>
1051
+ <span class="normal"> </span><span class="cbracket">{</span>
1052
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Error-Reporting.html#g-set-error">g_set_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error</span><span class="symbol">,</span>
1053
+ <span class="normal"> <a href="gio-GIOError.html#G-IO-ERROR:CAPS">G_IO_ERROR</a></span><span class="symbol">,</span>
1054
+ <span class="normal"> <a href="gio-GIOError.html#G-IO-ERROR-FAILED:CAPS">G_IO_ERROR_FAILED</a></span><span class="symbol">,</span>
1055
+ <span class="normal"> </span><span class="string">"Hello AGAIN %s. I thought I said writing this property "</span>
1056
+ <span class="normal"> </span><span class="string">"always results in an error. kthxbye"</span><span class="symbol">,</span>
1057
+ <span class="normal"> sender</span><span class="symbol">);</span>
1058
+ <span class="normal"> </span><span class="cbracket">}</span>
1059
+
1060
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">error </span><span class="symbol">==</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
1061
+ <span class="cbracket">}</span>
1062
+
1063
+
1064
+ <span class="comment">/* for now */</span>
1065
+ <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>
1066
+ <span class="cbracket">{</span>
1067
+ <span class="normal"> handle_method_call</span><span class="symbol">,</span>
1068
+ <span class="normal"> handle_get_property</span><span class="symbol">,</span>
1069
+ <span class="normal"> handle_set_property</span>
1070
+ <span class="cbracket">}</span><span class="symbol">;</span>
1071
+
1072
+ <span class="comment">/* ---------------------------------------------------------------------------------------------------- */</span>
1073
+
1074
+ <span class="keyword">static</span><span class="normal"> <a href="../glib/glib-Basic-Types.html#gboolean">gboolean</a></span>
1075
+ <span class="function">on_timeout_cb</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
1076
+ <span class="cbracket">{</span>
1077
+ <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><span class="normal"> </span><span class="function">G_DBUS_CONNECTION</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">user_data</span><span class="symbol">);</span>
1078
+ <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>
1079
+ <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>
1080
+ <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>
1081
+
1082
+ <span class="normal"> swap_a_and_b </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">!</span><span class="normal">swap_a_and_b</span><span class="symbol">;</span>
1083
+
1084
+ <span class="normal"> error </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
1085
+ <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>
1086
+ <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>
1087
+ <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>
1088
+ <span class="normal"> </span><span class="string">"{sv}"</span><span class="symbol">,</span>
1089
+ <span class="normal"> </span><span class="string">"Foo"</span><span class="symbol">,</span>
1090
+ <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">swap_a_and_b </span><span class="symbol">?</span><span class="normal"> </span><span class="string">"Tock"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="string">"Tick"</span><span class="symbol">));</span>
1091
+ <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>
1092
+ <span class="normal"> </span><span class="string">"{sv}"</span><span class="symbol">,</span>
1093
+ <span class="normal"> </span><span class="string">"Bar"</span><span class="symbol">,</span>
1094
+ <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">swap_a_and_b </span><span class="symbol">?</span><span class="normal"> </span><span class="string">"Tick"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="string">"Tock"</span><span class="symbol">));</span>
1095
+ <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>
1096
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
1097
+ <span class="normal"> </span><span class="string">"/org/gtk/GDBus/TestObject"</span><span class="symbol">,</span>
1098
+ <span class="normal"> </span><span class="string">"org.freedesktop.DBus.Properties"</span><span class="symbol">,</span>
1099
+ <span class="normal"> </span><span class="string">"PropertiesChanged"</span><span class="symbol">,</span>
1100
+ <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>
1101
+ <span class="normal"> </span><span class="string">"org.gtk.GDBus.TestInterface"</span><span class="symbol">,</span>
1102
+ <span class="normal"> builder</span><span class="symbol">,</span>
1103
+ <span class="normal"> invalidated_builder</span><span class="symbol">),</span>
1104
+ <span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">error</span><span class="symbol">);</span>
1105
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Testing.html#g-assert-no-error">g_assert_no_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error</span><span class="symbol">);</span>
1106
+
1107
+
1108
+ <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>
1109
+ <span class="cbracket">}</span>
1110
+
1111
+ <span class="comment">/* ---------------------------------------------------------------------------------------------------- */</span>
1112
+
1113
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
1114
+ <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>
1115
+ <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>
1116
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
1117
+ <span class="cbracket">{</span>
1118
+ <span class="normal"> </span><span class="usertype">guint</span><span class="normal"> registration_id</span><span class="symbol">;</span>
1119
+
1120
+ <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>
1121
+ <span class="normal"> </span><span class="string">"/org/gtk/GDBus/TestObject"</span><span class="symbol">,</span>
1122
+ <span class="normal"> introspection_data</span><span class="symbol">-&gt;</span><span class="normal">interfaces</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">],</span>
1123
+ <span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">interface_vtable</span><span class="symbol">,</span>
1124
+ <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>
1125
+ <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>
1126
+ <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>
1127
+ <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">&gt;</span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span>
1128
+
1129
+ <span class="normal"> </span><span class="comment">/* swap value of properties Foo and Bar every two seconds */</span>
1130
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-The-Main-Event-Loop.html#g-timeout-add-seconds">g_timeout_add_seconds</a></span><span class="normal"> </span><span class="symbol">(</span><span class="number">2</span><span class="symbol">,</span>
1131
+ <span class="normal"> on_timeout_cb</span><span class="symbol">,</span>
1132
+ <span class="normal"> connection</span><span class="symbol">);</span>
1133
+ <span class="cbracket">}</span>
1134
+
1135
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
1136
+ <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>
1137
+ <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>
1138
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
1139
+ <span class="cbracket">{</span>
1140
+ <span class="cbracket">}</span>
1141
+
1142
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
1143
+ <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>
1144
+ <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>
1145
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
1146
+ <span class="cbracket">{</span>
1147
+ <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>
1148
+ <span class="cbracket">}</span>
1149
1149
 
1150
1150
  <span class="type">int</span>
1151
- main (<span class="type">int</span> argc, <span class="type">char</span> *argv[])
1152
- {
1153
- <span class="type">guint</span> owner_id;
1154
- <span class="type">GMainLoop</span> *loop;
1151
+ <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>
1152
+ <span class="cbracket">{</span>
1153
+ <span class="normal"> </span><span class="usertype">guint</span><span class="normal"> owner_id</span><span class="symbol">;</span>
1154
+ <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>
1155
1155
 
1156
- <span class="comment">/*</span><span class="comment"> We are lazy here - we don't want to manually provide</span>
1156
+ <span class="normal"> </span><span class="comment">/* We are lazy here - we don't want to manually provide</span>
1157
1157
  <span class="comment"> * the introspection data structures - so we just build</span>
1158
1158
  <span class="comment"> * them from XML.</span>
1159
- <span class="comment"> </span><span class="comment">*/</span>
1160
- introspection_data = <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> (introspection_xml, <span class="number">NULL</span>);
1161
- <span class="preproc">g_assert</span> (introspection_data != <span class="number">NULL</span>);
1159
+ <span class="comment"> */</span>
1160
+ <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>
1161
+ <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>
1162
1162
 
1163
- owner_id = <span class="function"><a href="gio-Owning-Bus-Names.html#g-bus-own-name">g_bus_own_name</a></span> (<span class="number">G_BUS_TYPE_SESSION</span>,
1164
- <span class="number">&quot;org.gtk.GDBus.TestServer&quot;</span>,
1165
- <span class="number">G_BUS_NAME_OWNER_FLAGS_NONE</span>,
1166
- on_bus_acquired,
1167
- on_name_acquired,
1168
- on_name_lost,
1169
- <span class="number">NULL</span>,
1170
- <span class="number">NULL</span>);
1163
+ <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>
1164
+ <span class="normal"> </span><span class="string">"org.gtk.GDBus.TestServer"</span><span class="symbol">,</span>
1165
+ <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>
1166
+ <span class="normal"> on_bus_acquired</span><span class="symbol">,</span>
1167
+ <span class="normal"> on_name_acquired</span><span class="symbol">,</span>
1168
+ <span class="normal"> on_name_lost</span><span class="symbol">,</span>
1169
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
1170
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
1171
1171
 
1172
- loop = <span class="function"><a href="../glib/glib-The-Main-Event-Loop.html#g-main-loop-new">g_main_loop_new</a></span> (<span class="number">NULL</span>, <span class="number">FALSE</span>);
1173
- <span class="function"><a href="../glib/glib-The-Main-Event-Loop.html#g-main-loop-run">g_main_loop_run</a></span> (loop);
1172
+ <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>
1173
+ <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>
1174
1174
 
1175
- <span class="function"><a href="gio-Owning-Bus-Names.html#g-bus-unown-name">g_bus_unown_name</a></span> (owner_id);
1175
+ <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>
1176
1176
 
1177
- <span class="function"><a href="gio-D-Bus-Introspection-Data.html#g-dbus-node-info-unref">g_dbus_node_info_unref</a></span> (introspection_data);
1177
+ <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>
1178
1178
 
1179
- <span class="keyword">return</span> <span class="number">0</span>;
1180
- }</pre></td>
1179
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span>
1180
+ <span class="cbracket">}</span></pre></td>
1181
1181
  </tr>
1182
1182
  </tbody>
1183
1183
  </table>
@@ -1592,404 +1592,404 @@ main (<span class="type">int</span> argc, <span class="type">char</span> *argv[]
1592
1592
  396
1593
1593
  397
1594
1594
  398</pre></td>
1595
- <td class="listing_code"><pre class="programlisting"><span class="preproc">#include </span><span class="number">&lt;gio/gio.h&gt;</span>
1596
- <span class="preproc">#include </span><span class="number">&lt;stdlib.h&gt;</span>
1597
- <span class="preproc">#include </span><span class="number">&lt;string.h&gt;</span>
1598
-
1599
- <span class="comment">/*</span><span class="comment"> ---------------------------------------------------------------------------------------------------- </span><span class="comment">*/</span>
1600
-
1601
- <span class="type">static</span> <span class="type">GDBusNodeInfo</span> *introspection_data = <span class="number">NULL</span>;
1602
- <span class="type">static</span> <span class="type">GDBusInterfaceInfo</span> *manager_interface_info = <span class="number">NULL</span>;
1603
- <span class="type">static</span> <span class="type">GDBusInterfaceInfo</span> *block_interface_info = <span class="number">NULL</span>;
1604
- <span class="type">static</span> <span class="type">GDBusInterfaceInfo</span> *partition_interface_info = <span class="number">NULL</span>;
1605
-
1606
- <span class="comment">/*</span><span class="comment"> Introspection data for the service we are exporting </span><span class="comment">*/</span>
1607
- <span class="type">static</span> <span class="type">const</span> <span class="type">gchar</span> introspection_xml[] =
1608
- <span class="number">&quot;&lt;node&gt;&quot;</span>
1609
- <span class="number">&quot; &lt;interface name='org.gtk.GDBus.Example.Manager'&gt;&quot;</span>
1610
- <span class="number">&quot; &lt;method name='Hello'&gt;&quot;</span>
1611
- <span class="number">&quot; &lt;arg type='s' name='greeting' direction='in'/&gt;&quot;</span>
1612
- <span class="number">&quot; &lt;arg type='s' name='response' direction='out'/&gt;&quot;</span>
1613
- <span class="number">&quot; &lt;/method&gt;&quot;</span>
1614
- <span class="number">&quot; &lt;/interface&gt;&quot;</span>
1615
- <span class="number">&quot; &lt;interface name='org.gtk.GDBus.Example.Block'&gt;&quot;</span>
1616
- <span class="number">&quot; &lt;method name='Hello'&gt;&quot;</span>
1617
- <span class="number">&quot; &lt;arg type='s' name='greeting' direction='in'/&gt;&quot;</span>
1618
- <span class="number">&quot; &lt;arg type='s' name='response' direction='out'/&gt;&quot;</span>
1619
- <span class="number">&quot; &lt;/method&gt;&quot;</span>
1620
- <span class="number">&quot; &lt;property type='i' name='Major' access='read'/&gt;&quot;</span>
1621
- <span class="number">&quot; &lt;property type='i' name='Minor' access='read'/&gt;&quot;</span>
1622
- <span class="number">&quot; &lt;property type='s' name='Notes' access='readwrite'/&gt;&quot;</span>
1623
- <span class="number">&quot; &lt;/interface&gt;&quot;</span>
1624
- <span class="number">&quot; &lt;interface name='org.gtk.GDBus.Example.Partition'&gt;&quot;</span>
1625
- <span class="number">&quot; &lt;method name='Hello'&gt;&quot;</span>
1626
- <span class="number">&quot; &lt;arg type='s' name='greeting' direction='in'/&gt;&quot;</span>
1627
- <span class="number">&quot; &lt;arg type='s' name='response' direction='out'/&gt;&quot;</span>
1628
- <span class="number">&quot; &lt;/method&gt;&quot;</span>
1629
- <span class="number">&quot; &lt;property type='i' name='PartitionNumber' access='read'/&gt;&quot;</span>
1630
- <span class="number">&quot; &lt;property type='s' name='Notes' access='readwrite'/&gt;&quot;</span>
1631
- <span class="number">&quot; &lt;/interface&gt;&quot;</span>
1632
- <span class="number">&quot;&lt;/node&gt;&quot;</span>;
1633
-
1634
- <span class="comment">/*</span><span class="comment"> ---------------------------------------------------------------------------------------------------- </span><span class="comment">*/</span>
1635
-
1636
- <span class="type">static</span> <span class="type">void</span>
1637
- manager_method_call (<span class="type">GDBusConnection</span> *connection,
1638
- <span class="type">const</span> <span class="type">gchar</span> *sender,
1639
- <span class="type">const</span> <span class="type">gchar</span> *object_path,
1640
- <span class="type">const</span> <span class="type">gchar</span> *interface_name,
1641
- <span class="type">const</span> <span class="type">gchar</span> *method_name,
1642
- <span class="type">GVariant</span> *parameters,
1643
- <span class="type">GDBusMethodInvocation</span> *invocation,
1644
- <span class="type">gpointer</span> user_data)
1645
- {
1646
- <span class="type">const</span> <span class="type">gchar</span> *greeting;
1647
- <span class="type">gchar</span> *response;
1648
-
1649
- <span class="preproc">g_assert_cmpstr</span> (interface_name, ==, <span class="number">&quot;org.gtk.GDBus.Example.Manager&quot;</span>);
1650
- <span class="preproc">g_assert_cmpstr</span> (method_name, ==, <span class="number">&quot;Hello&quot;</span>);
1651
-
1652
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-get">g_variant_get</a></span> (parameters, <span class="number">&quot;(&amp;s)&quot;</span>, &amp;greeting);
1653
-
1654
- response = <span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a></span> (<span class="number">&quot;Method </span><span class="symbol">%s</span><span class="number">.</span><span class="symbol">%s</span><span class="number"> with user_data `</span><span class="symbol">%s</span><span class="number">' on object path </span><span class="symbol">%s</span><span class="number"> called with arg '</span><span class="symbol">%s</span><span class="number">'&quot;</span>,
1655
- interface_name,
1656
- method_name,
1657
- (<span class="type">const</span> <span class="type">gchar</span> *) user_data,
1658
- object_path,
1659
- greeting);
1660
- <span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-value">g_dbus_method_invocation_return_value</a></span> (invocation,
1661
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new">g_variant_new</a></span> (<span class="number">&quot;(s)&quot;</span>, response));
1662
- <span class="function"><a href="../glib/glib-Memory-Allocation.html#g-free">g_free</a></span> (response);
1663
- }
1664
-
1665
- <span class="type">const</span> <span class="type">GDBusInterfaceVTable</span> manager_vtable =
1666
- {
1667
- manager_method_call,
1668
- <span class="number">NULL</span>, <span class="comment">/*</span><span class="comment"> get_property </span><span class="comment">*/</span>
1669
- <span class="number">NULL</span> <span class="comment">/*</span><span class="comment"> set_property </span><span class="comment">*/</span>
1670
- };
1671
-
1672
- <span class="comment">/*</span><span class="comment"> ---------------------------------------------------------------------------------------------------- </span><span class="comment">*/</span>
1673
-
1674
- <span class="type">static</span> <span class="type">void</span>
1675
- block_method_call (<span class="type">GDBusConnection</span> *connection,
1676
- <span class="type">const</span> <span class="type">gchar</span> *sender,
1677
- <span class="type">const</span> <span class="type">gchar</span> *object_path,
1678
- <span class="type">const</span> <span class="type">gchar</span> *interface_name,
1679
- <span class="type">const</span> <span class="type">gchar</span> *method_name,
1680
- <span class="type">GVariant</span> *parameters,
1681
- <span class="type">GDBusMethodInvocation</span> *invocation,
1682
- <span class="type">gpointer</span> user_data)
1683
- {
1684
- <span class="preproc">g_assert_cmpstr</span> (interface_name, ==, <span class="number">&quot;org.gtk.GDBus.Example.Block&quot;</span>);
1685
-
1686
- <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (method_name, <span class="number">&quot;Hello&quot;</span>) == <span class="number">0</span>)
1687
- {
1688
- <span class="type">const</span> <span class="type">gchar</span> *greeting;
1689
- <span class="type">gchar</span> *response;
1690
-
1691
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-get">g_variant_get</a></span> (parameters, <span class="number">&quot;(&amp;s)&quot;</span>, &amp;greeting);
1692
-
1693
- response = <span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a></span> (<span class="number">&quot;Method </span><span class="symbol">%s</span><span class="number">.</span><span class="symbol">%s</span><span class="number"> with user_data `</span><span class="symbol">%s</span><span class="number">' on object path </span><span class="symbol">%s</span><span class="number"> called with arg '</span><span class="symbol">%s</span><span class="number">'&quot;</span>,
1694
- interface_name,
1695
- method_name,
1696
- (<span class="type">const</span> <span class="type">gchar</span> *) user_data,
1697
- object_path,
1698
- greeting);
1699
- <span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-value">g_dbus_method_invocation_return_value</a></span> (invocation,
1700
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new">g_variant_new</a></span> (<span class="number">&quot;(s)&quot;</span>, response));
1701
- <span class="function"><a href="../glib/glib-Memory-Allocation.html#g-free">g_free</a></span> (response);
1702
- }
1703
- <span class="keyword">else</span> <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (method_name, <span class="number">&quot;DoStuff&quot;</span>) == <span class="number">0</span>)
1704
- {
1705
- <span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-dbus-error">g_dbus_method_invocation_return_dbus_error</a></span> (invocation,
1706
- <span class="number">&quot;org.gtk.GDBus.TestSubtree.Error.Failed&quot;</span>,
1707
- <span class="number">&quot;This method intentionally always fails&quot;</span>);
1708
- }
1709
- <span class="keyword">else</span>
1710
- {
1711
- <span class="preproc">g_assert_not_reached</span> ();
1712
- }
1713
- }
1714
-
1715
- <span class="type">static</span> <span class="type">GVariant</span> *
1716
- block_get_property (<span class="type">GDBusConnection</span> *connection,
1717
- <span class="type">const</span> <span class="type">gchar</span> *sender,
1718
- <span class="type">const</span> <span class="type">gchar</span> *object_path,
1719
- <span class="type">const</span> <span class="type">gchar</span> *interface_name,
1720
- <span class="type">const</span> <span class="type">gchar</span> *property_name,
1721
- <span class="type">GError</span> **error,
1722
- <span class="type">gpointer</span> user_data)
1723
- {
1724
- <span class="type">GVariant</span> *ret;
1725
- <span class="type">const</span> <span class="type">gchar</span> *node;
1726
- <span class="type">gint</span> major;
1727
- <span class="type">gint</span> minor;
1728
-
1729
- node = strrchr (object_path, <span class="number">'/'</span>) + <span class="number">1</span>;
1730
- <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-str-has-prefix">g_str_has_prefix</a></span> (node, <span class="number">&quot;sda&quot;</span>))
1731
- major = <span class="number">8</span>;
1732
- <span class="keyword">else</span>
1733
- major = <span class="number">9</span>;
1734
- <span class="keyword">if</span> (strlen (node) == <span class="number">4</span>)
1735
- minor = node[<span class="number">3</span>] - <span class="number">'0'</span>;
1736
- <span class="keyword">else</span>
1737
- minor = <span class="number">0</span>;
1738
-
1739
- ret = <span class="number">NULL</span>;
1740
- <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (property_name, <span class="number">&quot;Major&quot;</span>) == <span class="number">0</span>)
1741
- {
1742
- ret = <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new-int32">g_variant_new_int32</a></span> (major);
1743
- }
1744
- <span class="keyword">else</span> <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (property_name, <span class="number">&quot;Minor&quot;</span>) == <span class="number">0</span>)
1745
- {
1746
- ret = <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new-int32">g_variant_new_int32</a></span> (minor);
1747
- }
1748
- <span class="keyword">else</span> <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (property_name, <span class="number">&quot;Notes&quot;</span>) == <span class="number">0</span>)
1749
- {
1750
- <span class="function"><a href="../glib/glib-Error-Reporting.html#g-set-error">g_set_error</a></span> (error,
1751
- <span class="number">G_IO_ERROR</span>,
1752
- <span class="number">G_IO_ERROR_FAILED</span>,
1753
- <span class="number">&quot;Hello </span><span class="symbol">%s</span><span class="number">. I thought I said reading this property &quot;</span>
1754
- <span class="number">&quot;always results in an error. kthxbye&quot;</span>,
1755
- sender);
1756
- }
1757
- <span class="keyword">else</span>
1758
- {
1759
- <span class="preproc">g_assert_not_reached</span> ();
1760
- }
1761
-
1762
- <span class="keyword">return</span> ret;
1763
- }
1764
-
1765
- <span class="type">static</span> <span class="type">gboolean</span>
1766
- block_set_property (<span class="type">GDBusConnection</span> *connection,
1767
- <span class="type">const</span> <span class="type">gchar</span> *sender,
1768
- <span class="type">const</span> <span class="type">gchar</span> *object_path,
1769
- <span class="type">const</span> <span class="type">gchar</span> *interface_name,
1770
- <span class="type">const</span> <span class="type">gchar</span> *property_name,
1771
- <span class="type">GVariant</span> *value,
1772
- <span class="type">GError</span> **error,
1773
- <span class="type">gpointer</span> user_data)
1774
- {
1775
- <span class="comment">/*</span><span class="comment"> </span><span class="Todo">TODO</span><span class="comment"> </span><span class="comment">*/</span>
1776
- <span class="preproc">g_assert_not_reached</span> ();
1777
- }
1778
-
1779
- <span class="type">const</span> <span class="type">GDBusInterfaceVTable</span> block_vtable =
1780
- {
1781
- block_method_call,
1782
- block_get_property,
1783
- block_set_property,
1784
- };
1785
-
1786
- <span class="comment">/*</span><span class="comment"> ---------------------------------------------------------------------------------------------------- </span><span class="comment">*/</span>
1787
-
1788
- <span class="type">static</span> <span class="type">void</span>
1789
- partition_method_call (<span class="type">GDBusConnection</span> *connection,
1790
- <span class="type">const</span> <span class="type">gchar</span> *sender,
1791
- <span class="type">const</span> <span class="type">gchar</span> *object_path,
1792
- <span class="type">const</span> <span class="type">gchar</span> *interface_name,
1793
- <span class="type">const</span> <span class="type">gchar</span> *method_name,
1794
- <span class="type">GVariant</span> *parameters,
1795
- <span class="type">GDBusMethodInvocation</span> *invocation,
1796
- <span class="type">gpointer</span> user_data)
1797
- {
1798
- <span class="type">const</span> <span class="type">gchar</span> *greeting;
1799
- <span class="type">gchar</span> *response;
1800
-
1801
- <span class="preproc">g_assert_cmpstr</span> (interface_name, ==, <span class="number">&quot;org.gtk.GDBus.Example.Partition&quot;</span>);
1802
- <span class="preproc">g_assert_cmpstr</span> (method_name, ==, <span class="number">&quot;Hello&quot;</span>);
1803
-
1804
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-get">g_variant_get</a></span> (parameters, <span class="number">&quot;(&amp;s)&quot;</span>, &amp;greeting);
1805
-
1806
- response = <span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a></span> (<span class="number">&quot;Method </span><span class="symbol">%s</span><span class="number">.</span><span class="symbol">%s</span><span class="number"> with user_data `</span><span class="symbol">%s</span><span class="number">' on object path </span><span class="symbol">%s</span><span class="number"> called with arg '</span><span class="symbol">%s</span><span class="number">'&quot;</span>,
1807
- interface_name,
1808
- method_name,
1809
- (<span class="type">const</span> <span class="type">gchar</span> *) user_data,
1810
- object_path,
1811
- greeting);
1812
- <span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-value">g_dbus_method_invocation_return_value</a></span> (invocation,
1813
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new">g_variant_new</a></span> (<span class="number">&quot;(s)&quot;</span>, response));
1814
- <span class="function"><a href="../glib/glib-Memory-Allocation.html#g-free">g_free</a></span> (response);
1815
- }
1816
-
1817
- <span class="type">const</span> <span class="type">GDBusInterfaceVTable</span> partition_vtable =
1818
- {
1819
- partition_method_call,
1820
- <span class="comment">//partition_get_property,</span>
1821
- <span class="comment">//partition_set_property</span>
1822
- };
1823
-
1824
- <span class="comment">/*</span><span class="comment"> ---------------------------------------------------------------------------------------------------- </span><span class="comment">*/</span>
1825
-
1826
- <span class="type">static</span> <span class="type">gchar</span> **
1827
- subtree_enumerate (<span class="type">GDBusConnection</span> *connection,
1828
- <span class="type">const</span> <span class="type">gchar</span> *sender,
1829
- <span class="type">const</span> <span class="type">gchar</span> *object_path,
1830
- <span class="type">gpointer</span> user_data)
1831
- {
1832
- <span class="type">gchar</span> **nodes;
1833
- <span class="type">GPtrArray</span> *p;
1834
-
1835
- p = <span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-new">g_ptr_array_new</a></span> ();
1836
- <span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span> (p, <span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span> (<span class="number">&quot;sda&quot;</span>));
1837
- <span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span> (p, <span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span> (<span class="number">&quot;sda1&quot;</span>));
1838
- <span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span> (p, <span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span> (<span class="number">&quot;sda2&quot;</span>));
1839
- <span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span> (p, <span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span> (<span class="number">&quot;sda3&quot;</span>));
1840
- <span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span> (p, <span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span> (<span class="number">&quot;sdb&quot;</span>));
1841
- <span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span> (p, <span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span> (<span class="number">&quot;sdb1&quot;</span>));
1842
- <span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span> (p, <span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span> (<span class="number">&quot;sdc&quot;</span>));
1843
- <span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span> (p, <span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span> (<span class="number">&quot;sdc1&quot;</span>));
1844
- <span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span> (p, <span class="number">NULL</span>);
1845
- nodes = (<span class="type">gchar</span> **) <span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-free">g_ptr_array_free</a></span> (p, <span class="number">FALSE</span>);
1846
-
1847
- <span class="keyword">return</span> nodes;
1848
- }
1849
-
1850
- <span class="type">static</span> <span class="type">GDBusInterfaceInfo</span> **
1851
- subtree_introspect (<span class="type">GDBusConnection</span> *connection,
1852
- <span class="type">const</span> <span class="type">gchar</span> *sender,
1853
- <span class="type">const</span> <span class="type">gchar</span> *object_path,
1854
- <span class="type">const</span> <span class="type">gchar</span> *node,
1855
- <span class="type">gpointer</span> user_data)
1856
- {
1857
- <span class="type">GPtrArray</span> *p;
1858
-
1859
- p = <span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-new">g_ptr_array_new</a></span> ();
1860
- <span class="keyword">if</span> (node == <span class="number">NULL</span>)
1861
- {
1862
- <span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span> (p, <span class="function"><a href="gio-D-Bus-Introspection-Data.html#g-dbus-interface-info-ref">g_dbus_interface_info_ref</a></span> (manager_interface_info));
1863
- }
1864
- <span class="keyword">else</span>
1865
- {
1866
- <span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span> (p, <span class="function"><a href="gio-D-Bus-Introspection-Data.html#g-dbus-interface-info-ref">g_dbus_interface_info_ref</a></span> (block_interface_info));
1867
- <span class="keyword">if</span> (strlen (node) == <span class="number">4</span>)
1868
- <span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span> (p,
1869
- <span class="function"><a href="gio-D-Bus-Introspection-Data.html#g-dbus-interface-info-ref">g_dbus_interface_info_ref</a></span> (partition_interface_info));
1870
- }
1871
-
1872
- <span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span> (p, <span class="number">NULL</span>);
1873
-
1874
- <span class="keyword">return</span> (<span class="type">GDBusInterfaceInfo</span> **) <span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-free">g_ptr_array_free</a></span> (p, <span class="number">FALSE</span>);
1875
- }
1876
-
1877
- <span class="type">static</span> <span class="type">const</span> <span class="type">GDBusInterfaceVTable</span> *
1878
- subtree_dispatch (<span class="type">GDBusConnection</span> *connection,
1879
- <span class="type">const</span> <span class="type">gchar</span> *sender,
1880
- <span class="type">const</span> <span class="type">gchar</span> *object_path,
1881
- <span class="type">const</span> <span class="type">gchar</span> *interface_name,
1882
- <span class="type">const</span> <span class="type">gchar</span> *node,
1883
- <span class="type">gpointer</span> *out_user_data,
1884
- <span class="type">gpointer</span> user_data)
1885
- {
1886
- <span class="type">const</span> <span class="type">GDBusInterfaceVTable</span> *vtable_to_return;
1887
- <span class="type">gpointer</span> user_data_to_return;
1888
-
1889
- <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (interface_name, <span class="number">&quot;org.gtk.GDBus.Example.Manager&quot;</span>) == <span class="number">0</span>)
1890
- {
1891
- user_data_to_return = <span class="number">&quot;The Root&quot;</span>;
1892
- vtable_to_return = &amp;manager_vtable;
1893
- }
1894
- <span class="keyword">else</span>
1895
- {
1896
- <span class="keyword">if</span> (strlen (node) == <span class="number">4</span>)
1897
- user_data_to_return = <span class="number">&quot;A partition&quot;</span>;
1898
- <span class="keyword">else</span>
1899
- user_data_to_return = <span class="number">&quot;A block device&quot;</span>;
1900
-
1901
- <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (interface_name, <span class="number">&quot;org.gtk.GDBus.Example.Block&quot;</span>) == <span class="number">0</span>)
1902
- vtable_to_return = &amp;block_vtable;
1903
- <span class="keyword">else</span> <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (interface_name, <span class="number">&quot;org.gtk.GDBus.Example.Partition&quot;</span>) == <span class="number">0</span>)
1904
- vtable_to_return = &amp;partition_vtable;
1905
- <span class="keyword">else</span>
1906
- <span class="preproc">g_assert_not_reached</span> ();
1907
- }
1908
-
1909
- *out_user_data = user_data_to_return;
1910
-
1911
- <span class="keyword">return</span> vtable_to_return;
1912
- }
1913
-
1914
- <span class="type">const</span> <span class="type">GDBusSubtreeVTable</span> subtree_vtable =
1915
- {
1916
- subtree_enumerate,
1917
- subtree_introspect,
1918
- subtree_dispatch
1919
- };
1920
-
1921
- <span class="comment">/*</span><span class="comment"> ---------------------------------------------------------------------------------------------------- </span><span class="comment">*/</span>
1922
-
1923
- <span class="type">static</span> <span class="type">void</span>
1924
- on_bus_acquired (<span class="type">GDBusConnection</span> *connection,
1925
- <span class="type">const</span> <span class="type">gchar</span> *name,
1926
- <span class="type">gpointer</span> user_data)
1927
- {
1928
- <span class="type">guint</span> registration_id;
1929
-
1930
- registration_id = <span class="function"><a href="GDBusConnection.html#g-dbus-connection-register-subtree">g_dbus_connection_register_subtree</a></span> (connection,
1931
- <span class="number">&quot;/org/gtk/GDBus/TestSubtree/Devices&quot;</span>,
1932
- &amp;subtree_vtable,
1933
- <span class="number">G_DBUS_SUBTREE_FLAGS_NONE</span>,
1934
- <span class="number">NULL</span>, <span class="comment">/*</span><span class="comment"> user_data </span><span class="comment">*/</span>
1935
- <span class="number">NULL</span>, <span class="comment">/*</span><span class="comment"> user_data_free_func </span><span class="comment">*/</span>
1936
- <span class="number">NULL</span>); <span class="comment">/*</span><span class="comment"> GError** </span><span class="comment">*/</span>
1937
- <span class="preproc">g_assert</span> (registration_id &gt; <span class="number">0</span>);
1938
- }
1939
-
1940
- <span class="type">static</span> <span class="type">void</span>
1941
- on_name_acquired (<span class="type">GDBusConnection</span> *connection,
1942
- <span class="type">const</span> <span class="type">gchar</span> *name,
1943
- <span class="type">gpointer</span> user_data)
1944
- {
1945
- }
1946
-
1947
- <span class="type">static</span> <span class="type">void</span>
1948
- on_name_lost (<span class="type">GDBusConnection</span> *connection,
1949
- <span class="type">const</span> <span class="type">gchar</span> *name,
1950
- <span class="type">gpointer</span> user_data)
1951
- {
1952
- exit (<span class="number">1</span>);
1953
- }
1595
+ <td class="listing_code"><pre class="programlisting"><span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;gio/gio.h&gt;</span>
1596
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;stdlib.h&gt;</span>
1597
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;string.h&gt;</span>
1598
+
1599
+ <span class="comment">/* ---------------------------------------------------------------------------------------------------- */</span>
1600
+
1601
+ <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>
1602
+ <span class="keyword">static</span><span class="normal"> </span><span class="usertype">GDBusInterfaceInfo</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">manager_interface_info </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
1603
+ <span class="keyword">static</span><span class="normal"> </span><span class="usertype">GDBusInterfaceInfo</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">block_interface_info </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
1604
+ <span class="keyword">static</span><span class="normal"> </span><span class="usertype">GDBusInterfaceInfo</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">partition_interface_info </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
1605
+
1606
+ <span class="comment">/* Introspection data for the service we are exporting */</span>
1607
+ <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>
1608
+ <span class="normal"> </span><span class="string">"&lt;node&gt;"</span>
1609
+ <span class="normal"> </span><span class="string">" &lt;interface name='org.gtk.GDBus.Example.Manager'&gt;"</span>
1610
+ <span class="normal"> </span><span class="string">" &lt;method name='Hello'&gt;"</span>
1611
+ <span class="normal"> </span><span class="string">" &lt;arg type='s' name='greeting' direction='in'/&gt;"</span>
1612
+ <span class="normal"> </span><span class="string">" &lt;arg type='s' name='response' direction='out'/&gt;"</span>
1613
+ <span class="normal"> </span><span class="string">" &lt;/method&gt;"</span>
1614
+ <span class="normal"> </span><span class="string">" &lt;/interface&gt;"</span>
1615
+ <span class="normal"> </span><span class="string">" &lt;interface name='org.gtk.GDBus.Example.Block'&gt;"</span>
1616
+ <span class="normal"> </span><span class="string">" &lt;method name='Hello'&gt;"</span>
1617
+ <span class="normal"> </span><span class="string">" &lt;arg type='s' name='greeting' direction='in'/&gt;"</span>
1618
+ <span class="normal"> </span><span class="string">" &lt;arg type='s' name='response' direction='out'/&gt;"</span>
1619
+ <span class="normal"> </span><span class="string">" &lt;/method&gt;"</span>
1620
+ <span class="normal"> </span><span class="string">" &lt;property type='i' name='Major' access='read'/&gt;"</span>
1621
+ <span class="normal"> </span><span class="string">" &lt;property type='i' name='Minor' access='read'/&gt;"</span>
1622
+ <span class="normal"> </span><span class="string">" &lt;property type='s' name='Notes' access='readwrite'/&gt;"</span>
1623
+ <span class="normal"> </span><span class="string">" &lt;/interface&gt;"</span>
1624
+ <span class="normal"> </span><span class="string">" &lt;interface name='org.gtk.GDBus.Example.Partition'&gt;"</span>
1625
+ <span class="normal"> </span><span class="string">" &lt;method name='Hello'&gt;"</span>
1626
+ <span class="normal"> </span><span class="string">" &lt;arg type='s' name='greeting' direction='in'/&gt;"</span>
1627
+ <span class="normal"> </span><span class="string">" &lt;arg type='s' name='response' direction='out'/&gt;"</span>
1628
+ <span class="normal"> </span><span class="string">" &lt;/method&gt;"</span>
1629
+ <span class="normal"> </span><span class="string">" &lt;property type='i' name='PartitionNumber' access='read'/&gt;"</span>
1630
+ <span class="normal"> </span><span class="string">" &lt;property type='s' name='Notes' access='readwrite'/&gt;"</span>
1631
+ <span class="normal"> </span><span class="string">" &lt;/interface&gt;"</span>
1632
+ <span class="normal"> </span><span class="string">"&lt;/node&gt;"</span><span class="symbol">;</span>
1633
+
1634
+ <span class="comment">/* ---------------------------------------------------------------------------------------------------- */</span>
1635
+
1636
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
1637
+ <span class="function">manager_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>
1638
+ <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>
1639
+ <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>
1640
+ <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>
1641
+ <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>
1642
+ <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>
1643
+ <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>
1644
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
1645
+ <span class="cbracket">{</span>
1646
+ <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">greeting</span><span class="symbol">;</span>
1647
+ <span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">response</span><span class="symbol">;</span>
1648
+
1649
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Testing.html#g-assert-cmpstr">g_assert_cmpstr</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">interface_name</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">==,</span><span class="normal"> </span><span class="string">"org.gtk.GDBus.Example.Manager"</span><span class="symbol">);</span>
1650
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Testing.html#g-assert-cmpstr">g_assert_cmpstr</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="symbol">==,</span><span class="normal"> </span><span class="string">"Hello"</span><span class="symbol">);</span>
1651
+
1652
+ <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">"(&amp;s)"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">greeting</span><span class="symbol">);</span>
1653
+
1654
+ <span class="normal"> response </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Method %s.%s with user_data `%s' on object path %s called with arg '%s'"</span><span class="symbol">,</span>
1655
+ <span class="normal"> interface_name</span><span class="symbol">,</span>
1656
+ <span class="normal"> method_name</span><span class="symbol">,</span>
1657
+ <span class="normal"> </span><span class="symbol">(</span><span class="keyword">const</span><span class="normal"> <a href="../glib/glib-Basic-Types.html#gchar">gchar</a> </span><span class="symbol">*)</span><span class="normal"> user_data</span><span class="symbol">,</span>
1658
+ <span class="normal"> object_path</span><span class="symbol">,</span>
1659
+ <span class="normal"> greeting</span><span class="symbol">);</span>
1660
+ <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>
1661
+ <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">"(s)"</span><span class="symbol">,</span><span class="normal"> response</span><span class="symbol">));</span>
1662
+ <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">response</span><span class="symbol">);</span>
1663
+ <span class="cbracket">}</span>
1664
+
1665
+ <span class="keyword">const</span><span class="normal"> </span><span class="usertype">GDBusInterfaceVTable</span><span class="normal"> manager_vtable </span><span class="symbol">=</span>
1666
+ <span class="cbracket">{</span>
1667
+ <span class="normal"> manager_method_call</span><span class="symbol">,</span>
1668
+ <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">/* get_property */</span>
1669
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a> </span><span class="comment">/* set_property */</span>
1670
+ <span class="cbracket">}</span><span class="symbol">;</span>
1671
+
1672
+ <span class="comment">/* ---------------------------------------------------------------------------------------------------- */</span>
1673
+
1674
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
1675
+ <span class="function">block_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>
1676
+ <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>
1677
+ <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>
1678
+ <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>
1679
+ <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>
1680
+ <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>
1681
+ <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>
1682
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
1683
+ <span class="cbracket">{</span>
1684
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Testing.html#g-assert-cmpstr">g_assert_cmpstr</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">interface_name</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">==,</span><span class="normal"> </span><span class="string">"org.gtk.GDBus.Example.Block"</span><span class="symbol">);</span>
1685
+
1686
+ <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">"Hello"</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>
1687
+ <span class="normal"> </span><span class="cbracket">{</span>
1688
+ <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">greeting</span><span class="symbol">;</span>
1689
+ <span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">response</span><span class="symbol">;</span>
1690
+
1691
+ <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">"(&amp;s)"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">greeting</span><span class="symbol">);</span>
1692
+
1693
+ <span class="normal"> response </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Method %s.%s with user_data `%s' on object path %s called with arg '%s'"</span><span class="symbol">,</span>
1694
+ <span class="normal"> interface_name</span><span class="symbol">,</span>
1695
+ <span class="normal"> method_name</span><span class="symbol">,</span>
1696
+ <span class="normal"> </span><span class="symbol">(</span><span class="keyword">const</span><span class="normal"> <a href="../glib/glib-Basic-Types.html#gchar">gchar</a> </span><span class="symbol">*)</span><span class="normal"> user_data</span><span class="symbol">,</span>
1697
+ <span class="normal"> object_path</span><span class="symbol">,</span>
1698
+ <span class="normal"> greeting</span><span class="symbol">);</span>
1699
+ <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>
1700
+ <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">"(s)"</span><span class="symbol">,</span><span class="normal"> response</span><span class="symbol">));</span>
1701
+ <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">response</span><span class="symbol">);</span>
1702
+ <span class="normal"> </span><span class="cbracket">}</span>
1703
+ <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">method_name</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"DoStuff"</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>
1704
+ <span class="normal"> </span><span class="cbracket">{</span>
1705
+ <span class="normal"> </span><span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-dbus-error">g_dbus_method_invocation_return_dbus_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">invocation</span><span class="symbol">,</span>
1706
+ <span class="normal"> </span><span class="string">"org.gtk.GDBus.TestSubtree.Error.Failed"</span><span class="symbol">,</span>
1707
+ <span class="normal"> </span><span class="string">"This method intentionally always fails"</span><span class="symbol">);</span>
1708
+ <span class="normal"> </span><span class="cbracket">}</span>
1709
+ <span class="normal"> </span><span class="keyword">else</span>
1710
+ <span class="normal"> </span><span class="cbracket">{</span>
1711
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Testing.html#g-assert-not-reached">g_assert_not_reached</a></span><span class="normal"> </span><span class="symbol">();</span>
1712
+ <span class="normal"> </span><span class="cbracket">}</span>
1713
+ <span class="cbracket">}</span>
1714
+
1715
+ <span class="keyword">static</span><span class="normal"> <a href="../glib/glib-GVariant.html#GVariant">GVariant</a> </span><span class="symbol">*</span>
1716
+ <span class="function">block_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>
1717
+ <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>
1718
+ <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>
1719
+ <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>
1720
+ <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>
1721
+ <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>
1722
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
1723
+ <span class="cbracket">{</span>
1724
+ <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>
1725
+ <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">node</span><span class="symbol">;</span>
1726
+ <span class="normal"> </span><span class="usertype">gint</span><span class="normal"> major</span><span class="symbol">;</span>
1727
+ <span class="normal"> </span><span class="usertype">gint</span><span class="normal"> minor</span><span class="symbol">;</span>
1728
+
1729
+ <span class="normal"> node </span><span class="symbol">=</span><span class="normal"> </span><span class="function">strrchr</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">object_path</span><span class="symbol">,</span><span class="normal"> </span><span class="string">'/'</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">+</span><span class="normal"> </span><span class="number">1</span><span class="symbol">;</span>
1730
+ <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-str-has-prefix">g_str_has_prefix</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">node</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"sda"</span><span class="symbol">))</span>
1731
+ <span class="normal"> major </span><span class="symbol">=</span><span class="normal"> </span><span class="number">8</span><span class="symbol">;</span>
1732
+ <span class="normal"> </span><span class="keyword">else</span>
1733
+ <span class="normal"> major </span><span class="symbol">=</span><span class="normal"> </span><span class="number">9</span><span class="symbol">;</span>
1734
+ <span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function">strlen</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">node</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">==</span><span class="normal"> </span><span class="number">4</span><span class="symbol">)</span>
1735
+ <span class="normal"> minor </span><span class="symbol">=</span><span class="normal"> node</span><span class="symbol">[</span><span class="number">3</span><span class="symbol">]</span><span class="normal"> </span><span class="symbol">-</span><span class="normal"> </span><span class="string">'0'</span><span class="symbol">;</span>
1736
+ <span class="normal"> </span><span class="keyword">else</span>
1737
+ <span class="normal"> minor </span><span class="symbol">=</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span>
1738
+
1739
+ <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>
1740
+ <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">"Major"</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>
1741
+ <span class="normal"> </span><span class="cbracket">{</span>
1742
+ <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">major</span><span class="symbol">);</span>
1743
+ <span class="normal"> </span><span class="cbracket">}</span>
1744
+ <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">"Minor"</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>
1745
+ <span class="normal"> </span><span class="cbracket">{</span>
1746
+ <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">minor</span><span class="symbol">);</span>
1747
+ <span class="normal"> </span><span class="cbracket">}</span>
1748
+ <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">"Notes"</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>
1749
+ <span class="normal"> </span><span class="cbracket">{</span>
1750
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Error-Reporting.html#g-set-error">g_set_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error</span><span class="symbol">,</span>
1751
+ <span class="normal"> <a href="gio-GIOError.html#G-IO-ERROR:CAPS">G_IO_ERROR</a></span><span class="symbol">,</span>
1752
+ <span class="normal"> <a href="gio-GIOError.html#G-IO-ERROR-FAILED:CAPS">G_IO_ERROR_FAILED</a></span><span class="symbol">,</span>
1753
+ <span class="normal"> </span><span class="string">"Hello %s. I thought I said reading this property "</span>
1754
+ <span class="normal"> </span><span class="string">"always results in an error. kthxbye"</span><span class="symbol">,</span>
1755
+ <span class="normal"> sender</span><span class="symbol">);</span>
1756
+ <span class="normal"> </span><span class="cbracket">}</span>
1757
+ <span class="normal"> </span><span class="keyword">else</span>
1758
+ <span class="normal"> </span><span class="cbracket">{</span>
1759
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Testing.html#g-assert-not-reached">g_assert_not_reached</a></span><span class="normal"> </span><span class="symbol">();</span>
1760
+ <span class="normal"> </span><span class="cbracket">}</span>
1761
+
1762
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> ret</span><span class="symbol">;</span>
1763
+ <span class="cbracket">}</span>
1764
+
1765
+ <span class="keyword">static</span><span class="normal"> <a href="../glib/glib-Basic-Types.html#gboolean">gboolean</a></span>
1766
+ <span class="function">block_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>
1767
+ <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>
1768
+ <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>
1769
+ <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>
1770
+ <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>
1771
+ <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>
1772
+ <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>
1773
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
1774
+ <span class="cbracket">{</span>
1775
+ <span class="normal"> </span><span class="comment">/* </span><span class="todo">TODO</span><span class="comment"> */</span>
1776
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Testing.html#g-assert-not-reached">g_assert_not_reached</a></span><span class="normal"> </span><span class="symbol">();</span>
1777
+ <span class="cbracket">}</span>
1778
+
1779
+ <span class="keyword">const</span><span class="normal"> </span><span class="usertype">GDBusInterfaceVTable</span><span class="normal"> block_vtable </span><span class="symbol">=</span>
1780
+ <span class="cbracket">{</span>
1781
+ <span class="normal"> block_method_call</span><span class="symbol">,</span>
1782
+ <span class="normal"> block_get_property</span><span class="symbol">,</span>
1783
+ <span class="normal"> block_set_property</span><span class="symbol">,</span>
1784
+ <span class="cbracket">}</span><span class="symbol">;</span>
1785
+
1786
+ <span class="comment">/* ---------------------------------------------------------------------------------------------------- */</span>
1787
+
1788
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
1789
+ <span class="function">partition_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>
1790
+ <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>
1791
+ <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>
1792
+ <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>
1793
+ <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>
1794
+ <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>
1795
+ <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>
1796
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
1797
+ <span class="cbracket">{</span>
1798
+ <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">greeting</span><span class="symbol">;</span>
1799
+ <span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">response</span><span class="symbol">;</span>
1800
+
1801
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Testing.html#g-assert-cmpstr">g_assert_cmpstr</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">interface_name</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">==,</span><span class="normal"> </span><span class="string">"org.gtk.GDBus.Example.Partition"</span><span class="symbol">);</span>
1802
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Testing.html#g-assert-cmpstr">g_assert_cmpstr</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="symbol">==,</span><span class="normal"> </span><span class="string">"Hello"</span><span class="symbol">);</span>
1803
+
1804
+ <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">"(&amp;s)"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">greeting</span><span class="symbol">);</span>
1805
+
1806
+ <span class="normal"> response </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Method %s.%s with user_data `%s' on object path %s called with arg '%s'"</span><span class="symbol">,</span>
1807
+ <span class="normal"> interface_name</span><span class="symbol">,</span>
1808
+ <span class="normal"> method_name</span><span class="symbol">,</span>
1809
+ <span class="normal"> </span><span class="symbol">(</span><span class="keyword">const</span><span class="normal"> <a href="../glib/glib-Basic-Types.html#gchar">gchar</a> </span><span class="symbol">*)</span><span class="normal"> user_data</span><span class="symbol">,</span>
1810
+ <span class="normal"> object_path</span><span class="symbol">,</span>
1811
+ <span class="normal"> greeting</span><span class="symbol">);</span>
1812
+ <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>
1813
+ <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">"(s)"</span><span class="symbol">,</span><span class="normal"> response</span><span class="symbol">));</span>
1814
+ <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">response</span><span class="symbol">);</span>
1815
+ <span class="cbracket">}</span>
1816
+
1817
+ <span class="keyword">const</span><span class="normal"> </span><span class="usertype">GDBusInterfaceVTable</span><span class="normal"> partition_vtable </span><span class="symbol">=</span>
1818
+ <span class="cbracket">{</span>
1819
+ <span class="normal"> partition_method_call</span><span class="symbol">,</span>
1820
+ <span class="normal"> </span><span class="comment">//partition_get_property,</span>
1821
+ <span class="normal"> </span><span class="comment">//partition_set_property</span>
1822
+ <span class="cbracket">}</span><span class="symbol">;</span>
1823
+
1824
+ <span class="comment">/* ---------------------------------------------------------------------------------------------------- */</span>
1825
+
1826
+ <span class="keyword">static</span><span class="normal"> <a href="../glib/glib-Basic-Types.html#gchar">gchar</a> </span><span class="symbol">**</span>
1827
+ <span class="function">subtree_enumerate</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>
1828
+ <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>
1829
+ <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>
1830
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
1831
+ <span class="cbracket">{</span>
1832
+ <span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">**</span><span class="normal">nodes</span><span class="symbol">;</span>
1833
+ <span class="normal"> </span><span class="usertype">GPtrArray</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">p</span><span class="symbol">;</span>
1834
+
1835
+ <span class="normal"> p </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-new">g_ptr_array_new</a></span><span class="normal"> </span><span class="symbol">();</span>
1836
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">p</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"sda"</span><span class="symbol">));</span>
1837
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">p</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"sda1"</span><span class="symbol">));</span>
1838
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">p</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"sda2"</span><span class="symbol">));</span>
1839
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">p</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"sda3"</span><span class="symbol">));</span>
1840
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">p</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"sdb"</span><span class="symbol">));</span>
1841
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">p</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"sdb1"</span><span class="symbol">));</span>
1842
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">p</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"sdc"</span><span class="symbol">));</span>
1843
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">p</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"sdc1"</span><span class="symbol">));</span>
1844
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">p</span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
1845
+ <span class="normal"> nodes </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="../glib/glib-Basic-Types.html#gchar">gchar</a> </span><span class="symbol">**)</span><span class="normal"> </span><span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-free">g_ptr_array_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">p</span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">);</span>
1846
+
1847
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> nodes</span><span class="symbol">;</span>
1848
+ <span class="cbracket">}</span>
1849
+
1850
+ <span class="keyword">static</span><span class="normal"> <a href="gio-D-Bus-Introspection-Data.html#GDBusInterfaceInfo">GDBusInterfaceInfo</a> </span><span class="symbol">**</span>
1851
+ <span class="function">subtree_introspect</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>
1852
+ <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>
1853
+ <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>
1854
+ <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">node</span><span class="symbol">,</span>
1855
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
1856
+ <span class="cbracket">{</span>
1857
+ <span class="normal"> </span><span class="usertype">GPtrArray</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">p</span><span class="symbol">;</span>
1858
+
1859
+ <span class="normal"> p </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-new">g_ptr_array_new</a></span><span class="normal"> </span><span class="symbol">();</span>
1860
+ <span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">node </span><span class="symbol">==</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">)</span>
1861
+ <span class="normal"> </span><span class="cbracket">{</span>
1862
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">p</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="gio-D-Bus-Introspection-Data.html#g-dbus-interface-info-ref">g_dbus_interface_info_ref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">manager_interface_info</span><span class="symbol">));</span>
1863
+ <span class="normal"> </span><span class="cbracket">}</span>
1864
+ <span class="normal"> </span><span class="keyword">else</span>
1865
+ <span class="normal"> </span><span class="cbracket">{</span>
1866
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">p</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="gio-D-Bus-Introspection-Data.html#g-dbus-interface-info-ref">g_dbus_interface_info_ref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">block_interface_info</span><span class="symbol">));</span>
1867
+ <span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function">strlen</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">node</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">==</span><span class="normal"> </span><span class="number">4</span><span class="symbol">)</span>
1868
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">p</span><span class="symbol">,</span>
1869
+ <span class="normal"> </span><span class="function"><a href="gio-D-Bus-Introspection-Data.html#g-dbus-interface-info-ref">g_dbus_interface_info_ref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">partition_interface_info</span><span class="symbol">));</span>
1870
+ <span class="normal"> </span><span class="cbracket">}</span>
1871
+
1872
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-add">g_ptr_array_add</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">p</span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
1873
+
1874
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="gio-D-Bus-Introspection-Data.html#GDBusInterfaceInfo">GDBusInterfaceInfo</a> </span><span class="symbol">**)</span><span class="normal"> </span><span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-free">g_ptr_array_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">p</span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">);</span>
1875
+ <span class="cbracket">}</span>
1876
+
1877
+ <span class="keyword">static</span><span class="normal"> </span><span class="keyword">const</span><span class="normal"> <a href="GDBusConnection.html#GDBusInterfaceVTable">GDBusInterfaceVTable</a> </span><span class="symbol">*</span>
1878
+ <span class="function">subtree_dispatch</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>
1879
+ <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>
1880
+ <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>
1881
+ <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>
1882
+ <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">node</span><span class="symbol">,</span>
1883
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">out_user_data</span><span class="symbol">,</span>
1884
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
1885
+ <span class="cbracket">{</span>
1886
+ <span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">GDBusInterfaceVTable</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">vtable_to_return</span><span class="symbol">;</span>
1887
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data_to_return</span><span class="symbol">;</span>
1888
+
1889
+ <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">interface_name</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"org.gtk.GDBus.Example.Manager"</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>
1890
+ <span class="normal"> </span><span class="cbracket">{</span>
1891
+ <span class="normal"> user_data_to_return </span><span class="symbol">=</span><span class="normal"> </span><span class="string">"The Root"</span><span class="symbol">;</span>
1892
+ <span class="normal"> vtable_to_return </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">manager_vtable</span><span class="symbol">;</span>
1893
+ <span class="normal"> </span><span class="cbracket">}</span>
1894
+ <span class="normal"> </span><span class="keyword">else</span>
1895
+ <span class="normal"> </span><span class="cbracket">{</span>
1896
+ <span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function">strlen</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">node</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">==</span><span class="normal"> </span><span class="number">4</span><span class="symbol">)</span>
1897
+ <span class="normal"> user_data_to_return </span><span class="symbol">=</span><span class="normal"> </span><span class="string">"A partition"</span><span class="symbol">;</span>
1898
+ <span class="normal"> </span><span class="keyword">else</span>
1899
+ <span class="normal"> user_data_to_return </span><span class="symbol">=</span><span class="normal"> </span><span class="string">"A block device"</span><span class="symbol">;</span>
1900
+
1901
+ <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">interface_name</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"org.gtk.GDBus.Example.Block"</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>
1902
+ <span class="normal"> vtable_to_return </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">block_vtable</span><span class="symbol">;</span>
1903
+ <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">interface_name</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"org.gtk.GDBus.Example.Partition"</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>
1904
+ <span class="normal"> vtable_to_return </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">partition_vtable</span><span class="symbol">;</span>
1905
+ <span class="normal"> </span><span class="keyword">else</span>
1906
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Testing.html#g-assert-not-reached">g_assert_not_reached</a></span><span class="normal"> </span><span class="symbol">();</span>
1907
+ <span class="normal"> </span><span class="cbracket">}</span>
1908
+
1909
+ <span class="normal"> </span><span class="symbol">*</span><span class="normal">out_user_data </span><span class="symbol">=</span><span class="normal"> user_data_to_return</span><span class="symbol">;</span>
1910
+
1911
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> vtable_to_return</span><span class="symbol">;</span>
1912
+ <span class="cbracket">}</span>
1913
+
1914
+ <span class="keyword">const</span><span class="normal"> </span><span class="usertype">GDBusSubtreeVTable</span><span class="normal"> subtree_vtable </span><span class="symbol">=</span>
1915
+ <span class="cbracket">{</span>
1916
+ <span class="normal"> subtree_enumerate</span><span class="symbol">,</span>
1917
+ <span class="normal"> subtree_introspect</span><span class="symbol">,</span>
1918
+ <span class="normal"> subtree_dispatch</span>
1919
+ <span class="cbracket">}</span><span class="symbol">;</span>
1920
+
1921
+ <span class="comment">/* ---------------------------------------------------------------------------------------------------- */</span>
1922
+
1923
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
1924
+ <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>
1925
+ <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>
1926
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
1927
+ <span class="cbracket">{</span>
1928
+ <span class="normal"> </span><span class="usertype">guint</span><span class="normal"> registration_id</span><span class="symbol">;</span>
1929
+
1930
+ <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-subtree">g_dbus_connection_register_subtree</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">connection</span><span class="symbol">,</span>
1931
+ <span class="normal"> </span><span class="string">"/org/gtk/GDBus/TestSubtree/Devices"</span><span class="symbol">,</span>
1932
+ <span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">subtree_vtable</span><span class="symbol">,</span>
1933
+ <span class="normal"> <a href="GDBusConnection.html#G-DBUS-SUBTREE-FLAGS-NONE:CAPS">G_DBUS_SUBTREE_FLAGS_NONE</a></span><span class="symbol">,</span>
1934
+ <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>
1935
+ <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>
1936
+ <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>
1937
+ <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">&gt;</span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span>
1938
+ <span class="cbracket">}</span>
1939
+
1940
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
1941
+ <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>
1942
+ <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>
1943
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
1944
+ <span class="cbracket">{</span>
1945
+ <span class="cbracket">}</span>
1946
+
1947
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
1948
+ <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>
1949
+ <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>
1950
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
1951
+ <span class="cbracket">{</span>
1952
+ <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>
1953
+ <span class="cbracket">}</span>
1954
1954
 
1955
1955
  <span class="type">int</span>
1956
- main (<span class="type">int</span> argc, <span class="type">char</span> *argv[])
1957
- {
1958
- <span class="type">guint</span> owner_id;
1959
- <span class="type">GMainLoop</span> *loop;
1956
+ <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>
1957
+ <span class="cbracket">{</span>
1958
+ <span class="normal"> </span><span class="usertype">guint</span><span class="normal"> owner_id</span><span class="symbol">;</span>
1959
+ <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>
1960
1960
 
1961
- <span class="comment">/*</span><span class="comment"> We are lazy here - we don't want to manually provide</span>
1961
+ <span class="normal"> </span><span class="comment">/* We are lazy here - we don't want to manually provide</span>
1962
1962
  <span class="comment"> * the introspection data structures - so we just build</span>
1963
1963
  <span class="comment"> * them from XML.</span>
1964
- <span class="comment"> </span><span class="comment">*/</span>
1965
- introspection_data = <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> (introspection_xml, <span class="number">NULL</span>);
1966
- <span class="preproc">g_assert</span> (introspection_data != <span class="number">NULL</span>);
1967
-
1968
- manager_interface_info = <span class="function"><a href="gio-D-Bus-Introspection-Data.html#g-dbus-node-info-lookup-interface">g_dbus_node_info_lookup_interface</a></span> (introspection_data, <span class="number">&quot;org.gtk.GDBus.Example.Manager&quot;</span>);
1969
- block_interface_info = <span class="function"><a href="gio-D-Bus-Introspection-Data.html#g-dbus-node-info-lookup-interface">g_dbus_node_info_lookup_interface</a></span> (introspection_data, <span class="number">&quot;org.gtk.GDBus.Example.Block&quot;</span>);
1970
- partition_interface_info = <span class="function"><a href="gio-D-Bus-Introspection-Data.html#g-dbus-node-info-lookup-interface">g_dbus_node_info_lookup_interface</a></span> (introspection_data, <span class="number">&quot;org.gtk.GDBus.Example.Partition&quot;</span>);
1971
- <span class="preproc">g_assert</span> (manager_interface_info != <span class="number">NULL</span>);
1972
- <span class="preproc">g_assert</span> (block_interface_info != <span class="number">NULL</span>);
1973
- <span class="preproc">g_assert</span> (partition_interface_info != <span class="number">NULL</span>);
1974
-
1975
- owner_id = <span class="function"><a href="gio-Owning-Bus-Names.html#g-bus-own-name">g_bus_own_name</a></span> (<span class="number">G_BUS_TYPE_SESSION</span>,
1976
- <span class="number">&quot;org.gtk.GDBus.TestSubtree&quot;</span>,
1977
- <span class="number">G_BUS_NAME_OWNER_FLAGS_NONE</span>,
1978
- on_bus_acquired,
1979
- on_name_acquired,
1980
- on_name_lost,
1981
- <span class="number">NULL</span>,
1982
- <span class="number">NULL</span>);
1983
-
1984
- loop = <span class="function"><a href="../glib/glib-The-Main-Event-Loop.html#g-main-loop-new">g_main_loop_new</a></span> (<span class="number">NULL</span>, <span class="number">FALSE</span>);
1985
- <span class="function"><a href="../glib/glib-The-Main-Event-Loop.html#g-main-loop-run">g_main_loop_run</a></span> (loop);
1986
-
1987
- <span class="function"><a href="gio-Owning-Bus-Names.html#g-bus-unown-name">g_bus_unown_name</a></span> (owner_id);
1988
-
1989
- <span class="function"><a href="gio-D-Bus-Introspection-Data.html#g-dbus-node-info-unref">g_dbus_node_info_unref</a></span> (introspection_data);
1990
-
1991
- <span class="keyword">return</span> <span class="number">0</span>;
1992
- }</pre></td>
1964
+ <span class="comment"> */</span>
1965
+ <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>
1966
+ <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>
1967
+
1968
+ <span class="normal"> manager_interface_info </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gio-D-Bus-Introspection-Data.html#g-dbus-node-info-lookup-interface">g_dbus_node_info_lookup_interface</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">introspection_data</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"org.gtk.GDBus.Example.Manager"</span><span class="symbol">);</span>
1969
+ <span class="normal"> block_interface_info </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gio-D-Bus-Introspection-Data.html#g-dbus-node-info-lookup-interface">g_dbus_node_info_lookup_interface</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">introspection_data</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"org.gtk.GDBus.Example.Block"</span><span class="symbol">);</span>
1970
+ <span class="normal"> partition_interface_info </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gio-D-Bus-Introspection-Data.html#g-dbus-node-info-lookup-interface">g_dbus_node_info_lookup_interface</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">introspection_data</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"org.gtk.GDBus.Example.Partition"</span><span class="symbol">);</span>
1971
+ <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">manager_interface_info </span><span class="symbol">!=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
1972
+ <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">block_interface_info </span><span class="symbol">!=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
1973
+ <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">partition_interface_info </span><span class="symbol">!=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
1974
+
1975
+ <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>
1976
+ <span class="normal"> </span><span class="string">"org.gtk.GDBus.TestSubtree"</span><span class="symbol">,</span>
1977
+ <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>
1978
+ <span class="normal"> on_bus_acquired</span><span class="symbol">,</span>
1979
+ <span class="normal"> on_name_acquired</span><span class="symbol">,</span>
1980
+ <span class="normal"> on_name_lost</span><span class="symbol">,</span>
1981
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
1982
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
1983
+
1984
+ <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>
1985
+ <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>
1986
+
1987
+ <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>
1988
+
1989
+ <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>
1990
+
1991
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span>
1992
+ <span class="cbracket">}</span></pre></td>
1993
1993
  </tr>
1994
1994
  </tbody>
1995
1995
  </table>
@@ -2138,138 +2138,138 @@ main (<span class="type">int</span> argc, <span class="type">char</span> *argv[]
2138
2138
  130
2139
2139
  131
2140
2140
  132</pre></td>
2141
- <td class="listing_code"><pre class="programlisting"><span class="preproc">#include </span><span class="number">&lt;string.h&gt;</span>
2142
- <span class="preproc">#include </span><span class="number">&lt;stdlib.h&gt;</span>
2143
-
2144
- <span class="preproc">#include </span><span class="number">&lt;sys/types.h&gt;</span>
2145
- <span class="preproc">#include </span><span class="number">&lt;unistd.h&gt;</span>
2146
-
2147
- <span class="preproc">#include </span><span class="number">&lt;time.h&gt;</span>
2148
-
2149
- <span class="preproc">#include </span><span class="number">&lt;gio/gio.h&gt;</span>
2150
- <span class="preproc">#include </span><span class="number">&lt;gio/gunixfdlist.h&gt;</span>
2151
-
2152
- <span class="comment">/*</span><span class="comment"> see gdbus-example-server.c for the server implementation </span><span class="comment">*/</span>
2153
- <span class="type">static</span> <span class="type">gint</span>
2154
- get_server_stdout (<span class="type">GDBusConnection</span> *connection,
2155
- <span class="type">const</span> <span class="type">gchar</span> *name_owner,
2156
- <span class="type">GError</span> **error)
2157
- {
2158
- <span class="type">GDBusMessage</span> *method_call_message;
2159
- <span class="type">GDBusMessage</span> *method_reply_message;
2160
- <span class="type">GUnixFDList</span> *fd_list;
2161
- <span class="type">gint</span> fd;
2162
-
2163
- fd = -<span class="number">1</span>;
2164
- method_call_message = <span class="number">NULL</span>;
2165
- method_reply_message = <span class="number">NULL</span>;
2166
-
2167
- method_call_message = <span class="function"><a href="GDBusMessage.html#g-dbus-message-new-method-call">g_dbus_message_new_method_call</a></span> (name_owner,
2168
- <span class="number">&quot;/org/gtk/GDBus/TestObject&quot;</span>,
2169
- <span class="number">&quot;org.gtk.GDBus.TestInterface&quot;</span>,
2170
- <span class="number">&quot;GimmeStdout&quot;</span>);
2171
- method_reply_message = <span class="function"><a href="GDBusConnection.html#g-dbus-connection-send-message-with-reply-sync">g_dbus_connection_send_message_with_reply_sync</a></span> (connection,
2172
- method_call_message,
2173
- <span class="number">G_DBUS_SEND_MESSAGE_FLAGS_NONE</span>,
2174
- -<span class="number">1</span>,
2175
- <span class="number">NULL</span>, <span class="comment">/*</span><span class="comment"> out_serial </span><span class="comment">*/</span>
2176
- <span class="number">NULL</span>, <span class="comment">/*</span><span class="comment"> cancellable </span><span class="comment">*/</span>
2177
- error);
2178
- <span class="keyword">if</span> (method_reply_message == <span class="number">NULL</span>)
2179
- <span class="keyword">goto</span> out;
2180
-
2181
- <span class="keyword">if</span> (<span class="function"><a href="GDBusMessage.html#g-dbus-message-get-message-type">g_dbus_message_get_message_type</a></span> (method_reply_message) == <span class="number">G_DBUS_MESSAGE_TYPE_ERROR</span>)
2182
- {
2183
- <span class="function"><a href="GDBusMessage.html#g-dbus-message-to-gerror">g_dbus_message_to_gerror</a></span> (method_reply_message, error);
2184
- <span class="keyword">goto</span> out;
2185
- }
2186
-
2187
- fd_list = <span class="function"><a href="GDBusMessage.html#g-dbus-message-get-unix-fd-list">g_dbus_message_get_unix_fd_list</a></span> (method_reply_message);
2188
- fd = <span class="function"><a href="GUnixFDList.html#g-unix-fd-list-get">g_unix_fd_list_get</a></span> (fd_list, <span class="number">0</span>, error);
2189
-
2190
- <span class="keyword">out</span>:
2191
- <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> (method_call_message);
2192
- <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> (method_reply_message);
2193
-
2194
- <span class="keyword">return</span> fd;
2195
- }
2196
-
2197
- <span class="type">static</span> <span class="type">void</span>
2198
- on_name_appeared (<span class="type">GDBusConnection</span> *connection,
2199
- <span class="type">const</span> <span class="type">gchar</span> *name,
2200
- <span class="type">const</span> <span class="type">gchar</span> *name_owner,
2201
- <span class="type">gpointer</span> user_data)
2202
- {
2203
- <span class="type">gint</span> fd;
2204
- <span class="type">GError</span> *error;
2205
-
2206
- error = <span class="number">NULL</span>;
2207
- fd = get_server_stdout (connection, name_owner, &amp;error);
2208
- <span class="keyword">if</span> (fd == -<span class="number">1</span>)
2209
- {
2210
- <span class="function"><a href="../glib/glib-Warnings-and-Assertions.html#g-printerr">g_printerr</a></span> (<span class="number">&quot;Error invoking GimmeStdout(): </span><span class="symbol">%s</span><span class="symbol">\n</span><span class="number">&quot;</span>,
2211
- error-&gt;message);
2212
- <span class="function"><a href="../glib/glib-Error-Reporting.html#g-error-free">g_error_free</a></span> (error);
2213
- exit (<span class="number">1</span>);
2214
- }
2215
- <span class="keyword">else</span>
2216
- {
2217
- <span class="type">gchar</span> now_buf[<span class="number">256</span>];
2218
- <span class="type">time_t</span> now;
2219
- <span class="type">gssize</span> len;
2220
- <span class="type">gchar</span> *str;
2221
-
2222
- now = time (<span class="number">NULL</span>);
2223
- strftime (now_buf,
2224
- <span class="keyword">sizeof</span> now_buf,
2225
- <span class="number">&quot;</span><span class="symbol">%c</span><span class="number">&quot;</span>,
2226
- localtime (&amp;now));
2227
-
2228
- str = <span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a></span> (<span class="number">&quot;On </span><span class="symbol">%s</span><span class="number">, gdbus-example-unix-fd-client with pid </span><span class="symbol">%d</span><span class="number"> was here!</span><span class="symbol">\n</span><span class="number">&quot;</span>,
2229
- now_buf,
2230
- (<span class="type">gint</span>) getpid ());
2231
- len = strlen (str);
2232
- <span class="preproc">g_warn_if_fail</span> (write (fd, str, len) == len);
2233
- close (fd);
2234
-
2235
- <span class="function"><a href="../glib/glib-Warnings-and-Assertions.html#g-print">g_print</a></span> (<span class="number">&quot;Wrote the following on server's stdout:</span><span class="symbol">\n</span><span class="symbol">%s</span><span class="number">&quot;</span>, str);
2236
-
2237
- <span class="function"><a href="../glib/glib-Memory-Allocation.html#g-free">g_free</a></span> (str);
2238
- exit (<span class="number">0</span>);
2239
- }
2240
- }
2241
-
2242
- <span class="type">static</span> <span class="type">void</span>
2243
- on_name_vanished (<span class="type">GDBusConnection</span> *connection,
2244
- <span class="type">const</span> <span class="type">gchar</span> *name,
2245
- <span class="type">gpointer</span> user_data)
2246
- {
2247
- <span class="function"><a href="../glib/glib-Warnings-and-Assertions.html#g-printerr">g_printerr</a></span> (<span class="number">&quot;Failed to get name owner for </span><span class="symbol">%s</span><span class="symbol">\n</span><span class="number">&quot;</span>
2248
- <span class="number">&quot;Is ./gdbus-example-server running?</span><span class="symbol">\n</span><span class="number">&quot;</span>,
2249
- name);
2250
- exit (<span class="number">1</span>);
2251
- }
2141
+ <td class="listing_code"><pre class="programlisting"><span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;string.h&gt;</span>
2142
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;stdlib.h&gt;</span>
2143
+
2144
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;sys/types.h&gt;</span>
2145
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;unistd.h&gt;</span>
2146
+
2147
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;time.h&gt;</span>
2148
+
2149
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;gio/gio.h&gt;</span>
2150
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;gio/gunixfdlist.h&gt;</span>
2151
+
2152
+ <span class="comment">/* see gdbus-example-server.c for the server implementation */</span>
2153
+ <span class="keyword">static</span><span class="normal"> <a href="../glib/glib-Basic-Types.html#gint">gint</a></span>
2154
+ <span class="function">get_server_stdout</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>
2155
+ <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_owner</span><span class="symbol">,</span>
2156
+ <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>
2157
+ <span class="cbracket">{</span>
2158
+ <span class="normal"> </span><span class="usertype">GDBusMessage</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">method_call_message</span><span class="symbol">;</span>
2159
+ <span class="normal"> </span><span class="usertype">GDBusMessage</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">method_reply_message</span><span class="symbol">;</span>
2160
+ <span class="normal"> </span><span class="usertype">GUnixFDList</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">fd_list</span><span class="symbol">;</span>
2161
+ <span class="normal"> </span><span class="usertype">gint</span><span class="normal"> fd</span><span class="symbol">;</span>
2162
+
2163
+ <span class="normal"> fd </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">-</span><span class="number">1</span><span class="symbol">;</span>
2164
+ <span class="normal"> method_call_message </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
2165
+ <span class="normal"> method_reply_message </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
2166
+
2167
+ <span class="normal"> method_call_message </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GDBusMessage.html#g-dbus-message-new-method-call">g_dbus_message_new_method_call</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">name_owner</span><span class="symbol">,</span>
2168
+ <span class="normal"> </span><span class="string">"/org/gtk/GDBus/TestObject"</span><span class="symbol">,</span>
2169
+ <span class="normal"> </span><span class="string">"org.gtk.GDBus.TestInterface"</span><span class="symbol">,</span>
2170
+ <span class="normal"> </span><span class="string">"GimmeStdout"</span><span class="symbol">);</span>
2171
+ <span class="normal"> method_reply_message </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GDBusConnection.html#g-dbus-connection-send-message-with-reply-sync">g_dbus_connection_send_message_with_reply_sync</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">connection</span><span class="symbol">,</span>
2172
+ <span class="normal"> method_call_message</span><span class="symbol">,</span>
2173
+ <span class="normal"> <a href="GDBusConnection.html#G-DBUS-SEND-MESSAGE-FLAGS-NONE:CAPS">G_DBUS_SEND_MESSAGE_FLAGS_NONE</a></span><span class="symbol">,</span>
2174
+ <span class="normal"> </span><span class="symbol">-</span><span class="number">1</span><span class="symbol">,</span>
2175
+ <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">/* out_serial */</span>
2176
+ <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">/* cancellable */</span>
2177
+ <span class="normal"> error</span><span class="symbol">);</span>
2178
+ <span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">method_reply_message </span><span class="symbol">==</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">)</span>
2179
+ <span class="normal"> </span><span class="keyword">goto</span><span class="normal"> out</span><span class="symbol">;</span>
2180
+
2181
+ <span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="GDBusMessage.html#g-dbus-message-get-message-type">g_dbus_message_get_message_type</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">method_reply_message</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">==</span><span class="normal"> <a href="GDBusMessage.html#G-DBUS-MESSAGE-TYPE-ERROR:CAPS">G_DBUS_MESSAGE_TYPE_ERROR</a></span><span class="symbol">)</span>
2182
+ <span class="normal"> </span><span class="cbracket">{</span>
2183
+ <span class="normal"> </span><span class="function"><a href="GDBusMessage.html#g-dbus-message-to-gerror">g_dbus_message_to_gerror</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">method_reply_message</span><span class="symbol">,</span><span class="normal"> error</span><span class="symbol">);</span>
2184
+ <span class="normal"> </span><span class="keyword">goto</span><span class="normal"> out</span><span class="symbol">;</span>
2185
+ <span class="normal"> </span><span class="cbracket">}</span>
2186
+
2187
+ <span class="normal"> fd_list </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GDBusMessage.html#g-dbus-message-get-unix-fd-list">g_dbus_message_get_unix_fd_list</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">method_reply_message</span><span class="symbol">);</span>
2188
+ <span class="normal"> fd </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GUnixFDList.html#g-unix-fd-list-get">g_unix_fd_list_get</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">fd_list</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> error</span><span class="symbol">);</span>
2189
+
2190
+ <span class="label"> out:</span>
2191
+ <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">method_call_message</span><span class="symbol">);</span>
2192
+ <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">method_reply_message</span><span class="symbol">);</span>
2193
+
2194
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> fd</span><span class="symbol">;</span>
2195
+ <span class="cbracket">}</span>
2196
+
2197
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2198
+ <span class="function">on_name_appeared</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>
2199
+ <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>
2200
+ <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_owner</span><span class="symbol">,</span>
2201
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
2202
+ <span class="cbracket">{</span>
2203
+ <span class="normal"> </span><span class="usertype">gint</span><span class="normal"> fd</span><span class="symbol">;</span>
2204
+ <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>
2205
+
2206
+ <span class="normal"> error </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
2207
+ <span class="normal"> fd </span><span class="symbol">=</span><span class="normal"> </span><span class="function">get_server_stdout</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">connection</span><span class="symbol">,</span><span class="normal"> name_owner</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">error</span><span class="symbol">);</span>
2208
+ <span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">fd </span><span class="symbol">==</span><span class="normal"> </span><span class="symbol">-</span><span class="number">1</span><span class="symbol">)</span>
2209
+ <span class="normal"> </span><span class="cbracket">{</span>
2210
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Warnings-and-Assertions.html#g-printerr">g_printerr</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Error invoking GimmeStdout(): %s</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">,</span>
2211
+ <span class="normal"> error</span><span class="symbol">-&gt;</span><span class="normal">message</span><span class="symbol">);</span>
2212
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Error-Reporting.html#g-error-free">g_error_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error</span><span class="symbol">);</span>
2213
+ <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>
2214
+ <span class="normal"> </span><span class="cbracket">}</span>
2215
+ <span class="normal"> </span><span class="keyword">else</span>
2216
+ <span class="normal"> </span><span class="cbracket">{</span>
2217
+ <span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> now_buf</span><span class="symbol">[</span><span class="number">256</span><span class="symbol">];</span>
2218
+ <span class="normal"> </span><span class="usertype">time_t</span><span class="normal"> now</span><span class="symbol">;</span>
2219
+ <span class="normal"> </span><span class="usertype">gssize</span><span class="normal"> len</span><span class="symbol">;</span>
2220
+ <span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">str</span><span class="symbol">;</span>
2221
+
2222
+ <span class="normal"> now </span><span class="symbol">=</span><span class="normal"> </span><span class="function">time</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>
2223
+ <span class="normal"> </span><span class="function">strftime</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">now_buf</span><span class="symbol">,</span>
2224
+ <span class="normal"> </span><span class="keyword">sizeof</span><span class="normal"> now_buf</span><span class="symbol">,</span>
2225
+ <span class="normal"> </span><span class="string">"%c"</span><span class="symbol">,</span>
2226
+ <span class="normal"> </span><span class="function">localtime</span><span class="normal"> </span><span class="symbol">(&amp;</span><span class="normal">now</span><span class="symbol">));</span>
2227
+
2228
+ <span class="normal"> str </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"On %s, gdbus-example-unix-fd-client with pid %d was here!</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">,</span>
2229
+ <span class="normal"> now_buf</span><span class="symbol">,</span>
2230
+ <span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="../glib/glib-Basic-Types.html#gint">gint</a></span><span class="symbol">)</span><span class="normal"> </span><span class="function">getpid</span><span class="normal"> </span><span class="symbol">());</span>
2231
+ <span class="normal"> len </span><span class="symbol">=</span><span class="normal"> </span><span class="function">strlen</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">str</span><span class="symbol">);</span>
2232
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Warnings-and-Assertions.html#g-warn-if-fail">g_warn_if_fail</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">write</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">fd</span><span class="symbol">,</span><span class="normal"> str</span><span class="symbol">,</span><span class="normal"> len</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">==</span><span class="normal"> len</span><span class="symbol">);</span>
2233
+ <span class="normal"> </span><span class="function">close</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">fd</span><span class="symbol">);</span>
2234
+
2235
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Warnings-and-Assertions.html#g-print">g_print</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Wrote the following on server's stdout:</span><span class="specialchar">\n</span><span class="string">%s"</span><span class="symbol">,</span><span class="normal"> str</span><span class="symbol">);</span>
2236
+
2237
+ <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">str</span><span class="symbol">);</span>
2238
+ <span class="normal"> </span><span class="function">exit</span><span class="normal"> </span><span class="symbol">(</span><span class="number">0</span><span class="symbol">);</span>
2239
+ <span class="normal"> </span><span class="cbracket">}</span>
2240
+ <span class="cbracket">}</span>
2241
+
2242
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2243
+ <span class="function">on_name_vanished</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>
2244
+ <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>
2245
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
2246
+ <span class="cbracket">{</span>
2247
+ <span class="normal"> </span><span class="function"><a href="../glib/glib-Warnings-and-Assertions.html#g-printerr">g_printerr</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Failed to get name owner for %s</span><span class="specialchar">\n</span><span class="string">"</span>
2248
+ <span class="normal"> </span><span class="string">"Is ./gdbus-example-server running?</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">,</span>
2249
+ <span class="normal"> name</span><span class="symbol">);</span>
2250
+ <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>
2251
+ <span class="cbracket">}</span>
2252
2252
 
2253
2253
  <span class="type">int</span>
2254
- main (<span class="type">int</span> argc, <span class="type">char</span> *argv[])
2255
- {
2256
- <span class="type">guint</span> watcher_id;
2257
- <span class="type">GMainLoop</span> *loop;
2258
-
2259
- watcher_id = <span class="function"><a href="gio-Watching-Bus-Names.html#g-bus-watch-name">g_bus_watch_name</a></span> (<span class="number">G_BUS_TYPE_SESSION</span>,
2260
- <span class="number">&quot;org.gtk.GDBus.TestServer&quot;</span>,
2261
- <span class="number">G_BUS_NAME_WATCHER_FLAGS_NONE</span>,
2262
- on_name_appeared,
2263
- on_name_vanished,
2264
- <span class="number">NULL</span>,
2265
- <span class="number">NULL</span>);
2266
-
2267
- loop = <span class="function"><a href="../glib/glib-The-Main-Event-Loop.html#g-main-loop-new">g_main_loop_new</a></span> (<span class="number">NULL</span>, <span class="number">FALSE</span>);
2268
- <span class="function"><a href="../glib/glib-The-Main-Event-Loop.html#g-main-loop-run">g_main_loop_run</a></span> (loop);
2269
-
2270
- <span class="function"><a href="gio-Watching-Bus-Names.html#g-bus-unwatch-name">g_bus_unwatch_name</a></span> (watcher_id);
2271
- <span class="keyword">return</span> <span class="number">0</span>;
2272
- }</pre></td>
2254
+ <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>
2255
+ <span class="cbracket">{</span>
2256
+ <span class="normal"> </span><span class="usertype">guint</span><span class="normal"> watcher_id</span><span class="symbol">;</span>
2257
+ <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>
2258
+
2259
+ <span class="normal"> watcher_id </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gio-Watching-Bus-Names.html#g-bus-watch-name">g_bus_watch_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>
2260
+ <span class="normal"> </span><span class="string">"org.gtk.GDBus.TestServer"</span><span class="symbol">,</span>
2261
+ <span class="normal"> <a href="gio-Watching-Bus-Names.html#G-BUS-NAME-WATCHER-FLAGS-NONE:CAPS">G_BUS_NAME_WATCHER_FLAGS_NONE</a></span><span class="symbol">,</span>
2262
+ <span class="normal"> on_name_appeared</span><span class="symbol">,</span>
2263
+ <span class="normal"> on_name_vanished</span><span class="symbol">,</span>
2264
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
2265
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
2266
+
2267
+ <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>
2268
+ <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>
2269
+
2270
+ <span class="normal"> </span><span class="function"><a href="gio-Watching-Bus-Names.html#g-bus-unwatch-name">g_bus_unwatch_name</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">watcher_id</span><span class="symbol">);</span>
2271
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span>
2272
+ <span class="cbracket">}</span></pre></td>
2273
2273
  </tr>
2274
2274
  </tbody>
2275
2275
  </table>
@@ -2620,340 +2620,340 @@ main (<span class="type">int</span> argc, <span class="type">char</span> *argv[]
2620
2620
  332
2621
2621
  333
2622
2622
  334</pre></td>
2623
- <td class="listing_code"><pre class="programlisting"><span class="preproc">#include </span><span class="number">&lt;gio/gio.h&gt;</span>
2624
- <span class="preproc">#include </span><span class="number">&lt;stdlib.h&gt;</span>
2625
-
2626
- <span class="comment">/*</span><span class="comment"> ---------------------------------------------------------------------------------------------------- </span><span class="comment">*/</span>
2627
-
2628
- <span class="comment">/*</span><span class="comment"> The object we want to export </span><span class="comment">*/</span>
2629
- <span class="type">typedef</span> <span class="type">struct</span> _MyObjectClass MyObjectClass;
2630
- <span class="type">typedef</span> <span class="type">struct</span> _MyObject MyObject;
2631
-
2632
- <span class="type">struct</span> _MyObjectClass
2633
- {
2634
- <span class="type">GObjectClass</span> parent_class;
2635
- };
2636
-
2637
- <span class="type">struct</span> _MyObject
2638
- {
2639
- <span class="type">GObject</span> parent_instance;
2640
-
2641
- <span class="type">gint</span> count;
2642
- <span class="type">gchar</span> *name;
2643
- };
2644
-
2645
- <span class="type">enum</span>
2646
- {
2647
- PROP_0,
2648
- PROP_COUNT,
2649
- PROP_NAME
2650
- };
2651
-
2652
- <span class="type">static</span> <span class="type">GType</span> my_object_get_type (<span class="type">void</span>);
2653
- <span class="preproc">G_DEFINE_TYPE</span> (MyObject, my_object, <span class="number">G_TYPE_OBJECT</span>);
2654
-
2655
- <span class="type">static</span> <span class="type">void</span>
2656
- my_object_finalize (<span class="type">GObject</span> *object)
2657
- {
2658
- MyObject *myobj = (MyObject*)object;
2659
-
2660
- <span class="function"><a href="../glib/glib-Memory-Allocation.html#g-free">g_free</a></span> (myobj-&gt;name);
2661
-
2662
- <span class="preproc">G_OBJECT_CLASS</span> (my_object_parent_class)-&gt;finalize (object);
2663
- }
2664
-
2665
- <span class="type">static</span> <span class="type">void</span>
2666
- my_object_init (MyObject *object)
2667
- {
2668
- object-&gt;count = <span class="number">0</span>;
2669
- object-&gt;name = <span class="number">NULL</span>;
2670
- }
2671
-
2672
- <span class="type">static</span> <span class="type">void</span>
2673
- my_object_get_property (<span class="type">GObject</span> *object,
2674
- <span class="type">guint</span> prop_id,
2675
- <span class="type">GValue</span> *value,
2676
- <span class="type">GParamSpec</span> *pspec)
2677
- {
2678
- MyObject *myobj = (MyObject*)object;
2679
-
2680
- <span class="keyword">switch</span> (prop_id)
2681
- {
2682
- <span class="keyword">case</span> PROP_COUNT:
2683
- <span class="function"><a href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#g-value-set-int">g_value_set_int</a></span> (value, myobj-&gt;count);
2684
- <span class="keyword">break</span>;
2685
-
2686
- <span class="keyword">case</span> PROP_NAME:
2687
- <span class="function"><a href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#g-value-set-string">g_value_set_string</a></span> (value, myobj-&gt;name);
2688
- <span class="keyword">break</span>;
2689
-
2690
- <span class="keyword">default</span>:
2691
- <span class="preproc">G_OBJECT_WARN_INVALID_PROPERTY_ID</span> (object, prop_id, pspec);
2692
- }
2693
- }
2694
-
2695
- <span class="type">static</span> <span class="type">void</span>
2696
- my_object_set_property (<span class="type">GObject</span> *object,
2697
- <span class="type">guint</span> prop_id,
2698
- <span class="type">const</span> <span class="type">GValue</span> *value,
2699
- <span class="type">GParamSpec</span> *pspec)
2700
- {
2701
- MyObject *myobj = (MyObject*)object;
2702
-
2703
- <span class="keyword">switch</span> (prop_id)
2704
- {
2705
- <span class="keyword">case</span> PROP_COUNT:
2706
- myobj-&gt;count = <span class="function"><a href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#g-value-get-int">g_value_get_int</a></span> (value);
2707
- <span class="keyword">break</span>;
2708
-
2709
- <span class="keyword">case</span> PROP_NAME:
2710
- <span class="function"><a href="../glib/glib-Memory-Allocation.html#g-free">g_free</a></span> (myobj-&gt;name);
2711
- myobj-&gt;name = <span class="function"><a href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#g-value-dup-string">g_value_dup_string</a></span> (value);
2712
- <span class="keyword">break</span>;
2713
-
2714
- <span class="keyword">default</span>:
2715
- <span class="preproc">G_OBJECT_WARN_INVALID_PROPERTY_ID</span> (object, prop_id, pspec);
2716
- }
2717
- }
2718
-
2719
- <span class="type">static</span> <span class="type">void</span>
2720
- my_object_class_init (MyObjectClass *<span class="type">class</span>)
2721
- {
2722
- <span class="type">GObjectClass</span> *gobject_class = <span class="preproc">G_OBJECT_CLASS</span> (<span class="type">class</span>);
2723
-
2724
- gobject_class-&gt;finalize = my_object_finalize;
2725
- gobject_class-&gt;set_property = my_object_set_property;
2726
- gobject_class-&gt;get_property = my_object_get_property;
2727
-
2728
- <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-class-install-property">g_object_class_install_property</a></span> (gobject_class,
2729
- PROP_COUNT,
2730
- <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="number">&quot;count&quot;</span>,
2731
- <span class="number">&quot;Count&quot;</span>,
2732
- <span class="number">&quot;Count&quot;</span>,
2733
- <span class="number">0</span>, <span class="number">99999</span>, <span class="number">0</span>,
2734
- <span class="number">G_PARAM_READWRITE</span>));
2735
-
2736
- <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-class-install-property">g_object_class_install_property</a></span> (gobject_class,
2737
- PROP_NAME,
2738
- <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="number">&quot;name&quot;</span>,
2739
- <span class="number">&quot;Name&quot;</span>,
2740
- <span class="number">&quot;Name&quot;</span>,
2741
- <span class="number">NULL</span>,
2742
- <span class="number">G_PARAM_READWRITE</span>));
2743
- }
2744
-
2745
- <span class="comment">/*</span><span class="comment"> A method that we want to export </span><span class="comment">*/</span>
2746
- <span class="type">static</span> <span class="type">void</span>
2747
- my_object_change_count (MyObject *myobj,
2748
- <span class="type">gint</span> change)
2749
- {
2750
- myobj-&gt;count = <span class="number">2</span> * myobj-&gt;count + change;
2751
-
2752
- <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-notify">g_object_notify</a></span> (<span class="preproc">G_OBJECT</span> (myobj), <span class="number">&quot;count&quot;</span>);
2753
- }
2754
-
2755
- <span class="comment">/*</span><span class="comment"> ---------------------------------------------------------------------------------------------------- </span><span class="comment">*/</span>
2756
-
2757
- <span class="type">static</span> <span class="type">GDBusNodeInfo</span> *introspection_data = <span class="number">NULL</span>;
2758
-
2759
- <span class="comment">/*</span><span class="comment"> Introspection data for the service we are exporting </span><span class="comment">*/</span>
2760
- <span class="type">static</span> <span class="type">const</span> <span class="type">gchar</span> introspection_xml[] =
2761
- <span class="number">&quot;&lt;node&gt;&quot;</span>
2762
- <span class="number">&quot; &lt;interface name='org.myorg.MyObject'&gt;&quot;</span>
2763
- <span class="number">&quot; &lt;method name='ChangeCount'&gt;&quot;</span>
2764
- <span class="number">&quot; &lt;arg type='i' name='change' direction='in'/&gt;&quot;</span>
2765
- <span class="number">&quot; &lt;/method&gt;&quot;</span>
2766
- <span class="number">&quot; &lt;property type='i' name='Count' access='read'/&gt;&quot;</span>
2767
- <span class="number">&quot; &lt;property type='s' name='Name' access='readwrite'/&gt;&quot;</span>
2768
- <span class="number">&quot; &lt;/interface&gt;&quot;</span>
2769
- <span class="number">&quot;&lt;/node&gt;&quot;</span>;
2770
-
2771
-
2772
- <span class="type">static</span> <span class="type">void</span>
2773
- handle_method_call (<span class="type">GDBusConnection</span> *connection,
2774
- <span class="type">const</span> <span class="type">gchar</span> *sender,
2775
- <span class="type">const</span> <span class="type">gchar</span> *object_path,
2776
- <span class="type">const</span> <span class="type">gchar</span> *interface_name,
2777
- <span class="type">const</span> <span class="type">gchar</span> *method_name,
2778
- <span class="type">GVariant</span> *parameters,
2779
- <span class="type">GDBusMethodInvocation</span> *invocation,
2780
- <span class="type">gpointer</span> user_data)
2781
- {
2782
- MyObject *myobj = user_data;
2783
-
2784
- <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (method_name, <span class="number">&quot;ChangeCount&quot;</span>) == <span class="number">0</span>)
2785
- {
2786
- <span class="type">gint</span> change;
2787
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-get">g_variant_get</a></span> (parameters, <span class="number">&quot;(i)&quot;</span>, &amp;change);
2788
-
2789
- my_object_change_count (myobj, change);
2790
-
2791
- <span class="function"><a href="GDBusMethodInvocation.html#g-dbus-method-invocation-return-value">g_dbus_method_invocation_return_value</a></span> (invocation, <span class="number">NULL</span>);
2792
- }
2793
- }
2794
-
2795
- <span class="type">static</span> <span class="type">GVariant</span> *
2796
- handle_get_property (<span class="type">GDBusConnection</span> *connection,
2797
- <span class="type">const</span> <span class="type">gchar</span> *sender,
2798
- <span class="type">const</span> <span class="type">gchar</span> *object_path,
2799
- <span class="type">const</span> <span class="type">gchar</span> *interface_name,
2800
- <span class="type">const</span> <span class="type">gchar</span> *property_name,
2801
- <span class="type">GError</span> **error,
2802
- <span class="type">gpointer</span> user_data)
2803
- {
2804
- <span class="type">GVariant</span> *ret;
2805
- MyObject *myobj = user_data;
2806
-
2807
- ret = <span class="number">NULL</span>;
2808
- <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (property_name, <span class="number">&quot;Count&quot;</span>) == <span class="number">0</span>)
2809
- {
2810
- ret = <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new-int32">g_variant_new_int32</a></span> (myobj-&gt;count);
2811
- }
2812
- <span class="keyword">else</span> <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (property_name, <span class="number">&quot;Name&quot;</span>) == <span class="number">0</span>)
2813
- {
2814
- ret = <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new-string">g_variant_new_string</a></span> (myobj-&gt;name ? myobj-&gt;name : <span class="number">&quot;&quot;</span>);
2815
- }
2816
-
2817
- <span class="keyword">return</span> ret;
2818
- }
2819
-
2820
- <span class="type">static</span> <span class="type">gboolean</span>
2821
- handle_set_property (<span class="type">GDBusConnection</span> *connection,
2822
- <span class="type">const</span> <span class="type">gchar</span> *sender,
2823
- <span class="type">const</span> <span class="type">gchar</span> *object_path,
2824
- <span class="type">const</span> <span class="type">gchar</span> *interface_name,
2825
- <span class="type">const</span> <span class="type">gchar</span> *property_name,
2826
- <span class="type">GVariant</span> *value,
2827
- <span class="type">GError</span> **error,
2828
- <span class="type">gpointer</span> user_data)
2829
- {
2830
- MyObject *myobj = user_data;
2831
-
2832
- <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (property_name, <span class="number">&quot;Count&quot;</span>) == <span class="number">0</span>)
2833
- {
2834
- <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-set">g_object_set</a></span> (myobj, <span class="number">&quot;count&quot;</span>, <span class="function"><a href="../glib/glib-GVariant.html#g-variant-get-int32">g_variant_get_int32</a></span> (value), <span class="number">NULL</span>);
2835
- }
2836
- <span class="keyword">else</span> <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (property_name, <span class="number">&quot;Name&quot;</span>) == <span class="number">0</span>)
2837
- {
2838
- <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-set">g_object_set</a></span> (myobj, <span class="number">&quot;name&quot;</span>, <span class="function"><a href="../glib/glib-GVariant.html#g-variant-get-string">g_variant_get_string</a></span> (value, <span class="number">NULL</span>), <span class="number">NULL</span>);
2839
- }
2840
-
2841
- <span class="keyword">return</span> <span class="number">TRUE</span>;
2842
- }
2843
-
2844
-
2845
- <span class="comment">/*</span><span class="comment"> for now </span><span class="comment">*/</span>
2846
- <span class="type">static</span> <span class="type">const</span> <span class="type">GDBusInterfaceVTable</span> interface_vtable =
2847
- {
2848
- handle_method_call,
2849
- handle_get_property,
2850
- handle_set_property
2851
- };
2852
-
2853
- <span class="type">static</span> <span class="type">void</span>
2854
- send_property_change (<span class="type">GObject</span> *obj,
2855
- <span class="type">GParamSpec</span> *pspec,
2856
- <span class="type">GDBusConnection</span> *connection)
2857
- {
2858
- <span class="type">GVariantBuilder</span> *builder;
2859
- <span class="type">GVariantBuilder</span> *invalidated_builder;
2860
- MyObject *myobj = (MyObject *)obj;
2861
-
2862
- builder = <span class="function"><a href="../glib/glib-GVariant.html#g-variant-builder-new">g_variant_builder_new</a></span> (<span class="number">G_VARIANT_TYPE_ARRAY</span>);
2863
- invalidated_builder = <span class="function"><a href="../glib/glib-GVariant.html#g-variant-builder-new">g_variant_builder_new</a></span> (<span class="preproc">G_VARIANT_TYPE</span> (<span class="number">&quot;as&quot;</span>));
2864
-
2865
- <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (pspec-&gt;name, <span class="number">&quot;count&quot;</span>) == <span class="number">0</span>)
2866
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-builder-add">g_variant_builder_add</a></span> (builder,
2867
- <span class="number">&quot;{sv}&quot;</span>,
2868
- <span class="number">&quot;Count&quot;</span>, <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new-int32">g_variant_new_int32</a></span> (myobj-&gt;count));
2869
- <span class="keyword">else</span> <span class="keyword">if</span> (<span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strcmp0">g_strcmp0</a></span> (pspec-&gt;name, <span class="number">&quot;name&quot;</span>) == <span class="number">0</span>)
2870
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-builder-add">g_variant_builder_add</a></span> (builder,
2871
- <span class="number">&quot;{sv}&quot;</span>,
2872
- <span class="number">&quot;Name&quot;</span>, <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new-string">g_variant_new_string</a></span> (myobj-&gt;name ? myobj-&gt;name : <span class="number">&quot;&quot;</span>));
2873
-
2874
- <span class="function"><a href="GDBusConnection.html#g-dbus-connection-emit-signal">g_dbus_connection_emit_signal</a></span> (connection,
2875
- <span class="number">NULL</span>,
2876
- <span class="number">&quot;/org/myorg/MyObject&quot;</span>,
2877
- <span class="number">&quot;org.freedesktop.DBus.Properties&quot;</span>,
2878
- <span class="number">&quot;PropertiesChanged&quot;</span>,
2879
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new">g_variant_new</a></span> (<span class="number">&quot;(sa{sv}as)&quot;</span>,
2880
- <span class="number">&quot;org.myorg.MyObject&quot;</span>,
2881
- builder,
2882
- invalidated_builder),
2883
- <span class="number">NULL</span>);
2884
- }
2885
-
2886
- <span class="type">static</span> <span class="type">void</span>
2887
- on_bus_acquired (<span class="type">GDBusConnection</span> *connection,
2888
- <span class="type">const</span> <span class="type">gchar</span> *name,
2889
- <span class="type">gpointer</span> user_data)
2890
- {
2891
- MyObject *myobj = user_data;
2892
- <span class="type">guint</span> registration_id;
2893
-
2894
- <span class="preproc">g_signal_connect</span> (myobj, <span class="number">&quot;notify&quot;</span>,
2895
- <span class="preproc">G_CALLBACK</span> (send_property_change), connection);
2896
- registration_id = <span class="function"><a href="GDBusConnection.html#g-dbus-connection-register-object">g_dbus_connection_register_object</a></span> (connection,
2897
- <span class="number">&quot;/org/myorg/MyObject&quot;</span>,
2898
- introspection_data-&gt;interfaces[<span class="number">0</span>],
2899
- &amp;interface_vtable,
2900
- myobj,
2901
- <span class="number">NULL</span>, <span class="comment">/*</span><span class="comment"> user_data_free_func </span><span class="comment">*/</span>
2902
- <span class="number">NULL</span>); <span class="comment">/*</span><span class="comment"> GError** </span><span class="comment">*/</span>
2903
- <span class="preproc">g_assert</span> (registration_id &gt; <span class="number">0</span>);
2904
- }
2905
-
2906
- <span class="type">static</span> <span class="type">void</span>
2907
- on_name_acquired (<span class="type">GDBusConnection</span> *connection,
2908
- <span class="type">const</span> <span class="type">gchar</span> *name,
2909
- <span class="type">gpointer</span> user_data)
2910
- {
2911
- }
2912
-
2913
- <span class="type">static</span> <span class="type">void</span>
2914
- on_name_lost (<span class="type">GDBusConnection</span> *connection,
2915
- <span class="type">const</span> <span class="type">gchar</span> *name,
2916
- <span class="type">gpointer</span> user_data)
2917
- {
2918
- exit (<span class="number">1</span>);
2919
- }
2623
+ <td class="listing_code"><pre class="programlisting"><span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;gio/gio.h&gt;</span>
2624
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;stdlib.h&gt;</span>
2625
+
2626
+ <span class="comment">/* ---------------------------------------------------------------------------------------------------- */</span>
2627
+
2628
+ <span class="comment">/* The object we want to export */</span>
2629
+ <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>
2630
+ <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>
2631
+
2632
+ <span class="keyword">struct</span><span class="normal"> </span><span class="classname">_MyObjectClass</span>
2633
+ <span class="cbracket">{</span>
2634
+ <span class="normal"> </span><span class="usertype">GObjectClass</span><span class="normal"> parent_class</span><span class="symbol">;</span>
2635
+ <span class="cbracket">}</span><span class="symbol">;</span>
2636
+
2637
+ <span class="keyword">struct</span><span class="normal"> </span><span class="classname">_MyObject</span>
2638
+ <span class="cbracket">{</span>
2639
+ <span class="normal"> </span><span class="usertype">GObject</span><span class="normal"> parent_instance</span><span class="symbol">;</span>
2640
+
2641
+ <span class="normal"> </span><span class="usertype">gint</span><span class="normal"> count</span><span class="symbol">;</span>
2642
+ <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>
2643
+ <span class="cbracket">}</span><span class="symbol">;</span>
2644
+
2645
+ <span class="keyword">enum</span>
2646
+ <span class="cbracket">{</span>
2647
+ <span class="normal"> PROP_0</span><span class="symbol">,</span>
2648
+ <span class="normal"> PROP_COUNT</span><span class="symbol">,</span>
2649
+ <span class="normal"> PROP_NAME</span>
2650
+ <span class="cbracket">}</span><span class="symbol">;</span>
2651
+
2652
+ <span class="keyword">static</span><span class="normal"> </span><span class="usertype">GType</span><span class="normal"> </span><span class="function">my_object_get_type</span><span class="normal"> </span><span class="symbol">(</span><span class="type">void</span><span class="symbol">);</span>
2653
+ <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>
2654
+
2655
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2656
+ <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>
2657
+ <span class="cbracket">{</span>
2658
+ <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>
2659
+
2660
+ <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">-&gt;</span><span class="normal">name</span><span class="symbol">);</span>
2661
+
2662
+ <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">)-&gt;</span><span class="function">finalize</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">object</span><span class="symbol">);</span>
2663
+ <span class="cbracket">}</span>
2664
+
2665
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2666
+ <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>
2667
+ <span class="cbracket">{</span>
2668
+ <span class="normal"> object</span><span class="symbol">-&gt;</span><span class="normal">count </span><span class="symbol">=</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span>
2669
+ <span class="normal"> object</span><span class="symbol">-&gt;</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>
2670
+ <span class="cbracket">}</span>
2671
+
2672
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2673
+ <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>
2674
+ <span class="normal"> </span><span class="usertype">guint</span><span class="normal"> prop_id</span><span class="symbol">,</span>
2675
+ <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>
2676
+ <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>
2677
+ <span class="cbracket">{</span>
2678
+ <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>
2679
+
2680
+ <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>
2681
+ <span class="normal"> </span><span class="cbracket">{</span>
2682
+ <span class="normal"> </span><span class="keyword">case</span><span class="normal"> PROP_COUNT</span><span class="symbol">:</span>
2683
+ <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">-&gt;</span><span class="normal">count</span><span class="symbol">);</span>
2684
+ <span class="normal"> </span><span class="keyword">break</span><span class="symbol">;</span>
2685
+
2686
+ <span class="normal"> </span><span class="keyword">case</span><span class="normal"> PROP_NAME</span><span class="symbol">:</span>
2687
+ <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">-&gt;</span><span class="normal">name</span><span class="symbol">);</span>
2688
+ <span class="normal"> </span><span class="keyword">break</span><span class="symbol">;</span>
2689
+
2690
+ <span class="label"> default:</span>
2691
+ <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>
2692
+ <span class="normal"> </span><span class="cbracket">}</span>
2693
+ <span class="cbracket">}</span>
2694
+
2695
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2696
+ <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>
2697
+ <span class="normal"> </span><span class="usertype">guint</span><span class="normal"> prop_id</span><span class="symbol">,</span>
2698
+ <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>
2699
+ <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>
2700
+ <span class="cbracket">{</span>
2701
+ <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>
2702
+
2703
+ <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>
2704
+ <span class="normal"> </span><span class="cbracket">{</span>
2705
+ <span class="normal"> </span><span class="keyword">case</span><span class="normal"> PROP_COUNT</span><span class="symbol">:</span>
2706
+ <span class="normal"> myobj</span><span class="symbol">-&gt;</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>
2707
+ <span class="normal"> </span><span class="keyword">break</span><span class="symbol">;</span>
2708
+
2709
+ <span class="normal"> </span><span class="keyword">case</span><span class="normal"> PROP_NAME</span><span class="symbol">:</span>
2710
+ <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">-&gt;</span><span class="normal">name</span><span class="symbol">);</span>
2711
+ <span class="normal"> myobj</span><span class="symbol">-&gt;</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>
2712
+ <span class="normal"> </span><span class="keyword">break</span><span class="symbol">;</span>
2713
+
2714
+ <span class="label"> default:</span>
2715
+ <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>
2716
+ <span class="normal"> </span><span class="cbracket">}</span>
2717
+ <span class="cbracket">}</span>
2718
+
2719
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2720
+ <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>
2721
+ <span class="cbracket">{</span>
2722
+ <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>
2723
+
2724
+ <span class="normal"> gobject_class</span><span class="symbol">-&gt;</span><span class="normal">finalize </span><span class="symbol">=</span><span class="normal"> my_object_finalize</span><span class="symbol">;</span>
2725
+ <span class="normal"> gobject_class</span><span class="symbol">-&gt;</span><span class="normal">set_property </span><span class="symbol">=</span><span class="normal"> my_object_set_property</span><span class="symbol">;</span>
2726
+ <span class="normal"> gobject_class</span><span class="symbol">-&gt;</span><span class="normal">get_property </span><span class="symbol">=</span><span class="normal"> my_object_get_property</span><span class="symbol">;</span>
2727
+
2728
+ <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>
2729
+ <span class="normal"> PROP_COUNT</span><span class="symbol">,</span>
2730
+ <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>
2731
+ <span class="normal"> </span><span class="string">"Count"</span><span class="symbol">,</span>
2732
+ <span class="normal"> </span><span class="string">"Count"</span><span class="symbol">,</span>
2733
+ <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>
2734
+ <span class="normal"> <a href="../gobject/gobject-GParamSpec.html#G-PARAM-READWRITE:CAPS">G_PARAM_READWRITE</a></span><span class="symbol">));</span>
2735
+
2736
+ <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>
2737
+ <span class="normal"> PROP_NAME</span><span class="symbol">,</span>
2738
+ <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>
2739
+ <span class="normal"> </span><span class="string">"Name"</span><span class="symbol">,</span>
2740
+ <span class="normal"> </span><span class="string">"Name"</span><span class="symbol">,</span>
2741
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
2742
+ <span class="normal"> <a href="../gobject/gobject-GParamSpec.html#G-PARAM-READWRITE:CAPS">G_PARAM_READWRITE</a></span><span class="symbol">));</span>
2743
+ <span class="cbracket">}</span>
2744
+
2745
+ <span class="comment">/* A method that we want to export */</span>
2746
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2747
+ <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>
2748
+ <span class="normal"> </span><span class="usertype">gint</span><span class="normal"> change</span><span class="symbol">)</span>
2749
+ <span class="cbracket">{</span>
2750
+ <span class="normal"> myobj</span><span class="symbol">-&gt;</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">-&gt;</span><span class="normal">count </span><span class="symbol">+</span><span class="normal"> change</span><span class="symbol">;</span>
2751
+
2752
+ <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>
2753
+ <span class="cbracket">}</span>
2754
+
2755
+ <span class="comment">/* ---------------------------------------------------------------------------------------------------- */</span>
2756
+
2757
+ <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>
2758
+
2759
+ <span class="comment">/* Introspection data for the service we are exporting */</span>
2760
+ <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>
2761
+ <span class="normal"> </span><span class="string">"&lt;node&gt;"</span>
2762
+ <span class="normal"> </span><span class="string">" &lt;interface name='org.myorg.MyObject'&gt;"</span>
2763
+ <span class="normal"> </span><span class="string">" &lt;method name='ChangeCount'&gt;"</span>
2764
+ <span class="normal"> </span><span class="string">" &lt;arg type='i' name='change' direction='in'/&gt;"</span>
2765
+ <span class="normal"> </span><span class="string">" &lt;/method&gt;"</span>
2766
+ <span class="normal"> </span><span class="string">" &lt;property type='i' name='Count' access='read'/&gt;"</span>
2767
+ <span class="normal"> </span><span class="string">" &lt;property type='s' name='Name' access='readwrite'/&gt;"</span>
2768
+ <span class="normal"> </span><span class="string">" &lt;/interface&gt;"</span>
2769
+ <span class="normal"> </span><span class="string">"&lt;/node&gt;"</span><span class="symbol">;</span>
2770
+
2771
+
2772
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2773
+ <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>
2774
+ <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>
2775
+ <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>
2776
+ <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>
2777
+ <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>
2778
+ <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>
2779
+ <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>
2780
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
2781
+ <span class="cbracket">{</span>
2782
+ <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>
2783
+
2784
+ <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>
2785
+ <span class="normal"> </span><span class="cbracket">{</span>
2786
+ <span class="normal"> </span><span class="usertype">gint</span><span class="normal"> change</span><span class="symbol">;</span>
2787
+ <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">&amp;</span><span class="normal">change</span><span class="symbol">);</span>
2788
+
2789
+ <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>
2790
+
2791
+ <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>
2792
+ <span class="normal"> </span><span class="cbracket">}</span>
2793
+ <span class="cbracket">}</span>
2794
+
2795
+ <span class="keyword">static</span><span class="normal"> <a href="../glib/glib-GVariant.html#GVariant">GVariant</a> </span><span class="symbol">*</span>
2796
+ <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>
2797
+ <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>
2798
+ <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>
2799
+ <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>
2800
+ <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>
2801
+ <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>
2802
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
2803
+ <span class="cbracket">{</span>
2804
+ <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>
2805
+ <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>
2806
+
2807
+ <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>
2808
+ <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>
2809
+ <span class="normal"> </span><span class="cbracket">{</span>
2810
+ <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">-&gt;</span><span class="normal">count</span><span class="symbol">);</span>
2811
+ <span class="normal"> </span><span class="cbracket">}</span>
2812
+ <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>
2813
+ <span class="normal"> </span><span class="cbracket">{</span>
2814
+ <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">-&gt;</span><span class="normal">name </span><span class="symbol">?</span><span class="normal"> myobj</span><span class="symbol">-&gt;</span><span class="normal">name </span><span class="symbol">:</span><span class="normal"> </span><span class="string">""</span><span class="symbol">);</span>
2815
+ <span class="normal"> </span><span class="cbracket">}</span>
2816
+
2817
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> ret</span><span class="symbol">;</span>
2818
+ <span class="cbracket">}</span>
2819
+
2820
+ <span class="keyword">static</span><span class="normal"> <a href="../glib/glib-Basic-Types.html#gboolean">gboolean</a></span>
2821
+ <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>
2822
+ <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>
2823
+ <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>
2824
+ <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>
2825
+ <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>
2826
+ <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>
2827
+ <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>
2828
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
2829
+ <span class="cbracket">{</span>
2830
+ <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>
2831
+
2832
+ <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>
2833
+ <span class="normal"> </span><span class="cbracket">{</span>
2834
+ <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>
2835
+ <span class="normal"> </span><span class="cbracket">}</span>
2836
+ <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>
2837
+ <span class="normal"> </span><span class="cbracket">{</span>
2838
+ <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>
2839
+ <span class="normal"> </span><span class="cbracket">}</span>
2840
+
2841
+ <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>
2842
+ <span class="cbracket">}</span>
2843
+
2844
+
2845
+ <span class="comment">/* for now */</span>
2846
+ <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>
2847
+ <span class="cbracket">{</span>
2848
+ <span class="normal"> handle_method_call</span><span class="symbol">,</span>
2849
+ <span class="normal"> handle_get_property</span><span class="symbol">,</span>
2850
+ <span class="normal"> handle_set_property</span>
2851
+ <span class="cbracket">}</span><span class="symbol">;</span>
2852
+
2853
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2854
+ <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>
2855
+ <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>
2856
+ <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>
2857
+ <span class="cbracket">{</span>
2858
+ <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>
2859
+ <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>
2860
+ <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>
2861
+
2862
+ <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>
2863
+ <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>
2864
+
2865
+ <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">-&gt;</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>
2866
+ <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>
2867
+ <span class="normal"> </span><span class="string">"{sv}"</span><span class="symbol">,</span>
2868
+ <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">-&gt;</span><span class="normal">count</span><span class="symbol">));</span>
2869
+ <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">-&gt;</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>
2870
+ <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>
2871
+ <span class="normal"> </span><span class="string">"{sv}"</span><span class="symbol">,</span>
2872
+ <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">-&gt;</span><span class="normal">name </span><span class="symbol">?</span><span class="normal"> myobj</span><span class="symbol">-&gt;</span><span class="normal">name </span><span class="symbol">:</span><span class="normal"> </span><span class="string">""</span><span class="symbol">));</span>
2873
+
2874
+ <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>
2875
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
2876
+ <span class="normal"> </span><span class="string">"/org/myorg/MyObject"</span><span class="symbol">,</span>
2877
+ <span class="normal"> </span><span class="string">"org.freedesktop.DBus.Properties"</span><span class="symbol">,</span>
2878
+ <span class="normal"> </span><span class="string">"PropertiesChanged"</span><span class="symbol">,</span>
2879
+ <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>
2880
+ <span class="normal"> </span><span class="string">"org.myorg.MyObject"</span><span class="symbol">,</span>
2881
+ <span class="normal"> builder</span><span class="symbol">,</span>
2882
+ <span class="normal"> invalidated_builder</span><span class="symbol">),</span>
2883
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
2884
+ <span class="cbracket">}</span>
2885
+
2886
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2887
+ <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>
2888
+ <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>
2889
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
2890
+ <span class="cbracket">{</span>
2891
+ <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>
2892
+ <span class="normal"> </span><span class="usertype">guint</span><span class="normal"> registration_id</span><span class="symbol">;</span>
2893
+
2894
+ <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>
2895
+ <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>
2896
+ <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>
2897
+ <span class="normal"> </span><span class="string">"/org/myorg/MyObject"</span><span class="symbol">,</span>
2898
+ <span class="normal"> introspection_data</span><span class="symbol">-&gt;</span><span class="normal">interfaces</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">],</span>
2899
+ <span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">interface_vtable</span><span class="symbol">,</span>
2900
+ <span class="normal"> myobj</span><span class="symbol">,</span>
2901
+ <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>
2902
+ <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>
2903
+ <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">&gt;</span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span>
2904
+ <span class="cbracket">}</span>
2905
+
2906
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2907
+ <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>
2908
+ <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>
2909
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
2910
+ <span class="cbracket">{</span>
2911
+ <span class="cbracket">}</span>
2912
+
2913
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2914
+ <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>
2915
+ <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>
2916
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
2917
+ <span class="cbracket">{</span>
2918
+ <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>
2919
+ <span class="cbracket">}</span>
2920
2920
 
2921
2921
  <span class="type">int</span>
2922
- main (<span class="type">int</span> argc, <span class="type">char</span> *argv[])
2923
- {
2924
- <span class="type">guint</span> owner_id;
2925
- <span class="type">GMainLoop</span> *loop;
2926
- MyObject *myobj;
2922
+ <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>
2923
+ <span class="cbracket">{</span>
2924
+ <span class="normal"> </span><span class="usertype">guint</span><span class="normal"> owner_id</span><span class="symbol">;</span>
2925
+ <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>
2926
+ <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>
2927
2927
 
2928
- <span class="comment">/*</span><span class="comment"> We are lazy here - we don't want to manually provide</span>
2928
+ <span class="normal"> </span><span class="comment">/* We are lazy here - we don't want to manually provide</span>
2929
2929
  <span class="comment"> * the introspection data structures - so we just build</span>
2930
2930
  <span class="comment"> * them from XML.</span>
2931
- <span class="comment"> </span><span class="comment">*/</span>
2932
- introspection_data = <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> (introspection_xml, <span class="number">NULL</span>);
2933
- <span class="preproc">g_assert</span> (introspection_data != <span class="number">NULL</span>);
2931
+ <span class="comment"> */</span>
2932
+ <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>
2933
+ <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>
2934
2934
 
2935
- myobj = <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-new">g_object_new</a></span> (my_object_get_type (), <span class="number">NULL</span>);
2935
+ <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>
2936
2936
 
2937
- owner_id = <span class="function"><a href="gio-Owning-Bus-Names.html#g-bus-own-name">g_bus_own_name</a></span> (<span class="number">G_BUS_TYPE_SESSION</span>,
2938
- <span class="number">&quot;org.myorg.MyObject&quot;</span>,
2939
- <span class="number">G_BUS_NAME_OWNER_FLAGS_NONE</span>,
2940
- on_bus_acquired,
2941
- on_name_acquired,
2942
- on_name_lost,
2943
- myobj,
2944
- <span class="number">NULL</span>);
2937
+ <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>
2938
+ <span class="normal"> </span><span class="string">"org.myorg.MyObject"</span><span class="symbol">,</span>
2939
+ <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>
2940
+ <span class="normal"> on_bus_acquired</span><span class="symbol">,</span>
2941
+ <span class="normal"> on_name_acquired</span><span class="symbol">,</span>
2942
+ <span class="normal"> on_name_lost</span><span class="symbol">,</span>
2943
+ <span class="normal"> myobj</span><span class="symbol">,</span>
2944
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
2945
2945
 
2946
- loop = <span class="function"><a href="../glib/glib-The-Main-Event-Loop.html#g-main-loop-new">g_main_loop_new</a></span> (<span class="number">NULL</span>, <span class="number">FALSE</span>);
2947
- <span class="function"><a href="../glib/glib-The-Main-Event-Loop.html#g-main-loop-run">g_main_loop_run</a></span> (loop);
2946
+ <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>
2947
+ <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>
2948
2948
 
2949
- <span class="function"><a href="gio-Owning-Bus-Names.html#g-bus-unown-name">g_bus_unown_name</a></span> (owner_id);
2949
+ <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>
2950
2950
 
2951
- <span class="function"><a href="gio-D-Bus-Introspection-Data.html#g-dbus-node-info-unref">g_dbus_node_info_unref</a></span> (introspection_data);
2951
+ <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>
2952
2952
 
2953
- <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> (myobj);
2953
+ <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>
2954
2954
 
2955
- <span class="keyword">return</span> <span class="number">0</span>;
2956
- }</pre></td>
2955
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span>
2956
+ <span class="cbracket">}</span></pre></td>
2957
2957
  </tr>
2958
2958
  </tbody>
2959
2959
  </table>
@@ -4246,20 +4246,20 @@ convenient 'inline' use of <a href="../glib/glib-GVariant.html#g-variant-new"><c
4246
4246
  12
4247
4247
  13
4248
4248
  14</pre></td>
4249
- <td class="listing_code"><pre class="programlisting"><span class="function"><a href="GDBusConnection.html#g-dbus-connection-call">g_dbus_connection_call</a></span> (connection,
4250
- <span class="number">&quot;org.freedesktop.StringThings&quot;</span>,
4251
- <span class="number">&quot;/org/freedesktop/StringThings&quot;</span>,
4252
- <span class="number">&quot;org.freedesktop.StringThings&quot;</span>,
4253
- <span class="number">&quot;TwoStrings&quot;</span>,
4254
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new">g_variant_new</a></span> (<span class="number">&quot;(ss)&quot;</span>,
4255
- <span class="number">&quot;Thing One&quot;</span>,
4256
- <span class="number">&quot;Thing Two&quot;</span>),
4257
- <span class="number">NULL</span>,
4258
- <span class="number">G_DBUS_CALL_FLAGS_NONE</span>,
4259
- -<span class="number">1</span>,
4260
- <span class="number">NULL</span>,
4261
- (<span class="type">GAsyncReadyCallback</span>) two_strings_done,
4262
- <span class="number">NULL</span>);</pre></td>
4249
+ <td class="listing_code"><pre class="programlisting"><span class="function"><a href="GDBusConnection.html#g-dbus-connection-call">g_dbus_connection_call</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">connection</span><span class="symbol">,</span>
4250
+ <span class="normal"> </span><span class="string">"org.freedesktop.StringThings"</span><span class="symbol">,</span>
4251
+ <span class="normal"> </span><span class="string">"/org/freedesktop/StringThings"</span><span class="symbol">,</span>
4252
+ <span class="normal"> </span><span class="string">"org.freedesktop.StringThings"</span><span class="symbol">,</span>
4253
+ <span class="normal"> </span><span class="string">"TwoStrings"</span><span class="symbol">,</span>
4254
+ <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">"(ss)"</span><span class="symbol">,</span>
4255
+ <span class="normal"> </span><span class="string">"Thing One"</span><span class="symbol">,</span>
4256
+ <span class="normal"> </span><span class="string">"Thing Two"</span><span class="symbol">),</span>
4257
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
4258
+ <span class="normal"> <a href="GDBusConnection.html#G-DBUS-CALL-FLAGS-NONE:CAPS">G_DBUS_CALL_FLAGS_NONE</a></span><span class="symbol">,</span>
4259
+ <span class="normal"> </span><span class="symbol">-</span><span class="number">1</span><span class="symbol">,</span>
4260
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
4261
+ <span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="GAsyncResult.html#GAsyncReadyCallback">GAsyncReadyCallback</a></span><span class="symbol">)</span><span class="normal"> two_strings_done</span><span class="symbol">,</span>
4262
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span></pre></td>
4263
4263
  </tr>
4264
4264
  </tbody>
4265
4265
  </table>
@@ -4437,19 +4437,19 @@ This allows convenient 'inline' use of <a href="../glib/glib-GVariant.html#g-var
4437
4437
  11
4438
4438
  12
4439
4439
  13</pre></td>
4440
- <td class="listing_code"><pre class="programlisting"><span class="function"><a href="GDBusConnection.html#g-dbus-connection-call-sync">g_dbus_connection_call_sync</a></span> (connection,
4441
- <span class="number">&quot;org.freedesktop.StringThings&quot;</span>,
4442
- <span class="number">&quot;/org/freedesktop/StringThings&quot;</span>,
4443
- <span class="number">&quot;org.freedesktop.StringThings&quot;</span>,
4444
- <span class="number">&quot;TwoStrings&quot;</span>,
4445
- <span class="function"><a href="../glib/glib-GVariant.html#g-variant-new">g_variant_new</a></span> (<span class="number">&quot;(ss)&quot;</span>,
4446
- <span class="number">&quot;Thing One&quot;</span>,
4447
- <span class="number">&quot;Thing Two&quot;</span>),
4448
- <span class="number">NULL</span>,
4449
- <span class="number">G_DBUS_CALL_FLAGS_NONE</span>,
4450
- -<span class="number">1</span>,
4451
- <span class="number">NULL</span>,
4452
- &amp;error);</pre></td>
4440
+ <td class="listing_code"><pre class="programlisting"><span class="function"><a href="GDBusConnection.html#g-dbus-connection-call-sync">g_dbus_connection_call_sync</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">connection</span><span class="symbol">,</span>
4441
+ <span class="normal"> </span><span class="string">"org.freedesktop.StringThings"</span><span class="symbol">,</span>
4442
+ <span class="normal"> </span><span class="string">"/org/freedesktop/StringThings"</span><span class="symbol">,</span>
4443
+ <span class="normal"> </span><span class="string">"org.freedesktop.StringThings"</span><span class="symbol">,</span>
4444
+ <span class="normal"> </span><span class="string">"TwoStrings"</span><span class="symbol">,</span>
4445
+ <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">"(ss)"</span><span class="symbol">,</span>
4446
+ <span class="normal"> </span><span class="string">"Thing One"</span><span class="symbol">,</span>
4447
+ <span class="normal"> </span><span class="string">"Thing Two"</span><span class="symbol">),</span>
4448
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
4449
+ <span class="normal"> <a href="GDBusConnection.html#G-DBUS-CALL-FLAGS-NONE:CAPS">G_DBUS_CALL_FLAGS_NONE</a></span><span class="symbol">,</span>
4450
+ <span class="normal"> </span><span class="symbol">-</span><span class="number">1</span><span class="symbol">,</span>
4451
+ <span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
4452
+ <span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">error</span><span class="symbol">);</span></pre></td>
4453
4453
  </tr>
4454
4454
  </tbody>
4455
4455
  </table>
@@ -5405,15 +5405,15 @@ message can simply return the <em class="parameter"><code>message</code></em> ob
5405
5405
  7
5406
5406
  8
5407
5407
  9</pre></td>
5408
- <td class="listing_code"><pre class="programlisting"><span class="type">static</span> <span class="type">GDBusMessage</span> *
5409
- passive_filter (<span class="type">GDBusConnection</span> *connection
5410
- <span class="type">GDBusMessage</span> *message,
5411
- <span class="type">gboolean</span> incoming,
5412
- <span class="type">gpointer</span> user_data)
5413
- {
5414
- <span class="comment">/*</span><span class="comment"> inspect @message </span><span class="comment">*/</span>
5415
- <span class="keyword">return</span> message;
5416
- }</pre></td>
5408
+ <td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> <a href="GDBusMessage.html">GDBusMessage</a> </span><span class="symbol">*</span>
5409
+ <span class="function">passive_filter</span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="GDBusConnection.html">GDBusConnection</a> </span><span class="symbol">*</span><span class="normal">connection</span>
5410
+ <span class="normal"> </span><span class="usertype">GDBusMessage</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">message</span><span class="symbol">,</span>
5411
+ <span class="normal"> </span><span class="usertype">gboolean</span><span class="normal"> incoming</span><span class="symbol">,</span>
5412
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
5413
+ <span class="cbracket">{</span>
5414
+ <span class="normal"> </span><span class="comment">/* inspect @message */</span>
5415
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> message</span><span class="symbol">;</span>
5416
+ <span class="cbracket">}</span></pre></td>
5417
5417
  </tr>
5418
5418
  </tbody>
5419
5419
  </table>
@@ -5439,19 +5439,19 @@ Filter functions that wants to drop a message can simply return <a href="../glib
5439
5439
  11
5440
5440
  12
5441
5441
  13</pre></td>
5442
- <td class="listing_code"><pre class="programlisting"><span class="type">static</span> <span class="type">GDBusMessage</span> *
5443
- drop_filter (<span class="type">GDBusConnection</span> *connection
5444
- <span class="type">GDBusMessage</span> *message,
5445
- <span class="type">gboolean</span> incoming,
5446
- <span class="type">gpointer</span> user_data)
5447
- {
5448
- <span class="keyword">if</span> (should_drop_message)
5449
- {
5450
- <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> (message);
5451
- message = <span class="number">NULL</span>;
5452
- }
5453
- <span class="keyword">return</span> message;
5454
- }</pre></td>
5442
+ <td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> <a href="GDBusMessage.html">GDBusMessage</a> </span><span class="symbol">*</span>
5443
+ <span class="function">drop_filter</span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="GDBusConnection.html">GDBusConnection</a> </span><span class="symbol">*</span><span class="normal">connection</span>
5444
+ <span class="normal"> </span><span class="usertype">GDBusMessage</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">message</span><span class="symbol">,</span>
5445
+ <span class="normal"> </span><span class="usertype">gboolean</span><span class="normal"> incoming</span><span class="symbol">,</span>
5446
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
5447
+ <span class="cbracket">{</span>
5448
+ <span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">should_drop_message</span><span class="symbol">)</span>
5449
+ <span class="normal"> </span><span class="cbracket">{</span>
5450
+ <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">message</span><span class="symbol">);</span>
5451
+ <span class="normal"> message </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
5452
+ <span class="normal"> </span><span class="cbracket">}</span>
5453
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> message</span><span class="symbol">;</span>
5454
+ <span class="cbracket">}</span></pre></td>
5455
5455
  </tr>
5456
5456
  </tbody>
5457
5457
  </table>
@@ -5482,24 +5482,24 @@ Finally, a filter function may modify a message by copying it:
5482
5482
  16
5483
5483
  17
5484
5484
  18</pre></td>
5485
- <td class="listing_code"><pre class="programlisting"><span class="type">static</span> <span class="type">GDBusMessage</span> *
5486
- modifying_filter (<span class="type">GDBusConnection</span> *connection
5487
- <span class="type">GDBusMessage</span> *message,
5488
- <span class="type">gboolean</span> incoming,
5489
- <span class="type">gpointer</span> user_data)
5490
- {
5491
- <span class="type">GDBusMessage</span> *copy;
5492
- <span class="type">GError</span> *error;
5493
-
5494
- error = <span class="number">NULL</span>;
5495
- copy = <span class="function"><a href="GDBusMessage.html#g-dbus-message-copy">g_dbus_message_copy</a></span> (message, &amp;error);
5496
- <span class="comment">/*</span><span class="comment"> handle @error being is set </span><span class="comment">*/</span>
5497
- <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> (message);
5498
-
5499
- <span class="comment">/*</span><span class="comment"> modify @copy </span><span class="comment">*/</span>
5500
-
5501
- <span class="keyword">return</span> copy;
5502
- }</pre></td>
5485
+ <td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> <a href="GDBusMessage.html">GDBusMessage</a> </span><span class="symbol">*</span>
5486
+ <span class="function">modifying_filter</span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="GDBusConnection.html">GDBusConnection</a> </span><span class="symbol">*</span><span class="normal">connection</span>
5487
+ <span class="normal"> </span><span class="usertype">GDBusMessage</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">message</span><span class="symbol">,</span>
5488
+ <span class="normal"> </span><span class="usertype">gboolean</span><span class="normal"> incoming</span><span class="symbol">,</span>
5489
+ <span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> user_data</span><span class="symbol">)</span>
5490
+ <span class="cbracket">{</span>
5491
+ <span class="normal"> </span><span class="usertype">GDBusMessage</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">copy</span><span class="symbol">;</span>
5492
+ <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>
5493
+
5494
+ <span class="normal"> error </span><span class="symbol">=</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
5495
+ <span class="normal"> copy </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GDBusMessage.html#g-dbus-message-copy">g_dbus_message_copy</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">message</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">error</span><span class="symbol">);</span>
5496
+ <span class="normal"> </span><span class="comment">/* handle @error being is set */</span>
5497
+ <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">message</span><span class="symbol">);</span>
5498
+
5499
+ <span class="normal"> </span><span class="comment">/* modify @copy */</span>
5500
+
5501
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> copy</span><span class="symbol">;</span>
5502
+ <span class="cbracket">}</span></pre></td>
5503
5503
  </tr>
5504
5504
  </tbody>
5505
5505
  </table>
@@ -6550,7 +6550,7 @@ remote peer closed its end of the connection.</td>
6550
6550
  </div>
6551
6551
  </div>
6552
6552
  <div class="footnotes">
6553
- <br><hr style="width:100; align:left;">
6553
+ <br><hr style="width:100; text-align:left;margin-left: 0">
6554
6554
  <div id="ftn.id-1.4.16.7.8.4.2" class="footnote"><p><a href="#id-1.4.16.7.8.4.2" class="para"><sup class="para">[1] </sup></a>
6555
6555
  This is so that <a class="link" href="GDBusConnection.html#g-bus-get" title="g_bus_get ()"><code class="function">g_bus_get()</code></a> and <a class="link" href="GDBusConnection.html#g-bus-get-sync" title="g_bus_get_sync ()"><code class="function">g_bus_get_sync()</code></a> can safely return the
6556
6556
  same <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> when called from any thread.