Gnome2-VFS

 view release on metacpan or  search on metacpan

ChangeLog.pre-git  view on Meta::CPAN

	* xs/GnomeVFSMime.xs: Many leakage related minor changes and some
	commentary.  API doc.

2003/12/18 20:42 (-0500) muppetman

	* xs/GnomeVFS.xs: hush unused var warning in get_version_info.

	* xs/GnomeVFSAsync.xs: looks like a couple of
	s/VFS2PERL_GNOME_TYPE/GNOME_VFS_TYPE/ slipped through the cracks.

	* xs/GnomeVFSDirectory.xs, xs/GnomeVFSOps.xs: if using PPCODE, the
	return type should be void.  this hushes some 'unused var RETVAL'
	warnings.

	* xs/GnomeVFSUtils.xs: disambiguating braces hush compiler warnings.
	
2003/12/18 22:23 (+0100) kaffeetisch

	* VFS.pm: Mention Gnome2::VFS::index.

	* Makefile.PL

ChangeLog.pre-git  view on Meta::CPAN


	R vfs2perl.typemap
	A vfs.typemap
	* MANIFEST
	* Makefile.PL: Rename vfs2perl.typemap to vfs.typemap to avoid
	that it gets overwritten by the one generated by Gtk2::CodeGen.

	* xs/GnomeVFSAsync.xs
	* xs/GnomeVFSDirectory.xs
	* xs/GnomeVFSOps.xs
	* xs/GnomeVFSXfer.xs: Don't declare variables in CODE or PPCODE
	sections, use PREINIT instead.

2003/11/23 21:52 (+0100) kaffeetisch

	* Makefile.PL: Use custom prefixes for all GEnums and GFlags so
	that there are no conflicts if/when gnome-vfs starts creating its
	own ones. (muppet)

	* examples/downloader.pl: Use mnemonics and provide better status
	messages.

xs/GnomeVFS.xs  view on Meta::CPAN

#include "boot.xsh"
	gperl_handle_logs_for ("libgnomevfs");

=for apidoc

Returns the major, minor and micro version numbers of GnomeVFS.

=cut
void
GET_VERSION_INFO (class)
    PPCODE:
	PERL_UNUSED_VAR (ax);
	EXTEND (SP, 3);
	PUSHs (sv_2mortal (newSViv (VFS_MAJOR_VERSION)));
	PUSHs (sv_2mortal (newSViv (VFS_MINOR_VERSION)));
	PUSHs (sv_2mortal (newSViv (VFS_MICRO_VERSION)));

bool
CHECK_VERSION (class, major, minor, micro)
	int major
	int minor

xs/GnomeVFS.xs  view on Meta::CPAN

void
gnome_vfs_find_directory (class, near_uri, kind, create_if_needed, find_if_needed, permissions)
	GnomeVFSURI *near_uri
	GnomeVFSFindDirectoryKind kind
	gboolean create_if_needed
	gboolean find_if_needed
	guint permissions
    PREINIT:
	GnomeVFSResult result;
	GnomeVFSURI *result_uri;
    PPCODE:
	result = gnome_vfs_find_directory (near_uri, kind, &result_uri, create_if_needed, find_if_needed, permissions);
	EXTEND (sp, 2);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVGnomeVFSURI (result_uri)));

##  const char *gnome_vfs_result_to_string (GnomeVFSResult result)
const char *
gnome_vfs_result_to_string (class, result)
	GnomeVFSResult result
    C_ARGS:

xs/GnomeVFSApplicationRegistry.xs  view on Meta::CPAN


Returns a list of valid application id's that can handle this MIME type.

=cut
##  GList *gnome_vfs_application_registry_get_applications(const char *mime_type) 
void
gnome_vfs_application_registry_get_applications (class, mime_type=NULL)
	const char *mime_type
    PREINIT:
	GList *i, *results = NULL;
    PPCODE:
	results = gnome_vfs_application_registry_get_applications (mime_type);
	for (i = results; i != NULL; i = i->next)
		XPUSHs (sv_2mortal (newSVpv (i->data, 0)));
	g_list_free (results);

MODULE = Gnome2::VFS::ApplicationRegistry	PACKAGE = Gnome2::VFS::Application	PREFIX = gnome_vfs_application_registry_

##  gboolean gnome_vfs_application_registry_exists (const char *app_id) 
gboolean
gnome_vfs_application_registry_exists (app_id)

xs/GnomeVFSApplicationRegistry.xs  view on Meta::CPAN


Returns a list of valid keys for that application.

=cut
##  GList *gnome_vfs_application_registry_get_keys (const char *app_id) 
void
gnome_vfs_application_registry_get_keys (app_id)
	GnomeVFSApplication *app_id
    PREINIT:
	GList *i, *results = NULL;
    PPCODE:
	results = gnome_vfs_application_registry_get_keys (app_id);
	for (i = results; i != NULL; i = i->next)
		XPUSHs (sv_2mortal (newSVpv (i->data, 0)));
	g_list_free (results);

##  const char *gnome_vfs_application_registry_peek_value (const char *app_id, const char *key)
const char *
gnome_vfs_application_registry_peek_value (app_id, key)
	GnomeVFSApplication *app_id
	const char *key

xs/GnomeVFSApplicationRegistry.xs  view on Meta::CPAN


=cut
##  gboolean gnome_vfs_application_registry_get_bool_value (const char *app_id, const char *key, gboolean *got_key) 
void
gnome_vfs_application_registry_get_bool_value (app_id, key)
	GnomeVFSApplication *app_id
	const char *key
    PREINIT:
	gboolean result;
	gboolean got_key;
    PPCODE:
	result = gnome_vfs_application_registry_get_bool_value (app_id, key, &got_key);
	EXTEND (sp, 2);
	PUSHs (sv_2mortal (newSVuv (result)));
	PUSHs (sv_2mortal (newSVuv (got_key)));

##  void gnome_vfs_application_registry_remove_application(const char *app_id) 
void
gnome_vfs_application_registry_remove_application (app_id)
	GnomeVFSApplication *app_id

xs/GnomeVFSApplicationRegistry.xs  view on Meta::CPAN


Returns a list of MIME types this application can handle.

=cut
##  GList *gnome_vfs_application_registry_get_mime_types (const char *app_id) 
void
gnome_vfs_application_registry_get_mime_types (app_id)
	GnomeVFSApplication *app_id
    PREINIT:
	GList *i, *results = NULL;
    PPCODE:
	results = gnome_vfs_application_registry_get_mime_types (app_id);
	for (i = results; i != NULL; i = i->next)
		XPUSHs (sv_2mortal (newSVpv (i->data, 0)));
	g_list_free (results);

##  gboolean gnome_vfs_application_registry_supports_mime_type (const char *app_id, const char *mime_type) 
gboolean
gnome_vfs_application_registry_supports_mime_type (app_id, mime_type)
	GnomeVFSApplication *app_id
	const char *mime_type

xs/GnomeVFSAsync.xs  view on Meta::CPAN

	SV *data_update
	SV *func_sync
	SV *data_sync
    PREINIT:
	GnomeVFSResult result;
	GnomeVFSAsyncHandle *handle_return;
	GList *source_uri_list;
	GList *target_uri_list;
	GPerlCallback *callback_update;
	GPerlCallback *callback_sync;
    PPCODE:
	source_uri_list = SvGnomeVFSURIGList (source_ref);
	target_uri_list = SvGnomeVFSURIGList (target_ref);

	callback_update = vfs2perl_async_xfer_progress_callback_create (func_update, data_update);
	callback_sync = vfs2perl_xfer_progress_callback_create (func_sync, data_sync);

	result = gnome_vfs_async_xfer (&handle_return,
	                               source_uri_list,
	                               target_uri_list,
	                               xfer_options,

xs/GnomeVFSDNSSD.xs  view on Meta::CPAN

void
gnome_vfs_dns_sd_browse (class, domain, type, func, data = NULL)
	const char *domain
	const char *type
	SV *func
	SV *data
    PREINIT:
	GnomeVFSDNSSDBrowseHandle *handle;
	GnomeVFSResult result;
	GPerlCallback *callback;
    PPCODE:
	callback = vfs2perl_dns_sd_browse_callback_create (func, data);

	result = gnome_vfs_dns_sd_browse (&handle,
	                                  domain,
	                                  type,
	                                  (GnomeVFSDNSSDBrowseCallback)
	                                    vfs2perl_dns_sd_browse_callback,
	                                  callback,
	                                  (GDestroyNotify)
	                                    gperl_callback_destroy);

xs/GnomeVFSDNSSD.xs  view on Meta::CPAN

	const char *name
	const char *type
	const char *domain
	int timeout
	SV *func
	SV *data
    PREINIT:
	GnomeVFSDNSSDResolveHandle *handle;
	GnomeVFSResult result;
	GPerlCallback *callback;
    PPCODE:
	callback = vfs2perl_dns_sd_resolve_callback_create (func, data);

	result = gnome_vfs_dns_sd_resolve (&handle,
	                                   name,
	                                   type,
	                                   domain,
	                                   timeout,
	                                   (GnomeVFSDNSSDResolveCallback)
	                                     vfs2perl_dns_sd_resolve_callback,
	                                   callback,

xs/GnomeVFSDNSSD.xs  view on Meta::CPAN

##  GnomeVFSResult gnome_vfs_dns_sd_browse_sync (const char *domain, const char *type, int timeout_msec, int *n_services, GnomeVFSDNSSDService **services)
void
gnome_vfs_dns_sd_browse_sync (class, domain, type, timeout_msec)
	const char *domain
	const char *type
	int timeout_msec
    PREINIT:
	GnomeVFSResult result;
	int n_services, i;
	GnomeVFSDNSSDService *services = NULL;
    PPCODE:
	result = gnome_vfs_dns_sd_browse_sync (domain, type, timeout_msec, &n_services, &services);

	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));

	if (result == GNOME_VFS_OK && services) {
		for (i = 0; i < n_services; i++) {
			XPUSHs (sv_2mortal (newSVGnomeVFSDNSSDService (&services[i])));
		}
		gnome_vfs_dns_sd_service_list_free (services, n_services);
	}

