connection: add need_flush signal

Add a need_flush signal to the connection when something can be flushed.
Add destroy signal to connection
This commit is contained in:
Wim Taymans 2017-03-15 16:16:16 +01:00
parent c1cf1e6f67
commit 3ab17281f6
2 changed files with 67 additions and 40 deletions

View file

@ -25,9 +25,19 @@ extern "C" {
#endif
#include <spa/defs.h>
#include <pinos/client/sig.h>
typedef struct _PinosConnection PinosConnection;
struct _PinosConnection {
int fd;
PINOS_SIGNAL (need_flush, (PinosListener *listener,
PinosConnection *conn));
PINOS_SIGNAL (destroy_signal, (PinosListener *listener,
PinosConnection *conn));
};
PinosConnection * pinos_connection_new (int fd);
void pinos_connection_destroy (PinosConnection *conn);