File include/ubs-sched.h

Functions, data structures, and global variables used by the ubs-sched daemon.

Included in: lib/get_song.c
  lib/parse_line.c
  src/cmd_sched.c
  src/cmd_shows.c
  src/enqueue.c
  src/read_sched.c
  src/schedule.c
  src/search.c
  src/ubs-sched.c
  src/ubs.c


Included Files


Preprocessor definitions

#define LIST_RANDOM 0

#define LIST_M3U 1

#define LIST_ITUNES 2


Typedef wday

Days of the week

typedef enum {...} wday
enum 
   { 
     sun; 
     mon; 
     tues; 
     wed; 
     thurs; 
     fri; 
     sat; 
   } 


Typedef freq

Used for how often a show should repeat

typedef enum {...} freq
enum 
   { 
     once; 
     weekly; 
     daily; 
   } 


Type union occur

union occur
union occur 
   { 
     char day[32]; 
     wday weekday; 
   } 

Type struct show

This structure holds all of the information about an individual show, which is used in the allshows array.

struct show
struct show 
   { 
     int show_id; The ID of the show, which is how the UBS internally references the shows. This value is 0 indexed, and thus, should also reflect the show's position in the allshows array
     char show_name[128]; The name of the show. Used for display purposes only
     char dir[1024]; The directory that the show should read out of. This is recursive, so it will also include any music in a subdirectories found
     int start; What time the show starts, from 0-47 (the number of half hours in a 24 hour period
     int end; The time the show ends, from 0-47 alsa
     int type; Type of playlist to read from
     freq repeat; How often the show should repeat. See the enumerated type for this.
     union occur 
        { 
          char day[32]; 
          wday weekday; 
        } 
     when; 
     char banner[1024]; Special file to play at the start of every show, if defined
   } 


Global Variable PROCNAME

char PROCNAME[128]
Included from include/ubs.h

Global Variable CUR_TIME

struct tm* CUR_TIME
Included from include/ubs.h

Global Variable GLOBAL

ubs_table GLOBAL
Included from include/ubs.h

Global Variable LOGLEVEL

int LOGLEVEL
Included from include/ubs.h

Global Variable WEEK

An array that holds all of the half-hour slots for an entire week, which is the period of time that the ubs runs off of. This array contains integers which correspond to show ID's

int WEEK[7][48]


Global Variable ALLSHOWS

All the known shows

struct show* ALLSHOWS


Global Variable SCHED

ubs_table SCHED