Gnome2-VFS

 view release on metacpan or  search on metacpan

ChangeLog.pre-git  view on Meta::CPAN


	* VFS.pm, t/GnomeVFS.t: Export the following constants on demand
	(@EXPORT_OK): GNOME_VFS_PRIORITY_MIN, GNOME_VFS_PRIORITY_MAX,
	GNOME_VFS_PRIORITY_DEFAULT, GNOME_VFS_SIZE_FORMAT_STR,
	GNOME_VFS_OFFSET_FORMAT_STR, GNOME_VFS_MIME_TYPE_UNKNOWN,
	GNOME_VFS_URI_MAGIC_STR, and GNOME_VFS_URI_PATH_STR.

	* xs/GnomeVFSMime.xs, t/GnomeVFSMime: Bind
	gnome_vfs_mime_get_default_application_for_uri,
	gnome_vfs_mime_get_all_applications_for_uri,
	gnome_vfs_mime_application_new_from_desktop_id,
	gnome_vfs_mime_application_get_desktop_id,
	gnome_vfs_mime_application_get_desktop_file_path,
	gnome_vfs_mime_application_get_name,
	gnome_vfs_mime_application_get_generic_name,
	gnome_vfs_mime_application_get_icon,
	gnome_vfs_mime_application_get_exec,
	gnome_vfs_mime_application_get_binary_name,
	gnome_vfs_mime_application_supports_uris,
	gnome_vfs_mime_application_requires_terminal,
	gnome_vfs_mime_application_supports_startup_notification, and
	gnome_vfs_mime_application_get_startup_wm_class.

ChangeLog.pre-git  view on Meta::CPAN


2004/08/08 15:38 (+0200) kaffeetisch

	* NEWS, README, VFS.pm: Version 1.010.

2004/08/08 15:15 (+0200) kaffeetisch

	* Makefile.PL: Depend on Glib 1.053.

	* maps-2.8, t/GnomeVFSMime, xs/GnomeVFS.xs, xs/GnomeVFSMime.xs:
	Bind and test Gnome2::VFS::Mime::Type::get_all_desktop_entries,
	::get_default_desktop_entry, ::is_equal, and
	Gnome2::VFS::get_mime_type_for_data.

2004/07/29 19:12 (+0200) kaffeetisch

	* MANIFEST, vfs2perl.c, vfs2perl.h, t/GnomeVFSAddress.t,
	t/GnomeVFSDNSSD, t/GnomeVFSDrive, t/GnomeVFSResolve.t,
	t/GnomeVFSVolume, t/GnomeVFSVolumeMonitor, xs/GnomeVFSAddress.xs,
	xs/GnomeVFSDNSSD.xs, xs/GnomeVFSDrive.xs, xs/GnomeVFSResolve.xs,
	xs/GnomeVFSVolume.xs, xs/GnomeVFSVolumeMonitor.xs: Bind and test
	GnomeVFSAddress, GnomeVFSDNSSD, GnomeVFSDrive, GnomeVFSResolve,

NEWS  view on Meta::CPAN

=======================================

* Export the following constants on demand GNOME_VFS_PRIORITY_MIN,
  GNOME_VFS_PRIORITY_MAX, GNOME_VFS_PRIORITY_DEFAULT,
  GNOME_VFS_SIZE_FORMAT_STR, GNOME_VFS_OFFSET_FORMAT_STR,
  GNOME_VFS_MIME_TYPE_UNKNOWN, GNOME_VFS_URI_MAGIC_STR, and
  GNOME_VFS_URI_PATH_STR.

* Add Gnome2::VFS::Mime::Type::get_default_application_for_uri,
  Gnome2::VFS::Mime::Type::get_all_applications_for_uri,
  Gnome2::VFS::Mime::Application::new_from_desktop_id,
  Gnome2::VFS::Mime::Application::get_desktop_id,
  Gnome2::VFS::Mime::Application::get_desktop_file_path,
  Gnome2::VFS::Mime::Application::get_name,
  Gnome2::VFS::Mime::Application::get_generic_name,
  Gnome2::VFS::Mime::Application::get_icon,
  Gnome2::VFS::Mime::Application::get_exec,
  Gnome2::VFS::Mime::Application::get_binary_name,
  Gnome2::VFS::Mime::Application::supports_uris,
  Gnome2::VFS::Mime::Application::requires_terminal,
  Gnome2::VFS::Mime::Application::supports_startup_notification and
  Gnome2::VFS::Mime::Application::get_startup_wm_class,
  Gnome2::VFS::Handle::forget_cache and

t/GnomeVFS.t  view on Meta::CPAN

  GNOME_VFS_URI_MAGIC_STR
  GNOME_VFS_URI_PATH_STR
));

Gnome2::VFS -> init();
ok(Gnome2::VFS -> initialized());

###############################################################################

# FIXME: how to reliably test this? seems to require a running nautilus.
# my ($result, $uri) = Gnome2::VFS -> find_directory("/home", "desktop", 0, 1, 0755);
# is($result, "ok");
# isa_ok($uri, "Gnome2::VFS::URI");

ok(defined Gnome2::VFS -> result_to_string("ok"));

###############################################################################

Gnome2::VFS -> shutdown();

t/GnomeVFSAsync  view on Meta::CPAN

                                              qw(default),
                                              0,
                                              $callback_set_file_info);

isa_ok($handle, "Gnome2::VFS::Async::Handle");
$loop -> run();

###############################################################################

$handle = Gnome2::VFS::Async -> find_directory($files,
                                               "desktop",
                                               0,
                                               1,
                                               0777,
                                               0,
                                               $callback_find_directory);