xs/GnomeVFSDNSSD.xs  view on Meta::CPAN

	const char *type
	const char *domain
	int timeout_msec
    PREINIT:
	GnomeVFSResult result;
	char *host = NULL;
	int port;
	GHashTable *text = NULL;
	int text_raw_len;
	char *text_raw = NULL;
    PPCODE:
	result = gnome_vfs_dns_sd_resolve_sync (name, type, domain, timeout_msec, &host, &port, &text, &text_raw_len, &text_raw);

	EXTEND (sp, 5);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (host ? sv_2mortal (newSVpv (host, 0)) : &PL_sv_undef);
	PUSHs (sv_2mortal (newSViv (port)));
	PUSHs (sv_2mortal (newSVGnomeVFSDNSSDResolveHashTable (text)));
	PUSHs (text_raw ? sv_2mortal (newSVpv (text_raw, text_raw_len)) : &PL_sv_undef);

	if (host)

xs/GnomeVFSDNSSD.xs  view on Meta::CPAN

		g_hash_table_destroy (text);

##  GnomeVFSResult gnome_vfs_dns_sd_list_browse_domains_sync (const char *domain, int timeout_msec, GList **domains)
void
gnome_vfs_dns_sd_list_browse_domains_sync (class, domain, timeout_msec)
	const char *domain
	int timeout_msec
    PREINIT:
	GnomeVFSResult result;
	GList *domains = NULL, *i;
    PPCODE:
	result = gnome_vfs_dns_sd_list_browse_domains_sync (domain, timeout_msec, &domains);

	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));

	if (result == GNOME_VFS_OK) {
		for (i = domains; i; i = i->next) {
			if (i->data) {
				XPUSHs (sv_2mortal (newSVpv (i->data, 0)));
				g_free (i->data);
			}

xs/GnomeVFSDNSSD.xs  view on Meta::CPAN

MODULE = Gnome2::VFS::DNSSD	PACKAGE = Gnome2::VFS	PREFIX = gnome_vfs_

=for object Gnome2::VFS::DNSSD
=cut

##  GList * gnome_vfs_get_default_browse_domains (void)
void
gnome_vfs_get_default_browse_domains (class)
    PREINIT:
	GList *domains = NULL, *i;
    PPCODE:
	PERL_UNUSED_VAR (ax);
	domains = gnome_vfs_get_default_browse_domains ();

	for (i = domains; i; i = i->next) {
		if (i->data) {
			XPUSHs (sv_2mortal (newSVpv (i->data, 0)));
			g_free (i->data);
		}
	}

xs/GnomeVFSDirectory.xs  view on Meta::CPAN


=cut
##  GnomeVFSResult gnome_vfs_directory_open (GnomeVFSDirectoryHandle **handle, const gchar *text_uri, GnomeVFSFileInfoOptions options) 
void
gnome_vfs_directory_open (class, text_uri, options)
	const gchar *text_uri
	GnomeVFSFileInfoOptions options
    PREINIT:
	GnomeVFSResult result;
	GnomeVFSDirectoryHandle *handle;
    PPCODE:
	result = gnome_vfs_directory_open (&handle, text_uri, options);
	EXTEND (sp, 2);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVGnomeVFSDirectoryHandle (handle)));


=for apidoc

Returns a GnomeVFSResult and a GnomeVFSDirectoryHandle.

=cut
##  GnomeVFSResult gnome_vfs_directory_open_from_uri (GnomeVFSDirectoryHandle **handle, GnomeVFSURI *uri, GnomeVFSFileInfoOptions options) 
void
gnome_vfs_directory_open_from_uri (class, uri, options)
	GnomeVFSURI *uri
	GnomeVFSFileInfoOptions options
    PREINIT:
	GnomeVFSResult result;
	GnomeVFSDirectoryHandle *handle;
    PPCODE:
	result = gnome_vfs_directory_open_from_uri (&handle, uri, options);
	EXTEND (sp, 2);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVGnomeVFSDirectoryHandle (handle)));

##  GnomeVFSResult gnome_vfs_directory_visit (const gchar *uri, GnomeVFSFileInfoOptions info_options, GnomeVFSDirectoryVisitOptions visit_options, GnomeVFSDirectoryVisitFunc callback, gpointer data) 
GnomeVFSResult
gnome_vfs_directory_visit (class, uri, info_options, visit_options, func, data=NULL)
	const gchar *uri
	GnomeVFSFileInfoOptions info_options

