summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorJamie McCracken <jamiemcc@src.gnome.org>2006-05-02 20:37:43 +0000
committerJamie McCracken <jamiemcc@src.gnome.org>2006-05-02 20:37:43 +0000
commitceb13e3ca252c3996b97393f6934a77cc78928f8 (patch)
treec00d127b2ad48f113d59d6488cb0c91ba8a27b5f /data
parent68250b911ba718212e963b3249d4c2fa41db8672 (diff)
downloadtracker-ceb13e3ca252c3996b97393f6934a77cc78928f8.tar.gz
Updates for 0.0.4
Diffstat (limited to 'data')
-rw-r--r--data/Makefile.am3
-rw-r--r--data/mysql-tracker.sql420
-rw-r--r--data/tracker-introspect.xml315
3 files changed, 448 insertions, 290 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index 072b045b6..872c67514 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -2,7 +2,7 @@ SUBDIRS = english
configdir = $(datadir)/tracker
-config_DATA = mysql-tracker.sql tracker.cfg tracker-stop-words.txt
+config_DATA = tracker-introspect.xml mysql-tracker.sql mysql-stored-procs.sql mysql-system.sql tracker.cfg tracker-stop-words.txt
servicedir = $(prefix)/share/dbus-1/services
service_in_files = tracker.service.in
@@ -12,4 +12,3 @@ service_DATA = tracker.service
@sed -e "s|\@bindir\@|$(bindir)|" $< > $@
-EXTRA_DIST = $(config_DATA) tracker-introspect.xml
diff --git a/data/mysql-tracker.sql b/data/mysql-tracker.sql
index 156988415..6a8ee91bb 100644
--- a/data/mysql-tracker.sql
+++ b/data/mysql-tracker.sql
@@ -1,116 +1,226 @@
-/* WatchType Values : */
-/* 0 = top level watched folder */
-/* 1 = watched subfolder */
-/* 2 = watched special folder (like say /usr/share/applications for .Desktop files) */
-/* 3 = watched special file */
-/* 4 = no index folder */
-/* 5 = other */
-
-/* basic file info for a file */
-create table if not exists Files
+
+create table if not exists Options
+(
+ OptionKey varchar(50) not null,
+ OptionValue varchar(50),
+ Primary Key (OptionValue)
+);
+
+insert into Options (OptionKey, OptionValue) values
+('DBVersion', '1');
+
+
+create procedure GetVersion() SELECT OptionValue FROM Options WHERE OptionKey = 'DBVersion';
+
+create table if not exists ServiceTypes
+(
+ TypeID tinyint unsigned not null,
+ TypeName varchar (16),
+ MetadataClass varchar (16),
+ TableName varchar (16),
+
+ Primary Key (TypeID)
+);
+
+insert into ServiceTypes (TypeID, TypeName, MetadataClass) values
+(0, 'Files', 'File'),
+(1, 'Documents', 'Doc'),
+(2, 'Images', 'Image'),
+(3, 'Music', 'Audio'),
+(4, 'Videos', 'File'),
+(5, 'VFSFiles', 'File'),
+(6, 'VFSDocuments', 'Doc'),
+(7, 'VFSImages', 'Image'),
+(8, 'VFSMusic', 'Audio'),
+(9, 'VFSVideos', 'File'),
+(10, 'Conversations', 'File'),
+(11, 'Playlists', 'PlayList'),
+(12, 'Applications', 'App'),
+(13, 'Contacts', 'Contact'),
+(14, 'Emails', 'Email'),
+(15, 'EmailAttachments', 'File'),
+(16, 'Notes', 'Note'),
+(17, 'Appointments', 'Appointment'),
+(18, 'Tasks', 'Task'),
+(19, 'Bookmarks', 'Bookmark'),
+(20, 'History', 'History'),
+(21, 'Projects', 'Project');
+
+
+CREATE TABLE sequence (id int unsigned NOT NULL);
+INSERT INTO sequence VALUES (0);
+
+
+/* basic file info for a file or service object */
+create table if not exists Services
(
- ID int unsigned auto_increment not null,
- Path varchar (200) character set utf8 not null, /* non-local files can prefix uri type here */
- FileName varchar (128) character set utf8 not null,
- FileTypeID tinyint unsigned default 0,
- IsVFS bool default 0,
+ ID int unsigned not null,
+ ServiceTypeID tinyint unsigned default 0, /* see ServiceTypes table above for ID values */
+ Path varchar (200) character set utf8 not null, /* non-file objects should use service name here */
+ Name varchar (128) character set utf8, /* name of file or object - the combination path and name must be unique for all objects */
+ IsServiceSource bool default 0,
IsDirectory bool default 0,
- IsLink bool default 0,
- IsWatched bool default 0,
- WatchType tinyint unsigned default 5,
- IndexTime int unsigned, /* should equal st_mtime for file if up-to-date */
+ IsWatchedDirectory bool default 0,
+ IsLink bool default 0,
+ Misc varchar(255),
+ MiscInt int,
+ MiscDate DateTime,
+ IndexTime int unsigned, /* should equal st_mtime for file if up-to-date */
Offset int unsigned, /* last used disk offset for indexable files that always grow (like chat logs) */
primary key (ID),
- unique key (Path, FileName),
- key (WatchType)
+ unique key (Path, Name),
+ key (ServiceTypeID)
);
+/* provides links from one service entity to another */
+create table if not exists ServiceLinks
+(
+ ServiceID int unsigned not null,
+ LinkID int unsigned not null,
+ LinkTypeID tinyint unsigned not null, /* see ServiceLinkTypes table */
+
+ primary key (ServiceID, LinkID, LinkTypeID)
+
+);
+
+create table if not exists ServiceLinkTypes
+(
+ ID tinyint unsigned auto_increment not null,
+ Type varchar(32),
+
+ primary key (ID)
+
+);
+
+insert into ServiceLinkTypes (Type) Values ('PlayListItem');
+
+
+/* store all keywords here. */
+create table if not exists ServiceKeywords
+(
+ ServiceID int unsigned not null,
+ Keyword varchar (32) character set utf8 not null,
+
+ Primary Key (ServiceID, Keyword),
+ Key (Keyword)
+);
+
+
+
/* store all metadata here. */
-create table if not exists FileMetaData
+create table if not exists ServiceMetaData
(
- FileID int unsigned not null,
+ ServiceID int unsigned not null,
MetaDataID smallint unsigned not null,
MetaDataValue Text character set utf8,
MetaDataIndexValue MediumText character set utf8,
- MetaDataIntegerValue int unsigned,
+ MetaDataNumericValue double,
- Primary Key (FileID, MetaDataID),
- key IValue (MetaDataID, MetaDataValue (20)),
- key IIntValue (MetaDataID, MetaDataIntegerValue),
+ Primary Key (ServiceID, MetaDataID),
+ Key (MetaDataIndexValue (24)),
+ key INumericValue (MetaDataID, MetaDataNumericValue),
FullText (MetaDataIndexValue)
);
+
+
+
/* describes the types of metadata */
create table if not exists MetaDataTypes
(
ID smallint unsigned auto_increment not null,
MetaName varchar (128) not null,
- DataTypeID tinyint unsigned, /* 0=string, 1=int, 2=datetime (as string) */
- Indexable bool, /* if the metadata uses a full text index*/
- Writeable bool, /* embedded metadata is not writable */
+ DataTypeID tinyint unsigned, /* 0=full text indexable string, 1=string, 2=numeric, 3=datetime (as string) */
+ Embedded bool, /* if the metadata is embedded in the file */
+ Writeable bool, /* is metadata writable */
Primary Key (ID),
Unique (MetaName)
);
+
/* built in metadata types */
-insert into MetaDataTypes (MetaName, DatatypeID, Indexable, Writeable) values
+insert into MetaDataTypes (MetaName, DatatypeID, Embedded, Writeable) values
('File.Name', 0, 1, 0),
('File.Path', 0, 1, 0),
-('File.Link', 0, 1, 0),
+('File.Link', 1, 1, 0),
('File.Format', 0, 1, 0 ),
-('File.Size', 1, 0, 0),
-('File.Permissions', 0, 0, 0),
+('File.Size', 2, 1, 0),
+('File.Permissions', 1, 1, 0),
('File.Content', 0, 1, 0),
-('File.Description', 0, 1, 1),
-('File.Keywords', 0, 1, 1),
-('File.Rank', 1, 0, 1 ),
-('File.IconPath', 0, 0, 1 ),
-('File.PreviewThumbnailPath', 0, 0, 1),
-('File.Modified', 2, 0, 0),
-('File.Accessed', 2, 0, 0 ),
+('File.Description', 0, 0, 1),
+('File.Keywords', 0, 0, 1),
+('File.Rank', 2, 0, 1),
+('File.IconPath', 1, 0, 1 ),
+('File.SmallThumbnailPath', 1, 0, 1),
+('File.LargeThumbnailPath', 1, 0, 1),
+('File.Modified', 3, 1, 0),
+('File.Accessed', 3, 1, 0 ),
('File.Other', 0, 1, 0 ),
-('Audio.Title', 0, 1, 0),
-('Audio.Artist', 0, 1, 0),
-('Audio.Album', 0, 1, 0),
-('Audio.Year', 1, 0, 0),
-('Audio.Comment', 0, 1, 0),
-('Audio.Genre', 0, 1, 0),
-('Audio.Codec', 0, 1, 0),
-('Audio.Samplerate', 1, 0, 0),
-('Audio.Bitrate', 1, 0, 0),
-('Audio.Channels', 1, 0, 0),
+('Audio.Title', 0, 1, 1),
+('Audio.Artist', 0, 1, 1),
+('Audio.Album', 0, 1, 1),
+('Audio.AlbumArtist', 0, 1, 1),
+('Audio.AlbumTrackCount', 2, 1, 1),
+('Audio.TrackNo', 2, 1, 1),
+('Audio.DiscNo', 2, 1, 1),
+('Audio.Performer', 0, 1, 1),
+('Audio.TrackGain', 2, 1, 1),
+('Audio.TrackPeakGain', 2, 1, 1),
+('Audio.AlbumGain', 2, 1, 1),
+('Audio.AlbumPeakGain', 2, 1, 1),
+('Audio.Duration', 2, 1, 0),
+('Audio.ReleaseDate', 3, 1, 1),
+('Audio.Comment', 0, 1, 1),
+('Audio.Genre', 0, 1, 1),
+('Audio.Codec', 0, 1, 1),
+('Audio.CodecVersion', 1, 1, 1),
+('Audio.Samplerate', 2, 1, 1),
+('Audio.Bitrate', 2, 1, 1),
+('Audio.Channels', 2, 1, 1),
+('Audio.LastPlay', 3, 0, 1),
+('Audio.PlayCount', 2, 0, 1),
+('Audio.IsNew', 2, 0, 1),
+('Audio.MBAlbumID', 1, 0, 1),
+('Audio.MBArtistID', 1, 0, 1),
+('Audio.MBAlbumArtistID', 1, 0, 1),
+('Audio.MBTrackID', 1, 0, 1),
+('Audio.Lyrics', 0, 0, 1),
+('Audio.CoverAlbumThumbnailPath', 1, 0, 1),
('Doc.Title', 0, 1, 0),
('Doc.Subject', 0, 1, 0),
('Doc.Author', 0, 1, 0),
('Doc.Keywords', 0, 1, 0),
('Doc.Comments', 0, 1, 0),
-('Doc.PageCount', 1, 0, 0),
-('Doc.WordCount', 1, 0, 0),
-('Doc.Created', 2, 0, 0),
-('Image.Height', 1, 0, 0),
-('Image.Width', 1, 0, 0),
+('Doc.PageCount', 2, 1, 0),
+('Doc.WordCount', 2, 1, 0),
+('Doc.Created', 3, 1, 0),
+('Image.Height', 2, 1, 0),
+('Image.Width', 2, 1, 0),
('Image.Title', 0, 1, 0),
-('Image.Date', 2, 0, 0),
+('Image.Date', 3, 1, 0),
('Image.Keywords', 0, 1, 0),
('Image.Creator', 0, 1, 0),
('Image.Comments', 0, 1, 0),
('Image.Description', 0, 1, 0),
('Image.Software', 0, 1, 0),
('Image.CameraMake', 0, 1, 0),
-('Image.CameraModel', 0, 1, 0);
-
+('Image.CameraModel', 0, 1, 0),
+('PlayList.DateCreated', 3, 0, 1),
+('PlayList.LastPlay', 3, 0, 1),
+('PlayList.PlayCount', 2, 0, 1),
+('PlayList.Description', 0, 0, 1);
/* optional contextual file data - gives a nice audit trail for a file */
create table if not exists FileContexts
(
- FileID int unsigned not null,
- ContextActionID tinyint unsigned not null, /* 0=created, 1=edited, 2=attached, 3=embedded */
+ FileID int unsigned not null,
+ ContextActionID tinyint unsigned not null,
ContextDate DateTime not null,
ContextApp varchar (128),
ContextFileID int unsigned, /* file if linked/attached/embedded */
@@ -120,39 +230,16 @@ create table if not exists FileContexts
key (ContextFileID)
);
-
-/* allow aliasing of VFolders with nice names */
-create table if not exists VFolders
+create table if not exists FileContextActions
(
- Path varchar (200) not null,
- Name varchar (128) not null,
- Query text not null,
- RDF text,
- UserDefined bool,
-
- primary key (Path, Name)
+ ID tinyint unsigned auto_increment not null,
+ ContextAction varchar (30) not null,
+ primary key (ID)
);
-/* determines whether a file is more than just a file */
-create table if not exists FileTypes
-(
- ID tinyint unsigned not null,
- TypeName varchar(20) not null,
+insert into FileContextActions (ContextAction) values ('Created'),('Edited'),('Attached'),('Embedded'),('Downloaded');
- primary key (ID),
- unique (TypeName)
-);
-
-insert into FileTypes values
-(0,'File'),
-(1,'Desktop'),
-(2,'Bookmarks'),
-(3,'SmartBookmarks'),
-(4,'WebHistory'),
-(5,'Emails'),
-(6,'Conversations'),
-(7,'Contacts');
/* table for files waiting to be processed */
@@ -167,163 +254,36 @@ create table if not exists FilePending
IsDir tinyint default 0,
primary key (ID),
- key (FileID),
+ key (FileID, Action),
key (Counter)
);
-/* freedesktop .desktop files */
-create table if not exists DesktopFiles
-(
- AppName varchar (128) not null,
- LocaleName varchar (128),
- Comment varchar (255),
- LocaleComment varchar (255),
- Categories varchar (255),
- Executable varchar (255),
-
- primary key (AppName),
- FullText (AppName, LocaleName, Comment, LocaleComment, Categories)
-
-);
-
-/* any type of bookmark (web/filesystem) */
-create table if not exists Bookmarks
-(
- ID int auto_increment not null,
- Type smallint not null, /*0=web, 1=Filesystem */
- Title varchar (255) not null,
- URL varchar (255) not null,
-
- primary key (ID),
- FullText (Title, URL)
-
-);
-
-/* web history */
-create table if not exists History
-(
- ID int auto_increment not null,
- HistoryDate datetime,
- Title varchar (255) not null,
- URL varchar (255) not null,
-
- primary key (ID),
- key (HistoryDate),
- FullText (Title, URL)
-);
-
-
-/* index emails */
-create table if not exists Emails
-(
- EmailID int auto_increment not null,
- MessageID varchar (255) not null,
- InReplyTo varchar (255),
- Subject varchar (255),
- Body LongText,
-
- primary key (EmailID),
- key (MessageID),
- key (InReplyTo),
- FullText (Subject, Body)
-
-);
-
-create table if not exists EmailAttachments
-(
- EmailID int not null,
- AttachmentID int not null,
- MimeVersion varchar (30),
- ContentType varchar (255),
- ContentBoundary varchar (255),
- ContentCharset varchar (128),
- ContentEncoding varchar (255),
- ContentName varchar (255),
- ContentDisposition varchar (255),
- ContentFileName varchar (255),
- Contents LongText,
- AsText LongText,
-
- primary key (EmailID, AttachmentID),
- FullText (ContentFileName, AsText)
-);
-
-create table if not exists EmailAddresses
+create table if not exists FileWatches
(
- EmailAddressID int auto_increment not null,
- EmailName varchar (255),
- Address varchar (255) not null,
-
- primary key (EmailAddressID),
- FullText (EmailName, Address)
-);
+ WatchID int not null,
+ URI varchar(255) not null,
-/* used for any field that can contain multiple emails */
-create table if not exists EmailReferences
-(
- EmailID int not null,
- EmailAddressID int not null,
- ReferenceType smallint not null, /* 0 = Sent to, 1=CC, 2=BCC, 3=Reference, 4=sender */
- counter int not null,
-
- primary key (EmailID, EmailAddressID, ReferenceType, counter),
- key (EmailAddressID)
-);
-
-/* index chat logs line by line */
-create table if not exists Conversations
-(
- FileID int not null,
- LineID int not null,
- LogDate datetime not null,
- SpeakerNick varchar (64) not null,
- Content varchar (255) not null,
-
- primary key (FileID, LineID),
- FullText (SpeakerNick, Content)
+ primary key (WatchID),
+ unique (URI)
);
-create table if not exists Contacts
-(
- ContactID int auto_increment not null,
- ContactName varchar (255) not null,
- Nick varchar (30),
- HomeTel varchar(30),
- BusTel varchar(30),
- Mobile varchar(30),
- Fax varchar(30),
- HomePage varchar(255),
- ChatAddress varchar (64),
- ChatAddress2 varchar (64),
-
- primary key (ContactID),
- FullText (ContactName, Nick)
-);
-/* Multiple email accounts for a contact */
-create table if not exists ContactEmails
+/* allow aliasing of VFolders with nice names */
+create table if not exists VFolders
(
- ContactID int not null,
- EmailID int not null,
- AdressType smallint not null, /* 0=unknown, 1=home/personal, 2=work */
+ Path varchar (200) not null,
+ Name varchar (128) not null,
+ Query text not null,
+ RDF text,
- primary key (ContactID, EmailID, AdressType ),
- key (EmailID)
-
+ primary key (Path, Name)
);
-/* Multiple IM accounts for a contact */
-create table if not exists ContactChats
-(
- ContactID int not null,
- ServerID smallint not null, /* 0 = aim, 1=jabber, 2=yahoo, 3=MSN, 4=ICQ, 5=Groupwise */
- Account varchar (255) not null,
- primary key (ContactID, ServerID)
-);
+select Null
diff --git a/data/tracker-introspect.xml b/data/tracker-introspect.xml
index 66b2b08b0..e8c8b9ba2 100644
--- a/data/tracker-introspect.xml
+++ b/data/tracker-introspect.xml
@@ -1,20 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
-<node name="/org/freedesktop/tracker">
- <interface name="org.freedesktop.Tracker">
- <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="tracker_client"/>
-
<!--
"service" input parameters are a string representing the service type.
- Service types will include the following (only "files" is currently implemented):
+ A list of service types can be obtained by calling method GetServices and will *potentially* include the following :
Files
Documents
Images
Music
+ Videos
+ VFSFiles
+ VFSDocuments
+ VFSImages
+ VFSMusic
+ VFSVideos
Playlists
+ Notes
Applications
People
Emails
@@ -25,88 +28,160 @@
History
Projects
+
+ Services may also have a corresponding metadata class associated with them (EG Files has "File" class, Documents "Doc" etc see
+ the spec at http://freedesktop.org/wiki/Standards/shared-filemetadata-spec for more details on metadata classes)
"id" input parameters can represent, in the case of a file, the full path and name of the file.
- In other cases, "id" can also be an URI or an integer based id for the specified service.
+ In other cases, "id" can also be a unique name or URI for the specified service.
+
+ The "id" field uniquely identifies the entity only in a particular service
+
+ The combination "service" and "id" uniquely identifies a specific entity in Tracker
-->
+
+<node name="/org/freedesktop/tracker">
+
+ <interface name="org.freedesktop.Tracker">
+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="tracker_client"/>
+
+ <!-- Test method -->
<method name="Ping">
<arg type="b" name="response" direction="out" />
</method>
- <method name="GetMetadata">
- <arg type="s" name="service" direction="in" />
- <arg type="s" name="id" direction="in" />
- <arg type="s" name="key" direction="in" />
- <arg type="s" name="value" direction="out" />
- </method>
- <method name="SetMetadata">
- <arg type="s" name="service" direction="in" />
- <arg type="s" name="id" direction="in" />
- <arg type="s" name="key" direction="in" />
- <arg type="s" name="value" direction="in" />
+
+ <!-- Gets all implemented services and also any corresponding metdata type class for the service (IE "File", "Doc", "Image" etc) -->
+ <method name="GetServices">
+ <arg type="as" name="service_array" direction="out" />
+ <arg type="as" name="metadata_class_array" direction="out" />
</method>
- <method name="GetMultipleMetadata">
+
+ </interface>
+
+ <interface name="org.freedesktop.Tracker.Metadata">
+
+ <!-- Retrieves an array of metadata values for the specified array of metadata keys for a service and id pair-->
+ <method name="Get">
<arg type="s" name="service" direction="in" />
<arg type="s" name="id" direction="in" />
<arg type="as" name="keys" direction="in" />
- <arg type="a{ss}" name="values" direction="out" />
+ <arg type="as" name="values" direction="out" />
</method>
- <method name="SetMultipleMetadata">
+
+ <!-- Sets specified metadata keys to the specified metadata values for a service and id pair-->
+ <method name="Set">
<arg type="s" name="service" direction="in" />
<arg type="s" name="id" direction="in" />
- <arg type="a{ss}" name="values" direction="in" />
+ <arg type="as" name="keys" direction="in" />
+ <arg type="as" name="values" direction="in" />
</method>
<!--
- datatype argument for RegisterMetadataType should be one of the following:
+ Registers a new metadata type. The metadata name must be namespaced with an appropriate class in the format "class.name"
+
+ datatype argument for RegisterType should be one of the following:
"index" (a string which is stored in a full text index for searching )
"string" (a non-indexable string which will not show up in searches )
- "int"
- "date"
+ "numeric" (a signed number which can be either an integer or a float)
+ "date" (format should be "yyyy-mm-dd hh:mm:ss")
+
+ Metadata defined here is considered non-embeddable and writable
-->
- <method name="RegisterMetadataType">
+ <method name="RegisterType">
<arg type="s" name="name" direction="in" />
<arg type="s" name="datatype" direction="in" />
</method>
- <method name="MetadataTypeExists">
+
+
+ <!-- Gets all details of a named metadata type -->
+ <method name="GetTypeDetails">
<arg type="s" name="name" direction="in" />
- <arg type="b" name="result" direction="out" />
+ <arg type="s" name="data_type" direction="out" />
+ <arg type="b" name="is_embedded" direction="out" />
+ <arg type="b" name="is_writable" direction="out" />
</method>
- <method name="GetMetadataTypes">
+
+ <!-- returns an array of all metadata types that are registered for a certain class
+ You can enter "*" as the class to get all metadat types for all classes
+ -->
+ <method name="GetRegisteredTypes">
+ <arg type="s" name="metadata_class" direction="in" />
<arg type="as" name="result" direction="out" />
</method>
+
+
+ <!-- returns an array of all metadata types that are writeable and registered for a certain class
+ You can enter "*" as the class to get all metadat types for all classes that are writeable
+ -->
+ <method name="GetWriteableTypes">
+ <arg type="s" name="metadata_class" direction="in" />
+ <arg type="as" name="result" direction="out" />
+ </method>
+
+ <!-- returns an array of all metadata type classes that are registered -->
+ <method name="GetRegisteredClasses">
+ <arg type="as" name="result" direction="out" />
+ </method>
+
+
- <!-- calls for tags/keywords for any service object or file -->
- <method name="GetKeywords">
+
+ </interface>
+
+ <interface name="org.freedesktop.Tracker.Keywords">
+ <!-- calls for tags/keywords for any service object or file -->
+
+ <!-- gets all unique keywords/tags for specified service and id -->
+ <method name="Get">
<arg type="s" name="service" direction="in" />
<arg type="s" name="id" direction="in" />
<arg type="as" name="value" direction="out" />
</method>
- <method name="AddKeywords">
+
+ <!-- Adds new keywords/tags for specified service and id -->
+ <method name="Add">
<arg type="s" name="service" direction="in" />
<arg type="s" name="id" direction="in" />
<arg type="as" name="values" direction="in" />
</method>
- <method name="RemoveKeywords">
+
+ <!-- removes all specified keywords/tags for specified service and id -->
+ <method name="Remove">
<arg type="s" name="service" direction="in" />
<arg type="s" name="id" direction="in" />
<arg type="as" name="keywords" direction="in" />
</method>
+ <!-- searches specified service for matching keyword/tag and returns an array of matching id values for the service-->
+ <method name="Search">
+ <arg type="s" name="service" direction="in" />
+ <arg type="s" name="keywords" direction="in" />
+ <arg type="i" name="max_hits" direction="in" />
+ <arg type="as" name="result" direction="out" />
+ </method>
+
+ </interface>
+
+
+ <interface name="org.freedesktop.Tracker.Search">
- <method name="SearchMetadataQuery">
+ <!-- searches specified service using an xml rdf query for the query_condition parameter and returns the fields for all matching entities -->
+ <method name="Query">
<arg type="s" name="service" direction="in" />
<arg type="as" name="fields" direction="in" />
<arg type="s" name="query_condition" direction="in" />
<arg type="i" name="max_hits" direction="in" />
- <arg type="b" name="sort_by_relevance" direction="in" />
- <arg type="aas" name="result" direction="out" />
+ <arg type="a{sv}" name="result" direction="out" />
</method>
- <method name="SearchMetadataText">
+
+
+ <!-- searches specified service for entities that match the specified text. Returns id field of all hits. sort_by_relevance returns results sorted with the biggest hits first (as sorting is slower, you might want to disable this for fast queries) -->
+ <method name="Text">
<arg type="s" name="service" direction="in" />
<arg type="s" name="text" direction="in" />
<arg type="i" name="max_hits" direction="in" />
@@ -115,74 +190,198 @@
</method>
+ <!-- searches specified service for matching text and returns an array of matching id values for the service complete with text extract and basic file info suitable for use in a search gui-->
+ <method name="TextDetailed">
+ <arg type="s" name="service" direction="in" />
+ <arg type="s" name="text" direction="in" />
+ <arg type="i" name="max_hits" direction="in" />
+ <arg type="b" name="sort_by_relevance" direction="in" />
+ <arg type="a{sv}" name="result" direction="out" />
+ </method>
+
+ </interface>
+
+
+
<!--
File Specific calls
-->
- <method name="GetMetadataForFilesInFolder">
+ <interface name="org.freedesktop.Tracker.Files">
+
+ <method name="Create">
+ <arg type="s" name="uri" direction="in" />
+ <arg type="s" name="mime" direction="in" />
+ <arg type="i" name="size" direction="in" />
+ <arg type="i" name="mtime" direction="in" />
+ </method>
+
+
+ <method name="Delete">
<arg type="s" name="uri" direction="in" />
- <arg type="as" name="keys" direction="in" />
- <arg type="a{sv}" name="values" direction="out" />
</method>
- <method name="RefreshFileMetadata">
+
+ <method name="GetFileContents">
+ <arg type="s" name="uri" direction="in" />
+ <arg type="i" name="offset" direction="in" />
+ <arg type="i" name="max_length" direction="in" />
+ <arg type="s" name="result" direction="out" />
+ </method>
+
+
+ <!--
+ Retrieves all files that match a service description
+ Valid file_service types for GetByServiceType are: "Music", "Documents", "Images", "Videos", "VFSMusic", "VFSDocuments", "VFSImages", "VFSVideos"
+ -->
+ <method name="GetByServiceType">
+ <arg type="s" name="file_service" direction="in" />
+ <arg type="i" name="max_hits" direction="in" />
+ <arg type="as" name="result" direction="out" />
+ </method>
+
+ <!-- Retrieves all non-vfs files of the specified mime type(s) -->
+ <method name="GetByMimeType">
+ <arg type="as" name="mime_types" direction="in" />
+ <arg type="i" name="max_hits" direction="in" />
+ <arg type="as" name="result" direction="out" />
+ </method>
+
+ <!-- Retrieves all vfs files of the specified mime type(s) -->
+ <method name="GetByMimeTypeVFS">
+ <arg type="as" name="mime_types" direction="in" />
+ <arg type="i" name="max_hits" direction="in" />
+ <arg type="as" name="result" direction="out" />
+ </method>
+
+ <!-- Refreshes various speicfied metadata for a file including basic metadata (stuff derived from stat calls), embedded tags, text contents and/or thumbnails -->
+ <method name="RefreshMetadata">
<arg type="s" name="uri" direction="in" />
<arg type="b" name="basic" direction="in" />
<arg type="b" name="embedded" direction="in" />
<arg type="b" name="contents" direction="in" />
<arg type="b" name="thumbnails" direction="in" />
</method>
- <method name="IsFileMetadataUpToDate">
+
+ <!-- returns true if file's metadata is up to date -->
+ <method name="IsUpToDate">
<arg type="s" name="uri" direction="in" />
<arg type="i" name="mtime" direction="in" />
<arg type="b" name="result" direction="out" />
</method>
+
+ <!-- Retrieves all non-vfs files in a folder complete with all requested metadata -->
+ <method name="GetMetadataForFilesInFolder">
+ <arg type="s" name="uri" direction="in" />
+ <arg type="as" name="keys" direction="in" />
+ <arg type="a{sv}" name="values" direction="out" />
+ </method>
+
<!-- deprecated file specific calls (mostly used by Nautilus Search)-->
- <method name="SearchFilesByTextAndMime">
+ <method name="SearchByTextAndMime">
<annotation name="org.freedesktop.DBus.Deprecated" value="true"/>
<arg type="s" name="text" direction="in" />
<arg type="as" name="mimes" direction="in" />
<arg type="as" name="result" direction="out" />
</method>
- <method name="SearchFilesByTextAndMimeAndLocation">
+ <method name="SearchByTextAndMimeAndLocation">
<annotation name="org.freedesktop.DBus.Deprecated" value="true"/>
<arg type="s" name="text" direction="in" />
<arg type="as" name="mimes" direction="in" />
<arg type="s" name="location" direction="in" />
<arg type="as" name="result" direction="out" />
</method>
- <method name="SearchFilesByTextAndLocation">
+ <method name="SearchByTextAndLocation">
<annotation name="org.freedesktop.DBus.Deprecated" value="true"/>
<arg type="s" name="text" direction="in" />
<arg type="s" name="location" direction="in" />
<arg type="as" name="result" direction="out" />
</method>
-
- <method name="SearchFileQuery">
- <annotation name="org.freedesktop.DBus.Deprecated" value="true"/>
- <arg type="s" name="rdfquery" direction="in" />
- <arg type="i" name="max_hits" direction="in" />
- <arg type="b" name="sort_by_relevance" direction="in" />
- <arg type="as" name="result" direction="out" />
- </method>
<!-- end deprecated calls section-->
- <!-- File metadata signals -->
- <signal name="FileChanged">
+ <!-- File signals -->
+
+ <signal name="Created">
<arg type="s" name="path"/>
<arg type="s" name="filename"/>
+ <arg type="s" name="mime_type"/>
</signal>
- <signal name="FileMetadataChanged">
+
+ <signal name="Deleted">
+ <arg type="s" name="path"/>
+ <arg type="s" name="filename"/>
+ </signal>
+
+ <signal name="Moved">
+ <arg type="s" name="move_from_path"/>
+ <arg type="s" name="move_from_filename"/>
+ <arg type="s" name="move_to_path"/>
+ <arg type="s" name="move_to_filename"/>
+ </signal>
+
+ <signal name="Changed">
+ <arg type="s" name="path"/>
+ <arg type="s" name="filename"/>
+ </signal>
+
+ <signal name="MetadataChanged">
<arg type="s" name="path"/>
<arg type="s" name="filename"/>
- <arg type="s" name="key"/>
- <arg type="s" name="value"/>
+ <arg type="as" name="keys"/>
+ <arg type="as" name="values"/>
</signal>
- <signal name="FileThumbnailChanged">
+
+ <signal name="ThumbnailChanged">
<arg type="s" name="path"/>
<arg type="s" name="filename"/>
<arg type="s" name="smallthumbpath"/>
<arg type="s" name="largethumbpath"/>
</signal>
</interface>
+
+
+ <interface name="org.freedesktop.Tracker.PlayLists">
+
+ <method name="Create">
+ <arg type="s" name="list_name" direction="in" />
+ </method>
+
+ <method name="Delete">
+ <arg type="s" name="list_name" direction="in" />
+ </method>
+
+ <method name="Rename">
+ <arg type="s" name="old_list_name" direction="in" />
+ <arg type="s" name="new_list_name" direction="in" />
+ </method>
+
+ <method name="Get">
+ <arg type="as" name="list_names" direction="out" />
+ </method>
+
+ <method name="AddMediaFile">
+ <arg type="s" name="list_name" direction="in" />
+ <arg type="s" name="media_file_uri" direction="in" />
+ </method>
+
+ <method name="RemoveMediaFile">
+ <arg type="s" name="list_name" direction="in" />
+ <arg type="s" name="media_file_uri" direction="in" />
+ </method>
+
+ <method name="GetMediaFiles">
+ <arg type="s" name="list_name" direction="in" />
+ <arg type="as" name="media_file_uris" direction="out" />
+ </method>
+
+ <method name="GetMediaFilesWithMetadata">
+ <arg type="s" name="list_name" direction="in" />
+ <arg type="as" name="metadata_fields" direction="in" />
+ <arg type="a{sv}" name="results" direction="out" />
+ </method>
+
+
+ </interface>
+
+
</node>