pass the client object around

Pass the client object around, it's easier to deal with than the sender
id.
Fix the ASYNC return check
Don't overwrite the fds of a pollitem, instead keep an index of their
position in the global fd array.
This commit is contained in:
Wim Taymans 2016-09-27 16:59:45 +02:00
parent 7b53fa8685
commit c6861845a7
14 changed files with 123 additions and 79 deletions

View file

@ -29,6 +29,7 @@ typedef struct _PinosNodeFactoryClass PinosNodeFactoryClass;
typedef struct _PinosNodeFactoryPrivate PinosNodeFactoryPrivate;
#include <pinos/server/daemon.h>
#include <pinos/server/client.h>
#define PINOS_TYPE_NODE_FACTORY (pinos_node_factory_get_type ())
#define PINOS_IS_NODE_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PINOS_TYPE_NODE_FACTORY))
@ -61,7 +62,7 @@ struct _PinosNodeFactoryClass {
PinosNode * (*create_node) (PinosNodeFactory *factory,
PinosDaemon *daemon,
const gchar *sender,
PinosClient *client,
const gchar *name,
PinosProperties *properties);
};
@ -69,13 +70,14 @@ struct _PinosNodeFactoryClass {
/* normal GObject stuff */
GType pinos_node_factory_get_type (void);
const gchar * pinos_node_factory_get_name (PinosNodeFactory *node_factory);
PinosNode * pinos_node_factory_create_node (PinosNodeFactory *factory,
PinosDaemon *daemon,
const gchar *sender,
PinosClient *client,
const gchar *name,
PinosProperties *props);
const gchar * pinos_node_factory_get_name (PinosNodeFactory *node_factory);
G_END_DECLS
#endif /* __PINOS_NODE_FACTORY_H__ */