diff -r 9bab67afb6c2 -r 7afeec40ed62 gmyth-upnp/src/gmyth_upnp.h --- a/gmyth-upnp/src/gmyth_upnp.h Wed Jan 10 23:23:54 2007 +0000 +++ b/gmyth-upnp/src/gmyth_upnp.h Tue May 22 19:14:37 2007 +0100 @@ -51,45 +51,62 @@ typedef struct _GMythUPnP GMythUPnP; typedef struct _GMythUPnPClass GMythUPnPClass; +typedef struct _GMythUPnPPrivate GMythUPnPPrivate; /**************************************** * Data Type ****************************************/ +typedef enum upnp_device_list_status { + GMYTH_UPNP_DEVICE_ADDED = 0, + GMYTH_UPNP_DEVICE_REMOVED, + GMYTH_UPNP_DEVICE_UPDATED +} GMythUPnPDeviceStatus; + +typedef void (*GMythUPnPDeviceListener) ( GMythUPnPDeviceStatus status, gchar *dev ); + struct _GMythUPnPClass { - GObjectClass parent_class; + GObjectClass parent_class; - /* callbacks */ - /* no one for now */ + /* callbacks */ + guint device_found_handler_signal_id; + + GMythUPnPDeviceListener device_found_handler; + + /* no one for now */ }; +struct _GMythUPnPDevice { + gchar *uri; + gchar *host; + gint port; + gchar *protocol; +}; + +typedef struct _GMythUPnPDevice GMythUPnPDevice; + struct _GMythUPnP { GObject parent; + GMythUPnPPrivate *priv; - gchar *uri; - gchar *host; - gint port; - gchar *protocol; - + CgUpnpControlPoint* control_point; gchar *udn; - GMythBackendInfo *gmyth_backend_info; - - GList* mythtv_servers; - + GMythBackendInfo *backend_info; + gboolean upnp_dev_found; - }; GType gmyth_upnp_get_type (void); -GMythUPnP * gmyth_upnp_new ( GMythBackendInfo *gmyth_backend_info ); -gchar* gmyth_upnp_get_host ( GMythUPnP *gmyth_upnp ); -gint gmyth_upnp_get_port ( GMythUPnP *gmyth_upnp ); -GMythBackendInfo* gmyth_upnp_get_backend_info ( GMythUPnP *gmyth_upnp ); +GMythUPnP * gmyth_upnp_new ( GMythBackendInfo *gmyth_backend_info, + GMythUPnPDeviceListener handler ); +gchar* gmyth_upnp_get_host ( GMythUPnP *gmyth_upnp ); +gint gmyth_upnp_get_port ( GMythUPnP *gmyth_upnp ); +GMythBackendInfo* gmyth_upnp_get_backend_info ( GMythUPnP *gmyth_upnp ); G_END_DECLS