NautilusInfoProvider

NautilusInfoProvider — Interface to provide additional information about files

Synopsis

#include <libnautilus-extension/nautilus-column-provider.h>

                    NautilusInfoProvider;
struct              NautilusInfoProviderIface;
void                (*NautilusInfoProviderUpdateComplete)
                                                        (NautilusInfoProvider *provider,
                                                         NautilusOperationHandle *handle,
                                                         NautilusOperationResult result,
                                                         gpointer user_data);
                    NautilusOperationHandle;
enum                NautilusOperationResult;
NautilusOperationResult nautilus_info_provider_update_file_info
                                                        (NautilusInfoProvider *provider,
                                                         NautilusFileInfo *file,
                                                         GClosure *update_complete,
                                                         NautilusOperationHandle **handle);
void                nautilus_info_provider_cancel_update
                                                        (NautilusInfoProvider *provider,
                                                         NautilusOperationHandle *handle);
void                nautilus_info_provider_update_complete_invoke
                                                        (GClosure *update_complete,
                                                         NautilusInfoProvider *provider,
                                                         NautilusOperationHandle *handle,
                                                         NautilusOperationResult result);

Object Hierarchy

  GInterface
   +----NautilusInfoProvider
  GEnum
   +----NautilusOperationResult

Prerequisites

NautilusInfoProvider requires GObject.

Description

NautilusInfoProvider allows extension to provide additional information about files. When nautilus_info_provider_update_file_info() is called by the application, extensions will know that it's time to add extra information to the provided NautilusFileInfo.

Details

NautilusInfoProvider

typedef struct _NautilusInfoProvider NautilusInfoProvider;

struct NautilusInfoProviderIface

struct NautilusInfoProviderIface {
	GTypeInterface g_iface;

	NautilusOperationResult (*update_file_info) (NautilusInfoProvider     *provider,
						     NautilusFileInfo         *file,
						     GClosure                 *update_complete,
						     NautilusOperationHandle **handle);
	void                    (*cancel_update)    (NautilusInfoProvider     *provider,
						     NautilusOperationHandle  *handle);
};

Interface for extensions to provide additional information about files.

GTypeInterface g_iface;

The parent interface.

update_file_info ()

Returns a NautilusOperationResult. See nautilus_info_provider_update_file_info() for details.

cancel_update ()

Cancels a previous call to nautilus_info_provider_update_file_info(). See nautilus_info_provider_cancel_update() for details.

NautilusInfoProviderUpdateComplete ()

void                (*NautilusInfoProviderUpdateComplete)
                                                        (NautilusInfoProvider *provider,
                                                         NautilusOperationHandle *handle,
                                                         NautilusOperationResult result,
                                                         gpointer user_data);

NautilusOperationHandle

typedef struct _NautilusOperationHandle NautilusOperationHandle;

Handle for asynchronous interfaces. These are opaque handles that must be unique within an extension object. These are returned by operations that return NAUTILUS_OPERATION_IN_PROGRESS.


enum NautilusOperationResult

typedef enum {
	/* Returned if the call succeeded, and the extension is done 
	 * with the request */
	NAUTILUS_OPERATION_COMPLETE,

	/* Returned if the call failed */
	NAUTILUS_OPERATION_FAILED,

	/* Returned if the extension has begun an async operation. 
	 * If this is returned, the extension must set the handle 
	 * parameter and call the callback closure when the 
	 * operation is complete. */
	NAUTILUS_OPERATION_IN_PROGRESS
} NautilusOperationResult;

Return values for asynchronous operations performed by the extension. See nautilus_info_provider_update_file_info().

NAUTILUS_OPERATION_COMPLETE

the operation succeeded, and the extension is done with the request.

NAUTILUS_OPERATION_FAILED

the operation failed.

NAUTILUS_OPERATION_IN_PROGRESS

the extension has begin an async operation. When this value is returned, the extension must set the handle parameter and call the callback closure when the operation is complete.

nautilus_info_provider_update_file_info ()

NautilusOperationResult nautilus_info_provider_update_file_info
                                                        (NautilusInfoProvider *provider,
                                                         NautilusFileInfo *file,
                                                         GClosure *update_complete,
                                                         NautilusOperationHandle **handle);

nautilus_info_provider_cancel_update ()

void                nautilus_info_provider_cancel_update
                                                        (NautilusInfoProvider *provider,
                                                         NautilusOperationHandle *handle);

nautilus_info_provider_update_complete_invoke ()

void                nautilus_info_provider_update_complete_invoke
                                                        (GClosure *update_complete,
                                                         NautilusInfoProvider *provider,
                                                         NautilusOperationHandle *handle,
                                                         NautilusOperationResult result);