Changeset 5640:00dd1147ce70 in roaraudio for roard/plugins.c


Ignore:
Timestamp:
09/10/12 16:18:22 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Removed support for roard's proto support (replaced by CPI) (Closes: #278)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/plugins.c

    r5639 r5640  
    3030static struct _roard_plugin { 
    3131 struct roar_dl_lhandle     * lhandle; 
    32  int protocols[MAX_PROTOS]; 
    3332} g_plugins[MAX_PLUGINS]; 
    3433static struct _roard_plugin * _pp = NULL; 
     
    7675 
    7776static inline void plugins_delete(struct _roard_plugin * plugin) { 
    78  int i; 
    79  
    8077 ROAR_DBG("plugins_delete(plugin=%p) = ?", plugin); 
    8178 
    8279 roar_dl_appsched_trigger(plugin->lhandle, ROAR_DL_APPSCHED_FREE); 
    83  
    84  for (i = 0; i < MAX_PROTOS; i++) { 
    85   if ( plugin->protocols[i] != -1 ) { 
    86    clients_unregister_proto(plugin->protocols[i]); 
    87   } 
    88  } 
    8980 
    9081 roar_dl_close(plugin->lhandle); 
     
    179170 struct _roard_plugin * next = _find_free(); 
    180171 struct roar_dl_librarypara * para; 
    181  int i; 
    182172 
    183173 ROAR_DBG("plugins_load(filename=\"%s\", args=\"%s\") = ?", filename, args); 
     
    185175 if ( next == NULL ) 
    186176  return -1; 
    187  
    188  for (i = 0; i < MAX_PLUGINS; i++) 
    189   next->protocols[i] = -1; 
    190177 
    191178 if ( (para = roar_dl_para_new(args, NULL, ROARD_DL_APPNAME, ROARD_DL_ABIVERSION)) == NULL ) { 
     
    244231} 
    245232 
    246 int plugins_reg_proto(struct roard_proto         * proto) { 
    247  int i; 
    248  
    249  if ( _pp == NULL ) 
    250   return -1; 
    251  
    252  for (i = 0; i < MAX_PROTOS; i++) { 
    253   if ( _pp->protocols[i] == -1 ) { 
    254    _pp->protocols[i] = proto->proto; 
    255    break; 
    256   } 
    257  } 
    258  
    259  if ( i == MAX_PROTOS ) { 
    260   roar_err_set(ROAR_ERROR_NOMEM); 
    261   return -1; 
    262  } 
    263  
    264  return clients_register_proto(proto, _pp->lhandle); 
    265 } 
    266  
    267233static int plugin_callback(enum roar_dl_fnreg_action action, int fn, int subtype, const void * object, size_t objectlen, int version, int options, void * userdata, struct roar_dl_lhandle * lhandle) { 
    268234 
Note: See TracChangeset for help on using the changeset viewer.