xs/GnomeVFSDirectory.xs  view on Meta::CPAN


=cut
##  GnomeVFSResult gnome_vfs_directory_list_load (GList **list, const gchar *text_uri, GnomeVFSFileInfoOptions options) 
void
gnome_vfs_directory_list_load (class, text_uri, options)
	const gchar *text_uri
	GnomeVFSFileInfoOptions options
    PREINIT:
	GnomeVFSResult result;
	GList *i, *list = NULL;
    PPCODE:
	result = gnome_vfs_directory_list_load (&list, text_uri, options);

	EXTEND (sp, 1);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));

	for (i = list; i != NULL; i = i->next)
		XPUSHs (sv_2mortal (newSVGnomeVFSFileInfo (i->data)));

	gnome_vfs_file_info_list_free (list);

xs/GnomeVFSDirectory.xs  view on Meta::CPAN

Returns a GnomeVFSResult and a GnomeVFSFileInfo.

=cut
##  GnomeVFSResult gnome_vfs_directory_read_next (GnomeVFSDirectoryHandle *handle, GnomeVFSFileInfo *file_info) 
void
gnome_vfs_directory_read_next (handle)
	GnomeVFSDirectoryHandle *handle
    PREINIT:
	GnomeVFSResult result;
	GnomeVFSFileInfo *file_info;
    PPCODE:
	file_info = gnome_vfs_file_info_new ();
	result = gnome_vfs_directory_read_next (handle, file_info);
	EXTEND (sp, 2);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVGnomeVFSFileInfo (file_info)));
	gnome_vfs_file_info_unref (file_info);

##  GnomeVFSResult gnome_vfs_directory_close (GnomeVFSDirectoryHandle *handle) 
GnomeVFSResult
gnome_vfs_directory_close (handle)

xs/GnomeVFSDrive.xs  view on Meta::CPAN

	}

#if VFS_CHECK_VERSION (2, 8, 0)

##  GList * gnome_vfs_drive_get_mounted_volumes (GnomeVFSDrive *drive)
void
gnome_vfs_drive_get_mounted_volumes (drive)
	GnomeVFSDrive *drive
    PREINIT:
	GList *list = NULL, *i;
    PPCODE:
	list = gnome_vfs_drive_get_mounted_volumes (drive);

	for (i = list; i; i = i->next) {
		XPUSHs (sv_2mortal (newSVGnomeVFSVolume (i->data)));
	}

	gnome_vfs_drive_volume_list_free (list);

##  char * gnome_vfs_drive_get_hal_udi (drive)
char *

xs/GnomeVFSMime.xs  view on Meta::CPAN

