nf2 wrote:
Perhaps this would be an interesting feature for "DVFS-light", because its "ls" function returns the file-info as key/value map. Therefore returning file-metadata would be quite easy (if requested in the {OPTS} of "ls").

Sure. There are a lot of apps that would beneift from having the metadata easily accessible.

I should perhaps define a generic method for this so any metadata item can be retrieved for a file or all files in a folder.

IE

GetMetaDataForFile
  input DBUS_TYPE_STRING s (the file uri)
  input DBUS_TYPE_STRING s (the metadata type name)
  output DBUS_TYPE_STRING s (the metadata value)

SetMetaDataForFile
  input DBUS_TYPE_STRING s (the file uri)
  input DBUS_TYPE_STRING s (the metadata type name)
  input DBUS_TYPE_STRING s (the metadata value)

GetAllMetaDataForFile
  input DBUS_TYPE_STRING s (the file uri)
  output DBUS_TYPE_DICT  a{ss} (the metadata as key,value pairs)

GetMetaDataForFilesInFolder
  input DBUS_TYPE_STRING s (the folder uri)
  input DBUS_TYPE_STRING s (the metadata type name)
  output DBUS_TYPE_DICT  a{ss} (the metadata as filename, metadata)


I should also define a set of common metadata type names like:

Artist
Author
Album
Bitrate
Samplerate
Genre
Encoding
Title
Subject
Comments
Emblems
KeyWords
MimeType
ThumbnailPath
WordCount

You might also want to have a search method for VFS or apps so

SearchMetaData
  input DBUS_TYPE_STRING s (the search string)
  output DBUS_TYPE_ARRAY as (array of matching file uris)

The search string here should be freetext as in google/beagle but also could include some of the metadata type names (enclosed in square brackets). EG "[Author]=Jamie" would return all files with Jamie as author while just "jamie" would return anything that contained the word jamie anywhere (whether its in the metadata or in the indexed contents of a file).

Im not sure if we need notification of metadata changes for VFS/Filemanagers though that could easily be added too.

--
Mr Jamie McCracken
http://www.advogato.org/person/jamiemcc/
_______________________________________________
xdg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xdg

Reply via email to