Changeset 2524:fb139fa9dfb9 in roaraudio


Ignore:
Timestamp:
09/01/09 17:55:04 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

implemted emul_esd_int_read(), emul_esd_int_write(), emul_esd_test_auth() and a stub emul_esd_test_byteorder() and emul_esd_on_connect()

Files:
2 edited

Legend:

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

    r2522 r2524  
    6666}; 
    6767 
     68// command handling: 
    6869int emul_esd_exec_command(int client, int cmd, struct roar_vio_calls * vio) { 
    6970 struct emul_esd_command * cur; 
     
    132133} 
    133134 
     135// porto lib: 
     136int emul_esd_int_read      (int client, int * data, struct roar_vio_calls * vio) { 
     137 _cmd_t d; 
     138 
     139 if ( data == NULL ) 
     140  return -1; 
     141 
     142 if ( roar_vio_read(vio, &d, _INTSIZE) != _INTSIZE ) 
     143  return -1; 
     144 
     145 *data = d; 
     146 
     147 return 0; 
     148} 
     149 
     150int emul_esd_int_write     (int client, int   data, struct roar_vio_calls * vio) { 
     151 _cmd_t d = data; 
     152 
     153 return roar_vio_write(vio, &d, _INTSIZE) == _INTSIZE ? 0 : -1; 
     154} 
     155 
     156int emul_esd_test_auth     (int client, void * data, struct roar_vio_calls * vio) { 
     157 // accept all clients for the moment. 
     158 return emul_esd_int_write(client, 1, vio); 
     159} 
     160 
     161int emul_esd_test_byteorder(int client, void * data, struct roar_vio_calls * vio) { 
     162 // TODO: do a real test 
     163 return 0; 
     164} 
     165 
     166// handler: 
     167int emul_esd_on_connect    (int client, struct emul_esd_command * cmd, void * data, struct roar_vio_calls * vio) { 
     168 return -1; 
     169} 
     170 
     171 
    134172#endif 
    135173#endif 
  • roard/include/emul_esd.h.OLD

    r2522 r2524  
    4242}; 
    4343 
    44 int emul_esd_exec_command(int client, int cmd, struct roar_vio_calls * vio); 
    45 int emul_esd_check_client(int client, struct roar_vio_calls * vio); 
     44int emul_esd_exec_command  (int client, int cmd, struct roar_vio_calls * vio); 
     45int emul_esd_check_client  (int client, struct roar_vio_calls * vio); 
     46 
     47int emul_esd_int_read      (int client, int * data, struct roar_vio_calls * vio); 
     48int emul_esd_int_write     (int client, int   data, struct roar_vio_calls * vio); 
     49int emul_esd_test_auth     (int client, void * data, struct roar_vio_calls * vio); 
     50int emul_esd_test_byteorder(int client, void * data, struct roar_vio_calls * vio); 
     51 
     52int emul_esd_on_connect    (int client, struct emul_esd_command * cmd, void * data, struct roar_vio_calls * vio); 
    4653 
    4754#endif 
Note: See TracChangeset for help on using the changeset viewer.