=cut
# FIXME: leak.
##  GList * gnome_vfs_mime_remove_application_from_list (GList *applications, const char *application_id, gboolean *did_remove) 
void
gnome_vfs_mime_remove_application_from_list (class, application_id, ...)
	const char *application_id
    PREINIT:
	int i;
	GList *applications = NULL, *result, *j;
	gboolean did_remove;
    PPCODE:
	for (i = 2; i < items; i++)
		applications = g_list_append (applications, SvGnomeVFSMimeApplication (ST (i)));

	result = gnome_vfs_mime_remove_application_from_list (applications, application_id, &did_remove);

	EXTEND (sp, 1);
	PUSHs (sv_2mortal (newSVuv (did_remove)));

	for (j = result; j != NULL; j = j->next) {
		XPUSHs (sv_2mortal (newSVGnomeVFSMimeApplication (j->data)));

xs/GnomeVFSMime.xs  view on Meta::CPAN

Returns a list of application id's.

=cut
# FIXME: leak.
##  GList * gnome_vfs_mime_id_list_from_application_list (GList *applications) 
void
gnome_vfs_mime_id_list_from_application_list (class, ...)
    PREINIT:
	int i;
	GList *applications = NULL, *ids, *j;
    PPCODE:
	for (i = 1; i < items; i++)
		applications = g_list_append (applications, SvGnomeVFSMimeApplication (ST (i)));

	ids = gnome_vfs_mime_id_list_from_application_list (applications);

	for (j = ids; j != NULL; j = j->next) {
		XPUSHs (sv_2mortal (newSVpv (j->data, 0)));
		/* g_free (j->data); */
	}

xs/GnomeVFSMime.xs  view on Meta::CPAN


Returns a list of GnomeVFSMimeApplication's.

=cut
##  GList * gnome_vfs_mime_get_short_list_applications (const char *mime_type) 
void
gnome_vfs_mime_get_short_list_applications (mime_type)
	GnomeVFSMimeType *mime_type
    PREINIT:
	GList *i, *applications;
    PPCODE:
	applications = gnome_vfs_mime_get_short_list_applications (mime_type);

	for (i = applications; i != NULL; i = i->next)
		XPUSHs (sv_2mortal (newSVGnomeVFSMimeApplication (i->data)));

	/* gnome_vfs_mime_application_list_free (applications); */
	g_list_free (applications);

# FIXME: Needs bonobo typemaps.
###  GList * gnome_vfs_mime_get_short_list_components (const char *mime_type) 

xs/GnomeVFSMime.xs  view on Meta::CPAN


Returns a list of GnomeVFSMimeApplication's.

=cut
##  GList * gnome_vfs_mime_get_all_applications (const char *mime_type) 
void
gnome_vfs_mime_get_all_applications (mime_type)
	GnomeVFSMimeType *mime_type
    PREINIT:
	GList *i, *applications;
    PPCODE:
	applications = gnome_vfs_mime_get_all_applications (mime_type);

	for (i = applications; i != NULL; i = i->next)
		XPUSHs (sv_2mortal (newSVGnomeVFSMimeApplication (i->data)));

	/* gnome_vfs_mime_application_list_free (applications); */
	g_list_free (applications);

#if VFS_CHECK_VERSION (2, 10, 0)

##  GList * gnome_vfs_mime_get_all_applications_for_uri (const char *uri, const char *mime_type);
void
gnome_vfs_mime_get_all_applications_for_uri (mime_type, uri)
	GnomeVFSMimeType *mime_type
	const char *uri
    PREINIT:
	GList *i, *applications;
    PPCODE:
	applications = gnome_vfs_mime_get_all_applications_for_uri (uri, mime_type);

	for (i = applications; i != NULL; i = i->next)
		XPUSHs (sv_2mortal (newSVGnomeVFSMimeApplication (i->data)));

	/* gnome_vfs_mime_application_list_free (applications); */
	g_list_free (applications);

#endif

xs/GnomeVFSMime.xs  view on Meta::CPAN

	RETVAL

#if VFS_CHECK_VERSION (2, 8, 0)

##  GList *gnome_vfs_mime_get_all_desktop_entries (const char *mime_type)
void
gnome_vfs_mime_get_all_desktop_entries (mime_type)
      GnomeVFSMimeType *mime_type
    PREINIT:
	GList *result = NULL, *i;
    PPCODE:
	result = gnome_vfs_mime_get_all_desktop_entries (mime_type);

	for (i = result; i; i = i->next) {
		if (i->data) {
			XPUSHs (sv_2mortal (newSVpv (i->data, 0)));
			g_free (i->data);
		}
	}

	g_list_free (result);

xs/GnomeVFSOps.xs  view on Meta::CPAN


=cut
##  GnomeVFSResult gnome_vfs_open (GnomeVFSHandle **handle, const gchar *text_uri, GnomeVFSOpenMode open_mode)
void
gnome_vfs_open (class, text_uri, open_mode)
	const gchar *text_uri
	GnomeVFSOpenMode open_mode
    PREINIT:
	GnomeVFSResult result;
	GnomeVFSHandle *handle;
    PPCODE:
	result = gnome_vfs_open (&handle, text_uri, open_mode);
	EXTEND (sp, 2);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVGnomeVFSHandle (handle)));


=for apidoc

Returns a GnomeVFSResult and a GnomeVFSHandle.

xs/GnomeVFSOps.xs  view on Meta::CPAN

##  GnomeVFSResult gnome_vfs_create (GnomeVFSHandle **handle, const gchar *text_uri, GnomeVFSOpenMode open_mode, gboolean exclusive, guint perm) 
void
gnome_vfs_create (class, text_uri, open_mode, exclusive, perm)
	const gchar *text_uri
	GnomeVFSOpenMode open_mode
	gboolean exclusive
	guint perm
    PREINIT:
	GnomeVFSResult result;
	GnomeVFSHandle *handle;
    PPCODE:
	result = gnome_vfs_create (&handle, text_uri, open_mode, exclusive, perm);
	EXTEND (sp, 2);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVGnomeVFSHandle (handle)));

##  GnomeVFSResult gnome_vfs_unlink (const gchar *text_uri) 
GnomeVFSResult
gnome_vfs_unlink (class, text_uri)
	const gchar *text_uri
    C_ARGS:

xs/GnomeVFSOps.xs  view on Meta::CPAN


=cut
##  GnomeVFSResult gnome_vfs_check_same_fs (const gchar *source, const gchar *target, gboolean *same_fs_return) 
void
gnome_vfs_check_same_fs (class, source, target)
	const gchar *source
	const gchar *target
    PREINIT:
	GnomeVFSResult result;
	gboolean same_fs_return;
    PPCODE:
	result = gnome_vfs_check_same_fs (source, target, &same_fs_return);
	EXTEND (sp, 2);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVuv (same_fs_return)));

