[anjuta/sdb-core-trans: 59/59] symbol-db: new IAnjutaSymbolManager ifaces to manage packages.
- From: Massimo Cora' <mcora src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/sdb-core-trans: 59/59] symbol-db: new IAnjutaSymbolManager ifaces to manage packages.
- Date: Fri, 30 Jul 2010 00:05:17 +0000 (UTC)
commit bbbd47a47225e1423202b410e7dbc52cff14ba2c
Author: Massimo Corà <mcora src gnome org>
Date: Fri Jul 30 02:00:01 2010 +0200
symbol-db: new IAnjutaSymbolManager ifaces to manage packages.
libanjuta/interfaces/libanjuta.idl | 41 ++++++++++++++++++++++++++++++++++++
plugins/symbol-db/tables.sql | 6 +++-
2 files changed, 45 insertions(+), 2 deletions(-)
---
diff --git a/libanjuta/interfaces/libanjuta.idl b/libanjuta/interfaces/libanjuta.idl
index 6d6a9e4..950045e 100644
--- a/libanjuta/interfaces/libanjuta.idl
+++ b/libanjuta/interfaces/libanjuta.idl
@@ -6039,6 +6039,47 @@ interface IAnjutaSymbolManager
* Returns: A #IAnjutaSymbolQuery object
*/
IAnjutaSymbolQuery* create_query (IAnjutaSymbolQueryName name, IAnjutaSymbolQueryDb db);
+
+ /**
+ * ianjuta_symbol_manager_add_package:
+ * @obj: Self
+ * @pkg-name: Name of the package to scan. Should be the name given by
+ * pkg-config
+ * @pkg_version: Version of the package
+ * or by the language implementation (Python, Javascript, etc.)
+ * @files: A list of GFile's to scan for this package
+ *
+ * Reads the package files into the database.
+ *
+ * Returns: TRUE if the package will be loaded into the db, FALSE if the package
+ * already exists
+ */
+ gboolean add_package (const gchar* pkg_name, const gchar* pkg_version, const GList* files);
+
+ /**
+ * ianjuta_symbol_manager_activate_package:
+ * @obj: Self
+ * @pkg_name: Name of the package to activate
+ * @pkg_version: Version of the package
+ *
+ * Activates the package for searches in the global symbol database.
+ *
+ * Returns: TRUE if the package was loaded (or will be loaded once scanned).
+ * FALSE if the version given was newer than the version in the database or the
+ * package was not found. In this case, add_package() should be called.
+ */
+ gboolean activate_package (const gchar *pkg_name, const gchar *pkg_version);
+
+ /**
+ * ianjuta_symbol_manager_deactivate_package:
+ * @obj: Self
+ * @package: name of the package
+ *
+ * Deactivates the package if it was found. If package is NULL, deactivate all
+ * packages
+ */
+ gboolean deactivate_package (const gchar* pkg_name, const gchar *pkg_version);
+
}
/**
diff --git a/plugins/symbol-db/tables.sql b/plugins/symbol-db/tables.sql
index c7db0d5..0dd883f 100644
--- a/plugins/symbol-db/tables.sql
+++ b/plugins/symbol-db/tables.sql
@@ -10,9 +10,11 @@ CREATE TABLE workspace (workspace_id integer PRIMARY KEY AUTOINCREMENT,
DROP TABLE IF EXISTS project;
CREATE TABLE project (project_id integer PRIMARY KEY AUTOINCREMENT,
- project_name text not null unique,
+ project_name text not null,
+ version numeric not null default 1.0,
wrkspace_id integer REFERENCES workspace (workspace_id),
- analyse_time date
+ analyse_time date,
+ unique (project_name, version)
);
DROP TABLE IF EXISTS file;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]