Add G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE
[platform/upstream/glib.git] / gio / gioenums.h
index f7b222f..d534eed 100644 (file)
@@ -37,13 +37,15 @@ G_BEGIN_DECLS
  * @G_APP_INFO_CREATE_NONE: No flags.
  * @G_APP_INFO_CREATE_NEEDS_TERMINAL: Application opens in a terminal window.
  * @G_APP_INFO_CREATE_SUPPORTS_URIS: Application supports URI arguments.
+ * @G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION: Application supports startup notification. Since 2.26
  *
  * Flags used when creating a #GAppInfo.
  */
 typedef enum {
-  G_APP_INFO_CREATE_NONE           = 0,         /*< nick=none >*/
-  G_APP_INFO_CREATE_NEEDS_TERMINAL = (1 << 0),  /*< nick=needs-terminal >*/
-  G_APP_INFO_CREATE_SUPPORTS_URIS  = (1 << 1)   /*< nick=supports-uris >*/
+  G_APP_INFO_CREATE_NONE                           = 0,         /*< nick=none >*/
+  G_APP_INFO_CREATE_NEEDS_TERMINAL                 = (1 << 0),  /*< nick=needs-terminal >*/
+  G_APP_INFO_CREATE_SUPPORTS_URIS                  = (1 << 1),  /*< nick=supports-uris >*/
+  G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION  = (1 << 2)   /*< nick=supports-startup-notification >*/
 } GAppInfoCreateFlags;
 
 /**
@@ -195,7 +197,7 @@ typedef enum {
  * @G_FILE_CREATE_REPLACE_DESTINATION: Replace the destination
  *    as if it didn't exist before. Don't try to keep any old
  *    permissions, replace instead of following links. This
- *    is generally useful if you're doing a "copy over" 
+ *    is generally useful if you're doing a "copy over"
  *    rather than a "save new version of" replace operation.
  *    You can think of it as "unlink destination" before
  *    writing to it, although the implementation may not
@@ -420,10 +422,10 @@ typedef enum {
  * @G_IO_ERROR_WOULD_BLOCK: Operation would block.
  * @G_IO_ERROR_HOST_NOT_FOUND: Host couldn't be found (remote operations).
  * @G_IO_ERROR_WOULD_MERGE: Operation would merge files.
- * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has 
+ * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has
  *     already interacted with the user. Do not display any error dialog.
- * @G_IO_ERROR_TOO_MANY_OPEN_FILES: The current process has too many files 
- *     open and can't open any more. Duplicate descriptors do count toward 
+ * @G_IO_ERROR_TOO_MANY_OPEN_FILES: The current process has too many files
+ *     open and can't open any more. Duplicate descriptors do count toward
  *     this limit. Since 2.20
  * @G_IO_ERROR_NOT_INITIALIZED: The object has not been initialized. Since 2.22
  * @G_IO_ERROR_ADDRESS_IN_USE: The requested address is already in use. Since 2.22
@@ -434,6 +436,14 @@ typedef enum {
  *     domain. Use g_dbus_error_get_remote_error() to extract the D-Bus
  *     error name and g_dbus_error_strip_remote_error() to fix up the
  *     message so it matches what was received on the wire. Since 2.26.
+ * @G_IO_ERROR_HOST_UNREACHABLE: Host unreachable. Since 2.26
+ * @G_IO_ERROR_NETWORK_UNREACHABLE: Network unreachable. Since 2.26
+ * @G_IO_ERROR_CONNECTION_REFUSED: Connection refused. Since 2.26
+ * @G_IO_ERROR_PROXY_FAILED: Connection to proxy server failed. Since 2.26
+ * @G_IO_ERROR_PROXY_AUTH_FAILED: Proxy authentication failed. Since 2.26
+ * @G_IO_ERROR_PROXY_NEED_AUTH: Proxy server needs authentication. Since 2.26
+ * @G_IO_ERROR_PROXY_NOT_ALLOWED: Proxy connection is not allowed by ruleset.
+ *     Since 2.26
  *
  * Error codes returned by GIO functions.
  *
@@ -475,7 +485,14 @@ typedef enum {
   G_IO_ERROR_ADDRESS_IN_USE,
   G_IO_ERROR_PARTIAL_INPUT,
   G_IO_ERROR_INVALID_DATA,
-  G_IO_ERROR_DBUS_ERROR
+  G_IO_ERROR_DBUS_ERROR,
+  G_IO_ERROR_HOST_UNREACHABLE,
+  G_IO_ERROR_NETWORK_UNREACHABLE,
+  G_IO_ERROR_CONNECTION_REFUSED,
+  G_IO_ERROR_PROXY_FAILED,
+  G_IO_ERROR_PROXY_AUTH_FAILED,
+  G_IO_ERROR_PROXY_NEED_AUTH,
+  G_IO_ERROR_PROXY_NOT_ALLOWED
 } GIOErrorEnum;
 
 
@@ -740,21 +757,21 @@ typedef enum {
 
 /**
  * GBusType:
- * @G_BUS_TYPE_NONE: Not a message bus connection.
- * @G_BUS_TYPE_SESSION: The login session message bus.
+ * @G_BUS_TYPE_STARTER: An alias for the message bus that activated the process, if any.
+ * @G_BUS_TYPE_NONE: Not a message bus.
  * @G_BUS_TYPE_SYSTEM: The system-wide message bus.
- * @G_BUS_TYPE_STARTER: Connect to the bus that activated the program.
+ * @G_BUS_TYPE_SESSION: The login session message bus.
  *
- * An enumeration to specify the type of a #GDBusConnection.
+ * An enumeration for well-known message buses.
  *
  * Since: 2.26
  */
 typedef enum
 {
-  G_BUS_TYPE_NONE    = -1,
-  G_BUS_TYPE_SESSION = 0,
+  G_BUS_TYPE_STARTER = -1,
+  G_BUS_TYPE_NONE = 0,
   G_BUS_TYPE_SYSTEM  = 1,
-  G_BUS_TYPE_STARTER = 2
+  G_BUS_TYPE_SESSION = 2
 } GBusType;
 
 /**
@@ -772,7 +789,7 @@ typedef enum
 {
   G_BUS_NAME_OWNER_FLAGS_NONE = 0,                    /*< nick=none >*/
   G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT = (1<<0),  /*< nick=allow-replacement >*/