##  GnomeVFSResult gnome_vfs_create_symbolic_link (GnomeVFSURI *uri, const gchar *target_reference) 
GnomeVFSResult
gnome_vfs_create_symbolic_link (class, uri, target_reference)
	GnomeVFSURI *uri
	const gchar *target_reference

xs/GnomeVFSOps.xs  view on Meta::CPAN


=cut
##  GnomeVFSResult gnome_vfs_get_file_info (const gchar *text_uri, GnomeVFSFileInfo *info, GnomeVFSFileInfoOptions options) 
void
gnome_vfs_get_file_info (class, text_uri, options)
	const gchar *text_uri
	GnomeVFSFileInfoOptions options
    PREINIT:
	GnomeVFSResult result;
	GnomeVFSFileInfo *info;
    PPCODE:
	info = gnome_vfs_file_info_new ();
	result = gnome_vfs_get_file_info (text_uri, info, options);
	EXTEND (sp, 2);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVGnomeVFSFileInfo (info)));
	gnome_vfs_file_info_unref (info);

##  GnomeVFSResult gnome_vfs_truncate (const gchar *text_uri, GnomeVFSFileSize length) 
GnomeVFSResult
gnome_vfs_truncate (class, text_uri, length)

xs/GnomeVFSOps.xs  view on Meta::CPAN

=cut
##  GnomeVFSResult gnome_vfs_read (GnomeVFSHandle *handle, gpointer buffer, GnomeVFSFileSize bytes, GnomeVFSFileSize *bytes_read) 
void
gnome_vfs_read (handle, bytes)
	GnomeVFSHandle *handle
	GnomeVFSFileSize bytes
    PREINIT:
	char *buffer;
	GnomeVFSResult result;
	GnomeVFSFileSize bytes_read = bytes;
    PPCODE:
	if (bytes <= 0)
		croak ("The number of bytes to read must be greater than 0");

	buffer = g_new0 (char, bytes);
	result = gnome_vfs_read (handle, buffer, bytes, &bytes_read);

	EXTEND (sp, 3);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVuv (bytes_read)));
	PUSHs (sv_2mortal (newSVpv (buffer, bytes_read)));

xs/GnomeVFSOps.xs  view on Meta::CPAN

=cut
##  GnomeVFSResult gnome_vfs_write (GnomeVFSHandle *handle, gconstpointer buffer, GnomeVFSFileSize bytes, GnomeVFSFileSize *bytes_written) 
void
gnome_vfs_write (handle, buffer, bytes)
	GnomeVFSHandle *handle
	char *buffer;
	GnomeVFSFileSize bytes
    PREINIT:
	GnomeVFSResult result;
	GnomeVFSFileSize bytes_written = bytes;
    PPCODE:
	result = gnome_vfs_write (handle, buffer, bytes, &bytes_written);
	EXTEND (sp, 3);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVuv (bytes_written)));

##  GnomeVFSResult gnome_vfs_seek (GnomeVFSHandle *handle, GnomeVFSSeekPosition whence, GnomeVFSFileOffset offset) 
GnomeVFSResult
gnome_vfs_seek (handle, whence, offset)
	GnomeVFSHandle *handle
	GnomeVFSSeekPosition whence

xs/GnomeVFSOps.xs  view on Meta::CPAN

Returns a GnomeVFSResult and the offset.

=cut
##  GnomeVFSResult gnome_vfs_tell (GnomeVFSHandle *handle, GnomeVFSFileSize *offset_return) 
void
gnome_vfs_tell (handle)
	GnomeVFSHandle *handle
    PREINIT:
	GnomeVFSResult result;
	GnomeVFSFileSize offset_return;
    PPCODE:
	result = gnome_vfs_tell (handle, &offset_return);
	EXTEND (sp, 2);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSViv (offset_return)));

=for apidoc

Returns a GnomeVFSResult and a GnomeVFSFileInfo.

=cut
##  GnomeVFSResult gnome_vfs_get_file_info_from_handle (GnomeVFSHandle *handle, GnomeVFSFileInfo *info, GnomeVFSFileInfoOptions options) 
void
gnome_vfs_get_file_info (handle, options)
	GnomeVFSHandle *handle
	GnomeVFSFileInfoOptions options
    PREINIT:
	GnomeVFSResult result;
	GnomeVFSFileInfo *info;
    PPCODE:
	info = gnome_vfs_file_info_new ();
	result = gnome_vfs_get_file_info_from_handle (handle, info, options);
	EXTEND (sp, 2);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVGnomeVFSFileInfo (info)));
	g_free (info);

##  GnomeVFSResult gnome_vfs_truncate_handle (GnomeVFSHandle *handle, GnomeVFSFileSize length) 
GnomeVFSResult
gnome_vfs_truncate (handle, length)

xs/GnomeVFSOps.xs  view on Meta::CPAN


