shouter.h Source File

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.4 2004/04/01 16:27:14 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   INT_SET(bps,_bps); /* setted by the encoder */
    00057   INT_SET(login,_login);
    00058   CHAR_SET(name,_name);
    00059   CHAR_SET(url,_url);
    00060   CHAR_SET(desc,_desc);
    00061   int format;
    00062
    00063   bool start();
    00064   bool stop();
    00065   int send(short int *buf, unsigned int enc);
    00066
    00067   bool running;
    00068   time_t retry;
    00069
    00070   bool apply_profile();
    00071   bool profile_changed;
    00072
    00073 };
    00074
    00075
    00076 #endif