diff options
Diffstat (limited to 'moc_library.h')
| -rw-r--r-- | moc_library.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/moc_library.h b/moc_library.h new file mode 100644 index 0000000..60a9c09 --- /dev/null +++ b/moc_library.h @@ -0,0 +1,47 @@ +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> //Header file for sleep(). man 3 sleep for details. +#include <errno.h> + +#include <pthread.h> +#include <sys/socket.h> +#include <sys/un.h> + + +/* Flags for the info decoder function. */ +enum tags_select +{ + TAGS_COMMENTS = 0x01, /* artist, title, etc. */ + TAGS_TIME = 0x02 /* time of the file. */ +}; + +enum moc_state { + STOPPED, + PLAYING, + PAUSED +}; + +enum moc_status { + INITIALIZING, + CONNECTED, + FAILED_TO_CONNECT, + ERROR +}; + +struct moc { + pthread_mutex_t lock; + enum moc_status status; + enum moc_state state; + + char *filename; + char *title; + char *album; + char *artist; + int track; + int time; + int filled; +}; + +extern const char * moc_str_state(enum moc_state s); +extern struct moc * moc_init(); + |