=cut
##  GnomeVFSResult gnome_vfs_open_uri (GnomeVFSHandle **handle, GnomeVFSURI *uri, GnomeVFSOpenMode open_mode) 
void
gnome_vfs_uri_open (uri, open_mode)
	GnomeVFSURI *uri
	GnomeVFSOpenMode open_mode
    PREINIT:
	GnomeVFSResult result;
	GnomeVFSHandle *handle;
    PPCODE:
	result = gnome_vfs_open_uri (&handle, uri, open_mode);
	EXTEND (sp, 2);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVGnomeVFSHandle (handle)));

=for apidoc

Returns a GnomeVFSResult and a GnomeVFSHandle.

=cut
##  GnomeVFSResult gnome_vfs_create_uri (GnomeVFSHandle **handle, GnomeVFSURI *uri, GnomeVFSOpenMode open_mode, gboolean exclusive, guint perm) 
void
gnome_vfs_uri_create (uri, open_mode, exclusive, perm)
	GnomeVFSURI *uri
	GnomeVFSOpenMode open_mode
	gboolean exclusive
	guint perm
    PREINIT:
	GnomeVFSResult result;
	GnomeVFSHandle *handle;
    PPCODE:
	result = gnome_vfs_create_uri (&handle, uri, open_mode, exclusive, perm);
	EXTEND (sp, 2);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVGnomeVFSHandle (handle)));

##  GnomeVFSResult gnome_vfs_move_uri (GnomeVFSURI *old_uri, GnomeVFSURI *new_uri, gboolean force_replace) 
GnomeVFSResult
gnome_vfs_uri_move (old_uri, new_uri, force_replace)
	GnomeVFSURI *old_uri
	GnomeVFSURI *new_uri

xs/GnomeVFSOps.xs  view on Meta::CPAN


=cut
##  GnomeVFSResult gnome_vfs_check_same_fs_uris (GnomeVFSURI *source_uri, GnomeVFSURI *target_uri, gboolean *same_fs_return) 
void
gnome_vfs_uri_check_same_fs (source_uri, target_uri)
	GnomeVFSURI *source_uri
	GnomeVFSURI *target_uri
    PREINIT:
	GnomeVFSResult result;
	gboolean same_fs_return;
    PPCODE:
	result = gnome_vfs_check_same_fs_uris (source_uri, target_uri, &same_fs_return);
	EXTEND (sp, 2);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVuv (same_fs_return)));

##  gboolean gnome_vfs_uri_exists (GnomeVFSURI *uri) 
gboolean
gnome_vfs_uri_exists (uri)
	GnomeVFSURI *uri

xs/GnomeVFSOps.xs  view on Meta::CPAN


=cut
##  GnomeVFSResult gnome_vfs_get_file_info_uri (GnomeVFSURI *uri, GnomeVFSFileInfo *info, GnomeVFSFileInfoOptions options) 
void
gnome_vfs_uri_get_file_info (uri, options)
	GnomeVFSURI *uri
	GnomeVFSFileInfoOptions options
    PREINIT:
	GnomeVFSResult result;
	GnomeVFSFileInfo *info;
    PPCODE:
	info = gnome_vfs_file_info_new ();
	result = gnome_vfs_get_file_info_uri (uri, info, options);
	EXTEND (sp, 2);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVGnomeVFSFileInfo (info)));
	g_free (info);

##  GnomeVFSResult gnome_vfs_truncate_uri (GnomeVFSURI *uri, GnomeVFSFileSize length) 
GnomeVFSResult
gnome_vfs_uri_truncate (uri, length)

xs/GnomeVFSOps.xs  view on Meta::CPAN

void
gnome_vfs_monitor_add (class, text_uri, monitor_type, func, data=NULL)
	const gchar *text_uri
	GnomeVFSMonitorType monitor_type
	SV *func
	SV *data
    PREINIT:
	GnomeVFSResult result;
	GnomeVFSMonitorHandle *handle;
	GPerlCallback *callback;
    PPCODE:
	callback = vfs2perl_monitor_callback_create (func, data);

	/* FIXME: destroy that callback somehow. */

	result = gnome_vfs_monitor_add (&handle,
	                                text_uri,
	                                monitor_type,
	                                (GnomeVFSMonitorCallback)
	                                  vfs2perl_monitor_callback,
	                                callback);

xs/GnomeVFSResolve.xs  view on Meta::CPAN

=for object Gnome2::VFS::Resolve
=cut

##  GnomeVFSResult gnome_vfs_resolve (const char *hostname, GnomeVFSResolveHandle **handle)
void
gnome_vfs_resolve (class, hostname)
	const char *hostname
    PREINIT:
	GnomeVFSResult result;
	GnomeVFSResolveHandle *handle = NULL;
    PPCODE:
	result = gnome_vfs_resolve (hostname, &handle);

	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));

	if (result == GNOME_VFS_OK) {
		XPUSHs (sv_2mortal (newSVGnomeVFSResolveHandle (handle)));
	}

