[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
Re: Audio Control schema changes
- Subject: Re: Audio Control schema changes
- From: Stuart Booth
- Date: Sat, 14 Feb 2004 22:57:00 +0000
On Sat, 14 Feb 2004 10:44:39 -0800, "Michael McSharry"
<<a
href="/group/xAP_developer/post?postID=_AZsaXFq-5o8qujguZb4JiQZ_va8DpDWlBCdpi-bT1fptWld6PDTpSOGpZM86xC7l0K1bml0ZvDxx9KVYB6jVZqydLI">mcs101main@w...</a>>
wrote:
>[Request]
>Class=xAP-Audio.Query
>Playlist.Query
>{
> Query=[Track List Title Artist Album Path Duration Index
Tracks Genre]
> Index="index in playlist"
>}
>[Response - where Query=Artist]
>Class=xAP-Audio.Playlist.Info
>Artist.Info
>{
> Artist="artist"
>}
That sounds like a good plan as.it combines both worlds. It seems even
more appropriate for targetted responses, as a device is asking for a
very specific bit of information in the latter examples.
I was just wondering about formatting the response block as follows:
[Response - where Query=Artist, Index=n]
Class=xAP-Audio.Playlist.Info
Track.Info
{
Artist="artist"
Index="index in playlist"
}
Ie a more finely grained Track.Info rather than a whole new block type
with its own block name.
Note that Index is always included to complete the integrity of the
response - the information contained within can be used by anyone
without reference to any previously sent message.
But I'm a tad troubled by the seeming overlap between "Track" and
"Playlist".
[Request]
Class=xAP-Audio.Query
Track.Query
{
Query=[Title Artist Album Path Duration Index Genre Time]
}
So how about Track.Query requests the track information block for the
*current* track as Edward clarified in a recent schema revision. This
saves a request/response cycle determining from the playlist what the
current track is each and every time. Plus it reuses blocks/responses
at the expense of making all their parameters optional.
Where Query is left out (and empty block? Or should we explicitly have
an "All" option?) all details are returned in a full Track.Info
block.
Time is an extra parameter in Track.Query blocks as shown above, not
present in the Playlist.Query, as it requests the current playing
track's progress, which won't necessary apply in a playlist context
where you access the nth track in the list. This should be optional
where it can be supported.
[Response - where Query = Artist]
Class=xAP-Audio.Playlist.Info
Track.Info
{
Artist="artist"
Index="index in playlist"
}
ie make all Track.Info parameters optional. Actually I think that the
fact it's the current track is lost in the response block. Only the
targetted response shows the context is the current track, assuming
the querying application remembers that fact!!
Maybe the response message Class should be xAP-Audio.Track.Info in
Track.Query cases as it would make the response message unambiguous.
Any thoughts?
-- PLAYLISTS --
[Request]
Class=xAP-Audio.Query
Playlist.Query
{
Query=[ Track List Title Artist Album Path Duration Index
Tracks Genre ]
Index="index in playlist"
}
[Response - where Query=Track, Index=n]
Class=xAP-Audio.Playlist.Info
Track.Info
{
Title="title"
Artist="artist"
Album="album"
Path="path to current track"
Duration="title duration"
Index="index in playlist"
Tracks="number of tracks in the current playlist"
Genre="genre"
}
[Response - where Query=List]
Class=xAP-Audio.Playlist.Info
Playlist.Info
{
Tracks="length of play list"
Index="index of current track"
Shuffle=[On Off]
Repeat=[Stop Track Playlist]
}
[Response - where Query=Artist, Index=n]
Class=xAP-Audio.Playlist.Info
Track.Info
{
Artist="artist"
Index="index in playlist"
}
Basically instead of the following template:
Block.Info
{
Query=[the query option]
Status=[the answer]
Index=n
}
we're using:
Track.Info
{
[the query option]=[the answer]
Index=n
}
Where the query option just happens to be an existing member of the
Track.Info name/value pairs. Bonus! So the Query option is implicit in
the parameters of the block (Artist=result) rather than being
completely explicit in a general message block (Query=Artist).
Is this a good or a bad thing?
S
--
Stuart Booth <<a
href="/group/xAP_developer/post?postID=m9b1SFxqtTz-1ASZTgJ2q0zS0WIWzJSHv43Po6gdNKXsUOtih7zvr8l3qSstz77bWEbG5m05n0XVmp4CPzCpnw">stuart@x...</a>>
xAPFramework.net - a xAP software development framework for .net
<a href="http://www.xapautomation.org/">http://www.xapautomation.org/</a>
<a href="http://www.xapframework.net/">http://www.xapframework.net/</a>
xAP_Development Main Index |
xAP_Development Thread Index |
xAP_Development Home |
Archives Home
|