Changeset 1106:b71671032077 in roaraudio for plugins/xmms


Ignore:
Timestamp:
01/11/09 05:45:50 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added all.h and gui.c, added mor config vars, read parts of the config foem XMMS configfile

Location:
plugins/xmms
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • plugins/xmms/Makefile

    r1056 r1106  
    11TARGET=libroar.so 
    22 
    3 OBJ=roar.o 
     3OBJ=roar.o gui.o 
    44 
    55include Makefile.conf 
  • plugins/xmms/roar.c

    r1039 r1106  
    8787 
    8888struct xmms_roar_out { 
    89  int state; 
    90  char * server; 
     89 int                 state; 
     90 char              * server; 
    9191 struct roar_connection con; 
    9292 struct roar_stream     stream; 
    93  int data_fh; 
    94  long unsigned int written; 
    95  long unsigned int bps; 
    96  int session; 
    97  int pause; 
     93 int                 data_fh; 
     94 long unsigned int   written; 
     95 long unsigned int   bps; 
     96 int                 session; 
     97 int                 pause; 
     98 struct { 
     99  int                server_type; 
     100  int                port; 
     101  int              * proxy_type; 
     102  char             * proxy; 
     103  char             * player_name; 
     104 } cfg; 
    98105} g_inst; 
    99106 
     
    103110 
    104111void roar_init(void) { 
     112 ConfigFile * cfgfile; 
     113 
     114 cfgfile = xmms_cfg_open_default_file(); 
     115 
    105116 g_inst.state = 0; 
    106117 g_inst.server = NULL; 
    107118 g_inst.session = ctrlsocket_get_session_id(); 
     119 
     120 xmms_cfg_read_string(cfgfile, "ROAR", "server", &g_inst.server); 
     121 
     122 xmms_cfg_read_string(cfgfile, "ROAR", "player_name", &g_inst.cfg.player_name); 
     123 
     124 xmms_cfg_free(cfgfile); 
     125 
     126 if ( g_inst.cfg.player_name == NULL ) 
     127  g_inst.cfg.player_name = "XMMS"; 
     128 
    108129 ROAR_DBG("roar_init(*) = (void)"); 
    109130} 
     
    137158 
    138159 if ( !(g_inst.state & STATE_CONNECTED) ) { 
    139   if ( roar_simple_connect(&(g_inst.con), g_inst.server, "XMMS") == -1 ) { 
     160  if ( roar_simple_connect(&(g_inst.con), g_inst.server, g_inst.cfg.player_name) == -1 ) { 
    140161   return FALSE; 
    141162  } 
Note: See TracChangeset for help on using the changeset viewer.