CouchdbSession

CouchdbSession

Synopsis

                    CouchdbSessionPrivate;
                    CouchdbSession;
                    CouchdbSessionClass;
CouchdbSession *    couchdb_session_new                 (const char *uri);
const char *        couchdb_session_get_uri             (CouchdbSession *couchdb);
GSList *            couchdb_session_list_databases      (CouchdbSession *couchdb,
                                                         GError **error);
void                couchdb_session_free_database_list  (GSList *dblist);
CouchdbDatabaseInfo * couchdb_session_get_database_info (CouchdbSession *couchdb,
                                                         const char *dbname,
                                                         GError **error);
gboolean            couchdb_session_create_database     (CouchdbSession *couchdb,
                                                         const char *dbname,
                                                         GError **error);
gboolean            couchdb_session_delete_database     (CouchdbSession *couchdb,
                                                         const char *dbname,
                                                         GError **error);
void                couchdb_session_listen_for_changes  (CouchdbSession *couchdb,
                                                         const char *dbname);
void                couchdb_session_enable_authentication
                                                        (CouchdbSession *couchdb,
                                                         CouchdbCredentials *credentials);
void                couchdb_session_disable_authentication
                                                        (CouchdbSession *couchdb);
gboolean            couchdb_session_is_authentication_enabled
                                                        (CouchdbSession *couchdb);
gboolean            couchdb_session_send_message        (CouchdbSession *couchdb,
                                                         const char *method,
                                                         const char *url,
                                                         const char *body,
                                                         JsonParser *parser,
                                                         GError **error);
GSList *            couchdb_session_list_documents      (CouchdbSession *couchdb,
                                                         const char *dbname,
                                                         GError **error);
void                couchdb_session_free_document_list  (GSList *doclist);

Object Hierarchy

  GObject
   +----CouchdbSession

Properties

  "uri"                      gchar*                : Read / Write / Construct

Signals

  "authentication-failed"                          : Run Last
  "database-created"                               : Run Last
  "database-deleted"                               : Run Last
  "document-created"                               : Run Last
  "document-deleted"                               : Run Last
  "document-updated"                               : Run Last

Description

Details

CouchdbSessionPrivate

typedef struct _CouchdbSessionPrivate CouchdbSessionPrivate;

CouchdbSession

typedef struct _CouchdbSession CouchdbSession;

CouchdbSessionClass

typedef struct {
	GObjectClass parent_class;

	void (* authentication_failed) (CouchdbSession *couchdb);

	void (* database_created) (CouchdbSession *couchdb, const char *dbname);
	void (* database_deleted) (CouchdbSession *couchdb, const char *dbname);

	void (* document_created) (CouchdbSession *couchdb, const char *dbname, CouchdbDocument *document);
	void (* document_updated) (CouchdbSession *couchdb, const char *dbname, CouchdbDocument *document);
	void (* document_deleted) (CouchdbSession *couchdb, const char *dbname, const char *docid);
} CouchdbSessionClass;

couchdb_session_new ()

CouchdbSession *    couchdb_session_new                 (const char *uri);

couchdb_session_get_uri ()

const char *        couchdb_session_get_uri             (CouchdbSession *couchdb);

couchdb_session_list_databases ()

GSList *            couchdb_session_list_databases      (CouchdbSession *couchdb,
                                                         GError **error);

couchdb_session_free_database_list ()

void                couchdb_session_free_database_list  (GSList *dblist);

couchdb_session_get_database_info ()

CouchdbDatabaseInfo * couchdb_session_get_database_info (CouchdbSession *couchdb,
                                                         const char *dbname,
                                                         GError **error);

couchdb_session_create_database ()

gboolean            couchdb_session_create_database     (CouchdbSession *couchdb,
                                                         const char *dbname,
                                                         GError **error);

couchdb_session_delete_database ()

gboolean            couchdb_session_delete_database     (CouchdbSession *couchdb,
                                                         const char *dbname,
                                                         GError **error);

couchdb_session_listen_for_changes ()

void                couchdb_session_listen_for_changes  (CouchdbSession *couchdb,
                                                         const char *dbname);

couchdb_session_enable_authentication ()

void                couchdb_session_enable_authentication
                                                        (CouchdbSession *couchdb,
                                                         CouchdbCredentials *credentials);

couchdb_session_disable_authentication ()

void                couchdb_session_disable_authentication
                                                        (CouchdbSession *couchdb);

couchdb_session_is_authentication_enabled ()

gboolean            couchdb_session_is_authentication_enabled
                                                        (CouchdbSession *couchdb);

couchdb_session_send_message ()

gboolean            couchdb_session_send_message        (CouchdbSession *couchdb,
                                                         const char *method,
                                                         const char *url,
                                                         const char *body,
                                                         JsonParser *parser,
                                                         GError **error);

couchdb_session_list_documents ()

GSList *            couchdb_session_list_documents      (CouchdbSession *couchdb,
                                                         const char *dbname,
                                                         GError **error);

couchdb_session_free_document_list ()

void                couchdb_session_free_document_list  (GSList *doclist);

Property Details

The "uri" property

  "uri"                      gchar*                : Read / Write / Construct

Uri pointing to the host to connect to.

Default value: NULL

Signal Details

The "authentication-failed" signal

void                user_function                      (CouchdbSession *couchdbsession,
                                                        gpointer        user_data)           : Run Last

The "database-created" signal

void                user_function                      (CouchdbSession *couchdbsession,
                                                        gchar          *arg1,
                                                        gpointer        user_data)           : Run Last

The "database-deleted" signal

void                user_function                      (CouchdbSession *couchdbsession,
                                                        gchar          *arg1,
                                                        gpointer        user_data)           : Run Last

The "document-created" signal

void                user_function                      (CouchdbSession *couchdbsession,
                                                        gchar          *arg1,
                                                        GObject        *arg2,
                                                        gpointer        user_data)           : Run Last

The "document-deleted" signal

void                user_function                      (CouchdbSession *couchdbsession,
                                                        gchar          *arg1,
                                                        gchar          *arg2,
                                                        gpointer        user_data)           : Run Last

The "document-updated" signal

void                user_function                      (CouchdbSession *couchdbsession,
                                                        gchar          *arg1,
                                                        GObject        *arg2,
                                                        gpointer        user_data)           : Run Last