gioenums.h 83 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154
  1. /* GIO - GLib Input, Output and Streaming Library
  2. *
  3. * Copyright (C) 2006-2007 Red Hat, Inc.
  4. *
  5. * SPDX-License-Identifier: LGPL-2.1-or-later
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General
  18. * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
  19. *
  20. * Author: Alexander Larsson <alexl@redhat.com>
  21. */
  22. #ifndef __GIO_ENUMS_H__
  23. #define __GIO_ENUMS_H__
  24. #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
  25. #error "Only <gio/gio.h> can be included directly."
  26. #endif
  27. #include <glib-object.h>
  28. #include <gio/gio-visibility.h>
  29. G_BEGIN_DECLS
  30. /**
  31. * GAppInfoCreateFlags:
  32. * @G_APP_INFO_CREATE_NONE: No flags.
  33. * @G_APP_INFO_CREATE_NEEDS_TERMINAL: Application opens in a terminal window.
  34. * @G_APP_INFO_CREATE_SUPPORTS_URIS: Application supports URI arguments.
  35. * @G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION: Application supports startup notification. Since 2.26
  36. *
  37. * Flags used when creating a #GAppInfo.
  38. */
  39. typedef enum {
  40. G_APP_INFO_CREATE_NONE = 0, /*< nick=none >*/
  41. G_APP_INFO_CREATE_NEEDS_TERMINAL = (1 << 0), /*< nick=needs-terminal >*/
  42. G_APP_INFO_CREATE_SUPPORTS_URIS = (1 << 1), /*< nick=supports-uris >*/
  43. G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION = (1 << 2) /*< nick=supports-startup-notification >*/
  44. } GAppInfoCreateFlags;
  45. /**
  46. * GConverterFlags:
  47. * @G_CONVERTER_NO_FLAGS: No flags.
  48. * @G_CONVERTER_INPUT_AT_END: At end of input data
  49. * @G_CONVERTER_FLUSH: Flush data
  50. *
  51. * Flags used when calling a g_converter_convert().
  52. *
  53. * Since: 2.24
  54. */
  55. typedef enum {
  56. G_CONVERTER_NO_FLAGS = 0, /*< nick=none >*/
  57. G_CONVERTER_INPUT_AT_END = (1 << 0), /*< nick=input-at-end >*/
  58. G_CONVERTER_FLUSH = (1 << 1) /*< nick=flush >*/
  59. } GConverterFlags;
  60. /**
  61. * GConverterResult:
  62. * @G_CONVERTER_ERROR: There was an error during conversion.
  63. * @G_CONVERTER_CONVERTED: Some data was consumed or produced
  64. * @G_CONVERTER_FINISHED: The conversion is finished
  65. * @G_CONVERTER_FLUSHED: Flushing is finished
  66. *
  67. * Results returned from g_converter_convert().
  68. *
  69. * Since: 2.24
  70. */
  71. typedef enum {
  72. G_CONVERTER_ERROR = 0, /*< nick=error >*/
  73. G_CONVERTER_CONVERTED = 1, /*< nick=converted >*/
  74. G_CONVERTER_FINISHED = 2, /*< nick=finished >*/
  75. G_CONVERTER_FLUSHED = 3 /*< nick=flushed >*/
  76. } GConverterResult;
  77. /**
  78. * GDataStreamByteOrder:
  79. * @G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN: Selects Big Endian byte order.
  80. * @G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN: Selects Little Endian byte order.
  81. * @G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN: Selects endianness based on host machine's architecture.
  82. *
  83. * #GDataStreamByteOrder is used to ensure proper endianness of streaming data sources
  84. * across various machine architectures.
  85. *
  86. **/
  87. typedef enum {
  88. G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN,
  89. G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN,
  90. G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN
  91. } GDataStreamByteOrder;
  92. /**
  93. * GDataStreamNewlineType:
  94. * @G_DATA_STREAM_NEWLINE_TYPE_LF: Selects "LF" line endings, common on most modern UNIX platforms.
  95. * @G_DATA_STREAM_NEWLINE_TYPE_CR: Selects "CR" line endings.
  96. * @G_DATA_STREAM_NEWLINE_TYPE_CR_LF: Selects "CR, LF" line ending, common on Microsoft Windows.
  97. * @G_DATA_STREAM_NEWLINE_TYPE_ANY: Automatically try to handle any line ending type.
  98. *
  99. * #GDataStreamNewlineType is used when checking for or setting the line endings for a given file.
  100. **/
  101. typedef enum {
  102. G_DATA_STREAM_NEWLINE_TYPE_LF,
  103. G_DATA_STREAM_NEWLINE_TYPE_CR,
  104. G_DATA_STREAM_NEWLINE_TYPE_CR_LF,
  105. G_DATA_STREAM_NEWLINE_TYPE_ANY
  106. } GDataStreamNewlineType;
  107. /**
  108. * GFileAttributeType:
  109. * @G_FILE_ATTRIBUTE_TYPE_INVALID: indicates an invalid or uninitialized type.
  110. * @G_FILE_ATTRIBUTE_TYPE_STRING: a null terminated UTF8 string.
  111. * @G_FILE_ATTRIBUTE_TYPE_BYTE_STRING: a zero terminated string of non-zero bytes.
  112. * @G_FILE_ATTRIBUTE_TYPE_BOOLEAN: a boolean value.
  113. * @G_FILE_ATTRIBUTE_TYPE_UINT32: an unsigned 4-byte/32-bit integer.
  114. * @G_FILE_ATTRIBUTE_TYPE_INT32: a signed 4-byte/32-bit integer.
  115. * @G_FILE_ATTRIBUTE_TYPE_UINT64: an unsigned 8-byte/64-bit integer.
  116. * @G_FILE_ATTRIBUTE_TYPE_INT64: a signed 8-byte/64-bit integer.
  117. * @G_FILE_ATTRIBUTE_TYPE_OBJECT: a #GObject.
  118. * @G_FILE_ATTRIBUTE_TYPE_STRINGV: a %NULL terminated char **. Since 2.22
  119. *
  120. * The data types for file attributes.
  121. **/
  122. typedef enum {
  123. G_FILE_ATTRIBUTE_TYPE_INVALID = 0,
  124. G_FILE_ATTRIBUTE_TYPE_STRING,
  125. G_FILE_ATTRIBUTE_TYPE_BYTE_STRING, /* zero terminated string of non-zero bytes */
  126. G_FILE_ATTRIBUTE_TYPE_BOOLEAN,
  127. G_FILE_ATTRIBUTE_TYPE_UINT32,
  128. G_FILE_ATTRIBUTE_TYPE_INT32,
  129. G_FILE_ATTRIBUTE_TYPE_UINT64,
  130. G_FILE_ATTRIBUTE_TYPE_INT64,
  131. G_FILE_ATTRIBUTE_TYPE_OBJECT,
  132. G_FILE_ATTRIBUTE_TYPE_STRINGV
  133. } GFileAttributeType;
  134. /**
  135. * GFileAttributeInfoFlags:
  136. * @G_FILE_ATTRIBUTE_INFO_NONE: no flags set.
  137. * @G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE: copy the attribute values when the file is copied.
  138. * @G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED: copy the attribute values when the file is moved.
  139. *
  140. * Flags specifying the behaviour of an attribute.
  141. **/
  142. typedef enum {
  143. G_FILE_ATTRIBUTE_INFO_NONE = 0,
  144. G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE = (1 << 0),
  145. G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED = (1 << 1)
  146. } GFileAttributeInfoFlags;
  147. /**
  148. * GFileAttributeStatus:
  149. * @G_FILE_ATTRIBUTE_STATUS_UNSET: Attribute value is unset (empty).
  150. * @G_FILE_ATTRIBUTE_STATUS_SET: Attribute value is set.
  151. * @G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING: Indicates an error in setting the value.
  152. *
  153. * Used by g_file_set_attributes_from_info() when setting file attributes.
  154. **/
  155. typedef enum {
  156. G_FILE_ATTRIBUTE_STATUS_UNSET = 0,
  157. G_FILE_ATTRIBUTE_STATUS_SET,
  158. G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING
  159. } GFileAttributeStatus;
  160. /**
  161. * GFileQueryInfoFlags:
  162. * @G_FILE_QUERY_INFO_NONE: No flags set.
  163. * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks.
  164. *
  165. * Flags used when querying a #GFileInfo.
  166. */
  167. typedef enum {
  168. G_FILE_QUERY_INFO_NONE = 0,
  169. G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS = (1 << 0) /*< nick=nofollow-symlinks >*/
  170. } GFileQueryInfoFlags;
  171. /**
  172. * GFileCreateFlags:
  173. * @G_FILE_CREATE_NONE: No flags set.
  174. * @G_FILE_CREATE_PRIVATE: Create a file that can only be
  175. * accessed by the current user.
  176. * @G_FILE_CREATE_REPLACE_DESTINATION: Replace the destination
  177. * as if it didn't exist before. Don't try to keep any old
  178. * permissions, replace instead of following links. This
  179. * is generally useful if you're doing a "copy over"
  180. * rather than a "save new version of" replace operation.
  181. * You can think of it as "unlink destination" before
  182. * writing to it, although the implementation may not
  183. * be exactly like that. This flag can only be used with
  184. * g_file_replace() and its variants, including g_file_replace_contents().
  185. * Since 2.20
  186. *
  187. * Flags used when an operation may create a file.
  188. */
  189. typedef enum {
  190. G_FILE_CREATE_NONE = 0,
  191. G_FILE_CREATE_PRIVATE = (1 << 0),
  192. G_FILE_CREATE_REPLACE_DESTINATION = (1 << 1)
  193. } GFileCreateFlags;
  194. /**
  195. * GFileMeasureFlags:
  196. * @G_FILE_MEASURE_NONE: No flags set.
  197. * @G_FILE_MEASURE_REPORT_ANY_ERROR: Report any error encountered
  198. * while traversing the directory tree. Normally errors are only
  199. * reported for the toplevel file.
  200. * @G_FILE_MEASURE_APPARENT_SIZE: Tally usage based on apparent file
  201. * sizes. Normally, the block-size is used, if available, as this is a
  202. * more accurate representation of disk space used.
  203. * Compare with `du --apparent-size`.
  204. * Since GLib 2.78. and similarly to `du` since GNU Coreutils 9.2, this will
  205. * ignore the sizes of file types other than regular files and links, as the
  206. * sizes of other file types are not specified in a standard way.
  207. * @G_FILE_MEASURE_NO_XDEV: Do not cross mount point boundaries.
  208. * Compare with `du -x`.
  209. *
  210. * Flags that can be used with g_file_measure_disk_usage().
  211. *
  212. * Since: 2.38
  213. **/
  214. typedef enum {
  215. G_FILE_MEASURE_NONE = 0,
  216. G_FILE_MEASURE_REPORT_ANY_ERROR = (1 << 1),
  217. G_FILE_MEASURE_APPARENT_SIZE = (1 << 2),
  218. G_FILE_MEASURE_NO_XDEV = (1 << 3)
  219. } GFileMeasureFlags;
  220. /**
  221. * GMountMountFlags:
  222. * @G_MOUNT_MOUNT_NONE: No flags set.
  223. *
  224. * Flags used when mounting a mount.
  225. */
  226. typedef enum /*< flags >*/ {
  227. G_MOUNT_MOUNT_NONE = 0
  228. } GMountMountFlags;
  229. /**
  230. * GMountUnmountFlags:
  231. * @G_MOUNT_UNMOUNT_NONE: No flags set.
  232. * @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding
  233. * file operations on the mount.
  234. *
  235. * Flags used when an unmounting a mount.
  236. */
  237. typedef enum {
  238. G_MOUNT_UNMOUNT_NONE = 0,
  239. G_MOUNT_UNMOUNT_FORCE = (1 << 0)
  240. } GMountUnmountFlags;
  241. /**
  242. * GDriveStartFlags:
  243. * @G_DRIVE_START_NONE: No flags set.
  244. *
  245. * Flags used when starting a drive.
  246. *
  247. * Since: 2.22
  248. */
  249. typedef enum /*< flags >*/ {
  250. G_DRIVE_START_NONE = 0
  251. } GDriveStartFlags;
  252. /**
  253. * GDriveStartStopType:
  254. * @G_DRIVE_START_STOP_TYPE_UNKNOWN: Unknown or drive doesn't support
  255. * start/stop.
  256. * @G_DRIVE_START_STOP_TYPE_SHUTDOWN: The stop method will physically
  257. * shut down the drive and e.g. power down the port the drive is
  258. * attached to.
  259. * @G_DRIVE_START_STOP_TYPE_NETWORK: The start/stop methods are used
  260. * for connecting/disconnect to the drive over the network.
  261. * @G_DRIVE_START_STOP_TYPE_MULTIDISK: The start/stop methods will
  262. * assemble/disassemble a virtual drive from several physical
  263. * drives.
  264. * @G_DRIVE_START_STOP_TYPE_PASSWORD: The start/stop methods will
  265. * unlock/lock the disk (for example using the ATA `SECURITY UNLOCK
  266. * DEVICE` command)
  267. *
  268. * Enumeration describing how a drive can be started/stopped.
  269. *
  270. * Since: 2.22
  271. */
  272. typedef enum {
  273. G_DRIVE_START_STOP_TYPE_UNKNOWN,
  274. G_DRIVE_START_STOP_TYPE_SHUTDOWN,
  275. G_DRIVE_START_STOP_TYPE_NETWORK,
  276. G_DRIVE_START_STOP_TYPE_MULTIDISK,
  277. G_DRIVE_START_STOP_TYPE_PASSWORD
  278. } GDriveStartStopType;
  279. /**
  280. * GFileCopyFlags:
  281. * @G_FILE_COPY_NONE: No flags set.
  282. * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
  283. * @G_FILE_COPY_BACKUP: Make a backup of any existing files.
  284. * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
  285. * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo).
  286. * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported.
  287. * @G_FILE_COPY_TARGET_DEFAULT_PERMS: Leaves target file with default perms, instead of setting the source file perms.
  288. * @G_FILE_COPY_TARGET_DEFAULT_MODIFIED_TIME: Use default modification
  289. * timestamps instead of copying them from the source file. Since 2.80
  290. *
  291. * Flags used when copying or moving files.
  292. */
  293. typedef enum {
  294. G_FILE_COPY_NONE = 0, /*< nick=none >*/
  295. G_FILE_COPY_OVERWRITE = (1 << 0),
  296. G_FILE_COPY_BACKUP = (1 << 1),
  297. G_FILE_COPY_NOFOLLOW_SYMLINKS = (1 << 2),
  298. G_FILE_COPY_ALL_METADATA = (1 << 3),
  299. G_FILE_COPY_NO_FALLBACK_FOR_MOVE = (1 << 4),
  300. G_FILE_COPY_TARGET_DEFAULT_PERMS = (1 << 5),
  301. G_FILE_COPY_TARGET_DEFAULT_MODIFIED_TIME GIO_AVAILABLE_ENUMERATOR_IN_2_80 = (1 << 6),
  302. } GFileCopyFlags;
  303. /**
  304. * GFileMonitorFlags:
  305. * @G_FILE_MONITOR_NONE: No flags set.
  306. * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events.
  307. * @G_FILE_MONITOR_SEND_MOVED: Pair DELETED and CREATED events caused
  308. * by file renames (moves) and send a single G_FILE_MONITOR_EVENT_MOVED
  309. * event instead (NB: not supported on all backends; the default
  310. * behaviour -without specifying this flag- is to send single DELETED
  311. * and CREATED events). Deprecated since 2.46: use
  312. * %G_FILE_MONITOR_WATCH_MOVES instead.
  313. * @G_FILE_MONITOR_WATCH_HARD_LINKS: Watch for changes to the file made
  314. * via another hard link. Since 2.36.
  315. * @G_FILE_MONITOR_WATCH_MOVES: Watch for rename operations on a
  316. * monitored directory. This causes %G_FILE_MONITOR_EVENT_RENAMED,
  317. * %G_FILE_MONITOR_EVENT_MOVED_IN and %G_FILE_MONITOR_EVENT_MOVED_OUT
  318. * events to be emitted when possible. Since: 2.46.
  319. *
  320. * Flags used to set what a #GFileMonitor will watch for.
  321. */
  322. typedef enum {
  323. G_FILE_MONITOR_NONE = 0,
  324. G_FILE_MONITOR_WATCH_MOUNTS = (1 << 0),
  325. G_FILE_MONITOR_SEND_MOVED = (1 << 1),
  326. G_FILE_MONITOR_WATCH_HARD_LINKS = (1 << 2),
  327. G_FILE_MONITOR_WATCH_MOVES = (1 << 3)
  328. } GFileMonitorFlags;
  329. /**
  330. * GFileType:
  331. * @G_FILE_TYPE_UNKNOWN: File's type is unknown.
  332. * @G_FILE_TYPE_REGULAR: File handle represents a regular file.
  333. * @G_FILE_TYPE_DIRECTORY: File handle represents a directory.
  334. * @G_FILE_TYPE_SYMBOLIC_LINK: File handle represents a symbolic link
  335. * (Unix systems).
  336. * @G_FILE_TYPE_SPECIAL: File is a "special" file, such as a socket, fifo,
  337. * block device, or character device.
  338. * @G_FILE_TYPE_SHORTCUT: File is a shortcut (Windows systems).
  339. * @G_FILE_TYPE_MOUNTABLE: File is a mountable location.
  340. *
  341. * Indicates the file's on-disk type.
  342. *
  343. * On Windows systems a file will never have %G_FILE_TYPE_SYMBOLIC_LINK type;
  344. * use #GFileInfo and %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK to determine
  345. * whether a file is a symlink or not. This is due to the fact that NTFS does
  346. * not have a single filesystem object type for symbolic links - it has
  347. * files that symlink to files, and directories that symlink to directories.
  348. * #GFileType enumeration cannot precisely represent this important distinction,
  349. * which is why all Windows symlinks will continue to be reported as
  350. * %G_FILE_TYPE_REGULAR or %G_FILE_TYPE_DIRECTORY.
  351. **/
  352. typedef enum {
  353. G_FILE_TYPE_UNKNOWN = 0,
  354. G_FILE_TYPE_REGULAR,
  355. G_FILE_TYPE_DIRECTORY,
  356. G_FILE_TYPE_SYMBOLIC_LINK,
  357. G_FILE_TYPE_SPECIAL, /* socket, fifo, blockdev, chardev */
  358. G_FILE_TYPE_SHORTCUT,
  359. G_FILE_TYPE_MOUNTABLE
  360. } GFileType;
  361. /**
  362. * GFilesystemPreviewType:
  363. * @G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS: Only preview files if user has explicitly requested it.
  364. * @G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL: Preview files if user has requested preview of "local" files.
  365. * @G_FILESYSTEM_PREVIEW_TYPE_NEVER: Never preview files.
  366. *
  367. * Indicates a hint from the file system whether files should be
  368. * previewed in a file manager. Returned as the value of the key
  369. * %G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW.
  370. **/
  371. typedef enum {
  372. G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS = 0,
  373. G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL,
  374. G_FILESYSTEM_PREVIEW_TYPE_NEVER
  375. } GFilesystemPreviewType;
  376. /**
  377. * GFileMonitorEvent:
  378. * @G_FILE_MONITOR_EVENT_CHANGED: a file changed.
  379. * @G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: a hint that this was probably the last change in a set of changes.
  380. * @G_FILE_MONITOR_EVENT_DELETED: a file was deleted.
  381. * @G_FILE_MONITOR_EVENT_CREATED: a file was created.
  382. * @G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: a file attribute was changed.
  383. * @G_FILE_MONITOR_EVENT_PRE_UNMOUNT: the file location will soon be unmounted.
  384. * @G_FILE_MONITOR_EVENT_UNMOUNTED: the file location was unmounted.
  385. * @G_FILE_MONITOR_EVENT_MOVED: the file was moved -- only sent if the
  386. * (deprecated) %G_FILE_MONITOR_SEND_MOVED flag is set
  387. * @G_FILE_MONITOR_EVENT_RENAMED: the file was renamed within the
  388. * current directory -- only sent if the %G_FILE_MONITOR_WATCH_MOVES
  389. * flag is set. Since: 2.46.
  390. * @G_FILE_MONITOR_EVENT_MOVED_IN: the file was moved into the
  391. * monitored directory from another location -- only sent if the
  392. * %G_FILE_MONITOR_WATCH_MOVES flag is set. Since: 2.46.
  393. * @G_FILE_MONITOR_EVENT_MOVED_OUT: the file was moved out of the
  394. * monitored directory to another location -- only sent if the
  395. * %G_FILE_MONITOR_WATCH_MOVES flag is set. Since: 2.46
  396. *
  397. * Specifies what type of event a monitor event is.
  398. **/
  399. typedef enum {
  400. G_FILE_MONITOR_EVENT_CHANGED,
  401. G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT,
  402. G_FILE_MONITOR_EVENT_DELETED,
  403. G_FILE_MONITOR_EVENT_CREATED,
  404. G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED,
  405. G_FILE_MONITOR_EVENT_PRE_UNMOUNT,
  406. G_FILE_MONITOR_EVENT_UNMOUNTED,
  407. G_FILE_MONITOR_EVENT_MOVED,
  408. G_FILE_MONITOR_EVENT_RENAMED,
  409. G_FILE_MONITOR_EVENT_MOVED_IN,
  410. G_FILE_MONITOR_EVENT_MOVED_OUT
  411. } GFileMonitorEvent;
  412. /* This enumeration conflicts with GIOError in giochannel.h. However,
  413. * that is only used as a return value in some deprecated functions.
  414. * So, we reuse the same prefix for the enumeration values, but call
  415. * the actual enumeration (which is rarely used) GIOErrorEnum.
  416. */
  417. /**
  418. * GIOErrorEnum:
  419. * @G_IO_ERROR_FAILED: Generic error condition for when an operation fails
  420. * and no more specific #GIOErrorEnum value is defined.
  421. * @G_IO_ERROR_NOT_FOUND: File not found.
  422. * @G_IO_ERROR_EXISTS: File already exists.
  423. * @G_IO_ERROR_IS_DIRECTORY: File is a directory.
  424. * @G_IO_ERROR_NOT_DIRECTORY: File is not a directory.
  425. * @G_IO_ERROR_NOT_EMPTY: File is a directory that isn't empty.
  426. * @G_IO_ERROR_NOT_REGULAR_FILE: File is not a regular file.
  427. * @G_IO_ERROR_NOT_SYMBOLIC_LINK: File is not a symbolic link.
  428. * @G_IO_ERROR_NOT_MOUNTABLE_FILE: File cannot be mounted.
  429. * @G_IO_ERROR_FILENAME_TOO_LONG: Filename is too many characters.
  430. * @G_IO_ERROR_INVALID_FILENAME: Filename is invalid or contains invalid characters.
  431. * @G_IO_ERROR_TOO_MANY_LINKS: File contains too many symbolic links.
  432. * @G_IO_ERROR_NO_SPACE: No space left on drive.
  433. * @G_IO_ERROR_INVALID_ARGUMENT: Invalid argument.
  434. * @G_IO_ERROR_PERMISSION_DENIED: Permission denied.
  435. * @G_IO_ERROR_NOT_SUPPORTED: Operation (or one of its parameters) not supported
  436. * @G_IO_ERROR_NOT_MOUNTED: File isn't mounted.
  437. * @G_IO_ERROR_ALREADY_MOUNTED: File is already mounted.
  438. * @G_IO_ERROR_CLOSED: File was closed.
  439. * @G_IO_ERROR_CANCELLED: Operation was cancelled. See #GCancellable.
  440. * @G_IO_ERROR_PENDING: Operations are still pending.
  441. * @G_IO_ERROR_READ_ONLY: File is read only.
  442. * @G_IO_ERROR_CANT_CREATE_BACKUP: Backup couldn't be created.
  443. * @G_IO_ERROR_WRONG_ETAG: File's Entity Tag was incorrect.
  444. * @G_IO_ERROR_TIMED_OUT: Operation timed out.
  445. * @G_IO_ERROR_WOULD_RECURSE: Operation would be recursive.
  446. * @G_IO_ERROR_BUSY: File is busy.
  447. * @G_IO_ERROR_WOULD_BLOCK: Operation would block.
  448. * @G_IO_ERROR_HOST_NOT_FOUND: Host couldn't be found (remote operations).
  449. * @G_IO_ERROR_WOULD_MERGE: Operation would merge files.
  450. * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has
  451. * already interacted with the user. Do not display any error dialog.
  452. * @G_IO_ERROR_TOO_MANY_OPEN_FILES: The current process has too many files
  453. * open and can't open any more. Duplicate descriptors do count toward
  454. * this limit. Since 2.20
  455. * @G_IO_ERROR_NOT_INITIALIZED: The object has not been initialized. Since 2.22
  456. * @G_IO_ERROR_ADDRESS_IN_USE: The requested address is already in use. Since 2.22
  457. * @G_IO_ERROR_PARTIAL_INPUT: Need more input to finish operation. Since 2.24
  458. * @G_IO_ERROR_INVALID_DATA: The input data was invalid. Since 2.24
  459. * @G_IO_ERROR_DBUS_ERROR: A remote object generated an error that
  460. * doesn't correspond to a locally registered #GError error
  461. * domain. Use g_dbus_error_get_remote_error() to extract the D-Bus
  462. * error name and g_dbus_error_strip_remote_error() to fix up the
  463. * message so it matches what was received on the wire. Since 2.26.
  464. * @G_IO_ERROR_HOST_UNREACHABLE: Host unreachable. Since 2.26
  465. * @G_IO_ERROR_NETWORK_UNREACHABLE: Network unreachable. Since 2.26
  466. * @G_IO_ERROR_CONNECTION_REFUSED: Connection refused. Since 2.26
  467. * @G_IO_ERROR_PROXY_FAILED: Connection to proxy server failed. Since 2.26
  468. * @G_IO_ERROR_PROXY_AUTH_FAILED: Proxy authentication failed. Since 2.26
  469. * @G_IO_ERROR_PROXY_NEED_AUTH: Proxy server needs authentication. Since 2.26
  470. * @G_IO_ERROR_PROXY_NOT_ALLOWED: Proxy connection is not allowed by ruleset.
  471. * Since 2.26
  472. * @G_IO_ERROR_BROKEN_PIPE: Broken pipe. Since 2.36
  473. * @G_IO_ERROR_CONNECTION_CLOSED: Connection closed by peer. Note that this
  474. * is the same code as %G_IO_ERROR_BROKEN_PIPE; before 2.44 some
  475. * "connection closed" errors returned %G_IO_ERROR_BROKEN_PIPE, but others
  476. * returned %G_IO_ERROR_FAILED. Now they should all return the same
  477. * value, which has this more logical name. Since 2.44.
  478. * @G_IO_ERROR_NOT_CONNECTED: Transport endpoint is not connected. Since 2.44
  479. * @G_IO_ERROR_MESSAGE_TOO_LARGE: Message too large. Since 2.48.
  480. * @G_IO_ERROR_NO_SUCH_DEVICE: No such device found. Since 2.74
  481. * @G_IO_ERROR_DESTINATION_UNSET: Destination address unset. Since 2.80
  482. *
  483. * Error codes returned by GIO functions.
  484. *
  485. * Note that this domain may be extended in future GLib releases. In
  486. * general, new error codes either only apply to new APIs, or else
  487. * replace %G_IO_ERROR_FAILED in cases that were not explicitly
  488. * distinguished before. You should therefore avoid writing code like
  489. * |[<!-- language="C" -->
  490. * if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_FAILED))
  491. * {
  492. * // Assume that this is EPRINTERONFIRE
  493. * ...
  494. * }
  495. * ]|
  496. * but should instead treat all unrecognized error codes the same as
  497. * %G_IO_ERROR_FAILED.
  498. *
  499. * See also #GPollableReturn for a cheaper way of returning
  500. * %G_IO_ERROR_WOULD_BLOCK to callers without allocating a #GError.
  501. **/
  502. typedef enum {
  503. G_IO_ERROR_FAILED,
  504. G_IO_ERROR_NOT_FOUND,
  505. G_IO_ERROR_EXISTS,
  506. G_IO_ERROR_IS_DIRECTORY,
  507. G_IO_ERROR_NOT_DIRECTORY,
  508. G_IO_ERROR_NOT_EMPTY,
  509. G_IO_ERROR_NOT_REGULAR_FILE,
  510. G_IO_ERROR_NOT_SYMBOLIC_LINK,
  511. G_IO_ERROR_NOT_MOUNTABLE_FILE,
  512. G_IO_ERROR_FILENAME_TOO_LONG,
  513. G_IO_ERROR_INVALID_FILENAME,
  514. G_IO_ERROR_TOO_MANY_LINKS,
  515. G_IO_ERROR_NO_SPACE,
  516. G_IO_ERROR_INVALID_ARGUMENT,
  517. G_IO_ERROR_PERMISSION_DENIED,
  518. G_IO_ERROR_NOT_SUPPORTED,
  519. G_IO_ERROR_NOT_MOUNTED,
  520. G_IO_ERROR_ALREADY_MOUNTED,
  521. G_IO_ERROR_CLOSED,
  522. G_IO_ERROR_CANCELLED,
  523. G_IO_ERROR_PENDING,
  524. G_IO_ERROR_READ_ONLY,
  525. G_IO_ERROR_CANT_CREATE_BACKUP,
  526. G_IO_ERROR_WRONG_ETAG,
  527. G_IO_ERROR_TIMED_OUT,
  528. G_IO_ERROR_WOULD_RECURSE,
  529. G_IO_ERROR_BUSY,
  530. G_IO_ERROR_WOULD_BLOCK,
  531. G_IO_ERROR_HOST_NOT_FOUND,
  532. G_IO_ERROR_WOULD_MERGE,
  533. G_IO_ERROR_FAILED_HANDLED,
  534. G_IO_ERROR_TOO_MANY_OPEN_FILES,
  535. G_IO_ERROR_NOT_INITIALIZED,
  536. G_IO_ERROR_ADDRESS_IN_USE,
  537. G_IO_ERROR_PARTIAL_INPUT,
  538. G_IO_ERROR_INVALID_DATA,
  539. G_IO_ERROR_DBUS_ERROR,
  540. G_IO_ERROR_HOST_UNREACHABLE,
  541. G_IO_ERROR_NETWORK_UNREACHABLE,
  542. G_IO_ERROR_CONNECTION_REFUSED,
  543. G_IO_ERROR_PROXY_FAILED,
  544. G_IO_ERROR_PROXY_AUTH_FAILED,
  545. G_IO_ERROR_PROXY_NEED_AUTH,
  546. G_IO_ERROR_PROXY_NOT_ALLOWED,
  547. G_IO_ERROR_BROKEN_PIPE,
  548. G_IO_ERROR_CONNECTION_CLOSED = G_IO_ERROR_BROKEN_PIPE,
  549. G_IO_ERROR_NOT_CONNECTED,
  550. G_IO_ERROR_MESSAGE_TOO_LARGE,
  551. G_IO_ERROR_NO_SUCH_DEVICE GIO_AVAILABLE_ENUMERATOR_IN_2_74,
  552. G_IO_ERROR_DESTINATION_UNSET GIO_AVAILABLE_ENUMERATOR_IN_2_80,
  553. } GIOErrorEnum;
  554. /**
  555. * GAskPasswordFlags:
  556. * @G_ASK_PASSWORD_NEED_PASSWORD: operation requires a password.
  557. * @G_ASK_PASSWORD_NEED_USERNAME: operation requires a username.
  558. * @G_ASK_PASSWORD_NEED_DOMAIN: operation requires a domain.
  559. * @G_ASK_PASSWORD_SAVING_SUPPORTED: operation supports saving settings.
  560. * @G_ASK_PASSWORD_ANONYMOUS_SUPPORTED: operation supports anonymous users.
  561. * @G_ASK_PASSWORD_TCRYPT: operation takes TCRYPT parameters (Since: 2.58)
  562. *
  563. * #GAskPasswordFlags are used to request specific information from the
  564. * user, or to notify the user of their choices in an authentication
  565. * situation.
  566. **/
  567. typedef enum {
  568. G_ASK_PASSWORD_NEED_PASSWORD = (1 << 0),
  569. G_ASK_PASSWORD_NEED_USERNAME = (1 << 1),
  570. G_ASK_PASSWORD_NEED_DOMAIN = (1 << 2),
  571. G_ASK_PASSWORD_SAVING_SUPPORTED = (1 << 3),
  572. G_ASK_PASSWORD_ANONYMOUS_SUPPORTED = (1 << 4),
  573. G_ASK_PASSWORD_TCRYPT = (1 << 5),
  574. } GAskPasswordFlags;
  575. /**
  576. * GPasswordSave:
  577. * @G_PASSWORD_SAVE_NEVER: never save a password.
  578. * @G_PASSWORD_SAVE_FOR_SESSION: save a password for the session.
  579. * @G_PASSWORD_SAVE_PERMANENTLY: save a password permanently.
  580. *
  581. * #GPasswordSave is used to indicate the lifespan of a saved password.
  582. *
  583. * #Gvfs stores passwords in the Gnome keyring when this flag allows it
  584. * to, and later retrieves it again from there.
  585. **/
  586. typedef enum {
  587. G_PASSWORD_SAVE_NEVER,
  588. G_PASSWORD_SAVE_FOR_SESSION,
  589. G_PASSWORD_SAVE_PERMANENTLY
  590. } GPasswordSave;
  591. /**
  592. * GMountOperationResult:
  593. * @G_MOUNT_OPERATION_HANDLED: The request was fulfilled and the
  594. * user specified data is now available
  595. * @G_MOUNT_OPERATION_ABORTED: The user requested the mount operation
  596. * to be aborted
  597. * @G_MOUNT_OPERATION_UNHANDLED: The request was unhandled (i.e. not
  598. * implemented)
  599. *
  600. * #GMountOperationResult is returned as a result when a request for
  601. * information is send by the mounting operation.
  602. **/
  603. typedef enum {
  604. G_MOUNT_OPERATION_HANDLED,
  605. G_MOUNT_OPERATION_ABORTED,
  606. G_MOUNT_OPERATION_UNHANDLED
  607. } GMountOperationResult;
  608. /**
  609. * GOutputStreamSpliceFlags:
  610. * @G_OUTPUT_STREAM_SPLICE_NONE: Do not close either stream.
  611. * @G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE: Close the source stream after
  612. * the splice.
  613. * @G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET: Close the target stream after
  614. * the splice.
  615. *
  616. * GOutputStreamSpliceFlags determine how streams should be spliced.
  617. **/
  618. typedef enum {
  619. G_OUTPUT_STREAM_SPLICE_NONE = 0,
  620. G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE = (1 << 0),
  621. G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET = (1 << 1)
  622. } GOutputStreamSpliceFlags;
  623. /**
  624. * GIOStreamSpliceFlags:
  625. * @G_IO_STREAM_SPLICE_NONE: Do not close either stream.
  626. * @G_IO_STREAM_SPLICE_CLOSE_STREAM1: Close the first stream after
  627. * the splice.
  628. * @G_IO_STREAM_SPLICE_CLOSE_STREAM2: Close the second stream after
  629. * the splice.
  630. * @G_IO_STREAM_SPLICE_WAIT_FOR_BOTH: Wait for both splice operations to finish
  631. * before calling the callback.
  632. *
  633. * GIOStreamSpliceFlags determine how streams should be spliced.
  634. *
  635. * Since: 2.28
  636. **/
  637. typedef enum {
  638. G_IO_STREAM_SPLICE_NONE = 0,
  639. G_IO_STREAM_SPLICE_CLOSE_STREAM1 = (1 << 0),
  640. G_IO_STREAM_SPLICE_CLOSE_STREAM2 = (1 << 1),
  641. G_IO_STREAM_SPLICE_WAIT_FOR_BOTH = (1 << 2)
  642. } GIOStreamSpliceFlags;
  643. /**
  644. * GEmblemOrigin:
  645. * @G_EMBLEM_ORIGIN_UNKNOWN: Emblem of unknown origin
  646. * @G_EMBLEM_ORIGIN_DEVICE: Emblem adds device-specific information
  647. * @G_EMBLEM_ORIGIN_LIVEMETADATA: Emblem depicts live metadata, such as "readonly"
  648. * @G_EMBLEM_ORIGIN_TAG: Emblem comes from a user-defined tag, e.g. set by nautilus (in the future)
  649. *
  650. * GEmblemOrigin is used to add information about the origin of the emblem
  651. * to #GEmblem.
  652. *
  653. * Since: 2.18
  654. */
  655. typedef enum {
  656. G_EMBLEM_ORIGIN_UNKNOWN,
  657. G_EMBLEM_ORIGIN_DEVICE,
  658. G_EMBLEM_ORIGIN_LIVEMETADATA,
  659. G_EMBLEM_ORIGIN_TAG
  660. } GEmblemOrigin;
  661. /**
  662. * GResolverError:
  663. * @G_RESOLVER_ERROR_NOT_FOUND: the requested name/address/service was not
  664. * found
  665. * @G_RESOLVER_ERROR_TEMPORARY_FAILURE: the requested information could not
  666. * be looked up due to a network error or similar problem
  667. * @G_RESOLVER_ERROR_INTERNAL: unknown error
  668. *
  669. * An error code used with %G_RESOLVER_ERROR in a #GError returned
  670. * from a #GResolver routine.
  671. *
  672. * Since: 2.22
  673. */
  674. typedef enum {
  675. G_RESOLVER_ERROR_NOT_FOUND,
  676. G_RESOLVER_ERROR_TEMPORARY_FAILURE,
  677. G_RESOLVER_ERROR_INTERNAL
  678. } GResolverError;
  679. /**
  680. * GResolverRecordType:
  681. * @G_RESOLVER_RECORD_SRV: look up DNS SRV records for a domain
  682. * @G_RESOLVER_RECORD_MX: look up DNS MX records for a domain
  683. * @G_RESOLVER_RECORD_TXT: look up DNS TXT records for a name
  684. * @G_RESOLVER_RECORD_SOA: look up DNS SOA records for a zone
  685. * @G_RESOLVER_RECORD_NS: look up DNS NS records for a domain
  686. *
  687. * The type of record that g_resolver_lookup_records() or
  688. * g_resolver_lookup_records_async() should retrieve. The records are returned
  689. * as lists of #GVariant tuples. Each record type has different values in
  690. * the variant tuples returned.
  691. *
  692. * %G_RESOLVER_RECORD_SRV records are returned as variants with the signature
  693. * `(qqqs)`, containing a `guint16` with the priority, a `guint16` with the
  694. * weight, a `guint16` with the port, and a string of the hostname.
  695. *
  696. * %G_RESOLVER_RECORD_MX records are returned as variants with the signature
  697. * `(qs)`, representing a `guint16` with the preference, and a string containing
  698. * the mail exchanger hostname.
  699. *
  700. * %G_RESOLVER_RECORD_TXT records are returned as variants with the signature
  701. * `(as)`, representing an array of the strings in the text record. Note: Most TXT
  702. * records only contain a single string, but
  703. * [RFC 1035](https://tools.ietf.org/html/rfc1035#section-3.3.14) does allow a
  704. * record to contain multiple strings. The RFC which defines the interpretation
  705. * of a specific TXT record will likely require concatenation of multiple
  706. * strings if they are present, as with
  707. * [RFC 7208](https://tools.ietf.org/html/rfc7208#section-3.3).
  708. *
  709. * %G_RESOLVER_RECORD_SOA records are returned as variants with the signature
  710. * `(ssuuuuu)`, representing a string containing the primary name server, a
  711. * string containing the administrator, the serial as a `guint32`, the refresh
  712. * interval as a `guint32`, the retry interval as a `guint32`, the expire timeout
  713. * as a `guint32`, and the TTL as a `guint32`.
  714. *
  715. * %G_RESOLVER_RECORD_NS records are returned as variants with the signature
  716. * `(s)`, representing a string of the hostname of the name server.
  717. *
  718. * Since: 2.34
  719. */
  720. typedef enum {
  721. G_RESOLVER_RECORD_SRV = 1,
  722. G_RESOLVER_RECORD_MX,
  723. G_RESOLVER_RECORD_TXT,
  724. G_RESOLVER_RECORD_SOA,
  725. G_RESOLVER_RECORD_NS
  726. } GResolverRecordType;
  727. /**
  728. * GResourceError:
  729. * @G_RESOURCE_ERROR_NOT_FOUND: no file was found at the requested path
  730. * @G_RESOURCE_ERROR_INTERNAL: unknown error
  731. *
  732. * An error code used with %G_RESOURCE_ERROR in a #GError returned
  733. * from a #GResource routine.
  734. *
  735. * Since: 2.32
  736. */
  737. typedef enum {
  738. G_RESOURCE_ERROR_NOT_FOUND,
  739. G_RESOURCE_ERROR_INTERNAL
  740. } GResourceError;
  741. /**
  742. * GResourceFlags:
  743. * @G_RESOURCE_FLAGS_NONE: No flags set.
  744. * @G_RESOURCE_FLAGS_COMPRESSED: The file is compressed.
  745. *
  746. * GResourceFlags give information about a particular file inside a resource
  747. * bundle.
  748. *
  749. * Since: 2.32
  750. **/
  751. typedef enum {
  752. G_RESOURCE_FLAGS_NONE = 0,
  753. G_RESOURCE_FLAGS_COMPRESSED = (1<<0)
  754. } GResourceFlags;
  755. /**
  756. * GResourceLookupFlags:
  757. * @G_RESOURCE_LOOKUP_FLAGS_NONE: No flags set.
  758. *
  759. * GResourceLookupFlags determine how resource path lookups are handled.
  760. *
  761. * Since: 2.32
  762. **/
  763. typedef enum /*< flags >*/ {
  764. G_RESOURCE_LOOKUP_FLAGS_NONE = 0
  765. } GResourceLookupFlags;
  766. /**
  767. * GSocketFamily:
  768. * @G_SOCKET_FAMILY_INVALID: no address family
  769. * @G_SOCKET_FAMILY_IPV4: the IPv4 family
  770. * @G_SOCKET_FAMILY_IPV6: the IPv6 family
  771. * @G_SOCKET_FAMILY_UNIX: the UNIX domain family
  772. *
  773. * The protocol family of a #GSocketAddress. (These values are
  774. * identical to the system defines %AF_INET, %AF_INET6 and %AF_UNIX,
  775. * if available.)
  776. *
  777. * Since: 2.22
  778. */
  779. typedef enum {
  780. G_SOCKET_FAMILY_INVALID,
  781. G_SOCKET_FAMILY_UNIX = GLIB_SYSDEF_AF_UNIX,
  782. G_SOCKET_FAMILY_IPV4 = GLIB_SYSDEF_AF_INET,
  783. G_SOCKET_FAMILY_IPV6 = GLIB_SYSDEF_AF_INET6
  784. } GSocketFamily;
  785. /**
  786. * GSocketType:
  787. * @G_SOCKET_TYPE_INVALID: Type unknown or wrong
  788. * @G_SOCKET_TYPE_STREAM: Reliable connection-based byte streams (e.g. TCP).
  789. * @G_SOCKET_TYPE_DATAGRAM: Connectionless, unreliable datagram passing.
  790. * (e.g. UDP)
  791. * @G_SOCKET_TYPE_SEQPACKET: Reliable connection-based passing of datagrams
  792. * of fixed maximum length (e.g. SCTP).
  793. *
  794. * Flags used when creating a #GSocket. Some protocols may not implement
  795. * all the socket types.
  796. *
  797. * Since: 2.22
  798. */
  799. typedef enum
  800. {
  801. G_SOCKET_TYPE_INVALID,
  802. G_SOCKET_TYPE_STREAM,
  803. G_SOCKET_TYPE_DATAGRAM,
  804. G_SOCKET_TYPE_SEQPACKET
  805. } GSocketType;
  806. /**
  807. * GSocketMsgFlags:
  808. * @G_SOCKET_MSG_NONE: No flags.
  809. * @G_SOCKET_MSG_OOB: Request to send/receive out of band data.
  810. * @G_SOCKET_MSG_PEEK: Read data from the socket without removing it from
  811. * the queue.
  812. * @G_SOCKET_MSG_DONTROUTE: Don't use a gateway to send out the packet,
  813. * only send to hosts on directly connected networks.
  814. *
  815. * Flags used in g_socket_receive_message() and g_socket_send_message().
  816. * The flags listed in the enum are some commonly available flags, but the
  817. * values used for them are the same as on the platform, and any other flags
  818. * are passed in/out as is. So to use a platform specific flag, just include
  819. * the right system header and pass in the flag.
  820. *
  821. * Since: 2.22
  822. */
  823. typedef enum /*< flags >*/
  824. {
  825. G_SOCKET_MSG_NONE,
  826. G_SOCKET_MSG_OOB = GLIB_SYSDEF_MSG_OOB,
  827. G_SOCKET_MSG_PEEK = GLIB_SYSDEF_MSG_PEEK,
  828. G_SOCKET_MSG_DONTROUTE = GLIB_SYSDEF_MSG_DONTROUTE
  829. } GSocketMsgFlags;
  830. /**
  831. * GSocketProtocol:
  832. * @G_SOCKET_PROTOCOL_UNKNOWN: The protocol type is unknown
  833. * @G_SOCKET_PROTOCOL_DEFAULT: The default protocol for the family/type
  834. * @G_SOCKET_PROTOCOL_TCP: TCP over IP
  835. * @G_SOCKET_PROTOCOL_UDP: UDP over IP
  836. * @G_SOCKET_PROTOCOL_SCTP: SCTP over IP
  837. *
  838. * A protocol identifier is specified when creating a #GSocket, which is a
  839. * family/type specific identifier, where 0 means the default protocol for
  840. * the particular family/type.
  841. *
  842. * This enum contains a set of commonly available and used protocols. You
  843. * can also pass any other identifiers handled by the platform in order to
  844. * use protocols not listed here.
  845. *
  846. * Since: 2.22
  847. */
  848. typedef enum {
  849. G_SOCKET_PROTOCOL_UNKNOWN = -1,
  850. G_SOCKET_PROTOCOL_DEFAULT = 0,
  851. G_SOCKET_PROTOCOL_TCP = 6,
  852. G_SOCKET_PROTOCOL_UDP = 17,
  853. G_SOCKET_PROTOCOL_SCTP = 132
  854. } GSocketProtocol;
  855. /**
  856. * GZlibCompressorFormat:
  857. * @G_ZLIB_COMPRESSOR_FORMAT_ZLIB: deflate compression with zlib header
  858. * @G_ZLIB_COMPRESSOR_FORMAT_GZIP: gzip file format
  859. * @G_ZLIB_COMPRESSOR_FORMAT_RAW: deflate compression with no header
  860. *
  861. * Used to select the type of data format to use for #GZlibDecompressor
  862. * and #GZlibCompressor.
  863. *
  864. * Since: 2.24
  865. */
  866. typedef enum {
  867. G_ZLIB_COMPRESSOR_FORMAT_ZLIB,
  868. G_ZLIB_COMPRESSOR_FORMAT_GZIP,
  869. G_ZLIB_COMPRESSOR_FORMAT_RAW
  870. } GZlibCompressorFormat;
  871. /**
  872. * GUnixSocketAddressType:
  873. * @G_UNIX_SOCKET_ADDRESS_INVALID: invalid
  874. * @G_UNIX_SOCKET_ADDRESS_ANONYMOUS: anonymous
  875. * @G_UNIX_SOCKET_ADDRESS_PATH: a filesystem path
  876. * @G_UNIX_SOCKET_ADDRESS_ABSTRACT: an abstract name
  877. * @G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED: an abstract name, 0-padded
  878. * to the full length of a unix socket name
  879. *
  880. * The type of name used by a #GUnixSocketAddress.
  881. * %G_UNIX_SOCKET_ADDRESS_PATH indicates a traditional unix domain
  882. * socket bound to a filesystem path. %G_UNIX_SOCKET_ADDRESS_ANONYMOUS
  883. * indicates a socket not bound to any name (eg, a client-side socket,
  884. * or a socket created with socketpair()).
  885. *
  886. * For abstract sockets, there are two incompatible ways of naming
  887. * them; the man pages suggest using the entire `struct sockaddr_un`
  888. * as the name, padding the unused parts of the %sun_path field with
  889. * zeroes; this corresponds to %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED.
  890. * However, many programs instead just use a portion of %sun_path, and
  891. * pass an appropriate smaller length to bind() or connect(). This is
  892. * %G_UNIX_SOCKET_ADDRESS_ABSTRACT.
  893. *
  894. * Since: 2.26
  895. */
  896. typedef enum {
  897. G_UNIX_SOCKET_ADDRESS_INVALID,
  898. G_UNIX_SOCKET_ADDRESS_ANONYMOUS,
  899. G_UNIX_SOCKET_ADDRESS_PATH,
  900. G_UNIX_SOCKET_ADDRESS_ABSTRACT,
  901. G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED
  902. } GUnixSocketAddressType;
  903. /**
  904. * GBusType:
  905. * @G_BUS_TYPE_STARTER: An alias for the message bus that activated the process, if any.
  906. * @G_BUS_TYPE_NONE: Not a message bus.
  907. * @G_BUS_TYPE_SYSTEM: The system-wide message bus.
  908. * @G_BUS_TYPE_SESSION: The login session message bus.
  909. *
  910. * An enumeration for well-known message buses.
  911. *
  912. * Since: 2.26
  913. */
  914. typedef enum
  915. {
  916. G_BUS_TYPE_STARTER = -1,
  917. G_BUS_TYPE_NONE = 0,
  918. G_BUS_TYPE_SYSTEM = 1,
  919. G_BUS_TYPE_SESSION = 2
  920. } GBusType;
  921. /**
  922. * GBusNameOwnerFlags:
  923. * @G_BUS_NAME_OWNER_FLAGS_NONE: No flags set.
  924. * @G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT: Allow another message bus connection to claim the name.
  925. * @G_BUS_NAME_OWNER_FLAGS_REPLACE: If another message bus connection owns the name and have
  926. * specified %G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, then take the name from the other connection.
  927. * @G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE: If another message bus connection owns the name, immediately
  928. * return an error from g_bus_own_name() rather than entering the waiting queue for that name. (Since 2.54)
  929. *
  930. * Flags used in g_bus_own_name().
  931. *
  932. * Since: 2.26
  933. */
  934. typedef enum
  935. {
  936. G_BUS_NAME_OWNER_FLAGS_NONE = 0, /*< nick=none >*/
  937. G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT = (1<<0), /*< nick=allow-replacement >*/
  938. G_BUS_NAME_OWNER_FLAGS_REPLACE = (1<<1), /*< nick=replace >*/
  939. G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE = (1<<2) /*< nick=do-not-queue >*/
  940. } GBusNameOwnerFlags;
  941. /* When adding new flags, their numeric values must currently match those
  942. * used in the D-Bus Specification. */
  943. /**
  944. * GBusNameWatcherFlags:
  945. * @G_BUS_NAME_WATCHER_FLAGS_NONE: No flags set.
  946. * @G_BUS_NAME_WATCHER_FLAGS_AUTO_START: If no-one owns the name when
  947. * beginning to watch the name, ask the bus to launch an owner for the
  948. * name.
  949. *
  950. * Flags used in g_bus_watch_name().
  951. *
  952. * Since: 2.26
  953. */
  954. typedef enum
  955. {
  956. G_BUS_NAME_WATCHER_FLAGS_NONE = 0,
  957. G_BUS_NAME_WATCHER_FLAGS_AUTO_START = (1<<0)
  958. } GBusNameWatcherFlags;
  959. /**
  960. * GDBusProxyFlags:
  961. * @G_DBUS_PROXY_FLAGS_NONE: No flags set.
  962. * @G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES: Don't load properties.
  963. * @G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS: Don't connect to signals on the remote object.
  964. * @G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START: If the proxy is for a well-known name,
  965. * do not ask the bus to launch an owner during proxy initialization or a method call.
  966. * This flag is only meaningful in proxies for well-known names.
  967. * @G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES: If set, the property value for any __invalidated property__ will be (asynchronously) retrieved upon receiving the [`PropertiesChanged`](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties) D-Bus signal and the property will not cause emission of the #GDBusProxy::g-properties-changed signal. When the value is received the #GDBusProxy::g-properties-changed signal is emitted for the property along with the retrieved value. Since 2.32.
  968. * @G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION: If the proxy is for a well-known name,
  969. * do not ask the bus to launch an owner during proxy initialization, but allow it to be
  970. * autostarted by a method call. This flag is only meaningful in proxies for well-known names,
  971. * and only if %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is not also specified.
  972. * @G_DBUS_PROXY_FLAGS_NO_MATCH_RULE: Don't actually send the AddMatch D-Bus
  973. * call for this signal subscription. This gives you more control
  974. * over which match rules you add (but you must add them manually). (Since: 2.72)
  975. *
  976. * Flags used when constructing an instance of a #GDBusProxy derived class.
  977. *
  978. * Since: 2.26
  979. */
  980. typedef enum
  981. {
  982. G_DBUS_PROXY_FLAGS_NONE = 0,
  983. G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES = (1<<0),
  984. G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS = (1<<1),
  985. G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START = (1<<2),
  986. G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES = (1<<3),
  987. G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION = (1<<4),
  988. G_DBUS_PROXY_FLAGS_NO_MATCH_RULE GIO_AVAILABLE_ENUMERATOR_IN_2_72 = (1<<5)
  989. } GDBusProxyFlags;
  990. /**
  991. * GDBusError:
  992. * @G_DBUS_ERROR_FAILED:
  993. * A generic error; "something went wrong" - see the error message for
  994. * more.
  995. * @G_DBUS_ERROR_NO_MEMORY:
  996. * There was not enough memory to complete an operation.
  997. * @G_DBUS_ERROR_SERVICE_UNKNOWN:
  998. * The bus doesn't know how to launch a service to supply the bus name
  999. * you wanted.
  1000. * @G_DBUS_ERROR_NAME_HAS_NO_OWNER:
  1001. * The bus name you referenced doesn't exist (i.e. no application owns
  1002. * it).
  1003. * @G_DBUS_ERROR_NO_REPLY:
  1004. * No reply to a message expecting one, usually means a timeout occurred.
  1005. * @G_DBUS_ERROR_IO_ERROR:
  1006. * Something went wrong reading or writing to a socket, for example.
  1007. * @G_DBUS_ERROR_BAD_ADDRESS:
  1008. * A D-Bus bus address was malformed.
  1009. * @G_DBUS_ERROR_NOT_SUPPORTED:
  1010. * Requested operation isn't supported (like ENOSYS on UNIX).
  1011. * @G_DBUS_ERROR_LIMITS_EXCEEDED:
  1012. * Some limited resource is exhausted.
  1013. * @G_DBUS_ERROR_ACCESS_DENIED:
  1014. * Security restrictions don't allow doing what you're trying to do.
  1015. * @G_DBUS_ERROR_AUTH_FAILED:
  1016. * Authentication didn't work.
  1017. * @G_DBUS_ERROR_NO_SERVER:
  1018. * Unable to connect to server (probably caused by ECONNREFUSED on a
  1019. * socket).
  1020. * @G_DBUS_ERROR_TIMEOUT:
  1021. * Certain timeout errors, possibly ETIMEDOUT on a socket. Note that
  1022. * %G_DBUS_ERROR_NO_REPLY is used for message reply timeouts. Warning:
  1023. * this is confusingly-named given that %G_DBUS_ERROR_TIMED_OUT also
  1024. * exists. We can't fix it for compatibility reasons so just be
  1025. * careful.
  1026. * @G_DBUS_ERROR_NO_NETWORK:
  1027. * No network access (probably ENETUNREACH on a socket).
  1028. * @G_DBUS_ERROR_ADDRESS_IN_USE:
  1029. * Can't bind a socket since its address is in use (i.e. EADDRINUSE).
  1030. * @G_DBUS_ERROR_DISCONNECTED:
  1031. * The connection is disconnected and you're trying to use it.
  1032. * @G_DBUS_ERROR_INVALID_ARGS:
  1033. * Invalid arguments passed to a method call.
  1034. * @G_DBUS_ERROR_FILE_NOT_FOUND:
  1035. * Missing file.
  1036. * @G_DBUS_ERROR_FILE_EXISTS:
  1037. * Existing file and the operation you're using does not silently overwrite.
  1038. * @G_DBUS_ERROR_UNKNOWN_METHOD:
  1039. * Method name you invoked isn't known by the object you invoked it on.
  1040. * @G_DBUS_ERROR_UNKNOWN_OBJECT:
  1041. * Object you invoked a method on isn't known. Since 2.42
  1042. * @G_DBUS_ERROR_UNKNOWN_INTERFACE:
  1043. * Interface you invoked a method on isn't known by the object. Since 2.42
  1044. * @G_DBUS_ERROR_UNKNOWN_PROPERTY:
  1045. * Property you tried to access isn't known by the object. Since 2.42
  1046. * @G_DBUS_ERROR_PROPERTY_READ_ONLY:
  1047. * Property you tried to set is read-only. Since 2.42
  1048. * @G_DBUS_ERROR_TIMED_OUT:
  1049. * Certain timeout errors, e.g. while starting a service. Warning: this is
  1050. * confusingly-named given that %G_DBUS_ERROR_TIMEOUT also exists. We
  1051. * can't fix it for compatibility reasons so just be careful.
  1052. * @G_DBUS_ERROR_MATCH_RULE_NOT_FOUND:
  1053. * Tried to remove or modify a match rule that didn't exist.
  1054. * @G_DBUS_ERROR_MATCH_RULE_INVALID:
  1055. * The match rule isn't syntactically valid.
  1056. * @G_DBUS_ERROR_SPAWN_EXEC_FAILED:
  1057. * While starting a new process, the exec() call failed.
  1058. * @G_DBUS_ERROR_SPAWN_FORK_FAILED:
  1059. * While starting a new process, the fork() call failed.
  1060. * @G_DBUS_ERROR_SPAWN_CHILD_EXITED:
  1061. * While starting a new process, the child exited with a status code.
  1062. * @G_DBUS_ERROR_SPAWN_CHILD_SIGNALED:
  1063. * While starting a new process, the child exited on a signal.
  1064. * @G_DBUS_ERROR_SPAWN_FAILED:
  1065. * While starting a new process, something went wrong.
  1066. * @G_DBUS_ERROR_SPAWN_SETUP_FAILED:
  1067. * We failed to setup the environment correctly.
  1068. * @G_DBUS_ERROR_SPAWN_CONFIG_INVALID:
  1069. * We failed to setup the config parser correctly.
  1070. * @G_DBUS_ERROR_SPAWN_SERVICE_INVALID:
  1071. * Bus name was not valid.
  1072. * @G_DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND:
  1073. * Service file not found in system-services directory.
  1074. * @G_DBUS_ERROR_SPAWN_PERMISSIONS_INVALID:
  1075. * Permissions are incorrect on the setuid helper.
  1076. * @G_DBUS_ERROR_SPAWN_FILE_INVALID:
  1077. * Service file invalid (Name, User or Exec missing).
  1078. * @G_DBUS_ERROR_SPAWN_NO_MEMORY:
  1079. * Tried to get a UNIX process ID and it wasn't available.
  1080. * @G_DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN:
  1081. * Tried to get a UNIX process ID and it wasn't available.
  1082. * @G_DBUS_ERROR_INVALID_SIGNATURE:
  1083. * A type signature is not valid.
  1084. * @G_DBUS_ERROR_INVALID_FILE_CONTENT:
  1085. * A file contains invalid syntax or is otherwise broken.
  1086. * @G_DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN:
  1087. * Asked for SELinux security context and it wasn't available.
  1088. * @G_DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN:
  1089. * Asked for ADT audit data and it wasn't available.
  1090. * @G_DBUS_ERROR_OBJECT_PATH_IN_USE:
  1091. * There's already an object with the requested object path.
  1092. *
  1093. * Error codes for the %G_DBUS_ERROR error domain.
  1094. *
  1095. * Since: 2.26
  1096. */
  1097. typedef enum
  1098. {
  1099. /* Well-known errors in the org.freedesktop.DBus.Error namespace */
  1100. G_DBUS_ERROR_FAILED, /* org.freedesktop.DBus.Error.Failed */
  1101. G_DBUS_ERROR_NO_MEMORY, /* org.freedesktop.DBus.Error.NoMemory */
  1102. G_DBUS_ERROR_SERVICE_UNKNOWN, /* org.freedesktop.DBus.Error.ServiceUnknown */
  1103. G_DBUS_ERROR_NAME_HAS_NO_OWNER, /* org.freedesktop.DBus.Error.NameHasNoOwner */
  1104. G_DBUS_ERROR_NO_REPLY, /* org.freedesktop.DBus.Error.NoReply */
  1105. G_DBUS_ERROR_IO_ERROR, /* org.freedesktop.DBus.Error.IOError */
  1106. G_DBUS_ERROR_BAD_ADDRESS, /* org.freedesktop.DBus.Error.BadAddress */
  1107. G_DBUS_ERROR_NOT_SUPPORTED, /* org.freedesktop.DBus.Error.NotSupported */
  1108. G_DBUS_ERROR_LIMITS_EXCEEDED, /* org.freedesktop.DBus.Error.LimitsExceeded */
  1109. G_DBUS_ERROR_ACCESS_DENIED, /* org.freedesktop.DBus.Error.AccessDenied */
  1110. G_DBUS_ERROR_AUTH_FAILED, /* org.freedesktop.DBus.Error.AuthFailed */
  1111. G_DBUS_ERROR_NO_SERVER, /* org.freedesktop.DBus.Error.NoServer */
  1112. G_DBUS_ERROR_TIMEOUT, /* org.freedesktop.DBus.Error.Timeout */
  1113. G_DBUS_ERROR_NO_NETWORK, /* org.freedesktop.DBus.Error.NoNetwork */
  1114. G_DBUS_ERROR_ADDRESS_IN_USE, /* org.freedesktop.DBus.Error.AddressInUse */
  1115. G_DBUS_ERROR_DISCONNECTED, /* org.freedesktop.DBus.Error.Disconnected */
  1116. G_DBUS_ERROR_INVALID_ARGS, /* org.freedesktop.DBus.Error.InvalidArgs */
  1117. G_DBUS_ERROR_FILE_NOT_FOUND, /* org.freedesktop.DBus.Error.FileNotFound */
  1118. G_DBUS_ERROR_FILE_EXISTS, /* org.freedesktop.DBus.Error.FileExists */
  1119. G_DBUS_ERROR_UNKNOWN_METHOD, /* org.freedesktop.DBus.Error.UnknownMethod */
  1120. G_DBUS_ERROR_TIMED_OUT, /* org.freedesktop.DBus.Error.TimedOut */
  1121. G_DBUS_ERROR_MATCH_RULE_NOT_FOUND, /* org.freedesktop.DBus.Error.MatchRuleNotFound */
  1122. G_DBUS_ERROR_MATCH_RULE_INVALID, /* org.freedesktop.DBus.Error.MatchRuleInvalid */
  1123. G_DBUS_ERROR_SPAWN_EXEC_FAILED, /* org.freedesktop.DBus.Error.Spawn.ExecFailed */
  1124. G_DBUS_ERROR_SPAWN_FORK_FAILED, /* org.freedesktop.DBus.Error.Spawn.ForkFailed */
  1125. G_DBUS_ERROR_SPAWN_CHILD_EXITED, /* org.freedesktop.DBus.Error.Spawn.ChildExited */
  1126. G_DBUS_ERROR_SPAWN_CHILD_SIGNALED, /* org.freedesktop.DBus.Error.Spawn.ChildSignaled */
  1127. G_DBUS_ERROR_SPAWN_FAILED, /* org.freedesktop.DBus.Error.Spawn.Failed */
  1128. G_DBUS_ERROR_SPAWN_SETUP_FAILED, /* org.freedesktop.DBus.Error.Spawn.FailedToSetup */
  1129. G_DBUS_ERROR_SPAWN_CONFIG_INVALID, /* org.freedesktop.DBus.Error.Spawn.ConfigInvalid */
  1130. G_DBUS_ERROR_SPAWN_SERVICE_INVALID, /* org.freedesktop.DBus.Error.Spawn.ServiceNotValid */
  1131. G_DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND, /* org.freedesktop.DBus.Error.Spawn.ServiceNotFound */
  1132. G_DBUS_ERROR_SPAWN_PERMISSIONS_INVALID, /* org.freedesktop.DBus.Error.Spawn.PermissionsInvalid */
  1133. G_DBUS_ERROR_SPAWN_FILE_INVALID, /* org.freedesktop.DBus.Error.Spawn.FileInvalid */
  1134. G_DBUS_ERROR_SPAWN_NO_MEMORY, /* org.freedesktop.DBus.Error.Spawn.NoMemory */
  1135. G_DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN, /* org.freedesktop.DBus.Error.UnixProcessIdUnknown */
  1136. G_DBUS_ERROR_INVALID_SIGNATURE, /* org.freedesktop.DBus.Error.InvalidSignature */
  1137. G_DBUS_ERROR_INVALID_FILE_CONTENT, /* org.freedesktop.DBus.Error.InvalidFileContent */
  1138. G_DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN, /* org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown */
  1139. G_DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN, /* org.freedesktop.DBus.Error.AdtAuditDataUnknown */
  1140. G_DBUS_ERROR_OBJECT_PATH_IN_USE, /* org.freedesktop.DBus.Error.ObjectPathInUse */
  1141. G_DBUS_ERROR_UNKNOWN_OBJECT, /* org.freedesktop.DBus.Error.UnknownObject */
  1142. G_DBUS_ERROR_UNKNOWN_INTERFACE, /* org.freedesktop.DBus.Error.UnknownInterface */
  1143. G_DBUS_ERROR_UNKNOWN_PROPERTY, /* org.freedesktop.DBus.Error.UnknownProperty */
  1144. G_DBUS_ERROR_PROPERTY_READ_ONLY /* org.freedesktop.DBus.Error.PropertyReadOnly */
  1145. } GDBusError;
  1146. /* Remember to update g_dbus_error_quark() in gdbuserror.c if you extend this enumeration */
  1147. /**
  1148. * GDBusConnectionFlags:
  1149. * @G_DBUS_CONNECTION_FLAGS_NONE: No flags set.
  1150. * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT: Perform authentication against server.
  1151. * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER: Perform authentication against client.
  1152. * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: When
  1153. * authenticating as a server, allow the anonymous authentication
  1154. * method.
  1155. * @G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION: Pass this flag if connecting to a peer that is a
  1156. * message bus. This means that the Hello() method will be invoked as part of the connection setup.
  1157. * @G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING: If set, processing of D-Bus messages is
  1158. * delayed until g_dbus_connection_start_message_processing() is called.
  1159. * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER: When authenticating
  1160. * as a server, require the UID of the peer to be the same as the UID of the server. (Since: 2.68)
  1161. * @G_DBUS_CONNECTION_FLAGS_CROSS_NAMESPACE: When authenticating, try to use
  1162. * protocols that work across a Linux user namespace boundary, even if this
  1163. * reduces interoperability with older D-Bus implementations. This currently
  1164. * affects client-side `EXTERNAL` authentication, for which this flag makes
  1165. * connections to a server in another user namespace succeed, but causes
  1166. * a deadlock when connecting to a GDBus server older than 2.73.3. Since: 2.74
  1167. *
  1168. * Flags used when creating a new #GDBusConnection.
  1169. *
  1170. * Since: 2.26
  1171. */
  1172. typedef enum {
  1173. G_DBUS_CONNECTION_FLAGS_NONE = 0,
  1174. G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT = (1<<0),
  1175. G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER = (1<<1),
  1176. G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS = (1<<2),
  1177. G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION = (1<<3),
  1178. G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING = (1<<4),
  1179. G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER GIO_AVAILABLE_ENUMERATOR_IN_2_68 = (1<<5),
  1180. G_DBUS_CONNECTION_FLAGS_CROSS_NAMESPACE GIO_AVAILABLE_ENUMERATOR_IN_2_74 = (1<<6)
  1181. } GDBusConnectionFlags;
  1182. /**
  1183. * GDBusCapabilityFlags:
  1184. * @G_DBUS_CAPABILITY_FLAGS_NONE: No flags set.
  1185. * @G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING: The connection
  1186. * supports exchanging UNIX file descriptors with the remote peer.
  1187. *
  1188. * Capabilities negotiated with the remote peer.
  1189. *
  1190. * Since: 2.26
  1191. */
  1192. typedef enum {
  1193. G_DBUS_CAPABILITY_FLAGS_NONE = 0,
  1194. G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING = (1<<0)
  1195. } GDBusCapabilityFlags;
  1196. /**
  1197. * GDBusCallFlags:
  1198. * @G_DBUS_CALL_FLAGS_NONE: No flags set.
  1199. * @G_DBUS_CALL_FLAGS_NO_AUTO_START: The bus must not launch
  1200. * an owner for the destination name in response to this method
  1201. * invocation.
  1202. * @G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION: the caller is prepared to
  1203. * wait for interactive authorization. Since 2.46.
  1204. *
  1205. * Flags used in g_dbus_connection_call() and similar APIs.
  1206. *
  1207. * Since: 2.26
  1208. */
  1209. typedef enum {
  1210. G_DBUS_CALL_FLAGS_NONE = 0,
  1211. G_DBUS_CALL_FLAGS_NO_AUTO_START = (1<<0),
  1212. G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION = (1<<1)
  1213. } GDBusCallFlags;
  1214. /* (1<<31) is reserved for internal use by GDBusConnection, do not use it. */
  1215. /**
  1216. * GDBusMessageType:
  1217. * @G_DBUS_MESSAGE_TYPE_INVALID: Message is of invalid type.
  1218. * @G_DBUS_MESSAGE_TYPE_METHOD_CALL: Method call.
  1219. * @G_DBUS_MESSAGE_TYPE_METHOD_RETURN: Method reply.
  1220. * @G_DBUS_MESSAGE_TYPE_ERROR: Error reply.
  1221. * @G_DBUS_MESSAGE_TYPE_SIGNAL: Signal emission.
  1222. *
  1223. * Message types used in #GDBusMessage.
  1224. *
  1225. * Since: 2.26
  1226. */
  1227. typedef enum {
  1228. G_DBUS_MESSAGE_TYPE_INVALID,
  1229. G_DBUS_MESSAGE_TYPE_METHOD_CALL,
  1230. G_DBUS_MESSAGE_TYPE_METHOD_RETURN,
  1231. G_DBUS_MESSAGE_TYPE_ERROR,
  1232. G_DBUS_MESSAGE_TYPE_SIGNAL
  1233. } GDBusMessageType;
  1234. /**
  1235. * GDBusMessageFlags:
  1236. * @G_DBUS_MESSAGE_FLAGS_NONE: No flags set.
  1237. * @G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED: A reply is not expected.
  1238. * @G_DBUS_MESSAGE_FLAGS_NO_AUTO_START: The bus must not launch an
  1239. * owner for the destination name in response to this message.
  1240. * @G_DBUS_MESSAGE_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION: If set on a method
  1241. * call, this flag means that the caller is prepared to wait for interactive
  1242. * authorization. Since 2.46.
  1243. *
  1244. * Message flags used in #GDBusMessage.
  1245. *
  1246. * Since: 2.26
  1247. */
  1248. typedef enum {
  1249. G_DBUS_MESSAGE_FLAGS_NONE = 0,
  1250. G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED = (1<<0),
  1251. G_DBUS_MESSAGE_FLAGS_NO_AUTO_START = (1<<1),
  1252. G_DBUS_MESSAGE_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION = (1<<2)
  1253. } GDBusMessageFlags;
  1254. /**
  1255. * GDBusMessageHeaderField:
  1256. * @G_DBUS_MESSAGE_HEADER_FIELD_INVALID: Not a valid header field.
  1257. * @G_DBUS_MESSAGE_HEADER_FIELD_PATH: The object path.
  1258. * @G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE: The interface name.
  1259. * @G_DBUS_MESSAGE_HEADER_FIELD_MEMBER: The method or signal name.
  1260. * @G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME: The name of the error that occurred.
  1261. * @G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL: The serial number the message is a reply to.
  1262. * @G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION: The name the message is intended for.
  1263. * @G_DBUS_MESSAGE_HEADER_FIELD_SENDER: Unique name of the sender of the message (filled in by the bus).
  1264. * @G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE: The signature of the message body.
  1265. * @G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS: The number of UNIX file descriptors that accompany the message.
  1266. *
  1267. * Header fields used in #GDBusMessage.
  1268. *
  1269. * Since: 2.26
  1270. */
  1271. typedef enum {
  1272. G_DBUS_MESSAGE_HEADER_FIELD_INVALID,
  1273. G_DBUS_MESSAGE_HEADER_FIELD_PATH,
  1274. G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE,
  1275. G_DBUS_MESSAGE_HEADER_FIELD_MEMBER,
  1276. G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME,
  1277. G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL,
  1278. G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION,
  1279. G_DBUS_MESSAGE_HEADER_FIELD_SENDER,
  1280. G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE,
  1281. G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS
  1282. } GDBusMessageHeaderField;
  1283. /**
  1284. * GDBusPropertyInfoFlags:
  1285. * @G_DBUS_PROPERTY_INFO_FLAGS_NONE: No flags set.
  1286. * @G_DBUS_PROPERTY_INFO_FLAGS_READABLE: Property is readable.
  1287. * @G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE: Property is writable.
  1288. *
  1289. * Flags describing the access control of a D-Bus property.
  1290. *
  1291. * Since: 2.26
  1292. */
  1293. typedef enum
  1294. {
  1295. G_DBUS_PROPERTY_INFO_FLAGS_NONE = 0,
  1296. G_DBUS_PROPERTY_INFO_FLAGS_READABLE = (1<<0),
  1297. G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE = (1<<1)
  1298. } GDBusPropertyInfoFlags;
  1299. /**
  1300. * GDBusSubtreeFlags:
  1301. * @G_DBUS_SUBTREE_FLAGS_NONE: No flags set.
  1302. * @G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES: Method calls to objects not in the enumerated range
  1303. * will still be dispatched. This is useful if you want
  1304. * to dynamically spawn objects in the subtree.
  1305. *
  1306. * Flags passed to g_dbus_connection_register_subtree().
  1307. *
  1308. * Since: 2.26
  1309. */
  1310. typedef enum
  1311. {
  1312. G_DBUS_SUBTREE_FLAGS_NONE = 0,
  1313. G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES = (1<<0)
  1314. } GDBusSubtreeFlags;
  1315. /**
  1316. * GDBusServerFlags:
  1317. * @G_DBUS_SERVER_FLAGS_NONE: No flags set.
  1318. * @G_DBUS_SERVER_FLAGS_RUN_IN_THREAD: All #GDBusServer::new-connection
  1319. * signals will run in separated dedicated threads (see signal for
  1320. * details).
  1321. * @G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: Allow the anonymous
  1322. * authentication method.
  1323. * @G_DBUS_SERVER_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER: Require the UID of the
  1324. * peer to be the same as the UID of the server when authenticating. (Since: 2.68)
  1325. *
  1326. * Flags used when creating a #GDBusServer.
  1327. *
  1328. * Since: 2.26
  1329. */
  1330. typedef enum
  1331. {
  1332. G_DBUS_SERVER_FLAGS_NONE = 0,
  1333. G_DBUS_SERVER_FLAGS_RUN_IN_THREAD = (1<<0),
  1334. G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS = (1<<1),
  1335. G_DBUS_SERVER_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER GIO_AVAILABLE_ENUMERATOR_IN_2_68 = (1<<2)
  1336. } GDBusServerFlags;
  1337. /**
  1338. * GDBusSignalFlags:
  1339. * @G_DBUS_SIGNAL_FLAGS_NONE: No flags set.
  1340. * @G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE: Don't actually send the AddMatch
  1341. * D-Bus call for this signal subscription. This gives you more control
  1342. * over which match rules you add (but you must add them manually).
  1343. * @G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE: Match first arguments that
  1344. * contain a bus or interface name with the given namespace.
  1345. * @G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH: Match first arguments that
  1346. * contain an object path that is either equivalent to the given path,
  1347. * or one of the paths is a subpath of the other.
  1348. *
  1349. * Flags used when subscribing to signals via g_dbus_connection_signal_subscribe().
  1350. *
  1351. * Since: 2.26
  1352. */
  1353. typedef enum /*< flags >*/
  1354. {
  1355. G_DBUS_SIGNAL_FLAGS_NONE = 0,
  1356. G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE = (1<<0),
  1357. G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE = (1<<1),
  1358. G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH = (1<<2)
  1359. } GDBusSignalFlags;
  1360. /**
  1361. * GDBusSendMessageFlags:
  1362. * @G_DBUS_SEND_MESSAGE_FLAGS_NONE: No flags set.
  1363. * @G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL: Do not automatically
  1364. * assign a serial number from the #GDBusConnection object when
  1365. * sending a message.
  1366. *
  1367. * Flags used when sending #GDBusMessages on a #GDBusConnection.
  1368. *
  1369. * Since: 2.26
  1370. */
  1371. typedef enum
  1372. {
  1373. G_DBUS_SEND_MESSAGE_FLAGS_NONE = 0,
  1374. G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL = (1<<0)
  1375. } GDBusSendMessageFlags;
  1376. /* (1<<31) is reserved for internal use by GDBusConnection, do not use it. */
  1377. /**
  1378. * GCredentialsType:
  1379. * @G_CREDENTIALS_TYPE_INVALID: Indicates an invalid native credential type.
  1380. * @G_CREDENTIALS_TYPE_LINUX_UCRED: The native credentials type is a `struct ucred`.
  1381. * @G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED: The native credentials type is a `struct cmsgcred`.
  1382. * @G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED: The native credentials type is a `struct sockpeercred`. Added in 2.30.
  1383. * @G_CREDENTIALS_TYPE_SOLARIS_UCRED: The native credentials type is a `ucred_t`. Added in 2.40.
  1384. * @G_CREDENTIALS_TYPE_NETBSD_UNPCBID: The native credentials type is a `struct unpcbid`. Added in 2.42.
  1385. * @G_CREDENTIALS_TYPE_APPLE_XUCRED: The native credentials type is a `struct xucred`. Added in 2.66.
  1386. * @G_CREDENTIALS_TYPE_WIN32_PID: The native credentials type is a PID `DWORD`. Added in 2.72.
  1387. *
  1388. * Enumeration describing different kinds of native credential types.
  1389. *
  1390. * Since: 2.26
  1391. */
  1392. typedef enum
  1393. {
  1394. G_CREDENTIALS_TYPE_INVALID,
  1395. G_CREDENTIALS_TYPE_LINUX_UCRED,
  1396. G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED,
  1397. G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED,
  1398. G_CREDENTIALS_TYPE_SOLARIS_UCRED,
  1399. G_CREDENTIALS_TYPE_NETBSD_UNPCBID,
  1400. G_CREDENTIALS_TYPE_APPLE_XUCRED,
  1401. G_CREDENTIALS_TYPE_WIN32_PID,
  1402. } GCredentialsType;
  1403. /**
  1404. * GDBusMessageByteOrder:
  1405. * @G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN: The byte order is big endian.
  1406. * @G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN: The byte order is little endian.
  1407. *
  1408. * Enumeration used to describe the byte order of a D-Bus message.
  1409. *
  1410. * Since: 2.26
  1411. */
  1412. typedef enum
  1413. {
  1414. G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN = 'B',
  1415. G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN = 'l'
  1416. } GDBusMessageByteOrder;
  1417. /**
  1418. * GApplicationFlags:
  1419. * @G_APPLICATION_FLAGS_NONE: Default. Deprecated in 2.74, use
  1420. * %G_APPLICATION_DEFAULT_FLAGS instead
  1421. * @G_APPLICATION_DEFAULT_FLAGS: Default flags. Since: 2.74
  1422. * @G_APPLICATION_IS_SERVICE: Run as a service. In this mode, registration
  1423. * fails if the service is already running, and the application
  1424. * will initially wait up to 10 seconds for an initial activation
  1425. * message to arrive.
  1426. * @G_APPLICATION_IS_LAUNCHER: Don't try to become the primary instance.
  1427. * @G_APPLICATION_HANDLES_OPEN: This application handles opening files (in
  1428. * the primary instance). Note that this flag only affects the default
  1429. * implementation of local_command_line(), and has no effect if
  1430. * %G_APPLICATION_HANDLES_COMMAND_LINE is given.
  1431. * See g_application_run() for details.
  1432. * @G_APPLICATION_HANDLES_COMMAND_LINE: This application handles command line
  1433. * arguments (in the primary instance). Note that this flag only affect
  1434. * the default implementation of local_command_line().
  1435. * See g_application_run() for details.
  1436. * @G_APPLICATION_SEND_ENVIRONMENT: Send the environment of the
  1437. * launching process to the primary instance. Set this flag if your
  1438. * application is expected to behave differently depending on certain
  1439. * environment variables. For instance, an editor might be expected
  1440. * to use the `GIT_COMMITTER_NAME` environment variable
  1441. * when editing a git commit message. The environment is available
  1442. * to the #GApplication::command-line signal handler, via
  1443. * g_application_command_line_getenv().
  1444. * @G_APPLICATION_NON_UNIQUE: Make no attempts to do any of the typical
  1445. * single-instance application negotiation, even if the application
  1446. * ID is given. The application neither attempts to become the
  1447. * owner of the application ID nor does it check if an existing
  1448. * owner already exists. Everything occurs in the local process.
  1449. * Since: 2.30.
  1450. * @G_APPLICATION_CAN_OVERRIDE_APP_ID: Allow users to override the
  1451. * application ID from the command line with `--gapplication-app-id`.
  1452. * Since: 2.48
  1453. * @G_APPLICATION_ALLOW_REPLACEMENT: Allow another instance to take over
  1454. * the bus name. Since: 2.60
  1455. * @G_APPLICATION_REPLACE: Take over from another instance. This flag is
  1456. * usually set by passing `--gapplication-replace` on the commandline.
  1457. * Since: 2.60
  1458. *
  1459. * Flags used to define the behaviour of a #GApplication.
  1460. *
  1461. * Since: 2.28
  1462. **/
  1463. typedef enum /*< prefix=G_APPLICATION >*/
  1464. {
  1465. G_APPLICATION_FLAGS_NONE GIO_DEPRECATED_ENUMERATOR_IN_2_74_FOR(G_APPLICATION_DEFAULT_FLAGS),
  1466. G_APPLICATION_DEFAULT_FLAGS GIO_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
  1467. G_APPLICATION_IS_SERVICE = (1 << 0),
  1468. G_APPLICATION_IS_LAUNCHER = (1 << 1),
  1469. G_APPLICATION_HANDLES_OPEN = (1 << 2),
  1470. G_APPLICATION_HANDLES_COMMAND_LINE = (1 << 3),
  1471. G_APPLICATION_SEND_ENVIRONMENT = (1 << 4),
  1472. G_APPLICATION_NON_UNIQUE = (1 << 5),
  1473. G_APPLICATION_CAN_OVERRIDE_APP_ID = (1 << 6),
  1474. G_APPLICATION_ALLOW_REPLACEMENT = (1 << 7),
  1475. G_APPLICATION_REPLACE = (1 << 8)
  1476. } GApplicationFlags;
  1477. /**
  1478. * GTlsError:
  1479. * @G_TLS_ERROR_UNAVAILABLE: No TLS provider is available
  1480. * @G_TLS_ERROR_MISC: Miscellaneous TLS error
  1481. * @G_TLS_ERROR_BAD_CERTIFICATE: The certificate presented could not
  1482. * be parsed or failed validation.
  1483. * @G_TLS_ERROR_NOT_TLS: The TLS handshake failed because the
  1484. * peer does not seem to be a TLS server.
  1485. * @G_TLS_ERROR_HANDSHAKE: The TLS handshake failed because the
  1486. * peer's certificate was not acceptable.
  1487. * @G_TLS_ERROR_CERTIFICATE_REQUIRED: The TLS handshake failed because
  1488. * the server requested a client-side certificate, but none was
  1489. * provided. See g_tls_connection_set_certificate().
  1490. * @G_TLS_ERROR_EOF: The TLS connection was closed without proper
  1491. * notice, which may indicate an attack. See
  1492. * g_tls_connection_set_require_close_notify().
  1493. * @G_TLS_ERROR_INAPPROPRIATE_FALLBACK: The TLS handshake failed
  1494. * because the client sent the fallback SCSV, indicating a protocol
  1495. * downgrade attack. Since: 2.60
  1496. * @G_TLS_ERROR_BAD_CERTIFICATE_PASSWORD: The certificate failed
  1497. * to load because a password was incorrect. Since: 2.72
  1498. *
  1499. * An error code used with %G_TLS_ERROR in a #GError returned from a
  1500. * TLS-related routine.
  1501. *
  1502. * Since: 2.28
  1503. */
  1504. typedef enum {
  1505. G_TLS_ERROR_UNAVAILABLE,
  1506. G_TLS_ERROR_MISC,
  1507. G_TLS_ERROR_BAD_CERTIFICATE,
  1508. G_TLS_ERROR_NOT_TLS,
  1509. G_TLS_ERROR_HANDSHAKE,
  1510. G_TLS_ERROR_CERTIFICATE_REQUIRED,
  1511. G_TLS_ERROR_EOF,
  1512. G_TLS_ERROR_INAPPROPRIATE_FALLBACK,
  1513. G_TLS_ERROR_BAD_CERTIFICATE_PASSWORD
  1514. } GTlsError;
  1515. /**
  1516. * GTlsCertificateFlags:
  1517. * @G_TLS_CERTIFICATE_NO_FLAGS: No flags set. Since: 2.74
  1518. * @G_TLS_CERTIFICATE_UNKNOWN_CA: The signing certificate authority is
  1519. * not known.
  1520. * @G_TLS_CERTIFICATE_BAD_IDENTITY: The certificate does not match the
  1521. * expected identity of the site that it was retrieved from.
  1522. * @G_TLS_CERTIFICATE_NOT_ACTIVATED: The certificate's activation time
  1523. * is still in the future
  1524. * @G_TLS_CERTIFICATE_EXPIRED: The certificate has expired
  1525. * @G_TLS_CERTIFICATE_REVOKED: The certificate has been revoked
  1526. * according to the #GTlsConnection's certificate revocation list.
  1527. * @G_TLS_CERTIFICATE_INSECURE: The certificate's algorithm is
  1528. * considered insecure.
  1529. * @G_TLS_CERTIFICATE_GENERIC_ERROR: Some other error occurred validating
  1530. * the certificate
  1531. * @G_TLS_CERTIFICATE_VALIDATE_ALL: the combination of all of the above
  1532. * flags
  1533. *
  1534. * A set of flags describing TLS certification validation. This can be
  1535. * used to describe why a particular certificate was rejected (for
  1536. * example, in #GTlsConnection::accept-certificate).
  1537. *
  1538. * GLib guarantees that if certificate verification fails, at least one
  1539. * flag will be set, but it does not guarantee that all possible flags
  1540. * will be set. Accordingly, you may not safely decide to ignore any
  1541. * particular type of error. For example, it would be incorrect to mask
  1542. * %G_TLS_CERTIFICATE_EXPIRED if you want to allow expired certificates,
  1543. * because this could potentially be the only error flag set even if
  1544. * other problems exist with the certificate.
  1545. *
  1546. * Since: 2.28
  1547. */
  1548. typedef enum {
  1549. G_TLS_CERTIFICATE_NO_FLAGS GIO_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
  1550. G_TLS_CERTIFICATE_UNKNOWN_CA = (1 << 0),
  1551. G_TLS_CERTIFICATE_BAD_IDENTITY = (1 << 1),
  1552. G_TLS_CERTIFICATE_NOT_ACTIVATED = (1 << 2),
  1553. G_TLS_CERTIFICATE_EXPIRED = (1 << 3),
  1554. G_TLS_CERTIFICATE_REVOKED = (1 << 4),
  1555. G_TLS_CERTIFICATE_INSECURE = (1 << 5),
  1556. G_TLS_CERTIFICATE_GENERIC_ERROR = (1 << 6),
  1557. G_TLS_CERTIFICATE_VALIDATE_ALL = 0x007f
  1558. } GTlsCertificateFlags;
  1559. /**
  1560. * GTlsAuthenticationMode:
  1561. * @G_TLS_AUTHENTICATION_NONE: client authentication not required
  1562. * @G_TLS_AUTHENTICATION_REQUESTED: client authentication is requested
  1563. * @G_TLS_AUTHENTICATION_REQUIRED: client authentication is required
  1564. *
  1565. * The client authentication mode for a #GTlsServerConnection.
  1566. *
  1567. * Since: 2.28
  1568. */
  1569. typedef enum {
  1570. G_TLS_AUTHENTICATION_NONE,
  1571. G_TLS_AUTHENTICATION_REQUESTED,
  1572. G_TLS_AUTHENTICATION_REQUIRED
  1573. } GTlsAuthenticationMode;
  1574. /**
  1575. * GTlsChannelBindingType:
  1576. * @G_TLS_CHANNEL_BINDING_TLS_UNIQUE:
  1577. * [`tls-unique`](https://tools.ietf.org/html/rfc5929#section-3) binding
  1578. * type
  1579. * @G_TLS_CHANNEL_BINDING_TLS_SERVER_END_POINT:
  1580. * [`tls-server-end-point`](https://tools.ietf.org/html/rfc5929#section-4)
  1581. * binding type
  1582. * @G_TLS_CHANNEL_BINDING_TLS_EXPORTER:
  1583. * [`tls-exporter`](https://www.rfc-editor.org/rfc/rfc9266.html) binding
  1584. * type. Since: 2.74
  1585. *
  1586. * The type of TLS channel binding data to retrieve from #GTlsConnection
  1587. * or #GDtlsConnection, as documented by RFC 5929 or RFC 9266. The
  1588. * [`tls-unique-for-telnet`](https://tools.ietf.org/html/rfc5929#section-5)
  1589. * binding type is not currently implemented.
  1590. *
  1591. * Since: 2.66
  1592. */
  1593. GIO_AVAILABLE_TYPE_IN_2_66
  1594. typedef enum {
  1595. G_TLS_CHANNEL_BINDING_TLS_UNIQUE,
  1596. G_TLS_CHANNEL_BINDING_TLS_SERVER_END_POINT,
  1597. G_TLS_CHANNEL_BINDING_TLS_EXPORTER GIO_AVAILABLE_ENUMERATOR_IN_2_74,
  1598. } GTlsChannelBindingType;
  1599. /**
  1600. * GTlsChannelBindingError:
  1601. * @G_TLS_CHANNEL_BINDING_ERROR_NOT_IMPLEMENTED: Either entire binding
  1602. * retrieval facility or specific binding type is not implemented in the
  1603. * TLS backend.
  1604. * @G_TLS_CHANNEL_BINDING_ERROR_INVALID_STATE: The handshake is not yet
  1605. * complete on the connection which is a strong requirement for any existing
  1606. * binding type.
  1607. * @G_TLS_CHANNEL_BINDING_ERROR_NOT_AVAILABLE: Handshake is complete but
  1608. * binding data is not available. That normally indicates the TLS
  1609. * implementation failed to provide the binding data. For example, some
  1610. * implementations do not provide a peer certificate for resumed connections.
  1611. * @G_TLS_CHANNEL_BINDING_ERROR_NOT_SUPPORTED: Binding type is not supported
  1612. * on the current connection. This error could be triggered when requesting
  1613. * `tls-server-end-point` binding data for a certificate which has no hash
  1614. * function or uses multiple hash functions.
  1615. * @G_TLS_CHANNEL_BINDING_ERROR_GENERAL_ERROR: Any other backend error
  1616. * preventing binding data retrieval.
  1617. *
  1618. * An error code used with %G_TLS_CHANNEL_BINDING_ERROR in a #GError to
  1619. * indicate a TLS channel binding retrieval error.
  1620. *
  1621. * Since: 2.66
  1622. */
  1623. GIO_AVAILABLE_TYPE_IN_2_66
  1624. typedef enum {
  1625. G_TLS_CHANNEL_BINDING_ERROR_NOT_IMPLEMENTED,
  1626. G_TLS_CHANNEL_BINDING_ERROR_INVALID_STATE,
  1627. G_TLS_CHANNEL_BINDING_ERROR_NOT_AVAILABLE,
  1628. G_TLS_CHANNEL_BINDING_ERROR_NOT_SUPPORTED,
  1629. G_TLS_CHANNEL_BINDING_ERROR_GENERAL_ERROR
  1630. } GTlsChannelBindingError;
  1631. /**
  1632. * GTlsRehandshakeMode:
  1633. * @G_TLS_REHANDSHAKE_NEVER: Never allow rehandshaking
  1634. * @G_TLS_REHANDSHAKE_SAFELY: Allow safe rehandshaking only
  1635. * @G_TLS_REHANDSHAKE_UNSAFELY: Allow unsafe rehandshaking
  1636. *
  1637. * When to allow rehandshaking. See
  1638. * g_tls_connection_set_rehandshake_mode().
  1639. *
  1640. * Since: 2.28
  1641. *
  1642. * Deprecated: 2.60. Changing the rehandshake mode is no longer
  1643. * required for compatibility. Also, rehandshaking has been removed
  1644. * from the TLS protocol in TLS 1.3.
  1645. */
  1646. typedef enum {
  1647. G_TLS_REHANDSHAKE_NEVER,
  1648. G_TLS_REHANDSHAKE_SAFELY,
  1649. G_TLS_REHANDSHAKE_UNSAFELY
  1650. } GTlsRehandshakeMode GIO_DEPRECATED_TYPE_IN_2_60;
  1651. /**
  1652. * GTlsPasswordFlags:
  1653. * @G_TLS_PASSWORD_NONE: No flags
  1654. * @G_TLS_PASSWORD_RETRY: The password was wrong, and the user should retry.
  1655. * @G_TLS_PASSWORD_MANY_TRIES: Hint to the user that the password has been
  1656. * wrong many times, and the user may not have many chances left.
  1657. * @G_TLS_PASSWORD_FINAL_TRY: Hint to the user that this is the last try to get
  1658. * this password right.
  1659. * @G_TLS_PASSWORD_PKCS11_USER: For PKCS #11, the user PIN is required.
  1660. * Since: 2.70.
  1661. * @G_TLS_PASSWORD_PKCS11_SECURITY_OFFICER: For PKCS #11, the security officer
  1662. * PIN is required. Since: 2.70.
  1663. * @G_TLS_PASSWORD_PKCS11_CONTEXT_SPECIFIC: For PKCS #11, the context-specific
  1664. * PIN is required. Since: 2.70.
  1665. *
  1666. * Various flags for the password.
  1667. *
  1668. * Since: 2.30
  1669. */
  1670. typedef enum _GTlsPasswordFlags
  1671. {
  1672. G_TLS_PASSWORD_NONE = 0,
  1673. G_TLS_PASSWORD_RETRY = 1 << 1,
  1674. G_TLS_PASSWORD_MANY_TRIES = 1 << 2,
  1675. G_TLS_PASSWORD_FINAL_TRY = 1 << 3,
  1676. G_TLS_PASSWORD_PKCS11_USER = 1 << 4,
  1677. G_TLS_PASSWORD_PKCS11_SECURITY_OFFICER = 1 << 5,
  1678. G_TLS_PASSWORD_PKCS11_CONTEXT_SPECIFIC = 1 << 6
  1679. } GTlsPasswordFlags;
  1680. /**
  1681. * GTlsInteractionResult:
  1682. * @G_TLS_INTERACTION_UNHANDLED: The interaction was unhandled (i.e. not
  1683. * implemented).
  1684. * @G_TLS_INTERACTION_HANDLED: The interaction completed, and resulting data
  1685. * is available.
  1686. * @G_TLS_INTERACTION_FAILED: The interaction has failed, or was cancelled.
  1687. * and the operation should be aborted.
  1688. *
  1689. * #GTlsInteractionResult is returned by various functions in #GTlsInteraction
  1690. * when finishing an interaction request.
  1691. *
  1692. * Since: 2.30
  1693. */
  1694. typedef enum {
  1695. G_TLS_INTERACTION_UNHANDLED,
  1696. G_TLS_INTERACTION_HANDLED,
  1697. G_TLS_INTERACTION_FAILED
  1698. } GTlsInteractionResult;
  1699. /**
  1700. * GDBusInterfaceSkeletonFlags:
  1701. * @G_DBUS_INTERFACE_SKELETON_FLAGS_NONE: No flags set.
  1702. * @G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD: Each method invocation is handled in
  1703. * a thread dedicated to the invocation. This means that the method implementation can use blocking IO
  1704. * without blocking any other part of the process. It also means that the method implementation must
  1705. * use locking to access data structures used by other threads.
  1706. *
  1707. * Flags describing the behavior of a #GDBusInterfaceSkeleton instance.
  1708. *
  1709. * Since: 2.30
  1710. */
  1711. typedef enum
  1712. {
  1713. G_DBUS_INTERFACE_SKELETON_FLAGS_NONE = 0,
  1714. G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD = (1<<0)
  1715. } GDBusInterfaceSkeletonFlags;
  1716. /**
  1717. * GDBusObjectManagerClientFlags:
  1718. * @G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE: No flags set.
  1719. * @G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START: If not set and the
  1720. * manager is for a well-known name, then request the bus to launch
  1721. * an owner for the name if no-one owns the name. This flag can only
  1722. * be used in managers for well-known names.
  1723. *
  1724. * Flags used when constructing a #GDBusObjectManagerClient.
  1725. *
  1726. * Since: 2.30
  1727. */
  1728. typedef enum
  1729. {
  1730. G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE = 0,
  1731. G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START = (1<<0)
  1732. } GDBusObjectManagerClientFlags;
  1733. /**
  1734. * GTlsDatabaseVerifyFlags:
  1735. * @G_TLS_DATABASE_VERIFY_NONE: No verification flags
  1736. *
  1737. * Flags for g_tls_database_verify_chain().
  1738. *
  1739. * Since: 2.30
  1740. */
  1741. typedef enum /*< flags >*/ {
  1742. G_TLS_DATABASE_VERIFY_NONE = 0
  1743. } GTlsDatabaseVerifyFlags;
  1744. /**
  1745. * GTlsDatabaseLookupFlags:
  1746. * @G_TLS_DATABASE_LOOKUP_NONE: No lookup flags
  1747. * @G_TLS_DATABASE_LOOKUP_KEYPAIR: Restrict lookup to certificates that have
  1748. * a private key.
  1749. *
  1750. * Flags for g_tls_database_lookup_certificate_for_handle(),
  1751. * g_tls_database_lookup_certificate_issuer(),
  1752. * and g_tls_database_lookup_certificates_issued_by().
  1753. *
  1754. * Since: 2.30
  1755. */
  1756. typedef enum {
  1757. G_TLS_DATABASE_LOOKUP_NONE = 0,
  1758. G_TLS_DATABASE_LOOKUP_KEYPAIR = 1
  1759. } GTlsDatabaseLookupFlags;
  1760. /**
  1761. * GTlsCertificateRequestFlags:
  1762. * @G_TLS_CERTIFICATE_REQUEST_NONE: No flags
  1763. *
  1764. * Flags for g_tls_interaction_request_certificate(),
  1765. * g_tls_interaction_request_certificate_async(), and
  1766. * g_tls_interaction_invoke_request_certificate().
  1767. *
  1768. * Since: 2.40
  1769. */
  1770. typedef enum {
  1771. G_TLS_CERTIFICATE_REQUEST_NONE = 0
  1772. } GTlsCertificateRequestFlags;
  1773. /**
  1774. * GTlsProtocolVersion:
  1775. * @G_TLS_PROTOCOL_VERSION_UNKNOWN: No protocol version or unknown protocol version
  1776. * @G_TLS_PROTOCOL_VERSION_SSL_3_0: SSL 3.0, which is insecure and should not be used
  1777. * @G_TLS_PROTOCOL_VERSION_TLS_1_0: TLS 1.0, which is insecure and should not be used
  1778. * @G_TLS_PROTOCOL_VERSION_TLS_1_1: TLS 1.1, which is insecure and should not be used
  1779. * @G_TLS_PROTOCOL_VERSION_TLS_1_2: TLS 1.2, defined by [RFC 5246](https://datatracker.ietf.org/doc/html/rfc5246)
  1780. * @G_TLS_PROTOCOL_VERSION_TLS_1_3: TLS 1.3, defined by [RFC 8446](https://datatracker.ietf.org/doc/html/rfc8446)
  1781. * @G_TLS_PROTOCOL_VERSION_DTLS_1_0: DTLS 1.0, which is insecure and should not be used
  1782. * @G_TLS_PROTOCOL_VERSION_DTLS_1_2: DTLS 1.2, defined by [RFC 6347](https://datatracker.ietf.org/doc/html/rfc6347)
  1783. *
  1784. * The TLS or DTLS protocol version used by a #GTlsConnection or
  1785. * #GDtlsConnection. The integer values of these versions are sequential
  1786. * to ensure newer known protocol versions compare greater than older
  1787. * known versions. Any known DTLS protocol version will compare greater
  1788. * than any SSL or TLS protocol version. The protocol version may be
  1789. * %G_TLS_PROTOCOL_VERSION_UNKNOWN if the TLS backend supports a newer
  1790. * protocol version that GLib does not yet know about. This means that
  1791. * it's possible for an unknown DTLS protocol version to compare less
  1792. * than the TLS protocol versions.
  1793. *
  1794. * Since: 2.70
  1795. */
  1796. typedef enum {
  1797. G_TLS_PROTOCOL_VERSION_UNKNOWN = 0,
  1798. G_TLS_PROTOCOL_VERSION_SSL_3_0 = 1,
  1799. G_TLS_PROTOCOL_VERSION_TLS_1_0 = 2,
  1800. G_TLS_PROTOCOL_VERSION_TLS_1_1 = 3,
  1801. G_TLS_PROTOCOL_VERSION_TLS_1_2 = 4,
  1802. G_TLS_PROTOCOL_VERSION_TLS_1_3 = 5,
  1803. G_TLS_PROTOCOL_VERSION_DTLS_1_0 = 201,
  1804. G_TLS_PROTOCOL_VERSION_DTLS_1_2 = 202,
  1805. } GTlsProtocolVersion;
  1806. /**
  1807. * GIOModuleScopeFlags:
  1808. * @G_IO_MODULE_SCOPE_NONE: No module scan flags
  1809. * @G_IO_MODULE_SCOPE_BLOCK_DUPLICATES: When using this scope to load or
  1810. * scan modules, automatically block a modules which has the same base
  1811. * basename as previously loaded module.
  1812. *
  1813. * Flags for use with g_io_module_scope_new().
  1814. *
  1815. * Since: 2.30
  1816. */
  1817. typedef enum {
  1818. G_IO_MODULE_SCOPE_NONE,
  1819. G_IO_MODULE_SCOPE_BLOCK_DUPLICATES
  1820. } GIOModuleScopeFlags;
  1821. /**
  1822. * GSocketClientEvent:
  1823. * @G_SOCKET_CLIENT_RESOLVING: The client is doing a DNS lookup.
  1824. * @G_SOCKET_CLIENT_RESOLVED: The client has completed a DNS lookup.
  1825. * @G_SOCKET_CLIENT_CONNECTING: The client is connecting to a remote
  1826. * host (either a proxy or the destination server).
  1827. * @G_SOCKET_CLIENT_CONNECTED: The client has connected to a remote
  1828. * host.
  1829. * @G_SOCKET_CLIENT_PROXY_NEGOTIATING: The client is negotiating
  1830. * with a proxy to connect to the destination server.
  1831. * @G_SOCKET_CLIENT_PROXY_NEGOTIATED: The client has negotiated
  1832. * with the proxy server.
  1833. * @G_SOCKET_CLIENT_TLS_HANDSHAKING: The client is performing a
  1834. * TLS handshake.
  1835. * @G_SOCKET_CLIENT_TLS_HANDSHAKED: The client has performed a
  1836. * TLS handshake.
  1837. * @G_SOCKET_CLIENT_COMPLETE: The client is done with a particular
  1838. * #GSocketConnectable.
  1839. *
  1840. * Describes an event occurring on a #GSocketClient. See the
  1841. * #GSocketClient::event signal for more details.
  1842. *
  1843. * Additional values may be added to this type in the future.
  1844. *
  1845. * Since: 2.32
  1846. */
  1847. typedef enum {
  1848. G_SOCKET_CLIENT_RESOLVING,
  1849. G_SOCKET_CLIENT_RESOLVED,
  1850. G_SOCKET_CLIENT_CONNECTING,
  1851. G_SOCKET_CLIENT_CONNECTED,
  1852. G_SOCKET_CLIENT_PROXY_NEGOTIATING,
  1853. G_SOCKET_CLIENT_PROXY_NEGOTIATED,
  1854. G_SOCKET_CLIENT_TLS_HANDSHAKING,
  1855. G_SOCKET_CLIENT_TLS_HANDSHAKED,
  1856. G_SOCKET_CLIENT_COMPLETE
  1857. } GSocketClientEvent;
  1858. /**
  1859. * GSocketListenerEvent:
  1860. * @G_SOCKET_LISTENER_BINDING: The listener is about to bind a socket.
  1861. * @G_SOCKET_LISTENER_BOUND: The listener has bound a socket.
  1862. * @G_SOCKET_LISTENER_LISTENING: The listener is about to start
  1863. * listening on this socket.
  1864. * @G_SOCKET_LISTENER_LISTENED: The listener is now listening on
  1865. * this socket.
  1866. *
  1867. * Describes an event occurring on a #GSocketListener. See the
  1868. * #GSocketListener::event signal for more details.
  1869. *
  1870. * Additional values may be added to this type in the future.
  1871. *
  1872. * Since: 2.46
  1873. */
  1874. typedef enum {
  1875. G_SOCKET_LISTENER_BINDING,
  1876. G_SOCKET_LISTENER_BOUND,
  1877. G_SOCKET_LISTENER_LISTENING,
  1878. G_SOCKET_LISTENER_LISTENED
  1879. } GSocketListenerEvent;
  1880. /**
  1881. * GTestDBusFlags:
  1882. * @G_TEST_DBUS_NONE: No flags.
  1883. *
  1884. * Flags to define future #GTestDBus behaviour.
  1885. *
  1886. * Since: 2.34
  1887. */
  1888. typedef enum /*< flags >*/ {
  1889. G_TEST_DBUS_NONE = 0
  1890. } GTestDBusFlags;
  1891. /**
  1892. * GSubprocessFlags:
  1893. * @G_SUBPROCESS_FLAGS_NONE: No flags.
  1894. * @G_SUBPROCESS_FLAGS_STDIN_PIPE: create a pipe for the stdin of the
  1895. * spawned process that can be accessed with
  1896. * g_subprocess_get_stdin_pipe().
  1897. * @G_SUBPROCESS_FLAGS_STDIN_INHERIT: stdin is inherited from the
  1898. * calling process.
  1899. * @G_SUBPROCESS_FLAGS_STDOUT_PIPE: create a pipe for the stdout of the
  1900. * spawned process that can be accessed with
  1901. * g_subprocess_get_stdout_pipe().
  1902. * @G_SUBPROCESS_FLAGS_STDOUT_SILENCE: silence the stdout of the spawned
  1903. * process (ie: redirect to `/dev/null`).
  1904. * @G_SUBPROCESS_FLAGS_STDERR_PIPE: create a pipe for the stderr of the
  1905. * spawned process that can be accessed with
  1906. * g_subprocess_get_stderr_pipe().
  1907. * @G_SUBPROCESS_FLAGS_STDERR_SILENCE: silence the stderr of the spawned
  1908. * process (ie: redirect to `/dev/null`).
  1909. * @G_SUBPROCESS_FLAGS_STDERR_MERGE: merge the stderr of the spawned
  1910. * process with whatever the stdout happens to be. This is a good way
  1911. * of directing both streams to a common log file, for example.
  1912. * @G_SUBPROCESS_FLAGS_INHERIT_FDS: spawned processes will inherit the
  1913. * file descriptors of their parent, unless those descriptors have
  1914. * been explicitly marked as close-on-exec. This flag has no effect
  1915. * over the "standard" file descriptors (stdin, stdout, stderr).
  1916. * @G_SUBPROCESS_FLAGS_SEARCH_PATH_FROM_ENVP: if path searching is
  1917. * needed when spawning the subprocess, use the `PATH` in the launcher
  1918. * environment. (Since: 2.72)
  1919. *
  1920. * Flags to define the behaviour of a #GSubprocess.
  1921. *
  1922. * Note that the default for stdin is to redirect from `/dev/null`. For
  1923. * stdout and stderr the default are for them to inherit the
  1924. * corresponding descriptor from the calling process.
  1925. *
  1926. * Note that it is a programmer error to mix 'incompatible' flags. For
  1927. * example, you may not request both %G_SUBPROCESS_FLAGS_STDOUT_PIPE and
  1928. * %G_SUBPROCESS_FLAGS_STDOUT_SILENCE.
  1929. *
  1930. * Since: 2.40
  1931. **/
  1932. typedef enum {
  1933. G_SUBPROCESS_FLAGS_NONE = 0,
  1934. G_SUBPROCESS_FLAGS_STDIN_PIPE = (1u << 0),
  1935. G_SUBPROCESS_FLAGS_STDIN_INHERIT = (1u << 1),
  1936. G_SUBPROCESS_FLAGS_STDOUT_PIPE = (1u << 2),
  1937. G_SUBPROCESS_FLAGS_STDOUT_SILENCE = (1u << 3),
  1938. G_SUBPROCESS_FLAGS_STDERR_PIPE = (1u << 4),
  1939. G_SUBPROCESS_FLAGS_STDERR_SILENCE = (1u << 5),
  1940. G_SUBPROCESS_FLAGS_STDERR_MERGE = (1u << 6),
  1941. G_SUBPROCESS_FLAGS_INHERIT_FDS = (1u << 7),
  1942. G_SUBPROCESS_FLAGS_SEARCH_PATH_FROM_ENVP = (1u << 8)
  1943. } GSubprocessFlags;
  1944. /**
  1945. * GNotificationPriority:
  1946. * @G_NOTIFICATION_PRIORITY_LOW: for notifications that do not require
  1947. * immediate attention - typically used for contextual background
  1948. * information, such as contact birthdays or local weather
  1949. * @G_NOTIFICATION_PRIORITY_NORMAL: the default priority, to be used for the
  1950. * majority of notifications (for example email messages, software updates,
  1951. * completed download/sync operations)
  1952. * @G_NOTIFICATION_PRIORITY_HIGH: for events that require more attention,
  1953. * usually because responses are time-sensitive (for example chat and SMS
  1954. * messages or alarms)
  1955. * @G_NOTIFICATION_PRIORITY_URGENT: for urgent notifications, or notifications
  1956. * that require a response in a short space of time (for example phone calls
  1957. * or emergency warnings)
  1958. *
  1959. * Priority levels for #GNotifications.
  1960. *
  1961. * Since: 2.42
  1962. */
  1963. typedef enum {
  1964. G_NOTIFICATION_PRIORITY_NORMAL,
  1965. G_NOTIFICATION_PRIORITY_LOW,
  1966. G_NOTIFICATION_PRIORITY_HIGH,
  1967. G_NOTIFICATION_PRIORITY_URGENT
  1968. } GNotificationPriority;
  1969. /**
  1970. * GNetworkConnectivity:
  1971. * @G_NETWORK_CONNECTIVITY_LOCAL: The host is not configured with a
  1972. * route to the Internet; it may or may not be connected to a local
  1973. * network.
  1974. * @G_NETWORK_CONNECTIVITY_LIMITED: The host is connected to a network, but
  1975. * does not appear to be able to reach the full Internet, perhaps
  1976. * due to upstream network problems.
  1977. * @G_NETWORK_CONNECTIVITY_PORTAL: The host is behind a captive portal and
  1978. * cannot reach the full Internet.
  1979. * @G_NETWORK_CONNECTIVITY_FULL: The host is connected to a network, and
  1980. * appears to be able to reach the full Internet.
  1981. *
  1982. * The host's network connectivity state, as reported by #GNetworkMonitor.
  1983. *
  1984. * Since: 2.44
  1985. */
  1986. typedef enum {
  1987. G_NETWORK_CONNECTIVITY_LOCAL = 1,
  1988. G_NETWORK_CONNECTIVITY_LIMITED = 2,
  1989. G_NETWORK_CONNECTIVITY_PORTAL = 3,
  1990. G_NETWORK_CONNECTIVITY_FULL = 4
  1991. } GNetworkConnectivity;
  1992. /**
  1993. * GPollableReturn:
  1994. * @G_POLLABLE_RETURN_FAILED: Generic error condition for when an operation fails.
  1995. * @G_POLLABLE_RETURN_OK: The operation was successfully finished.
  1996. * @G_POLLABLE_RETURN_WOULD_BLOCK: The operation would block.
  1997. *
  1998. * Return value for various IO operations that signal errors via the
  1999. * return value and not necessarily via a #GError.
  2000. *
  2001. * This enum exists to be able to return errors to callers without having to
  2002. * allocate a #GError. Allocating #GErrors can be quite expensive for
  2003. * regularly happening errors like %G_IO_ERROR_WOULD_BLOCK.
  2004. *
  2005. * In case of %G_POLLABLE_RETURN_FAILED a #GError should be set for the
  2006. * operation to give details about the error that happened.
  2007. *
  2008. * Since: 2.60
  2009. */
  2010. typedef enum {
  2011. G_POLLABLE_RETURN_FAILED = 0,
  2012. G_POLLABLE_RETURN_OK = 1,
  2013. G_POLLABLE_RETURN_WOULD_BLOCK = -G_IO_ERROR_WOULD_BLOCK
  2014. } GPollableReturn;
  2015. /**
  2016. * GMemoryMonitorWarningLevel:
  2017. * @G_MEMORY_MONITOR_WARNING_LEVEL_LOW: Memory on the device is low, processes
  2018. * should free up unneeded resources (for example, in-memory caches) so they can
  2019. * be used elsewhere.
  2020. * @G_MEMORY_MONITOR_WARNING_LEVEL_MEDIUM: Same as @G_MEMORY_MONITOR_WARNING_LEVEL_LOW
  2021. * but the device has even less free memory, so processes should try harder to free
  2022. * up unneeded resources. If your process does not need to stay running, it is a
  2023. * good time for it to quit.
  2024. * @G_MEMORY_MONITOR_WARNING_LEVEL_CRITICAL: The system will soon start terminating
  2025. * processes to reclaim memory, including background processes.
  2026. *
  2027. * Memory availability warning levels.
  2028. *
  2029. * Note that because new values might be added, it is recommended that applications check
  2030. * #GMemoryMonitorWarningLevel as ranges, for example:
  2031. * |[<!-- language="C" -->
  2032. * if (warning_level > G_MEMORY_MONITOR_WARNING_LEVEL_LOW)
  2033. * drop_caches ();
  2034. * ]|
  2035. *
  2036. * Since: 2.64
  2037. */
  2038. typedef enum {
  2039. G_MEMORY_MONITOR_WARNING_LEVEL_LOW = 50,
  2040. G_MEMORY_MONITOR_WARNING_LEVEL_MEDIUM = 100,
  2041. G_MEMORY_MONITOR_WARNING_LEVEL_CRITICAL = 255
  2042. } GMemoryMonitorWarningLevel;
  2043. G_END_DECLS
  2044. #endif /* __GIO_ENUMS_H__ */