Re: [Tracker] Status update?



Mikkel Kamstrup Erlandsen wrote:
What is the status of the next Tracker release? I can't wait to pump more features into Barracuda :-D


great!

dont panic! - Im still on course to deliver something soonish.

I am actually doing stuff that you need. I am reimplementing rdf query so you can optionally combine a full text search with a rdf query (which you will need in order to do more sophisticated searches in barracuda)

While Im at it, I decided to make rdf query more efficient and add more extensions and features and its that which has slowed me down a bit as its a bit tricky (but im winning!)

(see attached for new interfaces)

The current status is:

Main Tracker Interface : 100% done
Metadata Interface : 100% done
Keywords Interface : 100% done
Search Interface : 75% done
File Interface : 75% done
Playlist Interface : 0% done
Music Interface : 0% done

Hope to have it all done this weekend. Once the new rdf query stuff is finished the rest is all down hill and easy stuff.

All of it will need testing so hopefully you can help out with that in the next few days...

--
Mr Jamie McCracken
http://jamiemcc.livejournal.com/
<?xml version="1.0" encoding="UTF-8"?>

                <!-- 

                "service" input parameters are a string representing the service type.

                A list of service types can be obtained by calling method GetServices and will *potentially* 
include the following :

                "Files" 
                "Folders" *
                "Documents" *
                "Images" *
                "Music" *
                "Videos" *
                "Text Files" *
                "Development Files" *
                "Other Files" *
                "VFS Files"
                "VFS Folders" **
                "VFS Documents" **
                "VFS Images" **
                "VFS Music" **
                "VFS Videos" **
                "VFS Text Files" **
                "VFS Development Files" **
                "VFS Other Files" **
                "Conversations"
                "Playlists"
                "Applications"  
                "Contacts"
                "Emails"        
                "EmailAttachments"
                "Notes"
                "Appointments"
                "Tasks"
                "Bookmarks"
                "History"
                "Projects"
                        
                
                (*) - these services are a subset of "Files" service.
                (**) - these services are a subset of "VFSFiles" service.

                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 a unique name or URI for the specified service.

                The "id" field uniquely identifies an entity in Tracker regardless of its service type

                 -->



<node name="/org/freedesktop/tracker">

        <interface name="org.freedesktop.Tracker">
                <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="tracker_client"/>

                <!-- Returns the version number of tracker as an integer as XXXXXX where each XX pair 
represents part of the version
                     (EG "100" is returned for version 0.1.0 and "14523" would represent version 1.45.23) -->
                <method name="GetVersion">
                        <arg type="i" name="version" direction="out" />
                </method>


                <!-- Gets all implemented services and also returns any corresponding metadata type class for 
the service (IE "File", "Doc", "Image" etc)
                     If main_services_only is set to true then only the major services are returned
                     Output is in dict format: (service -> metadata class, description)  -->                  
  
                <method name="GetServices">
                        <arg type="b" name="main_services_only" direction="in" />
                        <arg type="a{sv}" name="result" direction="out" />
                </method>


                <!-- Get statistics for services that have been indexed. Output is in dict format: (service 
-> no of entities, percentage)  -->
                <method name="GetStats">
                        <arg type="a{sv}" name="service_stats" direction="out" />
                </method>


        </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="as" name="values" direction="out" />
                </method>

                <!-- 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="as" name="keys" direction="in" />
                        <arg type="as" name="values" direction="in" />
                </method>
                
                <!--
                        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 )
                        "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="RegisterType">
                        <arg type="s" name="name" direction="in" />
                        <arg type="s" name="datatype" direction="in" />
                </method>


                <!-- Gets all details of a named metadata type -->              
                <method name="GetTypeDetails">
                        <arg type="s" name="name" direction="in" />
                        <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>

                <!-- 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>


                

        </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>

                <!-- 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>

                <!-- 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>

                <!-- removes all keywords/tags for specified service and id -->
                <method name="RemoveAll">
                        <arg type="s" name="service" direction="in" />
                        <arg type="s" name="id" 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="as" name="keywords" direction="in" />
                        <arg type="i" name="max_hits" direction="in" />
                        <arg type="as" name="result" direction="out" />
                </method>

                <!-- emitted whenever tags on an entity change -->
                <signal name="Changed">
                        <arg type="s" name="service"/>
                        <arg type="s" name="id"/>
                </signal>




        </interface>


        <interface name="org.freedesktop.Tracker.Search">
                <!-- generic search interface (see other interfaces for file/keyword specific searches)-->


                <!-- searches specified service for entities that match the specified search_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="search_text" 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>


                <!-- searches all file based entities that match the specified search_text. 
                     Returns dict/hashtable with the uri as key and the file service category as the variant 
