Event handling.
More...
#include "compile_time.h"
#include <poll.h>
#include <stdbool.h>
Go to the source code of this file.
|
| enum | pfd_type {
PFD_TYPE_PARTITION = 0x1
, PFD_TYPE_STICKERDB = 0x2
, PFD_TYPE_TIMER = 0x4
, PFD_TYPE_QUEUE = 0x8
,
PFD_TYPE_TIMER_MPD_CONNECT = 0x10
, PFD_TYPE_TIMER_SCROBBLE = 0x20
, PFD_TYPE_TIMER_JUKEBOX = 0x40
} |
| |
◆ pfd_type
◆ event_eventfd_create()
| int event_eventfd_create |
( |
void |
| ) |
|
Creates an eventfd
- Returns
- the eventfd
◆ event_eventfd_read()
| bool event_eventfd_read |
( |
int |
fd | ) |
|
Reads from an eventfd
- Parameters
-
- Returns
- true on success, else false
◆ event_eventfd_write()
| bool event_eventfd_write |
( |
int |
fd | ) |
|
Increments the eventfd by one
- Parameters
-
- Returns
- true on success, else false
◆ event_fd_close()
| void event_fd_close |
( |
int |
fd | ) |
|
◆ event_pfd_add_fd()
Adds an fd to poll
- Parameters
-
| pfds | struct to add the fd |
| fd | fd to add |
| type | fd type to add |
| partition_state | pointer to partition_state or NULL |
- Returns
- true on success, else false
◆ event_pfd_init()
Initializes the mympd_pfds struct to zero
- Parameters
-
◆ lookup_pfd_revents()
| const char * lookup_pfd_revents |
( |
short |
revent | ) |
|
Lookups the name for poll revents
- Parameters
-
- Returns
- name as string
◆ lookup_pfd_type()
| const char * lookup_pfd_type |
( |
enum pfd_type |
type | ) |
|
Lookups the name for a pfd_type
- Parameters
-
- Returns
- name as string