You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1222 lines
44 KiB

  1. /* GIO - GLib Input, Output and Streaming Library
  2. *
  3. * Copyright (C) 2006-2007 Red Hat, Inc.
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General
  16. * Public License along with this library; if not, write to the
  17. * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  18. * Boston, MA 02111-1307, USA.
  19. *
  20. * Author: Alexander Larsson <alexl@redhat.com>
  21. */
  22. #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
  23. #error "Only <gio/gio.h> can be included directly."
  24. #endif
  25. #ifndef __GIO_ENUMS_H__
  26. #define __GIO_ENUMS_H__
  27. #include <glib-object.h>
  28. G_BEGIN_DECLS
  29. /**
  30. * GAppInfoCreateFlags:
  31. * @G_APP_INFO_CREATE_NONE: No flags.
  32. * @G_APP_INFO_CREATE_NEEDS_TERMINAL: Application opens in a terminal window.
  33. * @G_APP_INFO_CREATE_SUPPORTS_URIS: Application supports URI arguments.
  34. * @G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION: Application supports startup notification. Since 2.26
  35. *
  36. * Flags used when creating a #GAppInfo.
  37. */
  38. typedef enum {
  39. G_APP_INFO_CREATE_NONE = 0, /*< nick=none >*/
  40. G_APP_INFO_CREATE_NEEDS_TERMINAL = (1 << 0), /*< nick=needs-terminal >*/
  41. G_APP_INFO_CREATE_SUPPORTS_URIS = (1 << 1), /*< nick=supports-uris >*/
  42. G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION = (1 << 2) /*< nick=supports-startup-notification >*/
  43. } GAppInfoCreateFlags;
  44. /**
  45. * GConverterFlags:
  46. * @G_CONVERTER_NO_FLAGS: No flags.
  47. * @G_CONVERTER_INPUT_AT_END: At end of input data
  48. * @G_CONVERTER_FLUSH: Flush data
  49. *
  50. * Flags used when calling a g_converter_convert().
  51. *
  52. * Since: 2.24
  53. */
  54. typedef enum {
  55. G_CONVERTER_NO_FLAGS = 0, /*< nick=none >*/
  56. G_CONVERTER_INPUT_AT_END = (1 << 0), /*< nick=input-at-end >*/
  57. G_CONVERTER_FLUSH = (1 << 1) /*< nick=flush >*/
  58. } GConverterFlags;
  59. /**
  60. * GConverterResult:
  61. * @G_CONVERTER_ERROR: There was an error during conversion.
  62. * @G_CONVERTER_CONVERTED: Some data was consumed or produced
  63. * @G_CONVERTER_FINISHED: The conversion is finished
  64. * @G_CONVERTER_FLUSHED: Flushing is finished
  65. *
  66. * Results returned from g_converter_convert().
  67. *
  68. * Since: 2.24
  69. */
  70. typedef enum {
  71. G_CONVERTER_ERROR = 0, /*< nick=error >*/
  72. G_CONVERTER_CONVERTED = 1, /*< nick=converted >*/
  73. G_CONVERTER_FINISHED = 2, /*< nick=finished >*/
  74. G_CONVERTER_FLUSHED = 3 /*< nick=flushed >*/
  75. } GConverterResult;
  76. /**
  77. * GDataStreamByteOrder:
  78. * @G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN: Selects Big Endian byte order.
  79. * @G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN: Selects Little Endian byte order.
  80. * @G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN: Selects endianness based on host machine's architecture.
  81. *
  82. * #GDataStreamByteOrder is used to ensure proper endianness of streaming data sources
  83. * across various machine architectures.
  84. *
  85. **/
  86. typedef enum {
  87. G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN,
  88. G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN,
  89. G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN
  90. } GDataStreamByteOrder;
  91. /**
  92. * GDataStreamNewlineType:
  93. * @G_DATA_STREAM_NEWLINE_TYPE_LF: Selects "LF" line endings, common on most modern UNIX platforms.
  94. * @G_DATA_STREAM_NEWLINE_TYPE_CR: Selects "CR" line endings.
  95. * @G_DATA_STREAM_NEWLINE_TYPE_CR_LF: Selects "CR, LF" line ending, common on Microsoft Windows.
  96. * @G_DATA_STREAM_NEWLINE_TYPE_ANY: Automatically try to handle any line ending type.
  97. *
  98. * #GDataStreamNewlineType is used when checking for or setting the line endings for a given file.
  99. **/
  100. typedef enum {
  101. G_DATA_STREAM_NEWLINE_TYPE_LF,
  102. G_DATA_STREAM_NEWLINE_TYPE_CR,
  103. G_DATA_STREAM_NEWLINE_TYPE_CR_LF,
  104. G_DATA_STREAM_NEWLINE_TYPE_ANY
  105. } GDataStreamNewlineType;
  106. /**
  107. * GFileAttributeType:
  108. * @G_FILE_ATTRIBUTE_TYPE_INVALID: indicates an invalid or uninitalized type.
  109. * @G_FILE_ATTRIBUTE_TYPE_STRING: a null terminated UTF8 string.
  110. * @G_FILE_ATTRIBUTE_TYPE_BYTE_STRING: a zero terminated string of non-zero bytes.
  111. * @G_FILE_ATTRIBUTE_TYPE_BOOLEAN: a boolean value.
  112. * @G_FILE_ATTRIBUTE_TYPE_UINT32: an unsigned 4-byte/32-bit integer.
  113. * @G_FILE_ATTRIBUTE_TYPE_INT32: a signed 4-byte/32-bit integer.
  114. * @G_FILE_ATTRIBUTE_TYPE_UINT64: an unsigned 8-byte/64-bit integer.
  115. * @G_FILE_ATTRIBUTE_TYPE_INT64: a signed 8-byte/64-bit integer.
  116. * @G_FILE_ATTRIBUTE_TYPE_OBJECT: a #GObject.
  117. * @G_FILE_ATTRIBUTE_TYPE_STRINGV: a %NULL terminated char **. Since 2.22
  118. *
  119. * The data types for file attributes.
  120. **/
  121. typedef enum {
  122. G_FILE_ATTRIBUTE_TYPE_INVALID = 0,
  123. G_FILE_ATTRIBUTE_TYPE_STRING,
  124. G_FILE_ATTRIBUTE_TYPE_BYTE_STRING, /* zero terminated string of non-zero bytes */
  125. G_FILE_ATTRIBUTE_TYPE_BOOLEAN,
  126. G_FILE_ATTRIBUTE_TYPE_UINT32,
  127. G_FILE_ATTRIBUTE_TYPE_INT32,
  128. G_FILE_ATTRIBUTE_TYPE_UINT64,
  129. G_FILE_ATTRIBUTE_TYPE_INT64,
  130. G_FILE_ATTRIBUTE_TYPE_OBJECT,
  131. G_FILE_ATTRIBUTE_TYPE_STRINGV
  132. } GFileAttributeType;
  133. /**
  134. * GFileAttributeInfoFlags:
  135. * @G_FILE_ATTRIBUTE_INFO_NONE: no flags set.
  136. * @G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE: copy the attribute values when the file is copied.
  137. * @G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED: copy the attribute values when the file is moved.
  138. *
  139. * Flags specifying the behaviour of an attribute.
  140. **/
  141. typedef enum {
  142. G_FILE_ATTRIBUTE_INFO_NONE = 0,
  143. G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE = (1 << 0),
  144. G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED = (1 << 1)
  145. } GFileAttributeInfoFlags;
  146. /**
  147. * GFileAttributeStatus:
  148. * @G_FILE_ATTRIBUTE_STATUS_UNSET: Attribute value is unset (empty).
  149. * @G_FILE_ATTRIBUTE_STATUS_SET: Attribute value is set.
  150. * @G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING: Indicates an error in setting the value.
  151. *
  152. * Used by g_file_set_attributes_from_info() when setting file attributes.
  153. **/
  154. typedef enum {
  155. G_FILE_ATTRIBUTE_STATUS_UNSET = 0,
  156. G_FILE_ATTRIBUTE_STATUS_SET,
  157. G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING
  158. } GFileAttributeStatus;
  159. /**
  160. * GFileQueryInfoFlags:
  161. * @G_FILE_QUERY_INFO_NONE: No flags set.
  162. * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks.
  163. *
  164. * Flags used when querying a #GFileInfo.
  165. */
  166. typedef enum {
  167. G_FILE_QUERY_INFO_NONE = 0,
  168. G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS = (1 << 0) /*< nick=nofollow-symlinks >*/
  169. } GFileQueryInfoFlags;
  170. /**
  171. * GFileCreateFlags:
  172. * @G_FILE_CREATE_NONE: No flags set.
  173. * @G_FILE_CREATE_PRIVATE: Create a file that can only be
  174. * accessed by the current user.
  175. * @G_FILE_CREATE_REPLACE_DESTINATION: Replace the destination
  176. * as if it didn't exist before. Don't try to keep any old
  177. * permissions, replace instead of following links. This
  178. * is generally useful if you're doing a "copy over"
  179. * rather than a "save new version of" replace operation.
  180. * You can think of it as "unlink destination" before
  181. * writing to it, although the implementation may not
  182. * be exactly like that. Since 2.20
  183. *
  184. * Flags used when an operation may create a file.
  185. */
  186. typedef enum {
  187. G_FILE_CREATE_NONE = 0,
  188. G_FILE_CREATE_PRIVATE = (1 << 0),
  189. G_FILE_CREATE_REPLACE_DESTINATION = (1 << 1)
  190. } GFileCreateFlags;
  191. /**
  192. * GMountMountFlags:
  193. * @G_MOUNT_MOUNT_NONE: No flags set.
  194. *
  195. * Flags used when mounting a mount.
  196. */
  197. typedef enum {
  198. G_MOUNT_MOUNT_NONE = 0
  199. } GMountMountFlags;
  200. /**
  201. * GMountUnmountFlags:
  202. * @G_MOUNT_UNMOUNT_NONE: No flags set.
  203. * @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding
  204. * file operations on the mount.
  205. *
  206. * Flags used when an unmounting a mount.
  207. */
  208. typedef enum {
  209. G_MOUNT_UNMOUNT_NONE = 0,
  210. G_MOUNT_UNMOUNT_FORCE = (1 << 0)
  211. } GMountUnmountFlags;
  212. /**
  213. * GDriveStartFlags:
  214. * @G_DRIVE_START_NONE: No flags set.
  215. *
  216. * Flags used when starting a drive.
  217. *
  218. * Since: 2.22
  219. */
  220. typedef enum {
  221. G_DRIVE_START_NONE = 0
  222. } GDriveStartFlags;
  223. /**
  224. * GDriveStartStopType:
  225. * @G_DRIVE_START_STOP_TYPE_UNKNOWN: Unknown or drive doesn't support
  226. * start/stop.
  227. * @G_DRIVE_START_STOP_TYPE_SHUTDOWN: The stop method will physically
  228. * shut down the drive and e.g. power down the port the drive is
  229. * attached to.
  230. * @G_DRIVE_START_STOP_TYPE_NETWORK: The start/stop methods are used
  231. * for connecting/disconnect to the drive over the network.
  232. * @G_DRIVE_START_STOP_TYPE_MULTIDISK: The start/stop methods will
  233. * assemble/disassemble a virtual drive from several physical
  234. * drives.
  235. * @G_DRIVE_START_STOP_TYPE_PASSWORD: The start/stop methods will
  236. * unlock/lock the disk (for example using the ATA <quote>SECURITY
  237. * UNLOCK DEVICE</quote> command)
  238. *
  239. * Enumeration describing how a drive can be started/stopped.
  240. *
  241. * Since: 2.22
  242. */
  243. typedef enum {
  244. G_DRIVE_START_STOP_TYPE_UNKNOWN,
  245. G_DRIVE_START_STOP_TYPE_SHUTDOWN,
  246. G_DRIVE_START_STOP_TYPE_NETWORK,
  247. G_DRIVE_START_STOP_TYPE_MULTIDISK,
  248. G_DRIVE_START_STOP_TYPE_PASSWORD
  249. } GDriveStartStopType;
  250. /**
  251. * GFileCopyFlags:
  252. * @G_FILE_COPY_NONE: No flags set.
  253. * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
  254. * @G_FILE_COPY_BACKUP: Make a backup of any existing files.
  255. * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
  256. * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo).
  257. * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported.
  258. * @G_FILE_COPY_TARGET_DEFAULT_PERMS: Leaves target file with default perms, instead of setting the source file perms.
  259. *
  260. * Flags used when copying or moving files.
  261. */
  262. typedef enum {
  263. G_FILE_COPY_NONE = 0, /*< nick=none >*/
  264. G_FILE_COPY_OVERWRITE = (1 << 0),
  265. G_FILE_COPY_BACKUP = (1 << 1),
  266. G_FILE_COPY_NOFOLLOW_SYMLINKS = (1 << 2),
  267. G_FILE_COPY_ALL_METADATA = (1 << 3),
  268. G_FILE_COPY_NO_FALLBACK_FOR_MOVE = (1 << 4),
  269. G_FILE_COPY_TARGET_DEFAULT_PERMS = (1 << 5)
  270. } GFileCopyFlags;
  271. /**
  272. * GFileMonitorFlags:
  273. * @G_FILE_MONITOR_NONE: No flags set.
  274. * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events.
  275. * @G_FILE_MONITOR_SEND_MOVED: Pair DELETED and CREATED events caused
  276. * by file renames (moves) and send a single G_FILE_MONITOR_EVENT_MOVED
  277. * event instead (NB: not supported on all backends; the default
  278. * behaviour -without specifying this flag- is to send single DELETED
  279. * and CREATED events).
  280. *
  281. * Flags used to set what a #GFileMonitor will watch for.
  282. */
  283. typedef enum {
  284. G_FILE_MONITOR_NONE = 0,
  285. G_FILE_MONITOR_WATCH_MOUNTS = (1 << 0),
  286. G_FILE_MONITOR_SEND_MOVED = (1 << 1)
  287. } GFileMonitorFlags;
  288. /**
  289. * GFileType:
  290. * @G_FILE_TYPE_UNKNOWN: File's type is unknown.
  291. * @G_FILE_TYPE_REGULAR: File handle represents a regular file.
  292. * @G_FILE_TYPE_DIRECTORY: File handle represents a directory.
  293. * @G_FILE_TYPE_SYMBOLIC_LINK: File handle represents a symbolic link
  294. * (Unix systems).
  295. * @G_FILE_TYPE_SPECIAL: File is a "special" file, such as a socket, fifo,
  296. * block device, or character device.
  297. * @G_FILE_TYPE_SHORTCUT: File is a shortcut (Windows systems).
  298. * @G_FILE_TYPE_MOUNTABLE: File is a mountable location.
  299. *
  300. * Indicates the file's on-disk type.
  301. **/
  302. typedef enum {
  303. G_FILE_TYPE_UNKNOWN = 0,
  304. G_FILE_TYPE_REGULAR,
  305. G_FILE_TYPE_DIRECTORY,
  306. G_FILE_TYPE_SYMBOLIC_LINK,
  307. G_FILE_TYPE_SPECIAL, /* socket, fifo, blockdev, chardev */
  308. G_FILE_TYPE_SHORTCUT,
  309. G_FILE_TYPE_MOUNTABLE
  310. } GFileType;
  311. /**
  312. * GFilesystemPreviewType:
  313. * @G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS: Only preview files if user has explicitly requested it.
  314. * @G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL: Preview files if user has requested preview of "local" files.
  315. * @G_FILESYSTEM_PREVIEW_TYPE_NEVER: Never preview files.
  316. *
  317. * Indicates a hint from the file system whether files should be
  318. * previewed in a file manager. Returned as the value of the key
  319. * #G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW.
  320. **/
  321. typedef enum {
  322. G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS = 0,
  323. G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL,
  324. G_FILESYSTEM_PREVIEW_TYPE_NEVER
  325. } GFilesystemPreviewType;
  326. /**
  327. * GFileMonitorEvent:
  328. * @G_FILE_MONITOR_EVENT_CHANGED: a file changed.
  329. * @G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: a hint that this was probably the last change in a set of changes.
  330. * @G_FILE_MONITOR_EVENT_DELETED: a file was deleted.
  331. * @G_FILE_MONITOR_EVENT_CREATED: a file was created.
  332. * @G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: a file attribute was changed.
  333. * @G_FILE_MONITOR_EVENT_PRE_UNMOUNT: the file location will soon be unmounted.
  334. * @G_FILE_MONITOR_EVENT_UNMOUNTED: the file location was unmounted.
  335. * @G_FILE_MONITOR_EVENT_MOVED: the file was moved.
  336. *
  337. * Specifies what type of event a monitor event is.
  338. **/
  339. typedef enum {
  340. G_FILE_MONITOR_EVENT_CHANGED,
  341. G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT,
  342. G_FILE_MONITOR_EVENT_DELETED,
  343. G_FILE_MONITOR_EVENT_CREATED,
  344. G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED,
  345. G_FILE_MONITOR_EVENT_PRE_UNMOUNT,
  346. G_FILE_MONITOR_EVENT_UNMOUNTED,
  347. G_FILE_MONITOR_EVENT_MOVED
  348. } GFileMonitorEvent;
  349. /* This enumeration conflicts with GIOError in giochannel.h. However,
  350. * that is only used as a return value in some deprecated functions.
  351. * So, we reuse the same prefix for the enumeration values, but call
  352. * the actual enumeration (which is rarely used) GIOErrorEnum.
  353. */
  354. /**
  355. * GIOErrorEnum:
  356. * @G_IO_ERROR_FAILED: Generic error condition for when any operation fails.
  357. * @G_IO_ERROR_NOT_FOUND: File not found error.
  358. * @G_IO_ERROR_EXISTS: File already exists error.
  359. * @G_IO_ERROR_IS_DIRECTORY: File is a directory error.
  360. * @G_IO_ERROR_NOT_DIRECTORY: File is not a directory.
  361. * @G_IO_ERROR_NOT_EMPTY: File is a directory that isn't empty.
  362. * @G_IO_ERROR_NOT_REGULAR_FILE: File is not a regular file.
  363. * @G_IO_ERROR_NOT_SYMBOLIC_LINK: File is not a symbolic link.
  364. * @G_IO_ERROR_NOT_MOUNTABLE_FILE: File cannot be mounted.
  365. * @G_IO_ERROR_FILENAME_TOO_LONG: Filename is too many characters.
  366. * @G_IO_ERROR_INVALID_FILENAME: Filename is invalid or contains invalid characters.
  367. * @G_IO_ERROR_TOO_MANY_LINKS: File contains too many symbolic links.
  368. * @G_IO_ERROR_NO_SPACE: No space left on drive.
  369. * @G_IO_ERROR_INVALID_ARGUMENT: Invalid argument.
  370. * @G_IO_ERROR_PERMISSION_DENIED: Permission denied.
  371. * @G_IO_ERROR_NOT_SUPPORTED: Operation not supported for the current backend.
  372. * @G_IO_ERROR_NOT_MOUNTED: File isn't mounted.
  373. * @G_IO_ERROR_ALREADY_MOUNTED: File is already mounted.
  374. * @G_IO_ERROR_CLOSED: File was closed.
  375. * @G_IO_ERROR_CANCELLED: Operation was cancelled. See #GCancellable.
  376. * @G_IO_ERROR_PENDING: Operations are still pending.
  377. * @G_IO_ERROR_READ_ONLY: File is read only.
  378. * @G_IO_ERROR_CANT_CREATE_BACKUP: Backup couldn't be created.
  379. * @G_IO_ERROR_WRONG_ETAG: File's Entity Tag was incorrect.
  380. * @G_IO_ERROR_TIMED_OUT: Operation timed out.
  381. * @G_IO_ERROR_WOULD_RECURSE: Operation would be recursive.
  382. * @G_IO_ERROR_BUSY: File is busy.
  383. * @G_IO_ERROR_WOULD_BLOCK: Operation would block.
  384. * @G_IO_ERROR_HOST_NOT_FOUND: Host couldn't be found (remote operations).
  385. * @G_IO_ERROR_WOULD_MERGE: Operation would merge files.
  386. * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has
  387. * already interacted with the user. Do not display any error dialog.
  388. * @G_IO_ERROR_TOO_MANY_OPEN_FILES: The current process has too many files
  389. * open and can't open any more. Duplicate descriptors do count toward
  390. * this limit. Since 2.20
  391. * @G_IO_ERROR_NOT_INITIALIZED: The object has not been initialized. Since 2.22
  392. * @G_IO_ERROR_ADDRESS_IN_USE: The requested address is already in use. Since 2.22
  393. * @G_IO_ERROR_PARTIAL_INPUT: Need more input to finish operation. Since 2.24
  394. * @G_IO_ERROR_INVALID_DATA: There input data was invalid. Since 2.24
  395. * @G_IO_ERROR_DBUS_ERROR: A remote object generated an error that
  396. * doesn't correspond to a locally registered #GError error
  397. * domain. Use g_dbus_error_get_remote_error() to extract the D-Bus
  398. * error name and g_dbus_error_strip_remote_error() to fix up the
  399. * message so it matches what was received on the wire. Since 2.26.
  400. * @G_IO_ERROR_HOST_UNREACHABLE: Host unreachable. Since 2.26
  401. * @G_IO_ERROR_NETWORK_UNREACHABLE: Network unreachable. Since 2.26
  402. * @G_IO_ERROR_CONNECTION_REFUSED: Connection refused. Since 2.26
  403. * @G_IO_ERROR_PROXY_FAILED: Connection to proxy server failed. Since 2.26
  404. * @G_IO_ERROR_PROXY_AUTH_FAILED: Proxy authentication failed. Since 2.26
  405. * @G_IO_ERROR_PROXY_NEED_AUTH: Proxy server needs authentication. Since 2.26
  406. * @G_IO_ERROR_PROXY_NOT_ALLOWED: Proxy connection is not allowed by ruleset.
  407. * Since 2.26
  408. *
  409. * Error codes returned by GIO functions.
  410. *
  411. **/
  412. typedef enum {
  413. G_IO_ERROR_FAILED,
  414. G_IO_ERROR_NOT_FOUND,
  415. G_IO_ERROR_EXISTS,
  416. G_IO_ERROR_IS_DIRECTORY,
  417. G_IO_ERROR_NOT_DIRECTORY,
  418. G_IO_ERROR_NOT_EMPTY,
  419. G_IO_ERROR_NOT_REGULAR_FILE,
  420. G_IO_ERROR_NOT_SYMBOLIC_LINK,
  421. G_IO_ERROR_NOT_MOUNTABLE_FILE,
  422. G_IO_ERROR_FILENAME_TOO_LONG,
  423. G_IO_ERROR_INVALID_FILENAME,
  424. G_IO_ERROR_TOO_MANY_LINKS,
  425. G_IO_ERROR_NO_SPACE,
  426. G_IO_ERROR_INVALID_ARGUMENT,
  427. G_IO_ERROR_PERMISSION_DENIED,
  428. G_IO_ERROR_NOT_SUPPORTED,
  429. G_IO_ERROR_NOT_MOUNTED,
  430. G_IO_ERROR_ALREADY_MOUNTED,
  431. G_IO_ERROR_CLOSED,
  432. G_IO_ERROR_CANCELLED,
  433. G_IO_ERROR_PENDING,
  434. G_IO_ERROR_READ_ONLY,
  435. G_IO_ERROR_CANT_CREATE_BACKUP,
  436. G_IO_ERROR_WRONG_ETAG,
  437. G_IO_ERROR_TIMED_OUT,
  438. G_IO_ERROR_WOULD_RECURSE,
  439. G_IO_ERROR_BUSY,
  440. G_IO_ERROR_WOULD_BLOCK,
  441. G_IO_ERROR_HOST_NOT_FOUND,
  442. G_IO_ERROR_WOULD_MERGE,
  443. G_IO_ERROR_FAILED_HANDLED,
  444. G_IO_ERROR_TOO_MANY_OPEN_FILES,
  445. G_IO_ERROR_NOT_INITIALIZED,
  446. G_IO_ERROR_ADDRESS_IN_USE,
  447. G_IO_ERROR_PARTIAL_INPUT,
  448. G_IO_ERROR_INVALID_DATA,
  449. G_IO_ERROR_DBUS_ERROR,
  450. G_IO_ERROR_HOST_UNREACHABLE,
  451. G_IO_ERROR_NETWORK_UNREACHABLE,
  452. G_IO_ERROR_CONNECTION_REFUSED,
  453. G_IO_ERROR_PROXY_FAILED,
  454. G_IO_ERROR_PROXY_AUTH_FAILED,
  455. G_IO_ERROR_PROXY_NEED_AUTH,
  456. G_IO_ERROR_PROXY_NOT_ALLOWED
  457. } GIOErrorEnum;
  458. /**
  459. * GAskPasswordFlags:
  460. * @G_ASK_PASSWORD_NEED_PASSWORD: operation requires a password.
  461. * @G_ASK_PASSWORD_NEED_USERNAME: operation requires a username.
  462. * @G_ASK_PASSWORD_NEED_DOMAIN: operation requires a domain.
  463. * @G_ASK_PASSWORD_SAVING_SUPPORTED: operation supports saving settings.
  464. * @G_ASK_PASSWORD_ANONYMOUS_SUPPORTED: operation supports anonymous users.
  465. *
  466. * #GAskPasswordFlags are used to request specific information from the
  467. * user, or to notify the user of their choices in an authentication
  468. * situation.
  469. **/
  470. typedef enum {
  471. G_ASK_PASSWORD_NEED_PASSWORD = (1 << 0),
  472. G_ASK_PASSWORD_NEED_USERNAME = (1 << 1),
  473. G_ASK_PASSWORD_NEED_DOMAIN = (1 << 2),
  474. G_ASK_PASSWORD_SAVING_SUPPORTED = (1 << 3),
  475. G_ASK_PASSWORD_ANONYMOUS_SUPPORTED = (1 << 4)
  476. } GAskPasswordFlags;
  477. /**
  478. * GPasswordSave:
  479. * @G_PASSWORD_SAVE_NEVER: never save a password.
  480. * @G_PASSWORD_SAVE_FOR_SESSION: save a password for the session.
  481. * @G_PASSWORD_SAVE_PERMANENTLY: save a password permanently.
  482. *
  483. * #GPasswordSave is used to indicate the lifespan of a saved password.
  484. *
  485. * #Gvfs stores passwords in the Gnome keyring when this flag allows it
  486. * to, and later retrieves it again from there.
  487. **/
  488. typedef enum {
  489. G_PASSWORD_SAVE_NEVER,
  490. G_PASSWORD_SAVE_FOR_SESSION,
  491. G_PASSWORD_SAVE_PERMANENTLY
  492. } GPasswordSave;
  493. /**
  494. * GMountOperationResult:
  495. * @G_MOUNT_OPERATION_HANDLED: The request was fulfilled and the
  496. * user specified data is now available
  497. * @G_MOUNT_OPERATION_ABORTED: The user requested the mount operation
  498. * to be aborted
  499. * @G_MOUNT_OPERATION_UNHANDLED: The request was unhandled (i.e. not
  500. * implemented)
  501. *
  502. * #GMountOperationResult is returned as a result when a request for
  503. * information is send by the mounting operation.
  504. **/
  505. typedef enum {
  506. G_MOUNT_OPERATION_HANDLED,
  507. G_MOUNT_OPERATION_ABORTED,
  508. G_MOUNT_OPERATION_UNHANDLED
  509. } GMountOperationResult;
  510. /**
  511. * GOutputStreamSpliceFlags:
  512. * @G_OUTPUT_STREAM_SPLICE_NONE: Do not close either stream.
  513. * @G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE: Close the source stream after
  514. * the splice.
  515. * @G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET: Close the target stream after
  516. * the splice.
  517. *
  518. * GOutputStreamSpliceFlags determine how streams should be spliced.
  519. **/
  520. typedef enum {
  521. G_OUTPUT_STREAM_SPLICE_NONE = 0,
  522. G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE = (1 << 0),
  523. G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET = (1 << 1)
  524. } GOutputStreamSpliceFlags;
  525. /**
  526. * GEmblemOrigin:
  527. * @G_EMBLEM_ORIGIN_UNKNOWN: Emblem of unknown origin
  528. * @G_EMBLEM_ORIGIN_DEVICE: Emblem adds device-specific information
  529. * @G_EMBLEM_ORIGIN_LIVEMETADATA: Emblem depicts live metadata, such as "readonly"
  530. * @G_EMBLEM_ORIGIN_TAG: Emblem comes from a user-defined tag, e.g. set by nautilus (in the future)
  531. *
  532. * GEmblemOrigin is used to add information about the origin of the emblem
  533. * to #GEmblem.
  534. *
  535. * Since: 2.18
  536. */
  537. typedef enum {
  538. G_EMBLEM_ORIGIN_UNKNOWN,
  539. G_EMBLEM_ORIGIN_DEVICE,
  540. G_EMBLEM_ORIGIN_LIVEMETADATA,
  541. G_EMBLEM_ORIGIN_TAG
  542. } GEmblemOrigin;
  543. /**
  544. * GResolverError:
  545. * @G_RESOLVER_ERROR_NOT_FOUND: the requested name/address/service was not
  546. * found
  547. * @G_RESOLVER_ERROR_TEMPORARY_FAILURE: the requested information could not
  548. * be looked up due to a network error or similar problem
  549. * @G_RESOLVER_ERROR_INTERNAL: unknown error
  550. *
  551. * An error code used with %G_RESOLVER_ERROR in a #GError returned
  552. * from a #GResolver routine.
  553. *
  554. * Since: 2.22
  555. */
  556. typedef enum {
  557. G_RESOLVER_ERROR_NOT_FOUND,
  558. G_RESOLVER_ERROR_TEMPORARY_FAILURE,
  559. G_RESOLVER_ERROR_INTERNAL
  560. } GResolverError;
  561. /**
  562. * GSocketFamily:
  563. * @G_SOCKET_FAMILY_INVALID: no address family
  564. * @G_SOCKET_FAMILY_IPV4: the IPv4 family
  565. * @G_SOCKET_FAMILY_IPV6: the IPv6 family
  566. * @G_SOCKET_FAMILY_UNIX: the UNIX domain family
  567. *
  568. * The protocol family of a #GSocketAddress. (These values are
  569. * identical to the system defines %AF_INET, %AF_INET6 and %AF_UNIX,
  570. * if available.)
  571. *
  572. * Since: 2.22
  573. */
  574. typedef enum {
  575. G_SOCKET_FAMILY_INVALID,
  576. #ifdef GLIB_SYSDEF_AF_UNIX
  577. G_SOCKET_FAMILY_UNIX = GLIB_SYSDEF_AF_UNIX,
  578. #endif
  579. G_SOCKET_FAMILY_IPV4 = GLIB_SYSDEF_AF_INET,
  580. G_SOCKET_FAMILY_IPV6 = GLIB_SYSDEF_AF_INET6
  581. } GSocketFamily;
  582. /**
  583. * GSocketType:
  584. * @G_SOCKET_TYPE_INVALID: Type unknown or wrong
  585. * @G_SOCKET_TYPE_STREAM: Reliable connection-based byte streams (e.g. TCP).
  586. * @G_SOCKET_TYPE_DATAGRAM: Connectionless, unreliable datagram passing.
  587. * (e.g. UDP)
  588. * @G_SOCKET_TYPE_SEQPACKET: Reliable connection-based passing of datagrams
  589. * of fixed maximum length (e.g. SCTP).
  590. *
  591. * Flags used when creating a #GSocket. Some protocols may not implement
  592. * all the socket types.
  593. *
  594. * Since: 2.22
  595. */
  596. typedef enum
  597. {
  598. G_SOCKET_TYPE_INVALID,
  599. G_SOCKET_TYPE_STREAM,
  600. G_SOCKET_TYPE_DATAGRAM,
  601. G_SOCKET_TYPE_SEQPACKET
  602. } GSocketType;
  603. /**
  604. * GSocketMsgFlags:
  605. * @G_SOCKET_MSG_NONE: No flags.
  606. * @G_SOCKET_MSG_OOB: Request to send/receive out of band data.
  607. * @G_SOCKET_MSG_PEEK: Read data from the socket without removing it from
  608. * the queue.
  609. * @G_SOCKET_MSG_DONTROUTE: Don't use a gateway to send out the packet,
  610. * only send to hosts on directly connected networks.
  611. *
  612. * Flags used in g_socket_receive_message() and g_socket_send_message().
  613. * The flags listed in the enum are some commonly available flags, but the
  614. * values used for them are the same as on the platform, and any other flags
  615. * are passed in/out as is. So to use a platform specific flag, just include
  616. * the right system header and pass in the flag.
  617. *
  618. * Since: 2.22
  619. */
  620. typedef enum
  621. {
  622. G_SOCKET_MSG_NONE,
  623. G_SOCKET_MSG_OOB = GLIB_SYSDEF_MSG_OOB,
  624. G_SOCKET_MSG_PEEK = GLIB_SYSDEF_MSG_PEEK,
  625. G_SOCKET_MSG_DONTROUTE = GLIB_SYSDEF_MSG_DONTROUTE
  626. } GSocketMsgFlags;
  627. /**
  628. * GSocketProtocol:
  629. * @G_SOCKET_PROTOCOL_UNKNOWN: The protocol type is unknown
  630. * @G_SOCKET_PROTOCOL_DEFAULT: The default protocol for the family/type
  631. * @G_SOCKET_PROTOCOL_TCP: TCP over IP
  632. * @G_SOCKET_PROTOCOL_UDP: UDP over IP
  633. * @G_SOCKET_PROTOCOL_SCTP: SCTP over IP
  634. *
  635. * A protocol identifier is specified when creating a #GSocket, which is a
  636. * family/type specific identifier, where 0 means the default protocol for
  637. * the particular family/type.
  638. *
  639. * This enum contains a set of commonly available and used protocols. You
  640. * can also pass any other identifiers handled by the platform in order to
  641. * use protocols not listed here.
  642. *
  643. * Since: 2.22
  644. */
  645. typedef enum {
  646. G_SOCKET_PROTOCOL_UNKNOWN = -1,
  647. G_SOCKET_PROTOCOL_DEFAULT = 0,
  648. G_SOCKET_PROTOCOL_TCP = 6,
  649. G_SOCKET_PROTOCOL_UDP = 17,
  650. G_SOCKET_PROTOCOL_SCTP = 132
  651. } GSocketProtocol;
  652. /**
  653. * GZlibCompressorFormat:
  654. * @G_ZLIB_COMPRESSOR_FORMAT_ZLIB: deflate compression with zlib header
  655. * @G_ZLIB_COMPRESSOR_FORMAT_GZIP: gzip file format
  656. * @G_ZLIB_COMPRESSOR_FORMAT_RAW: deflate compression with no header
  657. *
  658. * Used to select the type of data format to use for #GZlibDecompressor
  659. * and #GZlibCompressor.
  660. *
  661. * Since: 2.24
  662. */
  663. typedef enum {
  664. G_ZLIB_COMPRESSOR_FORMAT_ZLIB,
  665. G_ZLIB_COMPRESSOR_FORMAT_GZIP,
  666. G_ZLIB_COMPRESSOR_FORMAT_RAW
  667. } GZlibCompressorFormat;
  668. /**
  669. * GUnixSocketAddressType:
  670. * @G_UNIX_SOCKET_ADDRESS_INVALID: invalid
  671. * @G_UNIX_SOCKET_ADDRESS_ANONYMOUS: anonymous
  672. * @G_UNIX_SOCKET_ADDRESS_PATH: a filesystem path
  673. * @G_UNIX_SOCKET_ADDRESS_ABSTRACT: an abstract name
  674. * @G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED: an abstract name, 0-padded
  675. * to the full length of a unix socket name
  676. *
  677. * The type of name used by a #GUnixSocketAddress.
  678. * %G_UNIX_SOCKET_ADDRESS_PATH indicates a traditional unix domain
  679. * socket bound to a filesystem path. %G_UNIX_SOCKET_ADDRESS_ANONYMOUS
  680. * indicates a socket not bound to any name (eg, a client-side socket,
  681. * or a socket created with socketpair()).
  682. *
  683. * For abstract sockets, there are two incompatible ways of naming
  684. * them: the man pages suggest using the entire <literal>struct
  685. * sockaddr_un</literal> as the name, padding the unused parts of the
  686. * %sun_path field with zeroes; this corresponds to
  687. * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED. However, many programs
  688. * instead just use a portion of %sun_path, and pass an appropriate
  689. * smaller length to bind() or connect(). This is
  690. * %G_UNIX_SOCKET_ADDRESS_ABSTRACT.
  691. *
  692. * Since: 2.26
  693. */
  694. typedef enum {
  695. G_UNIX_SOCKET_ADDRESS_INVALID,
  696. G_UNIX_SOCKET_ADDRESS_ANONYMOUS,
  697. G_UNIX_SOCKET_ADDRESS_PATH,
  698. G_UNIX_SOCKET_ADDRESS_ABSTRACT,
  699. G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED
  700. } GUnixSocketAddressType;
  701. /**
  702. * GBusType:
  703. * @G_BUS_TYPE_STARTER: An alias for the message bus that activated the process, if any.
  704. * @G_BUS_TYPE_NONE: Not a message bus.
  705. * @G_BUS_TYPE_SYSTEM: The system-wide message bus.
  706. * @G_BUS_TYPE_SESSION: The login session message bus.
  707. *
  708. * An enumeration for well-known message buses.
  709. *
  710. * Since: 2.26
  711. */
  712. typedef enum
  713. {
  714. G_BUS_TYPE_STARTER = -1,
  715. G_BUS_TYPE_NONE = 0,
  716. G_BUS_TYPE_SYSTEM = 1,
  717. G_BUS_TYPE_SESSION = 2
  718. } GBusType;
  719. /**
  720. * GBusNameOwnerFlags:
  721. * @G_BUS_NAME_OWNER_FLAGS_NONE: No flags set.
  722. * @G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT: Allow another message bus connection to claim the the name.
  723. * @G_BUS_NAME_OWNER_FLAGS_REPLACE: If another message bus connection owns the name and have
  724. * specified #G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, then take the name from the other connection.
  725. *
  726. * Flags used in g_bus_own_name().
  727. *
  728. * Since: 2.26
  729. */
  730. typedef enum
  731. {
  732. G_BUS_NAME_OWNER_FLAGS_NONE = 0, /*< nick=none >*/
  733. G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT = (1<<0), /*< nick=allow-replacement >*/
  734. G_BUS_NAME_OWNER_FLAGS_REPLACE = (1<<1) /*< nick=replace >*/
  735. } GBusNameOwnerFlags;
  736. /**
  737. * GBusNameWatcherFlags:
  738. * @G_BUS_NAME_WATCHER_FLAGS_NONE: No flags set.
  739. * @G_BUS_NAME_WATCHER_FLAGS_AUTO_START: If no-one owns the name when
  740. * beginning to watch the name, ask the bus to launch an owner for the
  741. * name.
  742. *
  743. * Flags used in g_bus_watch_name().
  744. *
  745. * Since: 2.26
  746. */
  747. typedef enum
  748. {
  749. G_BUS_NAME_WATCHER_FLAGS_NONE = 0,
  750. G_BUS_NAME_WATCHER_FLAGS_AUTO_START = (1<<0)
  751. } GBusNameWatcherFlags;
  752. /**
  753. * GDBusProxyFlags:
  754. * @G_DBUS_PROXY_FLAGS_NONE: No flags set.
  755. * @G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES: Don't load properties.
  756. * @G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS: Don't connect to signals on the remote object.
  757. * @G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START: If not set and the proxy if for a well-known name,
  758. * then request the bus to launch an owner for the name if no-one owns the name. This flag can
  759. * only be used in proxies for well-known names.
  760. *
  761. * Flags used when constructing an instance of a #GDBusProxy derived class.
  762. *
  763. * Since: 2.26
  764. */
  765. typedef enum
  766. {
  767. G_DBUS_PROXY_FLAGS_NONE = 0,
  768. G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES = (1<<0),
  769. G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS = (1<<1),
  770. G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START = (1<<2)
  771. } GDBusProxyFlags;
  772. /**
  773. * GDBusError:
  774. * @G_DBUS_ERROR_FAILED:
  775. * A generic error; "something went wrong" - see the error message for
  776. * more.
  777. * @G_DBUS_ERROR_NO_MEMORY:
  778. * There was not enough memory to complete an operation.
  779. * @G_DBUS_ERROR_SERVICE_UNKNOWN:
  780. * The bus doesn't know how to launch a service to supply the bus name
  781. * you wanted.
  782. * @G_DBUS_ERROR_NAME_HAS_NO_OWNER:
  783. * The bus name you referenced doesn't exist (i.e. no application owns
  784. * it).
  785. * @G_DBUS_ERROR_NO_REPLY:
  786. * No reply to a message expecting one, usually means a timeout occurred.
  787. * @G_DBUS_ERROR_IO_ERROR:
  788. * Something went wrong reading or writing to a socket, for example.
  789. * @G_DBUS_ERROR_BAD_ADDRESS:
  790. * A D-Bus bus address was malformed.
  791. * @G_DBUS_ERROR_NOT_SUPPORTED:
  792. * Requested operation isn't supported (like ENOSYS on UNIX).
  793. * @G_DBUS_ERROR_LIMITS_EXCEEDED:
  794. * Some limited resource is exhausted.
  795. * @G_DBUS_ERROR_ACCESS_DENIED:
  796. * Security restrictions don't allow doing what you're trying to do.
  797. * @G_DBUS_ERROR_AUTH_FAILED:
  798. * Authentication didn't work.
  799. * @G_DBUS_ERROR_NO_SERVER:
  800. * Unable to connect to server (probably caused by ECONNREFUSED on a
  801. * socket).
  802. * @G_DBUS_ERROR_TIMEOUT:
  803. * Certain timeout errors, possibly ETIMEDOUT on a socket. Note that
  804. * %G_DBUS_ERROR_NO_REPLY is used for message reply timeouts. Warning:
  805. * this is confusingly-named given that %G_DBUS_ERROR_TIMED_OUT also
  806. * exists. We can't fix it for compatibility reasons so just be
  807. * careful.
  808. * @G_DBUS_ERROR_NO_NETWORK:
  809. * No network access (probably ENETUNREACH on a socket).
  810. * @G_DBUS_ERROR_ADDRESS_IN_USE:
  811. * Can't bind a socket since its address is in use (i.e. EADDRINUSE).
  812. * @G_DBUS_ERROR_DISCONNECTED:
  813. * The connection is disconnected and you're trying to use it.
  814. * @G_DBUS_ERROR_INVALID_ARGS:
  815. * Invalid arguments passed to a method call.
  816. * @G_DBUS_ERROR_FILE_NOT_FOUND:
  817. * Missing file.
  818. * @G_DBUS_ERROR_FILE_EXISTS:
  819. * Existing file and the operation you're using does not silently overwrite.
  820. * @G_DBUS_ERROR_UNKNOWN_METHOD:
  821. * Method name you invoked isn't known by the object you invoked it on.
  822. * @G_DBUS_ERROR_TIMED_OUT:
  823. * Certain timeout errors, e.g. while starting a service. Warning: this is
  824. * confusingly-named given that %G_DBUS_ERROR_TIMEOUT also exists. We
  825. * can't fix it for compatibility reasons so just be careful.
  826. * @G_DBUS_ERROR_MATCH_RULE_NOT_FOUND:
  827. * Tried to remove or modify a match rule that didn't exist.
  828. * @G_DBUS_ERROR_MATCH_RULE_INVALID:
  829. * The match rule isn't syntactically valid.
  830. * @G_DBUS_ERROR_SPAWN_EXEC_FAILED:
  831. * While starting a new process, the exec() call failed.
  832. * @G_DBUS_ERROR_SPAWN_FORK_FAILED:
  833. * While starting a new process, the fork() call failed.
  834. * @G_DBUS_ERROR_SPAWN_CHILD_EXITED:
  835. * While starting a new process, the child exited with a status code.
  836. * @G_DBUS_ERROR_SPAWN_CHILD_SIGNALED:
  837. * While starting a new process, the child exited on a signal.
  838. * @G_DBUS_ERROR_SPAWN_FAILED:
  839. * While starting a new process, something went wrong.
  840. * @G_DBUS_ERROR_SPAWN_SETUP_FAILED:
  841. * We failed to setup the environment correctly.
  842. * @G_DBUS_ERROR_SPAWN_CONFIG_INVALID:
  843. * We failed to setup the config parser correctly.
  844. * @G_DBUS_ERROR_SPAWN_SERVICE_INVALID:
  845. * Bus name was not valid.
  846. * @G_DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND:
  847. * Service file not found in system-services directory.
  848. * @G_DBUS_ERROR_SPAWN_PERMISSIONS_INVALID:
  849. * Permissions are incorrect on the setuid helper.
  850. * @G_DBUS_ERROR_SPAWN_FILE_INVALID:
  851. * Service file invalid (Name, User or Exec missing).
  852. * @G_DBUS_ERROR_SPAWN_NO_MEMORY:
  853. * Tried to get a UNIX process ID and it wasn't available.
  854. * @G_DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN:
  855. * Tried to get a UNIX process ID and it wasn't available.
  856. * @G_DBUS_ERROR_INVALID_SIGNATURE:
  857. * A type signature is not valid.
  858. * @G_DBUS_ERROR_INVALID_FILE_CONTENT:
  859. * A file contains invalid syntax or is otherwise broken.
  860. * @G_DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN:
  861. * Asked for SELinux security context and it wasn't available.
  862. * @G_DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN:
  863. * Asked for ADT audit data and it wasn't available.
  864. * @G_DBUS_ERROR_OBJECT_PATH_IN_USE:
  865. * There's already an object with the requested object path.
  866. *
  867. * Error codes for the %G_DBUS_ERROR error domain.
  868. *
  869. * Since: 2.26
  870. */
  871. typedef enum
  872. {
  873. /* Well-known errors in the org.freedesktop.DBus.Error namespace */
  874. G_DBUS_ERROR_FAILED, /* org.freedesktop.DBus.Error.Failed */
  875. G_DBUS_ERROR_NO_MEMORY, /* org.freedesktop.DBus.Error.NoMemory */
  876. G_DBUS_ERROR_SERVICE_UNKNOWN, /* org.freedesktop.DBus.Error.ServiceUnknown */
  877. G_DBUS_ERROR_NAME_HAS_NO_OWNER, /* org.freedesktop.DBus.Error.NameHasNoOwner */
  878. G_DBUS_ERROR_NO_REPLY, /* org.freedesktop.DBus.Error.NoReply */
  879. G_DBUS_ERROR_IO_ERROR, /* org.freedesktop.DBus.Error.IOError */
  880. G_DBUS_ERROR_BAD_ADDRESS, /* org.freedesktop.DBus.Error.BadAddress */
  881. G_DBUS_ERROR_NOT_SUPPORTED, /* org.freedesktop.DBus.Error.NotSupported */
  882. G_DBUS_ERROR_LIMITS_EXCEEDED, /* org.freedesktop.DBus.Error.LimitsExceeded */
  883. G_DBUS_ERROR_ACCESS_DENIED, /* org.freedesktop.DBus.Error.AccessDenied */
  884. G_DBUS_ERROR_AUTH_FAILED, /* org.freedesktop.DBus.Error.AuthFailed */
  885. G_DBUS_ERROR_NO_SERVER, /* org.freedesktop.DBus.Error.NoServer */
  886. G_DBUS_ERROR_TIMEOUT, /* org.freedesktop.DBus.Error.Timeout */
  887. G_DBUS_ERROR_NO_NETWORK, /* org.freedesktop.DBus.Error.NoNetwork */
  888. G_DBUS_ERROR_ADDRESS_IN_USE, /* org.freedesktop.DBus.Error.AddressInUse */
  889. G_DBUS_ERROR_DISCONNECTED, /* org.freedesktop.DBus.Error.Disconnected */
  890. G_DBUS_ERROR_INVALID_ARGS, /* org.freedesktop.DBus.Error.InvalidArgs */
  891. G_DBUS_ERROR_FILE_NOT_FOUND, /* org.freedesktop.DBus.Error.FileNotFound */
  892. G_DBUS_ERROR_FILE_EXISTS, /* org.freedesktop.DBus.Error.FileExists */
  893. G_DBUS_ERROR_UNKNOWN_METHOD, /* org.freedesktop.DBus.Error.UnknownMethod */
  894. G_DBUS_ERROR_TIMED_OUT, /* org.freedesktop.DBus.Error.TimedOut */
  895. G_DBUS_ERROR_MATCH_RULE_NOT_FOUND, /* org.freedesktop.DBus.Error.MatchRuleNotFound */
  896. G_DBUS_ERROR_MATCH_RULE_INVALID, /* org.freedesktop.DBus.Error.MatchRuleInvalid */
  897. G_DBUS_ERROR_SPAWN_EXEC_FAILED, /* org.freedesktop.DBus.Error.Spawn.ExecFailed */
  898. G_DBUS_ERROR_SPAWN_FORK_FAILED, /* org.freedesktop.DBus.Error.Spawn.ForkFailed */
  899. G_DBUS_ERROR_SPAWN_CHILD_EXITED, /* org.freedesktop.DBus.Error.Spawn.ChildExited */
  900. G_DBUS_ERROR_SPAWN_CHILD_SIGNALED, /* org.freedesktop.DBus.Error.Spawn.ChildSignaled */
  901. G_DBUS_ERROR_SPAWN_FAILED, /* org.freedesktop.DBus.Error.Spawn.Failed */
  902. G_DBUS_ERROR_SPAWN_SETUP_FAILED, /* org.freedesktop.DBus.Error.Spawn.FailedToSetup */
  903. G_DBUS_ERROR_SPAWN_CONFIG_INVALID, /* org.freedesktop.DBus.Error.Spawn.ConfigInvalid */
  904. G_DBUS_ERROR_SPAWN_SERVICE_INVALID, /* org.freedesktop.DBus.Error.Spawn.ServiceNotValid */
  905. G_DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND, /* org.freedesktop.DBus.Error.Spawn.ServiceNotFound */
  906. G_DBUS_ERROR_SPAWN_PERMISSIONS_INVALID, /* org.freedesktop.DBus.Error.Spawn.PermissionsInvalid */
  907. G_DBUS_ERROR_SPAWN_FILE_INVALID, /* org.freedesktop.DBus.Error.Spawn.FileInvalid */
  908. G_DBUS_ERROR_SPAWN_NO_MEMORY, /* org.freedesktop.DBus.Error.Spawn.NoMemory */
  909. G_DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN, /* org.freedesktop.DBus.Error.UnixProcessIdUnknown */
  910. G_DBUS_ERROR_INVALID_SIGNATURE, /* org.freedesktop.DBus.Error.InvalidSignature */
  911. G_DBUS_ERROR_INVALID_FILE_CONTENT, /* org.freedesktop.DBus.Error.InvalidFileContent */
  912. G_DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN, /* org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown */
  913. G_DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN, /* org.freedesktop.DBus.Error.AdtAuditDataUnknown */
  914. G_DBUS_ERROR_OBJECT_PATH_IN_USE /* org.freedesktop.DBus.Error.ObjectPathInUse */
  915. } GDBusError;
  916. /* Remember to update g_dbus_error_quark() in gdbuserror.c if you extend this enumeration */
  917. /**
  918. * GDBusConnectionFlags:
  919. * @G_DBUS_CONNECTION_FLAGS_NONE: No flags set.
  920. * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT: Perform authentication against server.
  921. * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER: Perform authentication against client.
  922. * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: When
  923. * authenticating as a server, allow the anonymous authentication
  924. * method.
  925. * @G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION: Pass this flag if connecting to a peer that is a
  926. * message bus. This means that the Hello() method will be invoked as part of the connection setup.
  927. * @G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING: If set, processing of D-Bus messages is
  928. * delayed until g_dbus_connection_start_message_processing() is called.
  929. *
  930. * Flags used when creating a new #GDBusConnection.
  931. *
  932. * Since: 2.26
  933. */
  934. typedef enum {
  935. G_DBUS_CONNECTION_FLAGS_NONE = 0,
  936. G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT = (1<<0),
  937. G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER = (1<<1),
  938. G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS = (1<<2),
  939. G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION = (1<<3),
  940. G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING = (1<<4)
  941. } GDBusConnectionFlags;
  942. /**
  943. * GDBusCapabilityFlags:
  944. * @G_DBUS_CAPABILITY_FLAGS_NONE: No flags set.
  945. * @G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING: The connection
  946. * supports exchanging UNIX file descriptors with the remote peer.
  947. *
  948. * Capabilities negotiated with the remote peer.
  949. *
  950. * Since: 2.26
  951. */
  952. typedef enum {
  953. G_DBUS_CAPABILITY_FLAGS_NONE = 0,
  954. G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING = (1<<0)
  955. } GDBusCapabilityFlags;
  956. /**
  957. * GDBusCallFlags:
  958. * @G_DBUS_CALL_FLAGS_NONE: No flags set.
  959. * @G_DBUS_CALL_FLAGS_NO_AUTO_START: The bus must not launch
  960. * an owner for the destination name in response to this method
  961. * invocation.
  962. *
  963. * Flags used in g_dbus_connection_call() and similar APIs.
  964. *
  965. * Since: 2.26
  966. */
  967. typedef enum {
  968. G_DBUS_CALL_FLAGS_NONE = 0,
  969. G_DBUS_CALL_FLAGS_NO_AUTO_START = (1<<0)
  970. } GDBusCallFlags;
  971. /**
  972. * GDBusMessageType:
  973. * @G_DBUS_MESSAGE_TYPE_INVALID: Message is of invalid type.
  974. * @G_DBUS_MESSAGE_TYPE_METHOD_CALL: Method call.
  975. * @G_DBUS_MESSAGE_TYPE_METHOD_RETURN: Method reply.
  976. * @G_DBUS_MESSAGE_TYPE_ERROR: Error reply.
  977. * @G_DBUS_MESSAGE_TYPE_SIGNAL: Signal emission.
  978. *
  979. * Message types used in #GDBusMessage.
  980. *
  981. * Since: 2.26
  982. */
  983. typedef enum {
  984. G_DBUS_MESSAGE_TYPE_INVALID,
  985. G_DBUS_MESSAGE_TYPE_METHOD_CALL,
  986. G_DBUS_MESSAGE_TYPE_METHOD_RETURN,
  987. G_DBUS_MESSAGE_TYPE_ERROR,
  988. G_DBUS_MESSAGE_TYPE_SIGNAL
  989. } GDBusMessageType;
  990. /**
  991. * GDBusMessageFlags:
  992. * @G_DBUS_MESSAGE_FLAGS_NONE: No flags set.
  993. * @G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED: A reply is not expected.
  994. * @G_DBUS_MESSAGE_FLAGS_NO_AUTO_START: The bus must not launch an
  995. * owner for the destination name in response to this message.
  996. *
  997. * Message flags used in #GDBusMessage.
  998. *
  999. * Since: 2.26
  1000. */
  1001. typedef enum {
  1002. G_DBUS_MESSAGE_FLAGS_NONE = 0,
  1003. G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED = (1<<0),
  1004. G_DBUS_MESSAGE_FLAGS_NO_AUTO_START = (1<<1)
  1005. } GDBusMessageFlags;
  1006. /**
  1007. * GDBusMessageHeaderField:
  1008. * @G_DBUS_MESSAGE_HEADER_FIELD_INVALID: Not a valid header field.
  1009. * @G_DBUS_MESSAGE_HEADER_FIELD_PATH: The object path.
  1010. * @G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE: The interface name.
  1011. * @G_DBUS_MESSAGE_HEADER_FIELD_MEMBER: The method or signal name.
  1012. * @G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME: The name of the error that occurred.
  1013. * @G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL: The serial number the message is a reply to.
  1014. * @G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION: The name the message is intended for.
  1015. * @G_DBUS_MESSAGE_HEADER_FIELD_SENDER: Unique name of the sender of the message (filled in by the bus).
  1016. * @G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE: The signature of the message body.
  1017. * @G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS: The number of UNIX file descriptors that accompany the message.
  1018. *
  1019. * Header fields used in #GDBusMessage.
  1020. *
  1021. * Since: 2.26
  1022. */
  1023. typedef enum {
  1024. G_DBUS_MESSAGE_HEADER_FIELD_INVALID,
  1025. G_DBUS_MESSAGE_HEADER_FIELD_PATH,
  1026. G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE,
  1027. G_DBUS_MESSAGE_HEADER_FIELD_MEMBER,
  1028. G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME,
  1029. G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL,
  1030. G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION,
  1031. G_DBUS_MESSAGE_HEADER_FIELD_SENDER,
  1032. G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE,
  1033. G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS
  1034. } GDBusMessageHeaderField;
  1035. /**
  1036. * GDBusPropertyInfoFlags:
  1037. * @G_DBUS_PROPERTY_INFO_FLAGS_NONE: No flags set.
  1038. * @G_DBUS_PROPERTY_INFO_FLAGS_READABLE: Property is readable.
  1039. * @G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE: Property is writable.
  1040. *
  1041. * Flags describing the access control of a D-Bus property.
  1042. *
  1043. * Since: 2.26
  1044. */
  1045. typedef enum
  1046. {
  1047. G_DBUS_PROPERTY_INFO_FLAGS_NONE = 0,
  1048. G_DBUS_PROPERTY_INFO_FLAGS_READABLE = (1<<0),
  1049. G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE = (1<<1)
  1050. } GDBusPropertyInfoFlags;
  1051. /**
  1052. * GDBusSubtreeFlags:
  1053. * @G_DBUS_SUBTREE_FLAGS_NONE: No flags set.
  1054. * @G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES: Method calls to objects not in the enumerated range
  1055. * will still be dispatched. This is useful if you want
  1056. * to dynamically spawn objects in the subtree.
  1057. *
  1058. * Flags passed to g_dbus_connection_register_subtree().
  1059. *
  1060. * Since: 2.26
  1061. */
  1062. typedef enum
  1063. {
  1064. G_DBUS_SUBTREE_FLAGS_NONE = 0,
  1065. G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES = (1<<0)
  1066. } GDBusSubtreeFlags;
  1067. /**
  1068. * GDBusServerFlags:
  1069. * @G_DBUS_SERVER_FLAGS_NONE: No flags set.
  1070. * @G_DBUS_SERVER_FLAGS_RUN_IN_THREAD: All #GDBusServer::new-connection
  1071. * signals will run in separated dedicated threads (see signal for
  1072. * details).
  1073. * @G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: Allow the anonymous
  1074. * authentication method.
  1075. *
  1076. * Flags used when creating a #GDBusServer.
  1077. *
  1078. * Since: 2.26
  1079. */
  1080. typedef enum
  1081. {
  1082. G_DBUS_SERVER_FLAGS_NONE = 0,
  1083. G_DBUS_SERVER_FLAGS_RUN_IN_THREAD = (1<<0),
  1084. G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS = (1<<1)
  1085. } GDBusServerFlags;
  1086. /**
  1087. * GDBusSignalFlags:
  1088. * @G_DBUS_SIGNAL_FLAGS_NONE: No flags set.
  1089. *
  1090. * Flags used when subscribing to signals via g_dbus_connection_signal_subscribe().
  1091. *
  1092. * Since: 2.26
  1093. */
  1094. typedef enum /*< flags >*/
  1095. {
  1096. G_DBUS_SIGNAL_FLAGS_NONE = 0
  1097. } GDBusSignalFlags;
  1098. /**
  1099. * GDBusSendMessageFlags:
  1100. * @G_DBUS_SEND_MESSAGE_FLAGS_NONE: No flags set.
  1101. * @G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL: Do not automatically
  1102. * assign a serial number from the #GDBusConnection object when
  1103. * sending a message.
  1104. *
  1105. * Flags used when sending #GDBusMessage<!-- -->s on a #GDBusConnection.
  1106. *
  1107. * Since: 2.26
  1108. */
  1109. typedef enum
  1110. {
  1111. G_DBUS_SEND_MESSAGE_FLAGS_NONE = 0,
  1112. G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL = (1<<0)
  1113. } GDBusSendMessageFlags;
  1114. /**
  1115. * GCredentialsType:
  1116. * @G_CREDENTIALS_TYPE_INVALID: Indicates an invalid native credential type.
  1117. * @G_CREDENTIALS_TYPE_LINUX_UCRED: The native credentials type is a <type>struct ucred</type>.
  1118. * @G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED: The native credentials type is a <type>struct cmsgcred</type>.
  1119. *
  1120. * Enumeration describing different kinds of native credential types.
  1121. *
  1122. * Since: 2.26
  1123. */
  1124. typedef enum
  1125. {
  1126. G_CREDENTIALS_TYPE_INVALID,
  1127. G_CREDENTIALS_TYPE_LINUX_UCRED,
  1128. G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED
  1129. } GCredentialsType;
  1130. /**
  1131. * GDBusMessageByteOrder:
  1132. * @G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN: The byte order is big endian.
  1133. * @G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN: The byte order is little endian.
  1134. *
  1135. * Enumeration used to describe the byte order of a D-Bus message.
  1136. *
  1137. * Since: 2.26
  1138. */
  1139. typedef enum
  1140. {
  1141. G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN = 'B',
  1142. G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN = 'l'
  1143. } GDBusMessageByteOrder;
  1144. G_END_DECLS
  1145. #endif /* __GIO_ENUMS_H__ */