gnome-fileconvert

Name

gnome-fileconvert — File format conversion functions.

Synopsis


#include <gnome.h>


gint        gnome_file_convert_fd           (gint fd,
                                             gchar *fromtype,
                                             gchar *totype);
gint        gnome_file_convert              (gchar *filename,
                                             gchar *fromtype,
                                             gchar *totype);

Description

These routines provide conversion of information based on a source and target mime type. They return -1 on failure, or an opened file descriptor with the data on success

The rules for converting from a mime-type to another mime-type are loaded from the $gnome-prefix/share/type-convert directory, any files in that directory whose extension is .convert is loaded as well as the per-user ~/.gnome/type.convert file.

Details

gnome_file_convert_fd ()

gint        gnome_file_convert_fd           (gint fd,
                                             gchar *fromtype,
                                             gchar *totype);

Converts the file opened by fd to the totype format.

fd : file desciptor pointing to the file to convert.fromtype : mime type of the filetotype : target mime type we wantReturns :-1 on failure, or a file descriptor to the converted file.


gnome_file_convert ()

gint        gnome_file_convert              (gchar *filename,
                                             gchar *fromtype,
                                             gchar *totype);

Converts filename to the totype format.

filename : file to convertfromtype : mime type of the filetotype : target mime type we wantReturns :-1 on failure, or a file descriptor to the converted file.