GnomeVFS - Filesystem Abstraction library
<<< Previous Page | Home | Up | Next Page >>>

# mime-info

## Name

mime-info --

## Synopsis

    void        gnome_vfs_mime_freeze           (void);
    void        gnome_vfs_mime_thaw             (void);
    void        gnome_vfs_mime_info_reload      (void);
    gboolean    gnome_vfs_mime_type_is_known    (const char *mime_type);
    const char* gnome_vfs_mime_get_value        (const char *mime_type,
                                                 const char *key);
    GnomeVFSResult gnome_vfs_mime_set_value     (const char *mime_type,
                                                 const char *key,
                                                 const char *value);
    GList*      gnome_vfs_mime_get_key_list     (const char *mime_type);
    void        gnome_vfs_mime_keys_list_free   (GList *mime_type_list);
    GList*      gnome_vfs_mime_get_extensions_list
                                                (const char *mime_type);
    void        gnome_vfs_mime_extensions_list_free
                                                (GList *list);
    char*       gnome_vfs_mime_get_extensions_string
                                                (const char *mime_type);
    char*       gnome_vfs_mime_get_extensions_pretty_string
                                                (const char *mime_type);
    GList*      gnome_vfs_get_registered_mime_types
                                                (void);
    void        gnome_vfs_mime_registered_mime_type_list_free
                                                (GList *list);
    GnomeVFSResult gnome_vfs_mime_set_registered_type_key
                                                (const char *mime_type,
                                                 const char *key,
                                                 const char *data);
    GnomeVFSResult gnome_vfs_mime_set_extensions_list
                                                (const char *mime_type,
                                                 const char *extensions_list);
    void        gnome_vfs_mime_registered_mime_type_delete
                                                (const char *mime_type);
    void        gnome_vfs_mime_reset            (void);

## Description

## Details

### gnome_vfs_mime_freeze ()

    void        gnome_vfs_mime_freeze           (void);

Freezes the mime data so that you can do multiple updates to the dat in one batch without needing to back the files to disk or readind them

### gnome_vfs_mime_thaw ()

    void        gnome_vfs_mime_thaw             (void);

UnFreezes the mime data so that you can do multiple updates to the dat in one batch without needing to back the files to disk or readind them

### gnome_vfs_mime_info_reload ()

    void        gnome_vfs_mime_info_reload      (void);

### gnome_vfs_mime_type_is_known ()

    gboolean    gnome_vfs_mime_type_is_known    (const char *mime_type);

This function returns TRUE if `mime_type` is in the MIME database at all.

`mime_type` : | a mime type.
Returns : | TRUE if anything is known about `mime_type`, otherwise FALSE

### gnome_vfs_mime_get_value ()

    const char* gnome_vfs_mime_get_value        (const char *mime_type,
                                                 const char *key);

This function retrieves the value associated with `key` in the given GnomeMimeContext. The string is private, you should not free the result.

`mime_type` : | a mime type.
`key` : | A key to lookup for the given mime-type
Returns : | GNOME_VFS_OK if the operation succeeded, otherwise an error code

### gnome_vfs_mime_set_value ()

    GnomeVFSResult gnome_vfs_mime_set_value     (const char *mime_type,
                                                 const char *key,
                                                 const char *value);

This function is going to set the value associated to the key and it will save it to the user' file if necessary. You should not free the key/values passed to this function. They are used internally.

`mime_type` : | a mime type.
`key` : | a key to store the value in.
`value` : | the value to store in the key.
Returns : | GNOME_VFS_OK if the operation succeeded, otherwise an error code

### gnome_vfs_mime_get_key_list ()

    GList*      gnome_vfs_mime_get_key_list     (const char *mime_type);

`mime_type` : | the mime type to lookup.
Returns : | a GList that contains private strings with all of the keys associated with the `mime_type`.

### gnome_vfs_mime_keys_list_free ()

    void        gnome_vfs_mime_keys_list_free   (GList *mime_type_list);

Frees the mime type list.

`mime_type_list` : | A mime type list to free.

### gnome_vfs_mime_get_extensions_list ()

    GList*      gnome_vfs_mime_get_extensions_list
                                                (const char *mime_type);

`mime_type` : | the mime type
Returns : | a list of extensions for this mime-type

### gnome_vfs_mime_extensions_list_free ()

    void        gnome_vfs_mime_extensions_list_free
                                                (GList *list);

`list` : |

### gnome_vfs_mime_get_extensions_string ()

    char*       gnome_vfs_mime_get_extensions_string
                                                (const char *mime_type);

`mime_type` : |
Returns : |

### gnome_vfs_mime_get_extensions_pretty_string ()

    char*       gnome_vfs_mime_get_extensions_pretty_string
                                                (const char *mime_type);

`mime_type` : | the mime type
Returns : | a string containing comma seperated extensions for this mime-type

### gnome_vfs_get_registered_mime_types ()

    GList*      gnome_vfs_get_registered_mime_types
                                                (void);

Returns : |

### gnome_vfs_mime_registered_mime_type_list_free ()

    void        gnome_vfs_mime_registered_mime_type_list_free
                                                (GList *list);

Call this function on the list returned by gnome_vfs_get_registered_mime_types to free the list and all of its elements.

`list` : | the extensions list

### gnome_vfs_mime_set_registered_type_key ()

    GnomeVFSResult gnome_vfs_mime_set_registered_type_key
                                                (const char *mime_type,
                                                 const char *key,
                                                 const char *data);

This function sets the key data for the registered mime type's hash table.

`mime_type` : | Mime type to set key for
`key` : | The key to set
`data` : | The data to set for the key
Returns : | GNOME_VFS_OK if the operation succeeded, otherwise an error code

### gnome_vfs_mime_set_extensions_list ()

    GnomeVFSResult gnome_vfs_mime_set_extensions_list
                                                (const char *mime_type,
                                                 const char *extensions_list);

Sets the extensions for a given mime type. Overrides the previously set extensions.

`mime_type` : | the mime type.
`extensions_list` : | a whitespace-separated list of the extensions to set for this mime type.
Returns : | GNOME_VFS_OK if the operation succeeded, otherwise an error code.

### gnome_vfs_mime_registered_mime_type_delete ()

    void        gnome_vfs_mime_registered_mime_type_delete
                                                (const char *mime_type);

Delete a mime type for the user which runs this command. You can undo this only by calling gnome_vfs_mime_reset

`mime_type` : |

### gnome_vfs_mime_reset ()

    void        gnome_vfs_mime_reset            (void);

resets the user's mime database to the system defaults.

<<< Previous Page | Home | Up | Next Page >>>
MIME Handlers | mime-monitor