Andy's CarPlayer

/***************************************************************************
                          main.h  -  description
                             -------------------
    begin                : Mon Jan 31 2005
    copyright            : (C) 2005 by Andy
    email                : 
 ***************************************************************************/
 #include 
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

 enum play_status {
   TERMINATE  = 8,
   PLAYING,
   PAUSED,
   STOPPED,
   NEXT,
   PREVIOUS,
   RECONFIGURE};

 enum play_type {
   ALBUM = 0,
   ARTIST,
   GENRE,
   SINGLE,
   RANDOM,
   SELECT_ALBUM,
   SELECT_ARTIST};

 
 /***************************************************************************
 *                                                                         *
 *                      Global Variables                                   *
 *                                                                         *
 ***************************************************************************/
 typedef struct VALUES {
   char filename[255];
   char album[31];
   char artist[31];
   char track[31];
   char genre[25];
   char year[5];
   char next_track[31];
 }VALUES;

 VALUES current_song;
  
  typedef struct _MP3_system {
   int PC_temp;
   int PCM_volume;
   int number_of_tracks;
   int number_of_artists;
   int number_of_albums;
   int play_status;
   int mpg123_status;
   int playing_type;
   int track_LCD_offset;
   int artist_LCD_offset;
   int album_LCD_offset;
 } _MP3_system;
   _MP3_system MP3_system;
   
 
 typedef struct ALBUMS {
   char album[31];
 } ALBUMS;
 ALBUMS albums[2000];
 
 typedef struct ARTISTS {
   char artist[31];
 } ARTISTS;
 ARTISTS artists[2000];


 int debug_level;
 int fifo_fd;
 int tty_fd;
 char previous_sec[11];
   
/***************************************************************************
 *                                                                         *
 *                      Procedure Declares                                 *
 *                                                                         *
 ***************************************************************************/

   int Connect_DB();
   MYSQL_RES *db_query(char *query) ;


// globals
//
   MYSQL mysql;