[anjuta/system-db-refactor] libanjuta, symbol-db: Complete IAnjutaSymbolManager interface and add stubs



commit cbc389e2c01bab48b2ceee02c8ab00a91f166be5
Author: Johannes Schmid <jhs gnome org>
Date:   Sun Jan 30 18:47:14 2011 +0100

    libanjuta, symbol-db: Complete IAnjutaSymbolManager interface and add stubs

 libanjuta/interfaces/libanjuta.idl |   12 ++++++++++--
 plugins/symbol-db/plugin.c         |   36 ++++++++++++++++++++++++++++++++++--
 2 files changed, 44 insertions(+), 4 deletions(-)
---
diff --git a/libanjuta/interfaces/libanjuta.idl b/libanjuta/interfaces/libanjuta.idl
index fe6473b..16672bd 100644
--- a/libanjuta/interfaces/libanjuta.idl
+++ b/libanjuta/interfaces/libanjuta.idl
@@ -6193,9 +6193,17 @@ interface IAnjutaSymbolManager
  	 * Deactivates the package if it was found. If package is NULL, deactivate all
  	 * packages.
 	 *
-	 * Returns FALSE if the package couldn't have been deactivated.
  	 */
-	gboolean deactivate_package (const gchar* pkg_name, const gchar* pkg_version);
+	void deactivate_package (const gchar* pkg_name, const gchar* pkg_version);
+
+	/**
+	 * ianjuta_symbol_manager_deactivate_all:
+	 * @obj: Self
+ 	 * 
+ 	 * Deactivates all activate packages
+	 *
+ 	 */
+	void deactivate_all ();
 }
 
 /**
diff --git a/plugins/symbol-db/plugin.c b/plugins/symbol-db/plugin.c
index 461136f..b48c993 100644
--- a/plugins/symbol-db/plugin.c
+++ b/plugins/symbol-db/plugin.c
@@ -1465,7 +1465,6 @@ on_session_save (AnjutaShell *shell, AnjutaSessionPhase phase,
 				 AnjutaSession *session,
 				 SymbolDBPlugin *sdb_plugin)
 {
-	GList *pkgs;
 	if (phase != ANJUTA_SESSION_PHASE_NORMAL)
 		return;
 
@@ -2538,11 +2537,44 @@ isymbol_manager_activate_package (IAnjutaSymbolManager *isymbol_manager,
 }
 
 static void
+isymbol_manager_deactivate_package (IAnjutaSymbolManager *isymbol_manager,
+                                    const gchar *pkg_name, 
+                                    const gchar *pkg_version,
+                                    GError **err)
+{
+	SymbolDBPlugin *sdb_plugin;
+
+	g_return_if_fail (isymbol_manager != NULL);
+	
+	sdb_plugin = ANJUTA_PLUGIN_SYMBOL_DB (isymbol_manager);
+
+	if (symbol_db_engine_project_exists (sdb_plugin->sdbe_globals, pkg_name, 
+	    								 pkg_version) == TRUE)
+	{
+		/* FIXME: deactivate package in database */
+	}
+}
+
+static void
+isymbol_manager_deactivate_all (IAnjutaSymbolManager *isymbol_manager,
+                                GError **err)
+{
+	SymbolDBPlugin *sdb_plugin;
+
+	g_return_if_fail (isymbol_manager != NULL);
+	
+	sdb_plugin = ANJUTA_PLUGIN_SYMBOL_DB (isymbol_manager);
+
+	/* FIXME: deactivate all packages in database */
+}
+
+static void
 isymbol_manager_iface_init (IAnjutaSymbolManagerIface *iface)
 {
 	iface->create_query = isymbol_manager_create_query;
 	iface->activate_package = isymbol_manager_activate_package;
-	//iface->deactivate_package = isymbol_manager_deactivate_package;
+	iface->deactivate_package = isymbol_manager_deactivate_package;
+	iface->deactivate_all = isymbol_manager_deactivate_all;
 	iface->add_package = isymbol_manager_add_package;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]