xdgmime in gnomevfs

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

xdgmime in gnomevfs

Michael Ott-3
Hallo!

I want to write an application using gnomevfs and during my search I
found the xdgmime* files which are an part of gnomevfs.
(http://www.google.com/codesearch?hl=en&lr=&q=xdg_mime_get_mime_type_for_file+2.14&btnG=Search)

But I do not found this files in Debian.

Where are this files?

Thanks in advance

CU        
         
  Michael  
         
--
    ,''`.   Michael Ott, e-mail: michael at king-coder dot de
   : :' :   Debian SID on Thinkpad T43:
   `. `'    http://www.zolnott.de/laptop/ibm-t43-uc34nge.html 
     `-

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: xdgmime in gnomevfs

Josselin Mouette
Le samedi 11 novembre 2006 à 19:19 +0000, Michael Ott a écrit :
> Hallo!
>
> I want to write an application using gnomevfs and during my search I
> found the xdgmime* files which are an part of gnomevfs.
> (http://www.google.com/codesearch?hl=en&lr=&q=xdg_mime_get_mime_type_for_file+2.14&btnG=Search)
>
> But I do not found this files in Debian.
>
> Where are this files?

The headers are in libgnomevfs2-dev (source package: gnome-vfs2).
--
Josselin Mouette                /\./\

"Do you have any more insane proposals for me?"

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: xdgmime in gnomevfs

Michael Ott-3
Hallo Josselin!

> > I want to write an application using gnomevfs and during my search I
> > found the xdgmime* files which are an part of gnomevfs.
> > (http://www.google.com/codesearch?hl=en&lr=&q=xdg_mime_get_mime_type_for_file+2.14&btnG=Search)
> >
> > But I do not found this files in Debian.
> >
> > Where are this files?
>
> The headers are in libgnomevfs2-dev (source package: gnome-vfs2).
Maybe I do not see it but I do not find the following header.
xdgmime.h
xdgmimealias.h
xdgmimecache.h
xdgmimeglob.h
xdgmimeint.h
xdgmimemagic.h
xdgmimeparent.h
(That is form 2.14)

And one the debian package search pages for files I do also do not find
it.

~# dpkg -l | grep gnomevfs
ii  gstreamer0.10-gnomevfs    0.10.10-2     GStreamer plugin for GnomeVFS
ii  libgnomevfs2-0            2.16.1-1      GNOME virtual file-system (runtime libraries)
ii  libgnomevfs2-bin          2.16.1-1      GNOME virtual file-system (support binaries)
ii  libgnomevfs2-common       2.16.1-2      GNOME virtual file-system (common files)
ii  libgnomevfs2-dev          2.16.1-1      GNOME virtual file-system library (development files)
ii  libgnomevfs2-extra        2.16.1-1      GNOME virtual file-system (extra modules)

CU        
         
  Michael  
         
--
    ,''`.   Michael Ott, e-mail: michael at king-coder dot de
   : :' :   Debian SID on Thinkpad T43:
   `. `'    http://www.zolnott.de/laptop/ibm-t43-uc34nge.html 
     `-

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: xdgmime in gnomevfs

Josselin Mouette
Le samedi 11 novembre 2006 à 20:38 +0000, Michael Ott a écrit :

> > The headers are in libgnomevfs2-dev (source package: gnome-vfs2).
> Maybe I do not see it but I do not find the following header.
> xdgmime.h
> xdgmimealias.h
> xdgmimecache.h
> xdgmimeglob.h
> xdgmimeint.h
> xdgmimemagic.h
> xdgmimeparent.h
> (That is form 2.14)
Ah, sorry, I thought you were looking for the sources.

These headers are for internal gnome-vfs use (and other libraries
implementing the XDG MIME specification) only, and I don't think you
should use them. Instead, if your application already uses gnome-vfs,
you should use the gnome-vfs MIME interface, which is of a higher level
and is guaranteed to remain consistent. It is available in
gnome-vfs-mime-*.h.

Cheers,
--
Josselin Mouette                /\./\

"Do you have any more insane proposals for me?"

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: xdgmime in gnomevfs

Michael Ott-3
Hi Josselin!

> > > The headers are in libgnomevfs2-dev (source package: gnome-vfs2).
> > Maybe I do not see it but I do not find the following header.
> > xdgmime.h
> > xdgmimealias.h
> > xdgmimecache.h
> > xdgmimeglob.h
> > xdgmimeint.h
> > xdgmimemagic.h
> > xdgmimeparent.h
> > (That is form 2.14)
>
> Ah, sorry, I thought you were looking for the sources.
No problem.

> These headers are for internal gnome-vfs use (and other libraries
> implementing the XDG MIME specification) only, and I don't think you
> should use them. Instead, if your application already uses gnome-vfs,
> you should use the gnome-vfs MIME interface, which is of a higher level
> and is guaranteed to remain consistent. It is available in
> gnome-vfs-mime-*.h.
I want to write an appication, where you can change the
default-application (nearly the same as nautilus -> right mouse -> open
with) but with more informations and option.

So I want that you can search for mime types and globs. But I did not
find the command to get the globs from the mime types.

So I need to go depper into gnome-vfs.

Maybe you know where I can find this command.

CU        
         
  Michael  
         
--
    ,''`.   Michael Ott, e-mail: michael at king-coder dot de
   : :' :   Debian SID on Thinkpad T43:
   `. `'    http://www.zolnott.de/laptop/ibm-t43-uc34nge.html 
     `-

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: xdgmime in gnomevfs

Josselin Mouette
Le samedi 11 novembre 2006 à 21:37 +0000, Michael Ott a écrit :
> I want to write an appication, where you can change the
> default-application (nearly the same as nautilus -> right mouse -> open
> with) but with more informations and option.
>
> So I want that you can search for mime types and globs. But I did not
> find the command to get the globs from the mime types.
>
> So I need to go depper into gnome-vfs.

The XDG MIME specification was designed to easily obtain a MIME type and
a list of associated applications from a file (name or contents). As the
reverse is not that simple and as nautilus doesn't need it, gnome-vfs
doesn't provide a means to access this data.

You could propose an extension to the gnome-vfs API, with something
like:
        GList *gnome_vfs_mime_get_globs (char *mime_type);
but I fear it would be rejected, because it wouldn't bring all
information (like magic information). I also wish you luck in dealing
with children types in an efficient manner.

--
Josselin Mouette                /\./\

"Do you have any more insane proposals for me?"

signature.asc (196 bytes) Download Attachment