[anjuta/symbol-db-model] symbol-db: Added db-connect and db-disconnect signals to engine.
- From: Naba Kumar <naba src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/symbol-db-model] symbol-db: Added db-connect and db-disconnect signals to engine.
- Date: Thu, 18 Mar 2010 20:45:50 +0000 (UTC)
commit ae82540bc00a411a2ae29c1bcc3bab71d0f3f136
Author: Naba Kumar <naba gnome org>
Date: Thu Mar 18 00:12:41 2010 +0200
symbol-db: Added db-connect and db-disconnect signals to engine.
plugins/symbol-db/symbol-db-engine-core.c | 21 ++++++++++++++++++++-
plugins/symbol-db/symbol-db-engine-core.h | 2 ++
2 files changed, 22 insertions(+), 1 deletions(-)
---
diff --git a/plugins/symbol-db/symbol-db-engine-core.c b/plugins/symbol-db/symbol-db-engine-core.c
index e8ea53f..d7e98a5 100644
--- a/plugins/symbol-db/symbol-db-engine-core.c
+++ b/plugins/symbol-db/symbol-db-engine-core.c
@@ -155,6 +155,8 @@ typedef void (SymbolDBEngineCallback) (SymbolDBEngine * dbe,
*/
enum
{
+ DB_CONNECTED,
+ DB_DISCONNECTED,
SINGLE_FILE_SCAN_END,
SCAN_END,
SYMBOL_INSERTED,
@@ -2733,6 +2735,22 @@ sdb_engine_class_init (SymbolDBEngineClass * klass)
object_class->finalize = sdb_engine_finalize;
+ signals[DB_CONNECTED]
+ = g_signal_new ("db-connected",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (SymbolDBEngineClass, db_connected),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+
+ signals[DB_DISCONNECTED]
+ = g_signal_new ("db-disconnected",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (SymbolDBEngineClass, db_disconnected),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+
signals[SINGLE_FILE_SCAN_END]
= g_signal_new ("single-file-scan-end",
G_OBJECT_CLASS_TYPE (object_class),
@@ -2975,6 +2993,7 @@ sdb_engine_connect_to_db (SymbolDBEngine * dbe, const gchar *cnc_string)
}
DEBUG_PRINT ("Connected to database %s", cnc_string);
+ g_signal_emit_by_name (dbe, "db-connected", NULL);
return TRUE;
}
@@ -3118,7 +3137,7 @@ symbol_db_engine_close_db (SymbolDBEngine *dbe)
priv->thread_pool = g_thread_pool_new (sdb_engine_ctags_output_thread,
dbe, THREADS_MAX_CONCURRENT,
FALSE, NULL);
-
+ g_signal_emit_by_name (dbe, "db-disconnected", NULL);
return ret;
}
diff --git a/plugins/symbol-db/symbol-db-engine-core.h b/plugins/symbol-db/symbol-db-engine-core.h
index 162a1ef..c24b8db 100644
--- a/plugins/symbol-db/symbol-db-engine-core.h
+++ b/plugins/symbol-db/symbol-db-engine-core.h
@@ -50,6 +50,8 @@ struct _SymbolDBEngineClass
GObjectClass parent_class;
/* signals */
+ void (* db_connected) ();
+ void (* db_disconnected) ();
void (* single_file_scan_end) ();
void (* scan_end) (gint process_id);
void (* symbol_inserted) (gint symbol_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]