## fm-mime-type

fm-mime-type

## Synopsis

    struct              FmMimeType;
    void                fm_mime_type_add_action             (FmMimeType *mime_type,
                                                             const char *desktop_id,
                                                             char **custom_desktop);
    GList *             fm_mime_type_add_reload_cb          (GFreeFunc cb,
                                                             gpointer user_data);
    void                fm_mime_type_finalize               ();
    char **             fm_mime_type_get_actions            (FmMimeType *mime_type);
    char **             fm_mime_type_get_all_known_apps     ();
    char *              fm_mime_type_get_default_action     (FmMimeType *mime_type);
    const char *        fm_mime_type_get_desc               (FmMimeType *mime_type);
    FmMimeType *        fm_mime_type_get_for_file_name      (const char *ufile_name);
    FmMimeType *        fm_mime_type_get_for_native_file    (const char *file_path,
                                                             const char *base_name,
                                                             struct stat *pstat);
    FmMimeType *        fm_mime_type_get_for_type           (const char *type);
    FmIcon *            fm_mime_type_get_icon               (FmMimeType *mime_type);
    void                fm_mime_type_init                   ();
    char **             fm_mime_type_join_actions           (char **list1,
                                                             gsize len1,
                                                             char **list2,
                                                             gsize len2);
    FmMimeType *        fm_mime_type_new                    (const char *type_name);
    FmMimeType *        fm_mime_type_ref                    (FmMimeType *mime_type);
    void                fm_mime_type_remove_reload_cb       (GList *cb);
    void                fm_mime_type_set_default_action     (FmMimeType *mime_type,
                                                             const char *desktop_id);
    void                fm_mime_type_unref                  (gpointer mime_type_);

## Description

## Details

### struct FmMimeType

    struct FmMimeType {
        char* type; /* mime type name */
        char* description;  /* description of the mime type */
    	FmIcon* icon;

        int n_ref;
    };

### fm_mime_type_add_action ()

    void                fm_mime_type_add_action             (FmMimeType *mime_type,
                                                             const char *desktop_id,
                                                             char **custom_desktop);

### fm_mime_type_add_reload_cb ()

    GList *             fm_mime_type_add_reload_cb          (GFreeFunc cb,
                                                             gpointer user_data);

### fm_mime_type_finalize ()

    void                fm_mime_type_finalize               ();

### fm_mime_type_get_actions ()

    char **             fm_mime_type_get_actions            (FmMimeType *mime_type);

### fm_mime_type_get_all_known_apps ()

    char **             fm_mime_type_get_all_known_apps     ();

### fm_mime_type_get_default_action ()

    char *              fm_mime_type_get_default_action     (FmMimeType *mime_type);

### fm_mime_type_get_desc ()

    const char *        fm_mime_type_get_desc               (FmMimeType *mime_type);

### fm_mime_type_get_for_file_name ()

    FmMimeType *        fm_mime_type_get_for_file_name      (const char *ufile_name);

### fm_mime_type_get_for_native_file ()

    FmMimeType *        fm_mime_type_get_for_native_file    (const char *file_path,
                                                             const char *base_name,
                                                             struct stat *pstat);

### fm_mime_type_get_for_type ()

    FmMimeType *        fm_mime_type_get_for_type           (const char *type);

### fm_mime_type_get_icon ()

    FmIcon *            fm_mime_type_get_icon               (FmMimeType *mime_type);

### fm_mime_type_init ()

    void                fm_mime_type_init                   ();

### fm_mime_type_join_actions ()

    char **             fm_mime_type_join_actions           (char **list1,
                                                             gsize len1,
                                                             char **list2,
                                                             gsize len2);

### fm_mime_type_new ()

    FmMimeType *        fm_mime_type_new                    (const char *type_name);

### fm_mime_type_ref ()

    FmMimeType *        fm_mime_type_ref                    (FmMimeType *mime_type);

### fm_mime_type_remove_reload_cb ()

    void                fm_mime_type_remove_reload_cb       (GList *cb);

### fm_mime_type_set_default_action ()

    void                fm_mime_type_set_default_action     (FmMimeType *mime_type,
                                                             const char *desktop_id);

### fm_mime_type_unref ()

    void                fm_mime_type_unref                  (gpointer mime_type_);