23#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)
24#error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."
30#include <dbus/dbus-macros.h>
31#include <dbus/dbus-types.h>
61typedef DBusMutex* (* DBusRecursiveMutexNewFunction) (void);
103 int timeout_milliseconds);
123 DBUS_THREAD_FUNCTIONS_MUTEX_NEW_MASK = 1 << 0,
124 DBUS_THREAD_FUNCTIONS_MUTEX_FREE_MASK = 1 << 1,
125 DBUS_THREAD_FUNCTIONS_MUTEX_LOCK_MASK = 1 << 2,
126 DBUS_THREAD_FUNCTIONS_MUTEX_UNLOCK_MASK = 1 << 3,
127 DBUS_THREAD_FUNCTIONS_CONDVAR_NEW_MASK = 1 << 4,
128 DBUS_THREAD_FUNCTIONS_CONDVAR_FREE_MASK = 1 << 5,
129 DBUS_THREAD_FUNCTIONS_CONDVAR_WAIT_MASK = 1 << 6,
130 DBUS_THREAD_FUNCTIONS_CONDVAR_WAIT_TIMEOUT_MASK = 1 << 7,
131 DBUS_THREAD_FUNCTIONS_CONDVAR_WAKE_ONE_MASK = 1 << 8,
132 DBUS_THREAD_FUNCTIONS_CONDVAR_WAKE_ALL_MASK = 1 << 9,
133 DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_NEW_MASK = 1 << 10,
134 DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_FREE_MASK = 1 << 11,
135 DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_LOCK_MASK = 1 << 12,
136 DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_UNLOCK_MASK = 1 << 13,
137 DBUS_THREAD_FUNCTIONS_ALL_MASK = (1 << 14) - 1
173 void (* padding1) (void);
174 void (* padding2) (void);
175 void (* padding3) (void);
176 void (* padding4) (void);
#define DBUS_BEGIN_DECLS
Macro used prior to declaring functions in the D-Bus header files.
#define DBUS_END_DECLS
Macro used after declaring functions in the D-Bus header files.
dbus_bool_t(* DBusCondVarWaitTimeoutFunction)(DBusCondVar *cond, DBusMutex *mutex, int timeout_milliseconds)
Waits on a condition variable with a timeout.
void(* DBusCondVarWakeOneFunction)(DBusCondVar *cond)
Wakes one waiting thread on a condition variable.
DBusMutex *(* DBusMutexNewFunction)(void)
Deprecated, provide DBusRecursiveMutexNewFunction instead.
dbus_bool_t(* DBusMutexLockFunction)(DBusMutex *mutex)
Deprecated, provide DBusRecursiveMutexLockFunction instead.
DBusMutex *(* DBusRecursiveMutexNewFunction)(void)
Creates a new recursively-lockable mutex, or returns NULL if not enough memory.
dbus_bool_t dbus_threads_init_default(void)
Initializes threads.
dbus_bool_t(* DBusMutexUnlockFunction)(DBusMutex *mutex)
Deprecated, provide DBusRecursiveMutexUnlockFunction instead.
struct DBusMutex DBusMutex
An opaque mutex type provided by the DBusThreadFunctions implementation installed by dbus_threads_ini...
void(* DBusRecursiveMutexFreeFunction)(DBusMutex *mutex)
Frees a recursively-lockable mutex.
void(* DBusCondVarWakeAllFunction)(DBusCondVar *cond)
Wakes all waiting threads on a condition variable.
void(* DBusRecursiveMutexUnlockFunction)(DBusMutex *mutex)
Unlocks a recursively-lockable mutex.
void(* DBusCondVarWaitFunction)(DBusCondVar *cond, DBusMutex *mutex)
Waits on a condition variable.
DBusCondVar *(* DBusCondVarNewFunction)(void)
Creates a new condition variable.
void(* DBusCondVarFreeFunction)(DBusCondVar *cond)
Frees a condition variable.
void(* DBusRecursiveMutexLockFunction)(DBusMutex *mutex)
Locks a recursively-lockable mutex.
dbus_bool_t dbus_threads_init(const DBusThreadFunctions *functions)
Initializes threads, like dbus_threads_init_default().
void(* DBusMutexFreeFunction)(DBusMutex *mutex)
Deprecated, provide DBusRecursiveMutexFreeFunction instead.
DBusThreadFunctionsMask
Flags indicating which functions are present in DBusThreadFunctions.
dbus_uint32_t dbus_bool_t
A boolean, valid values are TRUE and FALSE.
pthread_cond_t cond
the condition
Functions that must be implemented to make the D-Bus library thread-aware.
DBusMutexFreeFunction mutex_free
Function to free a mutex; optional and deprecated.
DBusRecursiveMutexUnlockFunction recursive_mutex_unlock
Function to unlock a recursive mutex.
DBusCondVarWakeAllFunction condvar_wake_all
Function to wake all threads waiting on the condition.
DBusCondVarNewFunction condvar_new
Function to create a condition variable.
DBusMutexLockFunction mutex_lock
Function to lock a mutex; optional and deprecated.
DBusMutexUnlockFunction mutex_unlock
Function to unlock a mutex; optional and deprecated.
DBusMutexNewFunction mutex_new
Function to create a mutex; optional and deprecated.
DBusCondVarWakeOneFunction condvar_wake_one
Function to wake one thread waiting on the condition.
DBusCondVarWaitTimeoutFunction condvar_wait_timeout
Function to wait on a condition with a timeout.
DBusRecursiveMutexFreeFunction recursive_mutex_free
Function to free a recursive mutex.
unsigned int mask
Mask indicating which functions are present.
DBusCondVarFreeFunction condvar_free
Function to free a condition variable.
DBusCondVarWaitFunction condvar_wait
Function to wait on a condition.
DBusRecursiveMutexLockFunction recursive_mutex_lock
Function to lock a recursive mutex.
DBusRecursiveMutexNewFunction recursive_mutex_new
Function to create a recursive mutex.