#ifndef _PLUGIN_INTERFACE_TRANSPORT_H 
#define _PLUGIN_INTERFACE_TRANSPORT_H_ 

#include <glib-object.h>
#include "bmpx/vfs.h"

#define BMP_TYPE_PLUGIN_TRANSPORT		    (bmp_plugin_transport_iface_get_type ())
#define BMP_PLUGIN_TRANSPORT(obj)		    (G_TYPE_CHECK_INSTANCE_CAST ((obj), BMP_TYPE_PLUGIN_TRANSPORT, BmpPluginTransportInterface))
#define BMP_IS_PLUGIN_TRANSPORT(obj)		    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BMP_TYPE_PLUGIN_TRANSPORT))
#define BMP_PLUGIN_TRANSPORT_GET_IFACE(inst)	    (G_TYPE_INSTANCE_GET_INTERFACE ((inst), BMP_TYPE_PLUGIN_TRANSPORT, BmpPluginTransportInterface))


typedef struct _BmpPluginTransport BmpPluginTransport; 
typedef struct _BmpPluginTransportInterface BmpPluginTransportInterface;

struct _BmpPluginTransportInterface {
        GTypeInterface parent;

	gboolean    (*can_process)     (BmpPluginTransportInterface *self, const gchar *uri);
	gboolean    (*handle_set)      (BmpPluginTransportInterface *self, VFSHandle *handle);
	VFSHandle*  (*handle_get)      (BmpPluginTransportInterface *self);
	gboolean    (*handle_remove)   (BmpPluginTransportInterface *self);
	gboolean    (*handle_read)     (BmpPluginTransportInterface *self);
#if 0 
	// NYI
	gboolean    (*handle_write)    (BmpPluginTransportInterface *self);
#endif
};

GType
bmp_plugin_transport_iface_get_type (void);

gboolean
bmp_plugin_transport_can_process (BmpPluginTransportInterface *self, const gchar *uri);

gboolean
bmp_plugin_transport_handle_set (BmpPluginTransportInterface *self, VFSHandle *_handle);

VFSHandle*
bmp_plugin_transport_handle_get (BmpPluginTransportInterface *self);

gboolean
bmp_plugin_transport_handle_remove (BmpPluginTransportInterface *self);

gboolean
bmp_plugin_transport_handle_read   (BmpPluginTransportInterface *self);

#endif /* _PLUGIN_INTERFACE_TRANSPORT_H_ */











