mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
GBusNameOwnerFlags: Add DO_NOT_QUEUE flag
PulseAudio and LibreOffice are among the services that use this flag. Refusing to queue for a name lets you do this transaction, but atomically, avoiding the transient state where you briefly join the queue and then are given the name when its primary owner drops it: result = RequestName(name) if result == IN_QUEUE: ReleaseName(name) result = EXISTS return result (Modified by Philip Withnall to add documentation.) Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=784392
This commit is contained in:
parent
92f1ba200d
commit
c53b44edb2
@ -952,6 +952,8 @@ typedef enum
|
||||
* @G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT: Allow another message bus connection to claim the name.
|
||||
* @G_BUS_NAME_OWNER_FLAGS_REPLACE: If another message bus connection owns the name and have
|
||||
* specified #G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, then take the name from the other connection.
|
||||
* @G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE: If another message bus connection owns the name, immediately
|
||||
* return an error from g_bus_own_name() rather than entering the waiting queue for that name. (Since 2.54)
|
||||
*
|
||||
* Flags used in g_bus_own_name().
|
||||
*
|
||||
@ -961,7 +963,8 @@ 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 >*/
|
||||
G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE = (1<<2) /*< nick=do-not-queue >*/
|
||||
} GBusNameOwnerFlags;
|
||||
/* When adding new flags, their numeric values must currently match those
|
||||
* used in the D-Bus Specification. */
|
||||
|
Loading…
Reference in New Issue
Block a user