User Guide

Standard NetLinx API (SNAPI) R 1.8.0
74
Component Functions: (Cont.)
Name: Channel: Level: Command: Constant: Notes:
queryMediaDBProp-
erty(id,key)
?MEDIADBPROP-<id>,<key> Query for one Media Database Property where <id> is the record ID and <key> is the
property key to query, responds with MEDIADBPROP-<id>,<key>,<value> where <id>
is the record id of the record from which to retrieve the properties, <key> is the property
key and <value> is the property value.
searchDB(sr) MEDIADBSEARCH-<key>,<search
type>=<search
string>,RETURN=<return type>
Search the media database for records with <search type> equal to <search string>. If
<search string> is "*", all records are returned. <key> is a search key used in other
search operations, such as closeSearchDB(). It can be any string you like, such as a
panel device number or internal key that makes sense for your program. All future DB
operation associated with this search will reference this key value. <search type> can
be ALL, ID, ARTIST, GENRE, TITLE, KEYWORDS, PLAYLIST, BOOKMARK.
RETURN= is optional and limits the type of items returned in the result set where
<result type> can be ALL, PICTURE, APPLICATION, TRACK, CHAPTER, PLAYLIST,
BOOKMARK, DISC, AUDIO, VIDEO, GENRE, ARTIST, STATION.
setMediaDBProp-
erty(sID, sName,sValue)
MEDIADBPROP-
<id>,<key>,<value>
Set a Media Databse Property where <id> is the record id of the record for which to set
the properties, <key> is the property key and <value> is the property value.
updateRecord(rec) MEDIADBUPDATE-
<id>,<name>,<record type>[,<url>]
Update media record with record id of <id>, where <name> is the new name and
<record type> is the new record type, i.e. PICTURE, APPLICATION, TRACK, CHAP-
TER, PLAYLIST, BOOKMARK, DISC, AUDIO, VIDEO, GENRE, ARTIST, STATION
and <url> is the existing media URL to associate with the new/updated record
Listener
Name: Media DB Listener
Interface: IMediaDBComponentListener
IMediaDBComponentListener
Listener Functions:
Name: Channel: Level: Command: Constant: Notes:
processCloseEvent MEDIADBCLOSESEARCH-<key> The search associated with search key <key> have been closed. No more operations
can be performed against this search.
processDeleteRecordE-
vent
MEDIADBDELETE-<id>,<success> Media record with record id of <id> was deleted if <success> is 1, otherwise delete
failed.
processEndOfSetEvent MEDIADBEND-<key> End of search set was reached for search with search key <key>
processMediaDBProper-
tiesEvent
MEDIADBPROP-
<id>,<key>,<value>
Media Database property value where <id> is the record ID, <key> is the property key
and <value> is the property value. One command is returned for each key.
processQueryDBEvent MEDIADBRECORD-
<key>,<id>,<#>,<name>,<record
type>,<url>
Media record for search with search key <key>. <id> is the record ID, <#> is the record
position from 1 to the total number of records, <name> is the item name, <record type>
is the record type, which could be PICTURE, APPLICATION, TRACK, CHAPTER,
PLAYLIST, BOOKMARK, DISC, AUDIO, VIDEO, GENRE, ARTIST, STATION and
<url> is the URL of the media.
processSearchDBEvent MEDIADBSEARCHRESULT-
<key>,<count>
Media search results are available for search with search key <key>. <count> is the
total count of records. Use MEDIADBNEXT and MEDIADBPREV to get more records.
processStartOfSetEvent MEDIADBSTART-<key> Beginning of search set was reached for search with search key <key>
processUpdateRecordE-
vent
MEDIADBUPDATE-<id>,<success> Media record with record id of <id> was updated if <success> is 1, otherwise update
failed.