File src/ubs-sched.c

This module does the most work of any part of the UBS. It is responsible for knowing what time it is, what show we are in, the attributes of the said show, and scheduling music from this show to the queue when the queue runs out of music.


Included Files


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]
Included from include/ubs-sched.h


Global Variable ALLSHOWS

All the known shows

struct show* ALLSHOWS
Included from include/ubs-sched.h


Global Variable SCHED

ubs_table SCHED
Included from include/ubs-sched.h

Global Function main()

The main function

int main ( int argc, char* argv[] )

int argc
Should be empty; this program takes no arguments
char* argv[]
Should be empty; this program takes no arguments
Calls: check_running()lib/common.c
  console_error()lib/logging.c
  enqueue()src/enqueue.c
  find_show()src/schedule.c
  gettime()lib/logging.c
  init_week()src/schedule.c
  log_error_msg()lib/logging.c
  make_cache()lib/get_song.c
  parse_itunes_playlist()src/enqueue.c
  parse_m3u_playlist()src/enqueue.c
  queue_init()lib/queue.c
  queue_push()lib/queue.c
  read_config()lib/read_config.c
  read_sched()src/read_sched.c
  record_pid()lib/logging.c
  record_status()lib/logging.c
  ubs_init()lib/common.c
  ubs_table_add()lib/table.c
  ubs_table_data()lib/table.c
  ubs_table_init()lib/table.c
  atoi(), chdir(), exit(), fork(), getegid(), geteuid(), getpid(), setsid(), sleep(), umask()