#include <dbus/dbus.h>
Go to the source code of this file.
Defines | |
#define | DBUS_API_SUBJECT_TO_CHANGE |
Typedefs | |
typedef struct _MicrofeedMain | MicrofeedMain |
Opaque data type representing a main loop. | |
typedef struct _MicrofeedTimeout | MicrofeedTimeout |
Opaque data type representing a timeout in the main loop. | |
typedef struct _MicrofeedWatch | MicrofeedWatch |
Opaque data type representing a file descriptor to watch in the main loop. | |
typedef void(* | MicrofeedTimeoutCallback )(MicrofeedMain *microfeed_main, void *user_data) |
A function that is called when a timeout has occurred. | |
typedef void(* | MicrofeedWatchCallback )(MicrofeedMain *microfeed_main, int fd, MicrofeedWatchType type, void *user_data) |
A function that is called when a watched file descriptor has something to read or/and write. | |
Enumerations | |
enum | MicrofeedWatchType { MICROFEED_WATCH_TYPE_NONE = 0, MICROFEED_WATCH_TYPE_READ = 1, MICROFEED_WATCH_TYPE_WRITE = 2, MICROFEED_WATCH_TYPE_READ_WRITE = 3 } |
Possible watch types of a watched file descriptor. More... | |
Functions | |
MicrofeedMain * | microfeed_main_new () |
Instantiates a new main loop with a shared session-wide DBus connection. | |
MicrofeedMain * | microfeed_main_new_with_dbus_connection (DBusConnection *connection) |
Instantiates a new main loop with a given DBus connection. | |
void | microfeed_main_free (MicrofeedMain *microfeed_main) |
Frees the resources allocated for the main loop. | |
DBusConnection * | microfeed_main_get_dbus_connection (MicrofeedMain *microfeed_main) |
Returns the DBus connection used in the main loop. | |
void | microfeed_main_loop (MicrofeedMain *microfeed_main) |
Executes a main loop repeatedly until a microfeed_main_exit is called. | |
void | microfeed_main_exit (MicrofeedMain *microfeed_main) |
Asks the main loop to stop. | |
MicrofeedTimeout * | microfeed_main_add_timeout (MicrofeedMain *microfeed_main, unsigned long int milliseconds, MicrofeedTimeoutCallback callback, void *user_data) |
Adds a new timeout into the main loop. | |
MicrofeedWatch * | microfeed_main_add_watch (MicrofeedMain *microfeed_main, int fd, MicrofeedWatchType type, MicrofeedWatchCallback callback, void *user_data) |
Adds a new file descriptor to watch into the main loop. | |
void | microfeed_main_remove_timeout (MicrofeedMain *microfeed_main, MicrofeedTimeout *timeout) |
Removes a previously added timeout from the main loop. | |
void | microfeed_main_remove_watch (MicrofeedMain *microfeed_main, MicrofeedWatch *watch) |
Removes a previously added file descriptor watch from the main loop. |
#define DBUS_API_SUBJECT_TO_CHANGE |
Definition at line 4 of file microfeedmain.h.