ThunarVfsMimeApplication

ThunarVfsMimeApplication — Registered Applications for MIME types.

Synopsis


#include <thunar-vfs/thunar-vfs.h>

                    ThunarVfsMimeApplication;
ThunarVfsMimeApplication* thunar_vfs_mime_application_new_from_desktop_id
                                                        (const gchar *desktop_id);
ThunarVfsMimeApplication* thunar_vfs_mime_application_new_from_file
                                                        (const gchar *path,
                                                         const gchar *desktop_id);
gboolean            thunar_vfs_mime_application_is_usercreated
                                                        (const ThunarVfsMimeApplication *mime_application);
GList*              thunar_vfs_mime_application_get_actions
                                                        (ThunarVfsMimeApplication *mime_application);
#define             thunar_vfs_mime_application_get_command(mime_application)
const gchar*        thunar_vfs_mime_application_get_desktop_id
                                                        (const ThunarVfsMimeApplication *mime_application);
#define             thunar_vfs_mime_application_get_flags(mime_application)
#define             thunar_vfs_mime_application_get_name(mime_application)
guint               thunar_vfs_mime_application_hash    (gconstpointer mime_application);
gboolean            thunar_vfs_mime_application_equal   (gconstpointer a,
                                                         gconstpointer b);

Object Hierarchy

  GObject
   +----ThunarVfsMimeHandler
         +----ThunarVfsMimeApplication

Description

Details

ThunarVfsMimeApplication

typedef struct _ThunarVfsMimeApplication ThunarVfsMimeApplication;

The ThunarVfsMimeApplication struct contains private data only, and should be accessed using the functions below.


thunar_vfs_mime_application_new_from_desktop_id ()

ThunarVfsMimeApplication* thunar_vfs_mime_application_new_from_desktop_id
                                                        (const gchar *desktop_id);

Generates a ThunarVfsMimeApplication instance for the application referenced by desktop_id. Returns NULL if desktop_id is not valid.

The caller is responsible to free the returned instance using g_object_unref() when no longer needed.

desktop_id :

the id of an application's .desktop file.

Returns :

the ThunarVfsMimeApplication for desktop_id or NULL.

thunar_vfs_mime_application_new_from_file ()

ThunarVfsMimeApplication* thunar_vfs_mime_application_new_from_file
                                                        (const gchar *path,
                                                         const gchar *desktop_id);

Generates a new ThunarVfsMimeApplication for the application described by path and desktop_id.

The caller is responsible to free the returned instance using g_object_unref() when no longer needed.

You should really seldomly use this function and always prefer thunar_vfs_mime_application_new_from_desktop_id().

path :

the absolute path to the desktop file.

desktop_id :

the desktop-id of the file.

Returns :

the ThunarVfsMimeApplication for desktop_id or NULL.

thunar_vfs_mime_application_is_usercreated ()

gboolean            thunar_vfs_mime_application_is_usercreated
                                                        (const ThunarVfsMimeApplication *mime_application);

Returns TRUE if the mime_application was created by the user using a file manager, i.e. through the "Open With" dialog in Thunar.

mime_application :

a ThunarVfsMimeApplication.

Returns :

TRUE if mime_application is usercreated.

thunar_vfs_mime_application_get_actions ()

GList*              thunar_vfs_mime_application_get_actions
                                                        (ThunarVfsMimeApplication *mime_application);

Returns the list of ThunarVfsMimeActions available for the mime_application. The ThunarVfsMimeActions are an implementation of the desktop actions mentioned in the desktop entry specification.

The caller is responsible to free the returned list using

g_list_foreach (list, (GFunc) g_object_unref, NULL);
g_list_free (list);

when no longer needed.

mime_application :

a ThunarVfsMimeApplication.

Returns :

the list of ThunarVfsMimeActions for the mime_application.

thunar_vfs_mime_application_get_command()

#define thunar_vfs_mime_application_get_command(mime_application) (thunar_vfs_mime_handler_get_command (THUNAR_VFS_MIME_HANDLER ((mime_application))))

Returns the command for mime_application.

mime_application :

a ThunarVfsMimeApplication.

Returns :

the command for mime_application.

thunar_vfs_mime_application_get_desktop_id ()

const gchar*        thunar_vfs_mime_application_get_desktop_id
                                                        (const ThunarVfsMimeApplication *mime_application);

Returns the desktop-id of mime_application.

mime_application :

a ThunarVfsMimeApplication.

Returns :

the desktop-id of mime_application.

thunar_vfs_mime_application_get_flags()

#define thunar_vfs_mime_application_get_flags(mime_application) (thunar_vfs_mime_handler_get_flags (THUNAR_VFS_MIME_HANDLER ((mime_application))))

Returns the ThunarVfsMimeHandlerFlags for mime_handler.

mime_application :

a ThunarVfsMimeApplication.

Returns :

the flags for mime_application.

thunar_vfs_mime_application_get_name()

#define thunar_vfs_mime_application_get_name(mime_application) (thunar_vfs_mime_handler_get_name (THUNAR_VFS_MIME_HANDLER ((mime_application))))

Returns the name for mime_application.

mime_application :

a ThunarVfsMimeApplication.

Returns :

the name for mime_application.

thunar_vfs_mime_application_hash ()

guint               thunar_vfs_mime_application_hash    (gconstpointer mime_application);

Converts mime_application to a hash value. It can be passed to g_hash_table_new() as the hash_func parameter, when using ThunarVfsMimeApplications as keys in a GHashTable.

mime_application :

a ThunarVfsMimeApplication.

Returns :

a hash value corresponding to the key.

thunar_vfs_mime_application_equal ()

gboolean            thunar_vfs_mime_application_equal   (gconstpointer a,
                                                         gconstpointer b);

Checks whether a and b refer to the same application.

a :

a ThunarVfsMimeApplication.

b :

a ThunarVfsMimeApplication.

Returns :

TRUE if a and b are equal.

See Also

ThunarVfsMimeHandler and ThunarVfsMimeAction