tracker r2470 - in branches/libtracker-data: . src/libtracker-data src/trackerd
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2470 - in branches/libtracker-data: . src/libtracker-data src/trackerd
- Date: Thu, 6 Nov 2008 12:12:23 +0000 (UTC)
Author: juergbi
Date: Thu Nov 6 12:12:23 2008
New Revision: 2470
URL: http://svn.gnome.org/viewvc/tracker?rev=2470&view=rev
Log:
2008-11-06 JÃrg Billeter <j bitron ch>
* src/libtracker-data/tracker-data-live-search.c:
* src/libtracker-data/tracker-data-query.c:
* src/libtracker-data/tracker-data-schema.c:
* src/libtracker-data/tracker-data-schema.h:
* src/libtracker-data/tracker-data-search.c:
* src/libtracker-data/tracker-rdf-query.c:
* src/libtracker-data/tracker-xesam-query.c:
* src/trackerd/tracker-files.c:
* src/trackerd/tracker-keywords.c:
* src/trackerd/tracker-metadata.c:
* src/trackerd/tracker-search.c:
Use tracker_data_schema as function namespace
Modified:
branches/libtracker-data/ChangeLog
branches/libtracker-data/src/libtracker-data/tracker-data-live-search.c
branches/libtracker-data/src/libtracker-data/tracker-data-query.c
branches/libtracker-data/src/libtracker-data/tracker-data-schema.c
branches/libtracker-data/src/libtracker-data/tracker-data-schema.h
branches/libtracker-data/src/libtracker-data/tracker-data-search.c
branches/libtracker-data/src/libtracker-data/tracker-rdf-query.c
branches/libtracker-data/src/libtracker-data/tracker-xesam-query.c
branches/libtracker-data/src/trackerd/tracker-files.c
branches/libtracker-data/src/trackerd/tracker-keywords.c
branches/libtracker-data/src/trackerd/tracker-metadata.c
branches/libtracker-data/src/trackerd/tracker-search.c
Modified: branches/libtracker-data/src/libtracker-data/tracker-data-live-search.c
==============================================================================
--- branches/libtracker-data/src/libtracker-data/tracker-data-live-search.c (original)
+++ branches/libtracker-data/src/libtracker-data/tracker-data-live-search.c Thu Nov 6 12:12:23 2008
@@ -324,7 +324,7 @@
}
if (!field_exists) {
- field_data = tracker_db_get_metadata_field (iface,
+ field_data = tracker_data_schema_get_metadata_field (iface,
"Files",
field_name,
g_slist_length (*fields),
@@ -391,7 +391,7 @@
for (l = fields; l; l = l->next) {
gchar *field_name;
- field_name = tracker_db_metadata_get_field_related_names (iface,
+ field_name = tracker_data_schema_metadata_field_get_related_names (iface,
tracker_field_data_get_field_name (l->data));
g_string_append_printf (sql_join,
"INNER JOIN 'files-meta'.%s %s ON (X.ServiceID = %s.ServiceID AND %s.MetaDataID in (%s))\n ",
Modified: branches/libtracker-data/src/libtracker-data/tracker-data-query.c
==============================================================================
--- branches/libtracker-data/src/libtracker-data/tracker-data-query.c (original)
+++ branches/libtracker-data/src/libtracker-data/tracker-data-query.c Thu Nov 6 12:12:23 2008
@@ -167,7 +167,7 @@
for (i = 0; i < g_strv_length (keys); i++) {
TrackerFieldData *field_data;
- field_data = tracker_db_get_metadata_field (iface,
+ field_data = tracker_data_schema_get_metadata_field (iface,
service_type,
keys[i],
i,
Modified: branches/libtracker-data/src/libtracker-data/tracker-data-schema.c
==============================================================================
--- branches/libtracker-data/src/libtracker-data/tracker-data-schema.c (original)
+++ branches/libtracker-data/src/libtracker-data/tracker-data-schema.c Thu Nov 6 12:12:23 2008
@@ -42,8 +42,8 @@
#include "tracker-data-schema.h"
GArray *
-tracker_db_create_array_of_services (const gchar *service,
- gboolean basic_services)
+tracker_data_schema_create_service_array (const gchar *service,
+ gboolean basic_services)
{
GArray *array;
@@ -59,8 +59,8 @@
}
gchar *
-tracker_db_get_field_name (const gchar *service,
- const gchar *meta_name)
+tracker_data_schema_get_field_name (const gchar *service,
+ const gchar *meta_name)
{
gint key_field;
@@ -82,8 +82,8 @@
}
gchar *
-tracker_db_metadata_get_field_related_names (TrackerDBInterface *iface,
- const gchar *name)
+tracker_data_schema_metadata_field_get_related_names (TrackerDBInterface *iface,
+ const gchar *name)
{
TrackerDBResultSet *result_set;
@@ -123,8 +123,8 @@
}
TrackerDBResultSet *
-tracker_db_xesam_get_metadata_names (TrackerDBInterface *iface,
- const gchar *name)
+tracker_data_schema_xesam_get_metadata_names (TrackerDBInterface *iface,
+ const gchar *name)
{
TrackerDBResultSet *result_set;
@@ -140,7 +140,7 @@
}
TrackerDBResultSet *
-tracker_db_xesam_get_all_text_metadata_names (TrackerDBInterface *iface)
+tracker_data_schema_xesam_get_text_metadata_names (TrackerDBInterface *iface)
{
TrackerDBResultSet *result_set;
@@ -154,8 +154,8 @@
}
TrackerDBResultSet *
-tracker_db_xesam_get_service_names (TrackerDBInterface *iface,
- const gchar *name)
+tracker_data_schema_xesam_get_service_names (TrackerDBInterface *iface,
+ const gchar *name)
{
TrackerDBResultSet *result_set;
@@ -171,7 +171,7 @@
}
const gchar *
-tracker_db_metadata_get_field_table (TrackerFieldType type)
+tracker_data_schema_metadata_field_get_db_table (TrackerFieldType type)
{
switch (type) {
case TRACKER_FIELD_TYPE_INDEX:
@@ -197,12 +197,12 @@
}
TrackerFieldData *
-tracker_db_get_metadata_field (TrackerDBInterface *iface,
- const gchar *service,
- const gchar *field_name,
- gint field_count,
- gboolean is_select,
- gboolean is_condition)
+tracker_data_schema_get_metadata_field (TrackerDBInterface *iface,
+ const gchar *service,
+ const gchar *field_name,
+ gint field_count,
+ gboolean is_select,
+ gboolean is_condition)
{
TrackerFieldData *field_data = NULL;
TrackerField *def;
@@ -226,7 +226,7 @@
NULL);
alias = g_strdup_printf ("M%d", field_count);
- table_name = tracker_db_metadata_get_field_table (tracker_field_get_data_type (def));
+ table_name = tracker_data_schema_metadata_field_get_db_table (tracker_field_get_data_type (def));
g_debug ("Field_name: %s :table_name is: %s for data_type: %i",
field_name,
@@ -239,7 +239,7 @@
tracker_field_data_set_data_type (field_data, tracker_field_get_data_type (def));
tracker_field_data_set_multiple_values (field_data, tracker_field_get_multiple_values (def));
- this_field_name = tracker_db_get_field_name (service, field_name);
+ this_field_name = tracker_data_schema_get_field_name (service, field_name);
if (this_field_name) {
gchar *str;
Modified: branches/libtracker-data/src/libtracker-data/tracker-data-schema.h
==============================================================================
--- branches/libtracker-data/src/libtracker-data/tracker-data-schema.h (original)
+++ branches/libtracker-data/src/libtracker-data/tracker-data-schema.h Thu Nov 6 12:12:23 2008
@@ -38,30 +38,31 @@
G_BEGIN_DECLS
-GArray * tracker_db_create_array_of_services (const gchar *service,
- gboolean basic_services);
+GArray * tracker_data_schema_create_service_array (const gchar *service,
+ gboolean basic_services);
/* Metadata API */
-gchar * tracker_db_metadata_get_field_related_names (TrackerDBInterface *iface,
- const gchar *name);
-const gchar * tracker_db_metadata_get_field_table (TrackerFieldType type);
+gchar * tracker_data_schema_metadata_field_get_related_names(TrackerDBInterface *iface,
+ const gchar *name);
+const gchar * tracker_data_schema_metadata_field_get_db_table (TrackerFieldType type);
/* Miscellaneous API */
-gchar * tracker_db_get_field_name (const gchar *service,
- const gchar *meta_name);
-TrackerFieldData * tracker_db_get_metadata_field (TrackerDBInterface *iface,
- const gchar *service,
- const gchar *field_name,
- gint field_count,
- gboolean is_select,
- gboolean is_condition);
+gchar * tracker_data_schema_get_field_name (const gchar *service,
+ const gchar *meta_name);
+TrackerFieldData * tracker_data_schema_get_metadata_field (TrackerDBInterface *iface,
+ const gchar *service,
+ const gchar *field_name,
+ gint field_count,
+ gboolean is_select,
+ gboolean is_condition);
/* XESAM API */
-TrackerDBResultSet *tracker_db_xesam_get_metadata_names (TrackerDBInterface *iface,
- const char *name);
-TrackerDBResultSet *tracker_db_xesam_get_all_text_metadata_names (TrackerDBInterface *iface);
-TrackerDBResultSet *tracker_db_xesam_get_service_names (TrackerDBInterface *iface,
- const char *name);
+TrackerDBResultSet *tracker_data_schema_xesam_get_metadata_names (TrackerDBInterface *iface,
+ const char *name);
+TrackerDBResultSet *tracker_data_schema_xesam_get_text_metadata_names (TrackerDBInterface *iface);
+TrackerDBResultSet *tracker_data_schema_xesam_get_service_names (TrackerDBInterface *iface,
+ const char *name);
+
G_END_DECLS
#endif /* __TRACKER_DATA_SCHEMA_H__ */
Modified: branches/libtracker-data/src/libtracker-data/tracker-data-search.c
==============================================================================
--- branches/libtracker-data/src/libtracker-data/tracker-data-search.c (original)
+++ branches/libtracker-data/src/libtracker-data/tracker-data-search.c Thu Nov 6 12:12:23 2008
@@ -61,7 +61,7 @@
g_return_val_if_fail (search_string != NULL, NULL);
g_return_val_if_fail (offset >= 0, NULL);
- services = tracker_db_create_array_of_services (service, FALSE);
+ services = tracker_data_schema_create_service_array (service, FALSE);
/* FIXME: Do we need both index and services here? We used to have it */
tree = tracker_query_tree_new (search_string,
tracker_data_manager_get_config (),
@@ -220,7 +220,7 @@
g_return_val_if_fail (mime_array != NULL, NULL);
result_set1 = NULL;
- services = tracker_db_create_array_of_services (NULL, TRUE);
+ services = tracker_data_schema_create_service_array (NULL, TRUE);
tree = tracker_query_tree_new (text,
tracker_data_manager_get_config (),
@@ -314,7 +314,7 @@
result_set1 = NULL;
location_prefix = g_strconcat (location, G_DIR_SEPARATOR_S, NULL);
- services = tracker_db_create_array_of_services (NULL, TRUE);
+ services = tracker_data_schema_create_service_array (NULL, TRUE);
tree = tracker_query_tree_new (text,
tracker_data_manager_get_config (),
@@ -410,7 +410,7 @@
result_set1 = NULL;
location_prefix = g_strconcat (location, G_DIR_SEPARATOR_S, NULL);
- services = tracker_db_create_array_of_services (NULL, TRUE);
+ services = tracker_data_schema_create_service_array (NULL, TRUE);
tree = tracker_query_tree_new (text,
tracker_data_manager_get_config (),
Modified: branches/libtracker-data/src/libtracker-data/tracker-rdf-query.c
==============================================================================
--- branches/libtracker-data/src/libtracker-data/tracker-rdf-query.c (original)
+++ branches/libtracker-data/src/libtracker-data/tracker-rdf-query.c Thu Nov 6 12:12:23 2008
@@ -400,7 +400,7 @@
}
if (!field_exists) {
- field_data = tracker_db_get_metadata_field (data->iface,
+ field_data = tracker_data_schema_get_metadata_field (data->iface,
data->service,
field_name,
g_slist_length (data->fields),
@@ -1214,7 +1214,7 @@
if (!tracker_is_empty_string (keyword)) {
gchar *keyword_metadata;
- keyword_metadata = tracker_db_metadata_get_field_related_names (iface,
+ keyword_metadata = tracker_data_schema_metadata_field_get_related_names (iface,
"DC:Keywords");
g_string_append_printf (data.sql_from,
"\n INNER JOIN ServiceKeywordMetaData K ON S.ID = K.ServiceID and K.MetaDataID in (%s) and K.MetaDataValue = '%s' ",
@@ -1339,7 +1339,7 @@
} else {
gchar *related_metadata;
- related_metadata = tracker_db_metadata_get_field_related_names (iface,
+ related_metadata = tracker_data_schema_metadata_field_get_related_names (iface,
tracker_field_data_get_field_name (l->data));
g_string_append_printf (data.sql_from,
"\n INNER JOIN %s %s ON (S.ID = %s.ServiceID and %s.MetaDataID in (%s)) ",
@@ -1470,7 +1470,7 @@
} else {
gchar *related_metadata;
- related_metadata = tracker_db_metadata_get_field_related_names (iface,
+ related_metadata = tracker_data_schema_metadata_field_get_related_names (iface,
tracker_field_data_get_field_name (l->data));
g_string_append_printf (data.sql_from,
"\n INNER JOIN %s %s ON (S.ID = %s.ServiceID and %s.MetaDataID in (%s)) ",
Modified: branches/libtracker-data/src/libtracker-data/tracker-xesam-query.c
==============================================================================
--- branches/libtracker-data/src/libtracker-data/tracker-xesam-query.c (original)
+++ branches/libtracker-data/src/libtracker-data/tracker-xesam-query.c Thu Nov 6 12:12:23 2008
@@ -397,9 +397,9 @@
/* Do the xesam mapping */
if (!strcmp(xesam_name,FIELD_NAME_FULL_TEXT_FIELDS)) {
- result_set = tracker_db_xesam_get_all_text_metadata_names (data->iface);
+ result_set = tracker_data_schema_xesam_get_text_metadata_names (data->iface);
} else {
- result_set = tracker_db_xesam_get_metadata_names (data->iface, xesam_name);
+ result_set = tracker_data_schema_xesam_get_metadata_names (data->iface, xesam_name);
}
if (!result_set) {
@@ -433,7 +433,7 @@
}
if (!field_exists) {
- field_data = tracker_db_get_metadata_field (data->iface,
+ field_data = tracker_data_schema_get_metadata_field (data->iface,
data->service,
field_name,
g_slist_length (data->fields),
@@ -494,7 +494,7 @@
if(content) {
TrackerDBResultSet *result_set;
- result_set = tracker_db_xesam_get_service_names (data->iface,
+ result_set = tracker_data_schema_xesam_get_service_names (data->iface,
content);
content = g_strdup (content);
@@ -1450,7 +1450,7 @@
} else {
gchar *related_metadata;
- related_metadata = tracker_db_metadata_get_field_related_names (iface,
+ related_metadata = tracker_data_schema_metadata_field_get_related_names (iface,
tracker_field_data_get_field_name (l->data));
g_string_append_printf (data.sql_join,
" INNER JOIN %s %s ON (S.ID = %s.ServiceID and %s.MetaDataID in (%s)) ",
Modified: branches/libtracker-data/src/trackerd/tracker-files.c
==============================================================================
--- branches/libtracker-data/src/trackerd/tracker-files.c (original)
+++ branches/libtracker-data/src/trackerd/tracker-files.c Thu Nov 6 12:12:23 2008
@@ -793,7 +793,7 @@
for (i = 1; i <= g_strv_length (fields); i++) {
gchar *field;
- field = tracker_db_get_field_name ("Files", fields[i-1]);
+ field = tracker_data_schema_get_field_name ("Files", fields[i-1]);
if (field) {
g_string_append_printf (sql, ", F.%s ", field);
@@ -820,7 +820,7 @@
continue;
}
- table = tracker_db_metadata_get_field_table (tracker_field_get_data_type (defs[i]));
+ table = tracker_data_schema_metadata_field_get_db_table (tracker_field_get_data_type (defs[i]));
g_string_append_printf (sql,
" LEFT OUTER JOIN %s M%d ON "
Modified: branches/libtracker-data/src/trackerd/tracker-keywords.c
==============================================================================
--- branches/libtracker-data/src/trackerd/tracker-keywords.c (original)
+++ branches/libtracker-data/src/trackerd/tracker-keywords.c Thu Nov 6 12:12:23 2008
@@ -562,7 +562,7 @@
"' || S.Name as EntityName from Services S, ServiceKeywordMetaData M ");
/* Create where string */
- related_metadata = tracker_db_metadata_get_field_related_names (iface, "User:Keywords");
+ related_metadata = tracker_data_schema_metadata_field_get_related_names (iface, "User:Keywords");
where = g_string_new ("");
g_string_append_printf (where,
Modified: branches/libtracker-data/src/trackerd/tracker-metadata.c
==============================================================================
--- branches/libtracker-data/src/trackerd/tracker-metadata.c (original)
+++ branches/libtracker-data/src/trackerd/tracker-metadata.c Thu Nov 6 12:12:23 2008
@@ -114,7 +114,7 @@
}
if (!field_exists) {
- field_data = tracker_db_get_metadata_field (iface,
+ field_data = tracker_data_schema_get_metadata_field (iface,
service,
field_name,
g_slist_length (*fields),
Modified: branches/libtracker-data/src/trackerd/tracker-search.c
==============================================================================
--- branches/libtracker-data/src/trackerd/tracker-search.c (original)
+++ branches/libtracker-data/src/trackerd/tracker-search.c Thu Nov 6 12:12:23 2008
@@ -462,7 +462,7 @@
priv = TRACKER_SEARCH_GET_PRIVATE (object);
- array = tracker_db_create_array_of_services (service, FALSE);
+ array = tracker_data_schema_create_service_array (service, FALSE);
tree = tracker_query_tree_new (search_text,
priv->config,
priv->language,
@@ -512,7 +512,7 @@
priv = TRACKER_SEARCH_GET_PRIVATE (object);
- array = tracker_db_create_array_of_services (NULL, FALSE);
+ array = tracker_data_schema_create_service_array (NULL, FALSE);
tree = tracker_query_tree_new (search_text,
priv->config,
priv->language,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]