isa_ok($handle, "Gnome2::VFS::Async::Handle");
$loop -> run();

###############################################################################

t/GnomeVFSMime  view on Meta::CPAN

$application = $type -> get_default_application();

SKIP: {
  skip("you don't seem to have a default application associated with text/html", 8)
    unless (defined($application));

  isa_ok($application, "Gnome2::VFS::Mime::Application");
  ok(defined($application -> { id }));
  isa_ok($application -> { supported_uri_schemes }, "ARRAY");

  ok(Gnome2::VFS::Mime -> id_in_application_list("firefox.desktop", $application, $application));
  is(Gnome2::VFS::Mime -> id_list_from_application_list($application), "firefox.desktop");

  # is($application -> launch("http://gtk2-perl.sf.net"), "ok");
  # is($application -> launch_with_env(["http://gtk2-perl.sf.net"], [map { "$_=" . $ENV{ $_ } } (keys(%ENV))]), "ok");

  isa_ok(($type -> get_short_list_applications())[0], "Gnome2::VFS::Mime::Application");
  isa_ok(($type -> get_all_applications())[0], "Gnome2::VFS::Mime::Application");
  isa_ok(($type -> get_all_applications_for_uri("http://www.google.com"))[0], "Gnome2::VFS::Mime::Application");
}

isa_ok(Gnome2::VFS::Mime::Application -> new_from_id("firefox.desktop"), "Gnome2::VFS::Mime::Application");
isa_ok(Gnome2::VFS::Mime::Application -> new_from_desktop_id("firefox.desktop"), "Gnome2::VFS::Mime::Application");

# $type -> get_icon();
# $type -> set_icon(...);

# is($type -> set_description("HTML Foo"), "ok");
# is($type -> get_description(), "HTML Foo");

# is($type -> set_can_be_executable(0), "ok");
# ok(not $type -> can_be_executable());

t/GnomeVFSMime  view on Meta::CPAN

# is($type -> get_default_action_type(), "application");
# is($type -> set_default_action_type("none"), "ok");
# is($type -> get_default_action_type(), "none");

ok(defined Gnome2::VFS -> get_mime_type("/usr/bin/perl"));
ok(defined Gnome2::VFS -> get_slow_mime_type("/usr/bin/perl"), "slow mime type");
is(Gnome2::VFS -> get_mime_type_for_data("<html></html>"), "text/html");
is(Gnome2::VFS -> get_mime_type_for_name("foo.html"), "text/html");
is(Gnome2::VFS -> get_mime_type_for_name_and_data("foo.html", "<html></html>"), "text/html");

ok(defined $type -> get_all_desktop_entries());
ok(defined $type -> get_default_desktop_entry());

TODO: {
  local $TODO = "hmm";
  is($type -> get_equivalence($type), "identical");
  ok($type -> is_equal($type));
}

###############################################################################

Gnome2::VFS -> shutdown();

xs/GnomeVFSMime.xs  view on Meta::CPAN

		application_ids = g_list_append (application_ids, SvPV_nolen (ST (i)));

	RETVAL = gnome_vfs_mime_remove_from_all_applications (mime_type, application_ids);

	g_list_free (application_ids);
    OUTPUT:
	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);

##  gchar *gnome_vfs_mime_get_default_desktop_entry (const char *mime_type)
gchar_own *
gnome_vfs_mime_get_default_desktop_entry (mime_type)
      GnomeVFSMimeType *mime_type

##  GnomeVFSMimeEquivalence gnome_vfs_mime_type_get_equivalence (const char *mime_type, const char *base_mime_type)
GnomeVFSMimeEquivalence
gnome_vfs_mime_get_equivalence (mime_type, base_mime_type)
	GnomeVFSMimeType *mime_type
	GnomeVFSMimeType *base_mime_type
    CODE:
	RETVAL = gnome_vfs_mime_type_get_equivalence (mime_type, base_mime_type);
    OUTPUT:

xs/GnomeVFSMime.xs  view on Meta::CPAN


##  GnomeVFSMimeApplication *gnome_vfs_mime_application_new_from_id (const char *id) 
GnomeVFSMimeApplication *
gnome_vfs_mime_application_new_from_id (class, id)
	const char *id
    C_ARGS:
	id

#if VFS_CHECK_VERSION (2, 10, 0)

##  GnomeVFSMimeApplication *gnome_vfs_mime_application_new_from_desktop_id (const char *id);
GnomeVFSMimeApplication *
gnome_vfs_mime_application_new_from_desktop_id (class, id)
	const char *id
    C_ARGS:
	id

#endif

#if VFS_CHECK_VERSION (2, 4, 0)

=for apidoc

xs/GnomeVFSMime.xs  view on Meta::CPAN


	g_free (envp);
	g_list_free (uris);
    OUTPUT:
	RETVAL

#endif

#if VFS_CHECK_VERSION (2, 10, 0)

const char *gnome_vfs_mime_application_get_desktop_id (GnomeVFSMimeApplication *app);

const char *gnome_vfs_mime_application_get_desktop_file_path (GnomeVFSMimeApplication *app);

const char *gnome_vfs_mime_application_get_name (GnomeVFSMimeApplication *app);

const char *gnome_vfs_mime_application_get_generic_name (GnomeVFSMimeApplication *app);

const char *gnome_vfs_mime_application_get_icon (GnomeVFSMimeApplication *app);

const char *gnome_vfs_mime_application_get_exec (GnomeVFSMimeApplication *app);

const char *gnome_vfs_mime_application_get_binary_name (GnomeVFSMimeApplication *app);



( run in 0.486 second using v1.01-cache-2.11-cpan-299005ec8e3 )