caja-sendto-plugin

caja-sendto-plugin — caja-sento plug-in

Stability Level

Stable, unless otherwise indicated

Functions

#define NST_INIT_PLUGIN()

Types and Values

Object Hierarchy

    GFlags
    ╰── NstPluginCapabilities

Includes

#include <bluetooth-plugin.h>

Description

Plug-ins can be used to extend caja-sendto.

Functions

NST_INIT_PLUGIN()

#define             NST_INIT_PLUGIN(plugininfo)

Call this on an NstPluginInfo structure to make it available to caja-sendto.

Parameters

plugininfo

a NstPluginInfo structure representing the plugin

 

Types and Values

struct NstPluginInfo

struct NstPluginInfo {
	gchar                             *icon;
	gchar                             *id;
	gchar                             *description;
	gchar                             *gettext_package;
	NstPluginCapabilities              capabilities;
	gboolean (*init)                  (NstPlugin *plugin);
	GtkWidget* (*get_contacts_widget) (NstPlugin *plugin);
	gboolean (*validate_destination)  (NstPlugin *plugin, GtkWidget *contact_widget, char **error);
	gboolean (*send_files)            (NstPlugin *plugin,
					   GtkWidget *contact_widget,
					   GList *file_list);
	gboolean (*destroy)               (NstPlugin *plugin) ;
};

A structure representing a caja-sendto plugin. You should also call NST_INIT_PLUGIN() on the plugin structure to export it.

Members

gchar *icon;

The icon name for the plugin selection drop-down

 

gchar *id;

A unique ID representing the plugin

 

gchar *description;

The label used in the plugin selection drop-down

 

gchar *gettext_package;

The domain to use to translate the description, NULL if the plugin is part of caja-sendto

 

NstPluginCapabilities capabilities;

a bitmask of NstPluginCapabilities

 

init ()

Check for dependencies, and return FALSE if dependencies such as programs are missing.

 

get_contacts_widget ()

Return the contact widget, the widget to select the destination of the files

 

validate_destination ()

Validate whether the destination can receive the file. This callback is optional.

 

send_files ()

Actually send the files to the selected destination. The file list is a GList of URI strings.

 

destroy ()

Free all the resources used by the plugin.

 

struct NstPlugin

struct NstPlugin {
	GModule *module;
	NstPluginInfo *info;
};

A structure as used in caja-sendto.

Members

GModule *module;

the GModule for the opened shared library

 

NstPluginInfo *info;

a NstPluginInfo structure

 

enum NstPluginCapabilities

Capabilities of the plugin.

Members

CAJA_CAPS_NONE

No capabilities

 

CAJA_CAPS_SEND_DIRECTORIES

The plugin can send whole directories without compression

 

CAJA_CAPS_SEND_IMAGES

The plugin only sends images which could be resized