Ignore:
Timestamp:
11/09/12 02:51:16 (11 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

commit 1: Moved protocol support into new plugins protocol-esound, protocol-rplay and protocol-gopher (Closes: #311)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/roard/protocol-rplay.c

    r5739 r5740  
    2424 */ 
    2525 
    26 #include "roard.h" 
     26#include <roard/include/roard.h> 
    2727 
    2828#ifndef ROAR_WITHOUT_DCOMP_EMUL_RPLAY 
     
    8383static inline int is_true(const char * str) { 
    8484 const char * ts[] = {"true", "t", "1", "yes", "y", "on"}; 
    85  int i; 
    86  
    87  for (i = 0; i < sizeof(ts)/sizeof(*ts); i++) 
     85 size_t i; 
     86 
     87 for (i = 0; i < (sizeof(ts)/sizeof(*ts)); i++) 
    8888  if ( !strcasecmp(str, ts[i]) ) 
    8989   return 1; 
     
    137137 
    138138static int emul_rplay_set_proto  (int client, struct roar_vio_calls * vio, struct roar_buffer ** obuffer, void ** userdata, const struct roar_keyval * protopara, ssize_t protoparalen, struct roar_dl_librarypara * pluginpara) { 
     139 
     140 (void)obuffer, (void)userdata, (void)protopara, (void)protoparalen, (void)pluginpara; 
     141 
    139142 if ( emul_rplay_on_status(client, NULL, vio, NULL, 0) == -1 ) 
    140143  return -1; 
     
    146149 char buf[1024]; 
    147150 ssize_t len; 
     151 
     152 (void)obuffer, (void)userdata, (void)protopara, (void)protoparalen, (void)pluginpara; 
    148153 
    149154 if ( client == -1 ) 
     
    210215 const char * cd = NULL; 
    211216 
     217 (void)client; 
     218 
    212219 if ( cmd != NULL ) { 
    213220  command = cmd->name; 
     
    236243       int    fragsize  = ROAR_OUTPUT_CALC_OUTBUFSIZE(g_sa); 
    237244       int    h, m, s; 
     245 
     246 (void)client, (void)cmd, (void)kv, (void)kvlen; 
    238247 
    239248 s  = g_pos / g_sa->rate / g_sa->channels; 
     
    281290 
    282291static int emul_rplay_on_quit(int client, struct emul_rplay_command * cmd, struct roar_vio_calls * vio, struct roar_keyval * kv, size_t kvlen) { 
     292 
     293 (void)client, (void)cmd, (void)vio, (void)kv, (void)kvlen; 
     294 
    283295 return -1; 
    284296} 
     
    286298static int emul_rplay_on_help(int client, struct emul_rplay_command * cmd, struct roar_vio_calls * vio, struct roar_keyval * kv, size_t kvlen) { 
    287299 struct emul_rplay_command * c; 
     300 
     301 (void)client, (void)cmd, (void)kv, (void)kvlen; 
    288302 
    289303 roar_vio_printf(vio, "+message=\"command summary\" command=help\n"); 
     
    504518//static int emul_rplay_on_stop(int client, struct emul_rplay_command * cmd, struct roar_vio_calls * vio, struct roar_keyval * kv, size_t kvlen); 
    505519 
    506 struct roar_dl_proto __proto_common_rplay = { 
     520static struct roar_dl_proto __proto_common_rplay = { 
    507521 .proto = ROAR_PROTO_RPLAY, 
    508522 .description = "RPlay emulation", 
     
    512526}; 
    513527 
     528static int __reg_proto(struct roar_dl_librarypara * para, struct roar_dl_libraryinst * lib) { 
     529 (void)para, (void)lib; 
     530 ROAR_DL_PLUGIN_REG_FN(ROAR_DL_PROTO_SUBTYPE, __proto_common_rplay, ROAR_DL_PROTO_VERSION); 
     531 return 0; 
     532} 
     533 
     534ROAR_DL_PLUGIN_START(protocol_rplay) { 
     535 ROARD_DL_CHECK_VERSIONS(); 
     536 
     537 ROAR_DL_PLUGIN_META_PRODUCT_NIV("protocol-rplay", ROAR_VID_ROARAUDIO, ROAR_VNAME_ROARAUDIO); 
     538 ROAR_DL_PLUGIN_META_VERSION(ROAR_VERSION_STRING); 
     539 ROAR_DL_PLUGIN_META_LICENSE_TAG(GPLv3_0); 
     540 ROAR_DL_PLUGIN_META_CONTACT_FLNE("Philipp", "Schafft", "ph3-der-loewe", "lion@lion.leolix.org"); 
     541 ROAR_DL_PLUGIN_META_DESC("Implementation of the RPlay protocol"); 
     542 
     543 ROAR_DL_PLUGIN_REG(ROAR_DL_FN_PROTO, __reg_proto); 
     544} ROAR_DL_PLUGIN_END 
     545 
    514546#endif 
    515547 
Note: See TracChangeset for help on using the changeset viewer.