diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:04:49 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:04:49 -0800 |
commit | df7881f07f53b041dc0568be8528e9dbb74994cc (patch) | |
tree | 1b3e036f7df4241bf0c2d527b73198c50e1d7891 /proxy/proxy_common.h | |
parent | 55f4e4a5ec657a017e3bf75299ad71fd1c968dd3 (diff) | |
download | external_qemu-df7881f07f53b041dc0568be8528e9dbb74994cc.zip external_qemu-df7881f07f53b041dc0568be8528e9dbb74994cc.tar.gz external_qemu-df7881f07f53b041dc0568be8528e9dbb74994cc.tar.bz2 |
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'proxy/proxy_common.h')
-rw-r--r-- | proxy/proxy_common.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/proxy/proxy_common.h b/proxy/proxy_common.h index 54889cf..57f224d 100644 --- a/proxy/proxy_common.h +++ b/proxy/proxy_common.h @@ -29,7 +29,7 @@ typedef enum { } ProxyEvent; /* event can't be NONE when this callback is called */ -typedef void (*ProxyEventFunc)( void* opaque, ProxyEvent event ); +typedef void (*ProxyEventFunc)( void* opaque, int fd, ProxyEvent event ); extern void proxy_set_verbose(int mode); @@ -61,19 +61,27 @@ typedef struct { * * returns 0 on success, or -1 if there is no proxy service for this type of connection */ -extern int proxy_manager_add( int socket, struct sockaddr_in* address, void* ev_opaque, ProxyEventFunc ev_func ); +extern int proxy_manager_add( struct sockaddr_in* address, + int sock_type, + ProxyEventFunc ev_func, + void* ev_opaque ); /* remove an on-going proxified socket connection from the manager's list. * this is only necessary when the socket connection must be canceled before * the connection accept/refusal occured */ -extern void proxy_manager_del( int socket ); +extern void proxy_manager_del( void* ev_opaque ); /* this function is called to update the select file descriptor sets * with those of the proxified connection sockets that are currently managed */ -extern void proxy_manager_select_fill( int *pcount, fd_set* read_fds, fd_set* write_fds, fd_set* err_fds); +extern void proxy_manager_select_fill( int *pcount, + fd_set* read_fds, + fd_set* write_fds, + fd_set* err_fds); /* this function is called to act on proxified connection sockets when network events arrive */ -extern void proxy_manager_poll( fd_set* read_fds, fd_set* write_fds, fd_set* err_fds ); +extern void proxy_manager_poll( fd_set* read_fds, + fd_set* write_fds, + fd_set* err_fds ); #endif /* END */ |