gmyth-upnp/src/gmyth_upnp.h
branchtrunk
changeset 696 7afeec40ed62
parent 260 9bab67afb6c2
child 699 3710052a05c9
     1.1 --- a/gmyth-upnp/src/gmyth_upnp.h	Wed Jan 10 23:23:54 2007 +0000
     1.2 +++ b/gmyth-upnp/src/gmyth_upnp.h	Tue May 22 19:14:37 2007 +0100
     1.3 @@ -51,45 +51,62 @@
     1.4  
     1.5  typedef struct _GMythUPnP         GMythUPnP;
     1.6  typedef struct _GMythUPnPClass    GMythUPnPClass;
     1.7 +typedef struct _GMythUPnPPrivate  GMythUPnPPrivate;
     1.8  
     1.9  /****************************************
    1.10  * Data Type
    1.11  ****************************************/
    1.12  
    1.13 +typedef enum upnp_device_list_status {
    1.14 +	GMYTH_UPNP_DEVICE_ADDED = 0,
    1.15 +	GMYTH_UPNP_DEVICE_REMOVED,
    1.16 +	GMYTH_UPNP_DEVICE_UPDATED
    1.17 +} GMythUPnPDeviceStatus;
    1.18 +
    1.19 +typedef void (*GMythUPnPDeviceListener) ( GMythUPnPDeviceStatus status, gchar *dev );
    1.20 +
    1.21  struct _GMythUPnPClass
    1.22  {
    1.23 -  GObjectClass parent_class;
    1.24 +	GObjectClass parent_class;
    1.25  
    1.26 -  /* callbacks */
    1.27 -  /* no one for now */
    1.28 +	/* callbacks */
    1.29 +	guint device_found_handler_signal_id;
    1.30 +
    1.31 +	GMythUPnPDeviceListener device_found_handler;
    1.32 +
    1.33 +	/* no one for now */
    1.34  };
    1.35  
    1.36 +struct _GMythUPnPDevice {
    1.37 +	gchar *uri;
    1.38 +	gchar *host;
    1.39 +	gint port;
    1.40 +	gchar *protocol;
    1.41 +};
    1.42 +
    1.43 +typedef struct _GMythUPnPDevice GMythUPnPDevice;
    1.44 +
    1.45  struct _GMythUPnP {
    1.46  	
    1.47  	GObject parent;
    1.48 +	GMythUPnPPrivate *priv;
    1.49  	
    1.50 -	gchar *uri;
    1.51 -	gchar *host;
    1.52 -	gint port;
    1.53 -	gchar *protocol;
    1.54 -	
    1.55 +
    1.56  	CgUpnpControlPoint* control_point;
    1.57  	
    1.58  	gchar *udn;
    1.59  	
    1.60 -	GMythBackendInfo *gmyth_backend_info;
    1.61 -	
    1.62 -	GList* mythtv_servers;
    1.63 -	
    1.64 +	GMythBackendInfo *backend_info;
    1.65 +
    1.66  	gboolean upnp_dev_found;
    1.67 -	
    1.68  };
    1.69  
    1.70  GType       			gmyth_upnp_get_type (void);
    1.71 -GMythUPnP *				gmyth_upnp_new ( GMythBackendInfo *gmyth_backend_info );
    1.72 -gchar*						gmyth_upnp_get_host ( GMythUPnP *gmyth_upnp );
    1.73 -gint							gmyth_upnp_get_port ( GMythUPnP *gmyth_upnp );
    1.74 -GMythBackendInfo*	gmyth_upnp_get_backend_info ( GMythUPnP *gmyth_upnp );
    1.75 +GMythUPnP *			gmyth_upnp_new ( GMythBackendInfo *gmyth_backend_info, 
    1.76 +						GMythUPnPDeviceListener handler );
    1.77 +gchar*				gmyth_upnp_get_host ( GMythUPnP *gmyth_upnp );
    1.78 +gint				gmyth_upnp_get_port ( GMythUPnP *gmyth_upnp );
    1.79 +GMythBackendInfo*		gmyth_upnp_get_backend_info ( GMythUPnP *gmyth_upnp );
    1.80  
    1.81  G_END_DECLS
    1.82