From 43f695b7e4089a2b123f59f8b47d2f6e6eab408e Mon Sep 17 00:00:00 2001 From: glucaci Date: Fri, 2 Dec 2016 13:24:03 +0100 Subject: [PATCH] Commands for music database. --- LibMpc/Commands/Commands.Database.cs | 90 ++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 LibMpc/Commands/Commands.Database.cs diff --git a/LibMpc/Commands/Commands.Database.cs b/LibMpc/Commands/Commands.Database.cs new file mode 100644 index 0000000..8cbc68e --- /dev/null +++ b/LibMpc/Commands/Commands.Database.cs @@ -0,0 +1,90 @@ +using System; + +namespace LibMpc +{ + public partial class Commands + { + /// + /// https://www.musicpd.org/doc/protocol/database.html + /// + public class Database + { + // TODO: count + + public class Find : IMpcCommand + { + private readonly SearchTag _searchTag; + private readonly string _searchText; + + public Find(SearchTag searchTag, string searchText) + { + _searchTag = searchTag; + _searchText = searchText; + } + + public string Value => string.Join(" ", "find", _searchTag.Value, _searchText); + + public object ParseResponse(object response) + { + throw new NotImplementedException(); + } + } + + public class List : IMpcCommand + { + private readonly SearchTag _searchTag; + + public List(SearchTag searchTag) + { + _searchTag = searchTag; + } + + public string Value => string.Join(" ", "list", _searchTag); + + public object ParseResponse(object response) + { + throw new NotImplementedException(); + } + } + + // TODO: findadd + + public class ListAll : IMpcCommand + { + private readonly string _path; + + public ListAll(string path) + { + _path = path; + } + + public string Value => string.Join(" ", "listall", _path); + + public object ParseResponse(object response) + { + throw new NotImplementedException(); + } + } + + // TODO: listallinfo + // TODO: listfiles + // TODO: lsinfo + // TODO: readcomments + // TODO: search + // TODO: searchadd + // TODO: searchaddpl + + public class Update : IMpcCommand + { + public string Value => "update"; + + public object ParseResponse(object response) + { + throw new NotImplementedException(); + } + } + + // TODO: rescan + } + } +} \ No newline at end of file