-  G_BUS_NAME_OWNER_FLAGS_REPLACE = (1<<1),            /*< nick=replace >*/
+  G_BUS_NAME_OWNER_FLAGS_REPLACE = (1<<1)            /*< nick=replace >*/
 } GBusNameOwnerFlags;
 
 /**
@@ -797,6 +814,9 @@ typedef enum
  * @G_DBUS_PROXY_FLAGS_NONE: No flags set.
  * @G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES: Don't load properties.
  * @G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS: Don't connect to signals on the remote object.
+ * @G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START: If not set and the proxy if for a well-known name,
+ * then request the bus to launch an owner for the name if no-one owns the name. This flag can
+ * only be used in proxies for well-known names.
  *
  * Flags used when constructing an instance of a #GDBusProxy derived class.
  *
@@ -804,9 +824,10 @@ typedef enum
  */
 typedef enum
 {
-  G_DBUS_PROXY_FLAGS_NONE = 0,                        /*< nick=none >*/
-  G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES = (1<<0), /*< nick=do-not-load-properties >*/
-  G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS = (1<<1), /*< nick=do-not-connect-signals >*/
+  G_DBUS_PROXY_FLAGS_NONE = 0,
+  G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES = (1<<0),
+  G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS = (1<<1),
+  G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START = (1<<2)
 } GDBusProxyFlags;
 
 /**
@@ -951,7 +972,7 @@ typedef enum
   G_DBUS_ERROR_INVALID_FILE_CONTENT,             /* org.freedesktop.DBus.Error.InvalidFileContent */
   G_DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN, /* org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown */
   G_DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN,           /* org.freedesktop.DBus.Error.AdtAuditDataUnknown */
-  G_DBUS_ERROR_OBJECT_PATH_IN_USE,               /* org.freedesktop.DBus.Error.ObjectPathInUse */
+  G_DBUS_ERROR_OBJECT_PATH_IN_USE                /* org.freedesktop.DBus.Error.ObjectPathInUse */
 } GDBusError;
 /* Remember to update g_dbus_error_quark() in gdbuserror.c if you extend this enumeration */
 
@@ -965,6 +986,8 @@ typedef enum
  * method.
  * @G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION: Pass this flag if connecting to a peer that is a
  * message bus. This means that the Hello() method will be invoked as part of the connection setup.
+ * @G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING: If set, processing of D-Bus messages is
+ * delayed until g_dbus_connection_start_message_processing() is called.
  *
  * Flags used when creating a new #GDBusConnection.
  *