MODULE = Gnome2::VFS::Resolve	PACKAGE = Gnome2::VFS::Resolve::Handle	PREFIX = gnome_vfs_resolve_

xs/GnomeVFSURI.xs  view on Meta::CPAN

##  GList *gnome_vfs_uri_list_parse (const gchar* uri_list)
##  GList *gnome_vfs_uri_list_ref (GList *list)
##  GList *gnome_vfs_uri_list_unref (GList *list)
##  GList *gnome_vfs_uri_list_copy (GList *list)
##  void gnome_vfs_uri_list_free (GList *list)
void
gnome_vfs_uri_list_parse (class, uri_list)
	const gchar *uri_list
    PREINIT:
	GList *i, *list = NULL;
    PPCODE:
	list = gnome_vfs_uri_list_parse (uri_list);
	for (i = list; i != NULL; i = i->next)
		XPUSHs (sv_2mortal (newSVGnomeVFSURI (i->data)));
	gnome_vfs_uri_list_free (list);

##  char *gnome_vfs_uri_make_full_from_relative (const char *base_uri, const char *relative_uri)
char *
gnome_vfs_uri_make_full_from_relative (class, base_uri, relative_uri)
	const char *base_uri
	const char *relative_uri

xs/GnomeVFSUtils.xs  view on Meta::CPAN

Returns a GnomeVFSResult and a GnomeVFSFileSize.

=cut
##  GnomeVFSResult gnome_vfs_get_volume_free_space (const GnomeVFSURI *vfs_uri, GnomeVFSFileSize *size) 
void
gnome_vfs_get_volume_free_space (class, vfs_uri)
	const GnomeVFSURI *vfs_uri
    PREINIT:
	GnomeVFSResult result;
	GnomeVFSFileSize size;
    PPCODE:
	result = gnome_vfs_get_volume_free_space (vfs_uri, &size);
	EXTEND (sp, 2);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSVGnomeVFSFileSize (size)));

##  char *gnome_vfs_icon_path_from_filename (const char *filename) 
char_own *
gnome_vfs_icon_path_from_filename (class, filename)
	const char *filename
    C_ARGS:

xs/GnomeVFSUtils.xs  view on Meta::CPAN


=cut
##  GnomeVFSResult gnome_vfs_read_entire_file (const char *uri, int *file_size, char **file_contents) 
void
gnome_vfs_read_entire_file (class, uri)
	const char *uri
    PREINIT:
	GnomeVFSResult result;
	int file_size = 0;
	char *file_contents = NULL;
    PPCODE:
	result = gnome_vfs_read_entire_file (uri, &file_size, &file_contents);
	EXTEND (sp, 3);
	PUSHs (sv_2mortal (newSVGnomeVFSResult (result)));
	PUSHs (sv_2mortal (newSViv (file_size)));
	PUSHs (sv_2mortal (file_size
			   ? newSVpv (file_contents, file_size)
			   : newSVsv (&PL_sv_undef)));

##  char * gnome_vfs_format_uri_for_display (const char *uri) 
gchar_own *

xs/GnomeVFSVolumeMonitor.xs  view on Meta::CPAN

	/* do nada to avoid finalizing the monitor. */

#endif

##  GList * gnome_vfs_volume_monitor_get_mounted_volumes (GnomeVFSVolumeMonitor *volume_monitor)
void
gnome_vfs_volume_monitor_get_mounted_volumes (volume_monitor)
	GnomeVFSVolumeMonitor *volume_monitor
    PREINIT:
	GList *volumes = NULL, *i;
    PPCODE:
	volumes = gnome_vfs_volume_monitor_get_mounted_volumes (volume_monitor);

	for (i = volumes; i; i = i->next) {
		XPUSHs (sv_2mortal (newSVGnomeVFSVolume (i->data)));
		gnome_vfs_volume_unref (i->data);
	}

	g_list_free (volumes);

##  GList * gnome_vfs_volume_monitor_get_connected_drives (GnomeVFSVolumeMonitor *volume_monitor)
void
gnome_vfs_volume_monitor_get_connected_drives (volume_monitor)
	GnomeVFSVolumeMonitor *volume_monitor
    PREINIT:
	GList *drives = NULL, *i;
    PPCODE:
	drives = gnome_vfs_volume_monitor_get_connected_drives (volume_monitor);

	for (i = drives; i; i = i->next) {
		XPUSHs (sv_2mortal (newSVGnomeVFSDrive (i->data)));
		gnome_vfs_drive_unref (i->data);
	}

	g_list_free (drives);

##  GnomeVFSVolume * gnome_vfs_volume_monitor_get_volume_for_path (GnomeVFSVolumeMonitor *volume_monitor, const char *path)



( run in 1.654 second using v1.01-cache-2.11-cpan-5511b514fd6 )