Application Registry

Name

Application Registry -- a database of the available applications and their capabilities

Synopsis



#define     GNOME_VFS_APPLICATION_REGISTRY_COMMAND
#define     GNOME_VFS_APPLICATION_REGISTRY_NAME
#define     GNOME_VFS_APPLICATION_REGISTRY_CAN_OPEN_MULTIPLE_FILES
#define     GNOME_VFS_APPLICATION_REGISTRY_REQUIRES_TERMINAL
gboolean    gnome_vfs_application_registry_exists
                                            (const char *app_id);
GList*      gnome_vfs_application_registry_get_keys
                                            (const char *app_id);
const char* gnome_vfs_application_registry_peek_value
                                            (const char *app_id,
                                             const char *key);
gboolean    gnome_vfs_application_registry_get_bool_value
                                            (const char *app_id,
                                             const char *key,
                                             gboolean *got_key);
void        gnome_vfs_application_registry_remove_application
                                            (const char *app_id);
void        gnome_vfs_application_registry_set_value
                                            (const char *app_id,
                                             const char *key,
                                             const char *value);
void        gnome_vfs_application_registry_set_bool_value
                                            (const char *app_id,
                                             const char *key,
                                             gboolean value);
void        gnome_vfs_application_registry_unset_key
                                            (const char *app_id,
                                             const char *key);
GList*      gnome_vfs_application_registry_get_applications
                                            (const char *mime_type);
GList*      gnome_vfs_application_registry_get_mime_types
                                            (const char *app_id);
gboolean    gnome_vfs_application_registry_supports_mime_type
                                            (const char *app_id,
                                             const char *mime_type);
gboolean    gnome_vfs_application_registry_supports_uri_scheme
                                            (const char *app_id,
                                             const char *uri_scheme);
gboolean    gnome_vfs_application_is_user_owned_application
                                            (const GnomeVFSMimeApplication *application);
void        gnome_vfs_application_registry_clear_mime_types
                                            (const char *app_id);
void        gnome_vfs_application_registry_add_mime_type
                                            (const char *app_id,
                                             const char *mime_type);
void        gnome_vfs_application_registry_remove_mime_type
                                            (const char *app_id,
                                             const char *mime_type);
GnomeVFSResult gnome_vfs_application_registry_sync
                                            (void);
void        gnome_vfs_application_registry_shutdown
                                            (void);
void        gnome_vfs_application_registry_reload
                                            (void);
GnomeVFSMimeApplication* gnome_vfs_application_registry_get_mime_application
                                            (const char *app_id);
void        gnome_vfs_application_registry_save_mime_application
                                            (const GnomeVFSMimeApplication *application);

Description

Details

GNOME_VFS_APPLICATION_REGISTRY_COMMAND

#define GNOME_VFS_APPLICATION_REGISTRY_COMMAND "command"


GNOME_VFS_APPLICATION_REGISTRY_NAME

#define GNOME_VFS_APPLICATION_REGISTRY_NAME "name"


GNOME_VFS_APPLICATION_REGISTRY_CAN_OPEN_MULTIPLE_FILES

#define GNOME_VFS_APPLICATION_REGISTRY_CAN_OPEN_MULTIPLE_FILES "can_open_multiple_files"


GNOME_VFS_APPLICATION_REGISTRY_REQUIRES_TERMINAL

#define GNOME_VFS_APPLICATION_REGISTRY_REQUIRES_TERMINAL "requires_terminal"


gnome_vfs_application_registry_exists ()

gboolean    gnome_vfs_application_registry_exists
                                            (const char *app_id);

This function will return TRUE if there is an entry for app_id in the registry, otherwise FALSE.


gnome_vfs_application_registry_get_keys ()

GList*      gnome_vfs_application_registry_get_keys
                                            (const char *app_id);

This function wil return a list of strings which is the list of keys set for app_id in the application registry.


gnome_vfs_application_registry_peek_value ()

const char* gnome_vfs_application_registry_peek_value
                                            (const char *app_id,
                                             const char *key);

This will return the value associated with key for app_id in the application registry. There is no need to free the return value.


gnome_vfs_application_registry_get_bool_value ()

gboolean    gnome_vfs_application_registry_get_bool_value
                                            (const char *app_id,
                                             const char *key,
                                             gboolean *got_key);

This will look up a key in the structure pointed to by app_id and return the boolean value of that key. It will return false if there are no applications associated with the app_id.


gnome_vfs_application_registry_remove_application ()

void        gnome_vfs_application_registry_remove_application
                                            (const char *app_id);

Given the registry id this function will remove all applications that has been set by the user. You will need to call gnome_vfs_application_registry_sync to save the changes.


gnome_vfs_application_registry_set_value ()

void        gnome_vfs_application_registry_set_value
                                            (const char *app_id,
                                             const char *key,
                                             const char *value);

This function will set values pertaining to registry entry pointed to by app_id. You will need to call gnome_vfs_application_registry_sync to realize the changes.


gnome_vfs_application_registry_set_bool_value ()

void        gnome_vfs_application_registry_set_bool_value
                                            (const char *app_id,
                                             const char *key,
                                             gboolean value);


gnome_vfs_application_registry_unset_key ()

void        gnome_vfs_application_registry_unset_key
                                            (const char *app_id,
                                             const char *key);

This function given the application and the target will wipe the current value that the key contains.


gnome_vfs_application_registry_get_applications ()

GList*      gnome_vfs_application_registry_get_applications
                                            (const char *mime_type);

This will return all applications from the registry that are associated with the given mime type string, if NULL it returns all applications.


gnome_vfs_application_registry_get_mime_types ()

GList*      gnome_vfs_application_registry_get_mime_types
                                            (const char *app_id);

This function returns a list of strings that represent the mime types that can be handled by an application.


gnome_vfs_application_registry_supports_mime_type ()

gboolean    gnome_vfs_application_registry_supports_mime_type
                                            (const char *app_id,
                                             const char *mime_type);

Use this function to see if there is an application associated with a given mime type. The function will return true or false.


gnome_vfs_application_registry_supports_uri_scheme ()

gboolean    gnome_vfs_application_registry_supports_uri_scheme
                                            (const char *app_id,
                                             const char *uri_scheme);

Given the id of the application this function will determine if the uri scheme will given is supported.


gnome_vfs_application_is_user_owned_application ()

gboolean    gnome_vfs_application_is_user_owned_application
                                            (const GnomeVFSMimeApplication *application);

This function will determine if a mime application is user owned or not. By user ownered this means that the application is not a system application located in the prerequisite /usr area but rather in the user's area.


gnome_vfs_application_registry_clear_mime_types ()

void        gnome_vfs_application_registry_clear_mime_types
                                            (const char *app_id);

This function will remove the mime types associated with the application. Changes are not realized until the gnome_vfs_application_registry_sync function is called to save the changes to the file.


gnome_vfs_application_registry_add_mime_type ()

void        gnome_vfs_application_registry_add_mime_type
                                            (const char *app_id,
                                             const char *mime_type);

This function will associate a mime type with an application given the application registry id and the mime type. Changes are not realized until the gnome_vfs_application_registry_sync function is called to save the changes to the file.


gnome_vfs_application_registry_remove_mime_type ()

void        gnome_vfs_application_registry_remove_mime_type
                                            (const char *app_id,
                                             const char *mime_type);

This function will de-associate a mime type from an application registry. Given the application registry id and the mime type. Changes are not realized until the gnome_vfs_application_registry_sync function is called to save the changes to the file.


gnome_vfs_application_registry_sync ()

GnomeVFSResult gnome_vfs_application_registry_sync
                                            (void);

This function will sync the registry. Typically you would use this function after a modification of the registry. When you modify the registry a dirty flag is set. Calling this function will save your modifications to disk and reset the flag.

If successful, will return GNOME_VFS_OK


gnome_vfs_application_registry_shutdown ()

void        gnome_vfs_application_registry_shutdown
                                            (void);

Synchronize gnome-vfs application registry data to disk, and free resources.


gnome_vfs_application_registry_reload ()

void        gnome_vfs_application_registry_reload
                                            (void);

If this function is called for the first time it will initialize the registry. Subsequent calls to the function will clear out the current registry contents and load registry contents from the save file. Make certain that you've saved your registry before calling this function. It will destroy unsaved changes.


gnome_vfs_application_registry_get_mime_application ()

GnomeVFSMimeApplication* gnome_vfs_application_registry_get_mime_application
                                            (const char *app_id);

Returns a structure that contains the application that handles the mime type associated by the application referred by app_id.


gnome_vfs_application_registry_save_mime_application ()

void        gnome_vfs_application_registry_save_mime_application
                                            (const GnomeVFSMimeApplication *application);

This will save to the registry the application that will be associated with a defined mime type. The defined mime type is located within the GnomeVFSMimeApplication structure. Changes are not realized until the gnome_vfs_application_registry_sync function is called.