@@ -975,7 +998,8 @@ typedef enum {
   G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT = (1<<0),
   G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER = (1<<1),
   G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS = (1<<2),
-  G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION = (1<<3)
+  G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION = (1<<3),
+  G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING = (1<<4)
 } GDBusConnectionFlags;
 
 /**
@@ -990,24 +1014,24 @@ typedef enum {
  */
 typedef enum {
   G_DBUS_CAPABILITY_FLAGS_NONE = 0,
-  G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING = (1<<0),
+  G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING = (1<<0)
 } GDBusCapabilityFlags;
 
 /**
- * GDBusInvokeMethodFlags:
- * @G_DBUS_INVOKE_METHOD_FLAGS_NONE: No flags set.
- * @G_DBUS_INVOKE_METHOD_FLAGS_NO_AUTO_START: The bus must not launch
+ * GDBusCallFlags:
+ * @G_DBUS_CALL_FLAGS_NONE: No flags set.
+ * @G_DBUS_CALL_FLAGS_NO_AUTO_START: The bus must not launch
  * an owner for the destination name in response to this method
  * invocation.
  *
- * Flags used in g_dbus_connection_invoke_method() and similar APIs.
+ * Flags used in g_dbus_connection_call() and similar APIs.
  *
  * Since: 2.26
  */
 typedef enum {
-  G_DBUS_INVOKE_METHOD_FLAGS_NONE = 0,
-  G_DBUS_INVOKE_METHOD_FLAGS_NO_AUTO_START = (1<<0),
-} GDBusInvokeMethodFlags;
+  G_DBUS_CALL_FLAGS_NONE = 0,
+  G_DBUS_CALL_FLAGS_NO_AUTO_START = (1<<0)
+} GDBusCallFlags;
 
 /**
  * GDBusMessageType:
@@ -1090,7 +1114,7 @@ typedef enum
 {
   G_DBUS_PROPERTY_INFO_FLAGS_NONE = 0,
   G_DBUS_PROPERTY_INFO_FLAGS_READABLE = (1<<0),
-  G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE = (1<<1),
+  G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE = (1<<1)
 } GDBusPropertyInfoFlags;
 
 /**
@@ -1107,7 +1131,7 @@ typedef enum
 typedef enum
 {
   G_DBUS_SUBTREE_FLAGS_NONE = 0,
-  G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES = (1<<0),
+  G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES = (1<<0)
 } GDBusSubtreeFlags;
 
 /**
@@ -1130,6 +1154,101 @@ typedef enum
   G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS = (1<<1)
 } GDBusServerFlags;
 
+/**
+ * GDBusSignalFlags:
+ * @G_DBUS_SIGNAL_FLAGS_NONE: No flags set.
+ * @G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE: Don't actually send the AddMatch
+ * DBus call for this signal subscription.  This gives you more control
+ * over which match rules you add (but you must add them manually).
+ *
+ * Flags used when subscribing to signals via g_dbus_connection_signal_subscribe().
+ *
+ * Since: 2.26
+ */
+typedef enum /*< flags >*/
+{
+  G_DBUS_SIGNAL_FLAGS_NONE = 0,
+  G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE = (1<<0)
+} GDBusSignalFlags;
+
+/**
+ * GDBusSendMessageFlags:
+ * @G_DBUS_SEND_MESSAGE_FLAGS_NONE: No flags set.
+ * @G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL: Do not automatically
+ * assign a serial number from the #GDBusConnection object when
+ * sending a message.
+ *
+ * Flags used when sending #GDBusMessage<!-- -->s on a #GDBusConnection.
+ *
+ * Since: 2.26
+ */
+typedef enum
+{
+  G_DBUS_SEND_MESSAGE_FLAGS_NONE = 0,
+  G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL = (1<<0)
+} GDBusSendMessageFlags;
+
+/**
+ * GCredentialsType:
+ * @G_CREDENTIALS_TYPE_INVALID: Indicates an invalid native credential type.
+ * @G_CREDENTIALS_TYPE_LINUX_UCRED: The native credentials type is a <type>struct ucred</type>.
+ * @G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED: The native credentials type is a <type>struct cmsgcred</type>.
+ *
+ * Enumeration describing different kinds of native credential types.
+ *
+ * Since: 2.26
+ */
+typedef enum
+{
+  G_CREDENTIALS_TYPE_INVALID,
+  G_CREDENTIALS_TYPE_LINUX_UCRED,
+  G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED
+} GCredentialsType;
+
+/**
+ * GDBusMessageByteOrder:
+ * @G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN: The byte order is big endian.
+ * @G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN: The byte order is little endian.
+ *
+ * Enumeration used to describe the byte order of a D-Bus message.
+ *
+ * Since: 2.26
+ */
+typedef enum
+{
+  G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN    = 'B',
+  G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN = 'l'
+} GDBusMessageByteOrder;
+
+/**
+ * GApplicationFlags:
+ * @G_APPLICATION_FLAGS_NONE: Default
+ * @G_APPLICATION_IS_SERVICE: Run as a service. In this mode, registration
+ *      fails if the service is already running, and the application will
+ *      stay around for a while when the use count falls to zero.
+ * @G_APPLICATION_IS_LAUNCHER: Don't try to become the primary instance.
+ * @G_APPLICATION_HANDLES_OPEN: This application handles opening files (in the
+ *     primary instance)
+ * @G_APPLICATION_HANDLES_COMMAND_LINE: This application handles command line
+ *     arguments (in the primary instance)
+ * @G_APPLICATION_SEND_ENVIRONMENT: Send the environment of the
+ *     launching process to the primary instance
+ *
+ * Flags used to define the behaviour of a #GApplication.
+ *
+ * Since: 2.26
+ **/
+typedef enum
+{
+  G_APPLICATION_FLAGS_NONE,
+  G_APPLICATION_IS_SERVICE  =          (1 << 0),
+  G_APPLICATION_IS_LAUNCHER =          (1 << 1),
+
+  G_APPLICATION_HANDLES_OPEN =         (1 << 2),
+  G_APPLICATION_HANDLES_COMMAND_LINE = (1 << 3),
+  G_APPLICATION_SEND_ENVIRONMENT    =  (1 << 4)
+} GApplicationFlags;
+
 G_END_DECLS
 
 #endif /* __GIO_ENUMS_H__ */