|  |  |  | libseahorse Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | ||||
#define SEAHORSE_SOURCE_GET_INTERFACE (obj) SeahorseSource; SeahorseSourceIface; SeahorseOperation* seahorse_source_load (SeahorseSource *sksrc); void seahorse_source_load_sync (SeahorseSource *sksrc); void seahorse_source_load_async (SeahorseSource *sksrc); SeahorseOperation* seahorse_source_search (SeahorseSource *sksrc, const gchar *match); SeahorseOperation* seahorse_source_import (SeahorseSource *sksrc, GInputStream *input); gboolean seahorse_source_import_sync (SeahorseSource *sksrc, GInputStream *input, GError **err); SeahorseOperation* seahorse_source_export_objects (GList *objects, GOutputStream *output); SeahorseOperation* seahorse_source_delete_objects (GList *objects); SeahorseOperation* seahorse_source_export (SeahorseSource *sksrc, GList *objects, GOutputStream *output); SeahorseOperation* seahorse_source_export_raw (SeahorseSource *sksrc, GSList *ids, GOutputStream *output); GQuark seahorse_source_get_tag (SeahorseSource *sksrc); SeahorseLocation seahorse_source_get_location (SeahorseSource *sksrc);
#define SEAHORSE_SOURCE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SEAHORSE_TYPE_SOURCE, SeahorseSourceIface))
| 
 | 
typedef struct _SeahorseSource SeahorseSource;
- A generic interface for accessing sources. - Eventually more functionality will be merged from seahorse-op.* into this class and derived classes. - Each SeahorseObject has a weak pointer to the SeahorseSource that created it.
Properties base classes must implement: ktype: (GQuark) The ktype (ie: SEAHORSE_PGP) of objects originating from this object source. location: (SeahorseLocation) The location of objects that come from this source. (ie: SEAHORSE_LOCATION_LOCAL, SEAHORSE_LOCATION_REMOTE) uri: (gchar*) Only for remote object sources. The full URI of the keyserver being used.
typedef struct {
	GTypeInterface parent;
    
	/* virtual methods ------------------------------------------------- */
	/**
	 * load
	 * @sksrc: The #SeahorseSource.
	 * 
	 * Loads the requested objects, and add the objects to SeahorseContext. 
	 * 
	 * Returns: The load operation.
	 */
	SeahorseOperation* (*load) (SeahorseSource *sksrc);
	/**
	 * search
	 * @sksrc: The #SeahorseSource 
	 * @match: Match text
	 *
	 * Searches for objects in the source.
	 *
	 * Returns: The search operation.
	 */
	SeahorseOperation* (*search) (SeahorseSource *sksrc, const gchar *match);
    
	/**
	 * import
	 * @sksrc: The #SeahorseSource to import into.
	 * @input: The data to import.
	 *
	 * Import objects into the source. When operation is 'done' a GList of 
	 * updated objects may be found as the operation result. 
	 * 
	 * Returns: The import operation
	 */
	SeahorseOperation* (*import) (SeahorseSource *sksrc, GInputStream *input);
	/**
	 * export
	 * @sksrc: The #SeahorseSource to export from.
	 * @objects: A list of objects to export.
	 * @complete: Whether to export the secret objects too.
	 * @data: Output stream to export to.
	 *
	 * Import objects into the object source. When operation is 'done' the result
	 * of the operation will be a GOutputStream
	 * 
	 * Returns: The export operation
	 */    
	SeahorseOperation* (*export) (SeahorseSource *sksrc, GList *objects, GOutputStream *output);
	/**
	 * export_raw
	 * @sksrc: The #SeahorseSource to export from.
	 * @objects: A list of ids to export.
	 * @data: output stream to export to.
	 *
	 * Import objects into the source. When operation is 'done' the result
	 * of the operation will be a GOutputStream
	 * 
	 * Returns: The export operation
	 */    
	SeahorseOperation* (*export_raw) (SeahorseSource *sksrc, GSList *ids, 
	                                  GOutputStream *output);
} SeahorseSourceIface;
SeahorseOperation* seahorse_source_load (SeahorseSource *sksrc);
Refreshes the SeahorseSource's internal object listing.
| 
 | A SeahorseSource object | 
| Returns : | the asynchronous refresh operation. | 
void seahorse_source_load_sync (SeahorseSource *sksrc);
Refreshes the SeahorseSource's internal object listing. Completes in the background.
| 
 | A SeahorseSource object | 
SeahorseOperation* seahorse_source_search (SeahorseSource *sksrc, const gchar *match);
Refreshes the SeahorseSource's internal listing.
| 
 | A SeahorseSource object | 
| 
 | Text to search for | 
| Returns : | the asynchronous refresh operation. | 
SeahorseOperation* seahorse_source_import (SeahorseSource *sksrc, GInputStream *input);
| 
 | |
| 
 | |
| Returns : | 
gboolean seahorse_source_import_sync (SeahorseSource *sksrc, GInputStream *input, GError **err);
| 
 | |
| 
 | |
| 
 | |
| Returns : | 
SeahorseOperation* seahorse_source_export_objects (GList *objects, GOutputStream *output);
| 
 | |
| 
 | |
| Returns : | 
SeahorseOperation* seahorse_source_delete_objects (GList *objects);
| 
 | |
| Returns : | 
SeahorseOperation* seahorse_source_export (SeahorseSource *sksrc, GList *objects, GOutputStream *output);
| 
 | |
| 
 | |
| 
 | |
| Returns : | 
SeahorseOperation* seahorse_source_export_raw (SeahorseSource *sksrc, GSList *ids, GOutputStream *output);
| 
 | |
| 
 | |
| 
 | |
| Returns : | 
GQuark seahorse_source_get_tag (SeahorseSource *sksrc);
| 
 | The seahorse source object | 
| Returns : | The source-tag property of the object. As GQuark | 
SeahorseLocation seahorse_source_get_location (SeahorseSource *sksrc);
| 
 | |
| Returns : |