Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members  

shouter.h

00001 /* MuSE - Multiple Streaming Engine
00002  * Copyright (C) 2000-2002 Denis Rojo aka jaromil <jaromil@dyne.org>
00003  *
00004  * This source code is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Public License as published 
00006  * by the Free Software Foundation; either version 2 of the License,
00007  * or (at your option) any later version.
00008  *
00009  * This source code is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00012  * Please refer to the GNU Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Public License along with
00015  * this source code; if not, write to:
00016  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017  *
00018  * "$Id: shouter.h,v 1.6 2004/12/15 18:18:06 jaromil Exp $"
00019  *
00020  */
00021 
00022 #ifndef __SHOUTER_H__
00023 #define __SHOUTER_H__
00024 
00025 extern "C" {
00026 #include "shout/shout.h"
00027 }
00028 
00029 #include <linklist.h>
00030 #include <jutils.h>
00031 
00032 #define ERRORMSG 128
00033 #define RETRY_DELAY 600 /* time to retry connect on broken icecasts, in seconds */
00034 #define MAX_VALUE_SIZE 512
00035 
00036 class Shouter : public Entry {
00037  private:
00038   shout_t *ice;
00039 
00040   int errors;
00041   
00042  public:
00043   Shouter();
00044   ~Shouter();
00045 
00046   /* ======= GUI SETTINGS HERE
00047      the following macros declare two functions for each variable:
00048      set_variable(value); assign value to variable
00049      get_variable(); returns value of variable */
00050   CHAR_SET(ip,_ip);
00051   CHAR_SET(host,_host);
00052   char streamurl[MAX_VALUE_SIZE];
00053   INT_SET(port,_port);
00054   CHAR_SET(pass,_pass);
00055   CHAR_SET(mount,_mount);
00056   
00057   /* setted by the encoder */
00058   CHAR_SET(bps,_bps);
00059   CHAR_SET(freq,_freq);
00060   CHAR_SET(channels,_channels);
00061 
00062   INT_SET(login,_login);
00063   CHAR_SET(name,_name);
00064   CHAR_SET(url,_url);
00065   CHAR_SET(desc,_desc);
00066   int format;
00067   
00068   bool start();
00069   bool stop();
00070   int send(short int *buf, unsigned int enc);
00071   
00072   bool running;
00073   time_t retry;
00074 
00075   bool apply_profile();
00076   bool profile_changed;
00077 
00078 };
00079 
00080 
00081 #endif

Generated on Thu Dec 16 12:28:21 2004 for MuSE by doxygen1.3