[Netlinx-modules-commit] NetLinx-Modules/SlimServer README.1.1.txt,NONE,1.1 CHANGES.txt,1.1,1.2 Slim
Brought to you by:
coffler
|
From: Jeff C. <co...@us...> - 2005-09-21 14:27:29
|
Update of /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1434 Modified Files: CHANGES.txt SlimServerMod.axi SlimServerMod.axs SlimServerMod.odt Added Files: README.1.1.txt Log Message: Checked in files as required for SlimServer v1.1, BETA1 Index: CHANGES.txt =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer/CHANGES.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CHANGES.txt 28 Jul 2005 21:54:20 -0000 1.1 --- CHANGES.txt 21 Sep 2005 14:27:17 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- + 2005-09-20: Updated module to work properly with playlists in SlimServer v6.2 or later. Added new API to queue items directly (as needed for DMS panels or other needs). + 2005-05-16: Updated VPN-CP panel layout for "feedback" state (and colors) on primary screen and selection screen. There was no visual feedback on which button was touched. *************** *** 29,31 **** 2005-04-05: Bug fix: Setting detailed debugging didn't refresh screen ! 2005-04-02: Released v1.0 RC1 for testing \ No newline at end of file --- 31,33 ---- 2005-04-05: Bug fix: Setting detailed debugging didn't refresh screen ! 2005-04-02: Released v1.0 RC1 for testing Index: SlimServerMod.axi =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer/SlimServerMod.axi,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SlimServerMod.axi 28 Jul 2005 21:54:21 -0000 1.2 --- SlimServerMod.axi 21 Sep 2005 14:27:17 -0000 1.3 *************** *** 4,8 **** (* FILE CREATED ON: 10/03/2004 AT: 09:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 04/24/2005 AT: 16:46:46 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) --- 4,8 ---- (* FILE CREATED ON: 10/03/2004 AT: 09:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 09/20/2005 AT: 16:04:21 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) *************** *** 107,110 **** --- 107,111 ---- char SS_opSetDebugDetail = 103; // Set debugging detail char SS_opDoExtCommand = 104; // Perform extended command (Sleep, Volume, etc) + char SS_opQueueItem = 105; // Queue item to play on a Squeezebox char SS_opUICommand = 150; // Module cmd: UI (User Interface) operation *************** *** 266,269 **** --- 267,271 ---- long idArtist; long idAlbum; + long idPlaylist; // Filtering criteria (via QueueFile API - if written) *************** *** 329,336 **** long idAlbum; long idGenre; // Perform "search" (limit list of items returned to those containing search string) - char sListDir[SS_LEN_URL]; // Directory/URL for playlist char sSearch[SS_LEN_Item]; // Search restriction text --- 331,338 ---- long idAlbum; long idGenre; + long idPlaylist; // Perform "search" (limit list of items returned to those containing search string) char sSearch[SS_LEN_Item]; // Search restriction text *************** *** 689,692 **** --- 691,719 ---- + // Other (useful?) API functions + + define_function SS_QueueItem (dev vd, char unitNum, _sSS_QueueFile queueData) + // SS_QueueItem: Request SlimServer to queue an item for playing + // vd: Virtual device for transmits to SlimServer module + // unitNum: Unit number that we'd like to queue for + // queueData: Structure indicating what item we're going to queue + { + char sBuffer[SS_MAX_vdBuf]; + long lPos; + sinteger siStatus; + + // Marshall the data and transmit to the virtual device + + sBuffer = "SS_opQueueItem,unitNum"; // Store start of packet + lPos = 3; + siStatus = Variable_To_String(queueData, sBuffer, lPos); + + if (siStatus == 0) // Success + Send_Command vd, "sBuffer"; + else // Failure + Diag(llSlimServer, Error, 'SlimServer', "'Failure encoding SS_DoExtOpcode data, Error=',itoa(siStatus)"); + } + + (***********************************************************) (* STARTUP CODE GOES BELOW *) Index: SlimServerMod.axs =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer/SlimServerMod.axs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SlimServerMod.axs 28 Jul 2005 21:54:21 -0000 1.1 --- SlimServerMod.axs 21 Sep 2005 14:27:17 -0000 1.2 *************** *** 12,16 **** (* FILE CREATED ON: 10/03/2004 AT: 09:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 04/24/2005 AT: 16:52:56 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) --- 12,16 ---- (* FILE CREATED ON: 10/03/2004 AT: 09:00:00 *) (***********************************************************) ! (* FILE_LAST_MODIFIED_ON: 09/20/2005 AT: 20:25:49 *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) *************** *** 168,177 **** // sUI_ItemList: Storage for browse item lists (text/human description of item) // lUI_IDList: Internal database ID for the item - // sUI_URLList: Storage for browse URL lists (when ID can't be used) // InfoSearch: Search "blocks" (to search for items at each UI level) volatile _sSS_BrowseState BrowseState[SS_MAX_BrowseSessions]; volatile char sUI_ItemList[SS_MAX_BrowseSessions][MAX_UI_Level][SS_MAX_BrowseItemCount][SS_LEN_Item]; volatile long lUI_IDList[SS_MAX_BrowseSessions][MAX_UI_Level][SS_MAX_BrowseItemCount]; - volatile char sUI_URLList[SS_MAX_BrowseSessions][MAX_UI_Level][SS_MAX_BrowseItemCount][SS_LEN_URL]; volatile _sSS_GetBrowseInfo InfoSearch[SS_MAX_BrowseSessions][MAX_UI_Level]; --- 168,175 ---- *************** *** 313,317 **** dev G4Panels[SS_MAX_PanelsInSystem]; char fGoodPlayer, panelCount, loop; ! char sCoverArtPath[SS_LEN_URL]; // No G4 optimization? We're done! --- 311,315 ---- dev G4Panels[SS_MAX_PanelsInSystem]; char fGoodPlayer, panelCount, loop; ! char sCoverArtPath[80]; // No G4 optimization? We're done! *************** *** 860,864 **** [BrowseState[sessionNum].panel,134] = ((InfoSearch[sessionNum][lvl].startItem + BrowseState[sessionNum].numLines) < InfoSearch[sessionNum][lvl].maxItems); // Allowed to search at this time? ! [BrowseState[sessionNum].panel,SS_Channel_Search] = (lvl != 1 && InfoSearch[sessionNum][lvl].type <> SS_infoList && InfoSearch[sessionNum][lvl].type <> SS_infoTitleFromList); // Update the scroll bar to show how much data exists --- 858,862 ---- [BrowseState[sessionNum].panel,134] = ((InfoSearch[sessionNum][lvl].startItem + BrowseState[sessionNum].numLines) < InfoSearch[sessionNum][lvl].maxItems); // Allowed to search at this time? ! [BrowseState[sessionNum].panel,SS_Channel_Search] = (lvl != 1 && InfoSearch[sessionNum][lvl].type <> SS_infoTitleFromList); // Update the scroll bar to show how much data exists *************** *** 1145,1149 **** case SS_infoList: { infoData.type = SS_infoTitleFromList; ! infoData.sListDir = sUI_URLList[sessionNum][lvl][item]; } default: { --- 1143,1147 ---- case SS_infoList: { infoData.type = SS_infoTitleFromList; ! infoData.idPlaylist = lUI_IDList[sessionNum][lvl][item]; } default: { *************** *** 1169,1173 **** for (loop = 1; loop <= BrowseState[sessionNum].numLines; loop++) { clear_buffer sUI_ItemList[sessionNum][lvl][loop]; - clear_buffer sUI_URLList[sessionNum][lvl][loop]; lUI_IDList[sessionNum][lvl][loop] = 0; } --- 1167,1170 ---- *************** *** 1238,1242 **** case SS_infoTitleFromList: { qdata.itemID = lUI_IDList[sessionNum][lvl][item]; - // qdata.item = sUI_URLList[sessionNum][lvl][item]; } case SS_infoArtist: { --- 1235,1238 ---- *************** *** 1256,1260 **** } case SS_infoList: ! qdata.item = sUI_URLList[sessionNum][lvl][item]; } --- 1252,1256 ---- } case SS_infoList: ! qdata.idPlaylist = lUI_IDList[sessionNum][lvl][item]; } *************** *** 1386,1390 **** } ! if (lvl == 1 || InfoSearch[sessionNum][lvl].type == SS_infoList || InfoSearch[sessionNum][lvl].type == SS_infoTitleFromList) { UI_sendError(sessionNum, SS_UI_errSearchInvalid); return; --- 1382,1386 ---- } ! if (lvl == 1 || InfoSearch[sessionNum][lvl].type == SS_infoTitleFromList) { UI_sendError(sessionNum, SS_UI_errSearchInvalid); return; *************** *** 1543,1546 **** --- 1539,1557 ---- PanelForceUpdate(str); } + case SS_opQueueItem: { + _sSS_QueueFile queueData; + long lPos; + sinteger siStatus; + + lPos = 3; + siStatus = String_To_Variable(queueData, str, lPos); + + if (siStatus == 0) { + Diag(llSlimServer, Debug, sTagSlimServer, "'ProcessCommand: Received SS_opQueueItem; unitNum=',itoa(str[2])"); + QueueFile(str[2], queueData); + } + else + Diag(llSlimServer, Warning, sTagSlimServer, "'Failure decoding SS_opQueueItem data, Error=',itoa(siStatus)"); + } case SS_opUICommand: { _sSS_UI_DoCommand uiBuffer; *************** *** 1601,1608 **** case SS_infoAlbum: sBuffer = 'albums'; case SS_infoGenre: sBuffer = 'genres'; ! case SS_infoList: ! case SS_infoTitleFromList: { ! sBuffer = 'playlists'; ! } } --- 1612,1617 ---- case SS_infoAlbum: sBuffer = 'albums'; case SS_infoGenre: sBuffer = 'genres'; ! case SS_infoList: sBuffer = 'playlists'; ! case SS_infoTitleFromList: sBuffer = 'playlisttracks'; } *************** *** 1612,1619 **** switch (infoData.type) { ! case SS_infoList: sBuffer = "sBuffer,' tags: '"; ! case SS_infoTitleFromList: ! sBuffer = "sBuffer,' tags: dir:',EncodeURL(infoData.sListDir)"; default: { if (infoData.type == SS_infoTitle) { --- 1621,1636 ---- switch (infoData.type) { ! case SS_infoList: { sBuffer = "sBuffer,' tags: '"; ! ! if (Length_Array(infoData.sSearch)) ! sBuffer = "sBuffer,' search:',EncodeURL(infoData.sSearch)"; ! } ! case SS_infoTitleFromList: { ! sBuffer = "sBuffer,' tags: '"; ! ! if (infoData.idPlaylist <> 0) ! sBuffer = "sBuffer,' playlist_id:',itoa(infoData.idPlaylist)"; ! } default: { if (infoData.type == SS_infoTitle) { *************** *** 1659,1673 **** if (length_array(qdata.sfGenre)) ! strCommand = "strCommand,'genre:',EncodeURL(qdata.sfGenre),' '"; else strCommand = "strCommand,'* '"; if (length_array(qdata.sfArtist)) ! strCommand = "strCommand,'artist:',EncodeURL(qdata.sfArtist),' '"; else strCommand = "strCommand,'* '"; if (length_array(qdata.sfAlbum)) ! strCommand = "strCommand,'album:',EncodeURL(qdata.sfAlbum)"; else strCommand = "strCommand,'*'"; --- 1676,1690 ---- if (length_array(qdata.sfGenre)) ! strCommand = "strCommand,EncodeURL(qdata.sfGenre),' '"; else strCommand = "strCommand,'* '"; if (length_array(qdata.sfArtist)) ! strCommand = "strCommand,EncodeURL(qdata.sfArtist),' '"; else strCommand = "strCommand,'* '"; if (length_array(qdata.sfAlbum)) ! strCommand = "strCommand,EncodeURL(qdata.sfAlbum)"; else strCommand = "strCommand,'*'"; *************** *** 1686,1691 **** } } ! case SS_infoList: ! strCommand = "playerID,'playlist add ',EncodeURL(qdata.item)"; case SS_infoTitle: --- 1703,1714 ---- } } ! case SS_infoList: { ! if (qdata.idPlaylist) ! strCommand = "playerID,'playlistcontrol cmd:add playlist_id:',itoa(qdata.idPlaylist)"; ! else if (length_array(qdata.item)) ! strCommand = "playerID,'playlist add ',EncodeURL(qdata.item)"; ! else ! return; // Hmm; no ID, no URL - we can't handle this request ! } case SS_infoTitle: *************** *** 1808,1811 **** --- 1831,1836 ---- active (cmdParams[1] = 'playlists'): ParseBrowseListResponse(str, cmdParams[4]); + active (cmdParams[1] = 'playlisttracks'): + ParseBrowseTitleResponse(str, cmdParams[4]); // Intelligently handle volume changes due to simple volume adjustments *************** *** 2233,2245 **** lUI_IDList[sessionNum][lvl][cIndex] = atoi(strSeg); } ! active (sTag = 'title'): ! if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) ! sUI_ItemList[sessionNum][lvl][cIndex] = strSeg; active (sTag = 'tracknum'): if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) lTrack[cIndex] = atoi(strSeg); - // active (sTag = 'url'): - // if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) - // sUI_URLList[sessionNum][lvl][cIndex] = strSeg; active (sTag = 'context'): { sessionNum = atoi(strSeg); --- 2258,2272 ---- lUI_IDList[sessionNum][lvl][cIndex] = atoi(strSeg); } ! active (sTag = 'title'): { ! if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) { ! if (InfoSearch[sessionNum][lvl].type == SS_infoTitleFromList) ! sUI_ItemList[sessionNum][lvl][cIndex] = "itoa(InfoSearch[sessionNum][lvl].startItem+cIndex),'. ',strSeg"; ! else ! sUI_ItemList[sessionNum][lvl][cIndex] = strSeg; ! } ! } active (sTag = 'tracknum'): if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) lTrack[cIndex] = atoi(strSeg); active (sTag = 'context'): { sessionNum = atoi(strSeg); *************** *** 2277,2281 **** for (cIndex++; cIndex <= BrowseState[sessionNum].numLines; cIndex++) { clear_buffer sUI_ItemList[sessionNum][lvl][cIndex]; - // clear_buffer sUI_URLList[sessionNum][lvl][cIndex]; } --- 2304,2307 ---- *************** *** 2294,2302 **** char lvl; // Browsing "level" for this session char loop; // Loop control variable - long indexNum[SS_MAX_BrowseItemCount]; // Index numbers returned in playlist cIndex = 0; // Initialize in case of no title entries - for (loop = 1; loop < SS_MAX_BrowseItemCount; loop++) - indexNum[loop] = 0; // Skip the status portion that we don't care about ('playlists x y ') --- 2320,2325 ---- *************** *** 2326,2358 **** select { - active (sTag = 'index'): { - cIndex++; - if (cIndex < SS_MAX_BrowseItemCount) - indexNum[cIndex] = atoi(strSeg) + 1; - } - // Returned if item is a playlist path - active (sTag = 'item'): { - if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) - sUI_ItemList[sessionNum][lvl][cIndex] = strSeg; - - // Directory or nexted playlist; verify correct settings - InfoSearch[sessionNum][lvl].type = SS_infoList; - } - active (sTag = 'dir'): - if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) - sUI_URLList[sessionNum][lvl][cIndex] = strSeg; - - // Returned if item is a song active (stag = 'id'): { if (cIndex <= BrowseState[sessionNum].numLines) lUI_IDList[sessionNum][lvl][cIndex] = atoi(strSeg); } ! active (sTag = 'title'): { if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) sUI_ItemList[sessionNum][lvl][cIndex] = strSeg; } - // active (sTag = 'url'): - // if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) - // sUI_URLList[sessionNum][lvl][cIndex] = strSeg; active (sTag = 'context'): { sessionNum = atoi(strSeg); --- 2349,2361 ---- select { active (stag = 'id'): { + cIndex++; if (cIndex <= BrowseState[sessionNum].numLines) lUI_IDList[sessionNum][lvl][cIndex] = atoi(strSeg); } ! active (sTag = 'playlist'): { if (cIndex >= 1 && cIndex <= BrowseState[sessionNum].numLines) sUI_ItemList[sessionNum][lvl][cIndex] = strSeg; } active (sTag = 'context'): { sessionNum = atoi(strSeg); *************** *** 2368,2372 **** } active (TRUE) : ! // This command returns gobs of stuff; ignore what we don't care about cRecognized = '-'; } --- 2371,2375 ---- } active (TRUE) : ! // Ignore stuff that we don't care about cRecognized = '-'; } *************** *** 2378,2390 **** } - if (InfoSearch[sessionNum][BrowseState[sessionNum].lvl].type == SS_infoTitleFromList) { - for (loop = 1; loop <= cIndex; loop++) - if (indexNum[loop] <> 0) - sUI_ItemList[sessionNum][lvl][loop] = "itoa(indexNum[loop]),'. ',sUI_ItemList[sessionNum][lvl][loop]"; - } - for (cIndex++; cIndex <= BrowseState[sessionNum].numLines; cIndex++) { clear_buffer sUI_ItemList[sessionNum][lvl][cIndex]; - clear_buffer sUI_URLList[sessionNum][lvl][cIndex]; } --- 2381,2386 ---- --- NEW FILE: README.1.1.txt --- This file is intended to be viewed with "Notepad" in word-wrap mode (see "Format" menu). Released Version: V1.1, Beta1 Release Date: Sunday, 20-Sep-2005 ----- Setup information and notes for SlimServerMod Module: See SlimServer V1.0 for full details. Note: This package is a "partial" release. It is intended to be installed on top of a SlimServerMod V1.0 package. This package replaces SlimServerMod.axi and SlimServerMod.tko. As of the time of this release, the SlimServerMod module is compatible with the nightly build of SlimServer v6.2 (9/17./2005) or later. This module is not compatible with any previous version of the SlimServer software. In particular, this module is not compatible with SlimServer v6.0 or SlimServer v6.1. The following files are provided: CHANGES.txt: Change log file LICENSE.txt: Open source license; you are obligated to abide by this or not use the software README.1.1.txt: This file SlimServerMod.axi: SlimServer Include file and API definition file SlimServerMod.tko: SlimServer Module (compiled) SlimServerMod represents an open-source project. If you want source files, they are available via CVS from the SourceForge project 'NetLinx-Modules'. You are free to download the source code if you wish. If you make improvements to the code that you believe is generally useful, please submit your changes to netlinx-modules(at)taltos.com. That way, everyone can benefit from your changes. Thanks! The SlimServerMod code is regularly used by the author and several other sites. It is anticipated that it'll work with virtually any version of applicable AMX code. However, to be precise, SlimServerMod has been successfully tested with: SlimServer v6.2 (9/17/2005 nightly) and later NetLinx Master Cards: NXC-ME260, NXC-ME260/64 NetLinx Master (NXC) firmware v3.00.316 Modero MVP-8400 firmware 2.55.43 Index: SlimServerMod.odt =================================================================== RCS file: /cvsroot/netlinx-modules/NetLinx-Modules/SlimServer/SlimServerMod.odt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsyq3PmO and /tmp/cvsZRp2eK differ |