Name
Algorithmic Sniff Buffer -- algorithmic detection of mime type for select file types
Synopsis
GnomeVFSResult (*GnomeVFSSniffBufferSeekCall)
(gpointer context,
GnomeVFSSeekPosition whence,
GnomeVFSFileOffset offset);
GnomeVFSResult (*GnomeVFSSniffBufferReadCall)
(gpointer context,
gpointer buffer,
GnomeVFSFileSize bytes,
GnomeVFSFileSize *bytes_read);
void gnome_vfs_mime_clear_magic_table
(void);
GnomeVFSMimeSniffBuffer* gnome_vfs_mime_sniff_buffer_new_from_handle
(GnomeVFSHandle *file);
GnomeVFSMimeSniffBuffer* gnome_vfs_mime_sniff_buffer_new_from_memory
(const guchar *buffer,
gssize buffer_size);
GnomeVFSMimeSniffBuffer* gnome_vfs_mime_sniff_buffer_new_from_existing_data
(const guchar *buffer,
gssize buffer_size);
GnomeVFSMimeSniffBuffer* gnome_vfs_mime_sniff_buffer_new_generic
(GnomeVFSSniffBufferSeekCall seek_callback,
GnomeVFSSniffBufferReadCall read_callback,
gpointer context);
void gnome_vfs_mime_sniff_buffer_free
(GnomeVFSMimeSniffBuffer *buffer);
GnomeVFSResult gnome_vfs_mime_sniff_buffer_get
(GnomeVFSMimeSniffBuffer *buffer,
gssize size);
const char* gnome_vfs_get_mime_type_for_buffer
(GnomeVFSMimeSniffBuffer *buffer);
gboolean gnome_vfs_sniff_buffer_looks_like_text
(GnomeVFSMimeSniffBuffer *buffer);
gboolean gnome_vfs_sniff_buffer_looks_like_mp3
(GnomeVFSMimeSniffBuffer *buffer);
gboolean gnome_vfs_sniff_buffer_looks_like_gzip
(GnomeVFSMimeSniffBuffer *sniff_buffer,
const char *file_name); |
Details
GnomeVFSSniffBufferSeekCall ()
GnomeVFSSniffBufferReadCall ()
gnome_vfs_mime_clear_magic_table ()
void gnome_vfs_mime_clear_magic_table
(void); |
gnome_vfs_mime_sniff_buffer_new_from_handle ()
GnomeVFSMimeSniffBuffer* gnome_vfs_mime_sniff_buffer_new_from_handle
(GnomeVFSHandle *file); |
gnome_vfs_mime_sniff_buffer_new_from_memory ()
GnomeVFSMimeSniffBuffer* gnome_vfs_mime_sniff_buffer_new_from_memory
(const guchar *buffer,
gssize buffer_size); |
gnome_vfs_mime_sniff_buffer_new_from_existing_data ()
GnomeVFSMimeSniffBuffer* gnome_vfs_mime_sniff_buffer_new_from_existing_data
(const guchar *buffer,
gssize buffer_size); |
gnome_vfs_mime_sniff_buffer_new_generic ()
gnome_vfs_mime_sniff_buffer_free ()
void gnome_vfs_mime_sniff_buffer_free
(GnomeVFSMimeSniffBuffer *buffer); |
gnome_vfs_mime_sniff_buffer_get ()
GnomeVFSResult gnome_vfs_mime_sniff_buffer_get
(GnomeVFSMimeSniffBuffer *buffer,
gssize size); |
gnome_vfs_get_mime_type_for_buffer ()
const char* gnome_vfs_get_mime_type_for_buffer
(GnomeVFSMimeSniffBuffer *buffer); |
This routine uses a magic database to guess the mime type of the
data represented by buffer.
gnome_vfs_sniff_buffer_looks_like_text ()
gboolean gnome_vfs_sniff_buffer_looks_like_text
(GnomeVFSMimeSniffBuffer *buffer); |
gnome_vfs_sniff_buffer_looks_like_mp3 ()
gboolean gnome_vfs_sniff_buffer_looks_like_mp3
(GnomeVFSMimeSniffBuffer *buffer); |
gnome_vfs_sniff_buffer_looks_like_gzip ()
gboolean gnome_vfs_sniff_buffer_looks_like_gzip
(GnomeVFSMimeSniffBuffer *sniff_buffer,
const char *file_name); |