part for all hits. Results are sorted and grouped by file services categories (Music, Videos, Documents etc) 
-->
                <method name="FilesByText">
                        <arg type="s" name="search_text" direction="in" />
                        <arg type="i" name="max_hits" direction="in" />
                        <arg type="a{sv}" name="result" direction="out" />
                </method>


                <!-- searches specified service for matching entities.
                     The service parameter specifies the service which the query will be performed on
                     The fields parameter specifies an array of aditional metadata fields to return in 
addition to the id field (which is returned as the "key" in the resultant dict/hashtable) and the service 
category. This can be null                     
                     The search_text paramter specifies the text to search for in a full text search of all 
fields - this parameter can be null if the query_condition is not null (in which case only the query 
condition is used to find matches)
                     The query_condition parameter specifies an xml-based rdf query condition which is used 
to filter out the results - this parameter can be null if the search_text is not null (in which case only the 
search_text parameter is used to find matches)
                     The max_hits parameter limits the size of the result set.
                     The sort_by_service parameter optionally sorts results by their service category (if 
FALSE no service sorting is done)
                     The result is a hashtable/dict with the id of the matching entity as the key fields.
                     The variant part of the result is the service category followed by list of supplied 
fields as specified in the fields parameter
                -->
                <method name="Query">
                        <arg type="s" name="service" direction="in" />
                        <arg type="as" name="fields" direction="in" />
                        <arg type="s" name="search_text" direction="in" />
                        <arg type="s" name="query_condition" direction="in" />
                        <arg type="b" name="sort_by_service" direction="in" />
                        <arg type="i" name="max_hits" direction="in" />
                        <arg type="a{sv}" name="result" direction="out" />
                </method>


        </interface>



<!--
                File Specific calls
-->
        <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" />
                </method>

                <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 a chunk of text that contains the search text in the files text contents -->
                <method name="SearchFileContents">
                        <arg type="s" name="uri" direction="in" />
                        <arg type="s" name="text"  direction="in" />
                        <arg type="s" name="result" direction="out" />
                </method>


                <!--
                Retrieves all files that match a service description
                -->
                <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>

                <!-- 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 fields. 
Hashtable/dict output is uri as key and field metadata as the variant -->
                <method name="GetMetadataForFilesInFolder">
                        <arg type="s" name="uri" direction="in" />
                        <arg type="as" name="fields" direction="in" />
                        <arg type="a{sv}" name="values" direction="out" />
                </method>

                
                <!-- deprecated file specific calls (mostly used by Nautilus Search)-->
                <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="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="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>
                <!-- end deprecated calls section-->


                <!-- File signals -->

                <signal name="Created">
                        <arg type="s" name="path"/>
                        <arg type="s" name="filename"/>
                        <arg type="s" name="mime_type"/>
                </signal>

                <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="BasicMetadataChanged">
                        <arg type="s" name="path"/>
                        <arg type="s" name="filename"/>
                        <arg type="as" name="keys"/>
                        <arg type="as" name="values"/>
                </signal>

                <signal name="EmbeddedMetadataChanged">
                        <arg type="s" name="path"/>
                        <arg type="s" name="filename"/>
                        <arg type="as" name="keys"/>
                        <arg type="as" name="values"/>
                </signal>


                <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>       


                <!-- Returns unique list of all *audio only* media tracks in a Playlist
                     Output format is array of track uri's followed by the following metadata:
                        
                        Audio.Title
                        Audio.Artist
                        Audio.Album
                        Audio.Duration
                        Audio.PlayCount
                        
                -->
                <method name="GetMediaFilesDetailed">
                        <arg type="s" name="list_name" direction="in" />
                        <arg type="a{sv}" name="results" direction="out" />
                </method>       
        

        </interface>


</node>


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