tracker r1635 - branches/xesam-support/src/libtracker-common



Author: mottela
Date: Wed Jun 11 11:33:38 2008
New Revision: 1635
URL: http://svn.gnome.org/viewvc/tracker?rev=1635&view=rev

Log:
Fixed the XESAM_FIELD_TYPE fields

Modified:
   branches/xesam-support/src/libtracker-common/tracker-xesam-field.c
   branches/xesam-support/src/libtracker-common/tracker-xesam-field.h
   branches/xesam-support/src/libtracker-common/tracker-xesam-ontology.c

Modified: branches/xesam-support/src/libtracker-common/tracker-xesam-field.c
==============================================================================
--- branches/xesam-support/src/libtracker-common/tracker-xesam-field.c	(original)
+++ branches/xesam-support/src/libtracker-common/tracker-xesam-field.c	Wed Jun 11 11:33:38 2008
@@ -78,36 +78,30 @@
 
 	if (etype == 0) {
 		static const GEnumValue values[] = {
-			{ TRACKER_XESAM_FIELD_TYPE_KEYWORD,
-			  "TRACKER_XESAM_FIELD_TYPE_KEYWORD",
-			  "keyword" },
-			{ TRACKER_XESAM_FIELD_TYPE_INDEX,
-			  "TRACKER_XESAM_FIELD_TYPE_INDEX",
-			  "index" },
-			{ TRACKER_XESAM_FIELD_TYPE_FULLTEXT,
-			  " TRACKER_XESAM_FIELD_TYPE_FULLTEXT",
-			  "fulltext" },
 			{ TRACKER_XESAM_FIELD_TYPE_STRING,
 			  "TRACKER_XESAM_FIELD_TYPE_STRING",
 			  "string" },
+			{ TRACKER_XESAM_FIELD_TYPE_FLOAT,
+			  "TRACKER_XESAM_FIELD_TYPE_FLOAT",
+			  "float" },
 			{ TRACKER_XESAM_FIELD_TYPE_INTEGER,
-			  "TRACKER_XESAM_FIELD_TYPE_INTEGER",
+			  " TRACKER_XESAM_FIELD_TYPE_INTEGER",
 			  "integer" },
-			{ TRACKER_XESAM_FIELD_TYPE_DOUBLE,
-			  "TRACKER_XESAM_FIELD_TYPE_DOUBLE",
-			  "double" },
+			{ TRACKER_XESAM_FIELD_TYPE_BOOLEAN,
+			  "TRACKER_XESAM_FIELD_TYPE_BOOLEAN",
+			  "boolean" },
 			{ TRACKER_XESAM_FIELD_TYPE_DATE,
 			  "TRACKER_XESAM_FIELD_TYPE_DATE",
 			  "date" },
-			{ TRACKER_XESAM_FIELD_TYPE_BLOB,
-			  "TRACKER_XESAM_FIELD_TYPE_BLOB",
-			  "blob" },
-			{ TRACKER_XESAM_FIELD_TYPE_STRUCT,
-			  "TRACKER_XESAM_FIELD_TYPE_STRUCT",
-			  "struct" },
-			{ TRACKER_XESAM_FIELD_TYPE_LINK,
-			  "TRACKER_XESAM_FIELD_TYPE_LINK",
-			  "link" },
+			{ TRACKER_XESAM_FIELD_TYPE_LIST_OF_STRINGS,
+			  "TRACKER_XESAM_FIELD_TYPE_LIST_OF_STRINGS",
+			  "list of strings" },
+			{ TRACKER_XESAM_FIELD_TYPE_LIST_OF_URIS,
+			  "TRACKER_XESAM_FIELD_TYPE_LIST_OF_URIS",
+			  "list of uris" },
+			{ TRACKER_XESAM_FIELD_TYPE_LIST_OF_URLS,
+			  "TRACKER_XESAM_FIELD_TYPE_LIST_OF_URLS",
+			  "list of urls" },
 			{ 0, NULL, NULL }
 		};
 
@@ -148,7 +142,7 @@
 							    "data-type",
 							    "Field data type",
 							    tracker_xesam_field_type_get_type (),
-							    TRACKER_XESAM_FIELD_TYPE_INDEX,
+							    TRACKER_XESAM_FIELD_TYPE_STRING,
 							    G_PARAM_READWRITE));
 	g_object_class_install_property (object_class,
 					 PROP_FIELD_NAME,
@@ -407,7 +401,7 @@
 {
 	TrackerXesamFieldPriv *priv;
 	
-	g_return_val_if_fail (TRACKER_IS_XESAM_FIELD (field), TRACKER_XESAM_FIELD_TYPE_STRING); //FIXME
+	g_return_val_if_fail (TRACKER_IS_XESAM_FIELD (field), TRACKER_XESAM_FIELD_TYPE_STRING); // FIXME
 
 	priv = GET_PRIV (field);
 

Modified: branches/xesam-support/src/libtracker-common/tracker-xesam-field.h
==============================================================================
--- branches/xesam-support/src/libtracker-common/tracker-xesam-field.h	(original)
+++ branches/xesam-support/src/libtracker-common/tracker-xesam-field.h	Wed Jun 11 11:33:38 2008
@@ -27,16 +27,14 @@
 G_BEGIN_DECLS
 
 typedef enum {
-	TRACKER_XESAM_FIELD_TYPE_KEYWORD,
-	TRACKER_XESAM_FIELD_TYPE_INDEX,
-	TRACKER_XESAM_FIELD_TYPE_FULLTEXT,
 	TRACKER_XESAM_FIELD_TYPE_STRING,
+	TRACKER_XESAM_FIELD_TYPE_FLOAT,
 	TRACKER_XESAM_FIELD_TYPE_INTEGER,
-	TRACKER_XESAM_FIELD_TYPE_DOUBLE,
+	TRACKER_XESAM_FIELD_TYPE_BOOLEAN,
 	TRACKER_XESAM_FIELD_TYPE_DATE,
-	TRACKER_XESAM_FIELD_TYPE_BLOB,
-	TRACKER_XESAM_FIELD_TYPE_STRUCT,
-	TRACKER_XESAM_FIELD_TYPE_LINK
+	TRACKER_XESAM_FIELD_TYPE_LIST_OF_STRINGS,
+	TRACKER_XESAM_FIELD_TYPE_LIST_OF_URIS,
+	TRACKER_XESAM_FIELD_TYPE_LIST_OF_URLS,
 } TrackerXesamFieldType;
 
 GType tracker_xesam_field_type_get_type (void) G_GNUC_CONST;

Modified: branches/xesam-support/src/libtracker-common/tracker-xesam-ontology.c
==============================================================================
--- branches/xesam-support/src/libtracker-common/tracker-xesam-ontology.c	(original)
+++ branches/xesam-support/src/libtracker-common/tracker-xesam-ontology.c	Wed Jun 11 11:33:38 2008
@@ -542,13 +542,14 @@
 gchar *
 tracker_xesam_ontology_get_display_field (TrackerXesamField *field)
 {
+	// FIXME
+
 	TrackerXesamFieldType type;
 
 	type = tracker_xesam_field_get_data_type (field);
 
-	if (type == TRACKER_XESAM_FIELD_TYPE_INDEX ||
-	    type == TRACKER_XESAM_FIELD_TYPE_STRING || 
-	    type == TRACKER_XESAM_FIELD_TYPE_DOUBLE) {
+	if (type == TRACKER_XESAM_FIELD_TYPE_STRING || 
+	    type == TRACKER_XESAM_FIELD_TYPE_FLOAT) {
 		return g_strdup ("MetaDataDisplay");
 	}
 



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