Commit d71dcd9d authored by Torsten Schönfeld's avatar Torsten Schönfeld
Browse files

Wrap gnome_vfs_get_mime_type_for_name and

	* t/GnomeVFSMime, xs/GnomeVFSMime.xs: Wrap
	gnome_vfs_get_mime_type_for_name and
	gnome_vfs_get_mime_type_for_name_and_data.

	* Makefile.PL, NEWS, VFS.pm: Unstable release 1.051.

svn path=/trunk/; revision=158
parent cd952e58
2006/01/30 kaffeetisch
* Makefile.PL, NEWS, VFS.pm: Unstable release 1.051.
2006/01/30 kaffeetisch
* t/GnomeVFSMime, xs/GnomeVFSMime.xs: Wrap
gnome_vfs_get_mime_type_for_name and
gnome_vfs_get_mime_type_for_name_and_data.
2005/12/13 rwmcfa1
* t/GoneVFSAddress.t: skip equal and match tests unless version is >
......
......@@ -10,7 +10,7 @@ use File::Spec;
our %build_reqs = (
'perl-ExtUtils-Depends' => '0.20',
'perl-ExtUtils-PkgConfig' => '1.03',
'perl-Glib' => '1.100',
'perl-Glib' => '1.115',
'GnomeVFS' => '2.0.0',
);
......
Overview of changes in Gnome2-VFS 1.051
=======================================
* Add Gnome2::VFS::get_mime_type_for_name and
Gnome2::VFS::get_mime_type_for_name_and_data.
Overview of changes in Gnome2-VFS 1.050
=======================================
......
......@@ -26,7 +26,7 @@ our @EXPORT_OK = qw(
# --------------------------------------------------------------------------- #
our $VERSION = '1.050';
our $VERSION = '1.051';
sub import {
my ($self) = @_;
......
......@@ -7,7 +7,7 @@ use Test::More;
# $Header$
plan -d "$ENV{ HOME }/.gnome" ?
(tests => 17) :
(tests => 20) :
(skip_all => "You have no ~/.gnome");
Gnome2::VFS -> init();
......@@ -29,9 +29,8 @@ SKIP: {
ok(defined($application -> { id }));
isa_ok($application -> { supported_uri_schemes }, "ARRAY");
ok(Gnome2::VFS::Mime -> id_in_application_list("epiphany", $application, $application));
isa_ok(Gnome2::VFS::Mime -> remove_application_from_list("galeon", $application, $application), "Gnome2::VFS::Mime::Application");
is(Gnome2::VFS::Mime -> id_list_from_application_list($application), "epiphany");
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");
......@@ -41,11 +40,8 @@ SKIP: {
isa_ok(($type -> get_all_applications_for_uri("http://www.google.com"))[0], "Gnome2::VFS::Mime::Application");
}
TODO: {
local $TODO = "hrm";
isa_ok(Gnome2::VFS::Mime::Application -> new_from_id("epiphany"), "Gnome2::VFS::Mime::Application");
isa_ok(Gnome2::VFS::Mime::Application -> new_from_desktop_id("epiphany"), "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(...);
......@@ -76,16 +72,16 @@ TODO: {
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");
SKIP: {
skip("get_all_desktop_entries and get_default_desktop_entry are new in 2.8", 4)
unless (Gnome2::VFS -> CHECK_VERSION(2, 8, 0));
is($type -> get_all_desktop_entries(), undef);
is($type -> get_default_desktop_entry(), undef);
ok(defined $type -> get_all_desktop_entries());
ok(defined $type -> get_default_desktop_entry());
TODO: {
local $TODO = "hmm";
is($type -> get_equivalence($type), "identical");
is($type -> is_equal($type), 1);
ok($type -> is_equal($type));
}
###############################################################################
......
......@@ -665,3 +665,27 @@ char_own * gnome_vfs_get_slow_mime_type (class, const char *text_uri)
text_uri
#endif
#if VFS_CHECK_VERSION (2, 13, 4) /* FIXME: 2.14 */
# const char * gnome_vfs_get_mime_type_for_name (const char *filename);
const char *
gnome_vfs_get_mime_type_for_name (class, const char *filename)
C_ARGS:
filename
# const char * gnome_vfs_get_mime_type_for_name_and_data (const char *filename, gconstpointer data, gssize data_size);
const char *
gnome_vfs_get_mime_type_for_name_and_data (class, filename, data)
const char *filename
SV *data
PREINIT:
STRLEN data_size;
gconstpointer real_data;
CODE:
real_data = SvPV (data, data_size);
RETVAL = gnome_vfs_get_mime_type_for_name_and_data (filename, real_data, data_size);
OUTPUT:
RETVAL
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment