diff options
Diffstat (limited to 'libcaja-extension/caja-info-provider.h')
-rw-r--r-- | libcaja-extension/caja-info-provider.h | 92 |
1 files changed, 49 insertions, 43 deletions
diff --git a/libcaja-extension/caja-info-provider.h b/libcaja-extension/caja-info-provider.h index 69371f96..4377687f 100644 --- a/libcaja-extension/caja-info-provider.h +++ b/libcaja-extension/caja-info-provider.h @@ -34,54 +34,60 @@ #include "caja-extension-types.h" #include "caja-file-info.h" -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define CAJA_TYPE_INFO_PROVIDER (caja_info_provider_get_type ()) #define CAJA_INFO_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAJA_TYPE_INFO_PROVIDER, CajaInfoProvider)) #define CAJA_IS_INFO_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAJA_TYPE_INFO_PROVIDER)) #define CAJA_INFO_PROVIDER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), CAJA_TYPE_INFO_PROVIDER, CajaInfoProviderIface)) - typedef struct _CajaInfoProvider CajaInfoProvider; - typedef struct _CajaInfoProviderIface CajaInfoProviderIface; - - typedef void (*CajaInfoProviderUpdateComplete) (CajaInfoProvider *provider, - CajaOperationHandle *handle, - CajaOperationResult result, - gpointer user_data); - - struct _CajaInfoProviderIface - { - GTypeInterface g_iface; - - CajaOperationResult (*update_file_info) (CajaInfoProvider *provider, - CajaFileInfo *file, - GClosure *update_complete, - CajaOperationHandle **handle); - void (*cancel_update) (CajaInfoProvider *provider, - CajaOperationHandle *handle); - }; - - /* Interface Functions */ - GType caja_info_provider_get_type (void); - CajaOperationResult caja_info_provider_update_file_info (CajaInfoProvider *provider, - CajaFileInfo *file, - GClosure *update_complete, - CajaOperationHandle **handle); - void caja_info_provider_cancel_update (CajaInfoProvider *provider, - CajaOperationHandle *handle); - - - - /* Helper functions for implementations */ - void caja_info_provider_update_complete_invoke (GClosure *update_complete, - CajaInfoProvider *provider, - CajaOperationHandle *handle, - CajaOperationResult result); - -#ifdef __cplusplus -} -#endif +typedef struct _CajaInfoProvider CajaInfoProvider; +typedef struct _CajaInfoProviderIface CajaInfoProviderIface; + +typedef void (*CajaInfoProviderUpdateComplete) (CajaInfoProvider *provider, + CajaOperationHandle *handle, + CajaOperationResult result, + gpointer user_data); + +/** + * CajaInfoProviderIface: + * @g_iface: The parent interface. + * @update_file_info: Returns a #CajaOperationResult. + * See caja_info_provider_update_file_info() for details. + * @cancel_update: Cancels a previous call to caja_info_provider_update_file_info(). + * See caja_info_provider_cancel_update() for details. + * + * Interface for extensions to provide additional information about files. + */ + +struct _CajaInfoProviderIface { + GTypeInterface g_iface; + + CajaOperationResult (*update_file_info) (CajaInfoProvider *provider, + CajaFileInfo *file, + GClosure *update_complete, + CajaOperationHandle **handle); + void (*cancel_update) (CajaInfoProvider *provider, + CajaOperationHandle *handle); +}; + +/* Interface Functions */ +GType caja_info_provider_get_type (void); +CajaOperationResult caja_info_provider_update_file_info (CajaInfoProvider *provider, + CajaFileInfo *file, + GClosure *update_complete, + CajaOperationHandle **handle); +void caja_info_provider_cancel_update (CajaInfoProvider *provider, + CajaOperationHandle *handle); + + + +/* Helper functions for implementations */ +void caja_info_provider_update_complete_invoke (GClosure *update_complete, + CajaInfoProvider *provider, + CajaOperationHandle *handle, + CajaOperationResult result); + +G_END_DECLS #endif |