Changeset 99

Show
Ignore:
Timestamp:
02/28/07 16:18:26 (1 year ago)
Author:
bfitzpa2
Message:

Added a getTrackInfo method to the bridge to get all information about a track. Fixed the getSongStream method to give a stream instead of a null. Misc fixes to the XmlRpcBridgeServer?.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dmp/trunk/Bridge/Bridge.cs

    r97 r99  
    136136        public Stream getSongStream(int id) 
    137137        { 
    138             int libraryId = this.db.getRemoteLibraryId(id); 
    139             int remoteSongId = this.db.getRemoteSongId(id); 
     138            //int libraryId = this.db.getRemoteLibraryId(id); 
     139            //int remoteSongId = this.db.getRemoteSongId(id); 
    140140            long songSize = this.db.getRemoteSongSize(id); 
    141141 
    142142            //Track song = clientList[libraryId].Database.LookupTrackById(remoteSongId); 
    143             //return clientList[libraryId].Database.StreamTrack(song, out songSize); 
    144             return null; 
     143                        Track song = db.getRemoteTrack(id); 
     144            return clientList[libraryId].Database.StreamTrack(song, out songSize); 
     145            //return null; 
    145146        } 
     147 
     148                /// <summary> 
     149                /// Gets the track information for the specified track id. 
     150                /// </summary> 
     151                /// <param name="id">The id of the requested song.</param> 
     152                /// <returns>the Track object containing the track information</returns> 
     153                public Track getTrackInfo(int id) 
     154                { 
     155                        return db.getRemoteTrack(id); 
     156                } 
    146157 
    147158        public String getSongURL(int id) 
  • dmp/trunk/XmLRpcBridgeServer/BridgeXmlRpcServer.cs

    r86 r99  
    77using Nwc.XmlRpc; 
    88using DMP; 
     9using DAAP; 
    910 
    1011namespace XMLRPCServerTest 
     
    1920                { 
    2021                        bridge = new Bridge(); 
    21                         bridge.AddServerConnection("localhost", 3689); 
     22                        WriteEntry(bridge.AddServerConnection("localhost", 3689).ToString(),EventLogEntryType.Warning); 
    2223                        int breakPt = 0; 
    2324                } 
     
    6465                public byte[] getSong(int songID) 
    6566                { 
     67                        Console.WriteLine("getSong " + songID + " in BridgeXmlRpcServer"); 
    6668                        Stream musicStream = bridge.getSongStream(songID); 
    67                         byte[] musicBytes = new byte[musicStream.Length]; 
    68                         musicStream.Read(musicBytes, 0, Convert.ToInt32(musicStream.Length)); 
     69                        Track song = bridge.getTrackInfo(songID); 
     70                        byte[] musicBytes = new byte[song.Size]; 
     71                        musicStream.Read(musicBytes, 0, song.Size); 
    6972                        return musicBytes; 
    7073                } 
  • dmp/trunk/XmLRpcBridgeServer/XMLRPCBridgeServer.csproj

    r87 r99  
    7171      <Name>Bridge</Name> 
    7272    </ProjectReference> 
     73    <ProjectReference Include="..\daap-sharp\daap-sharp.csproj"> 
     74      <Project>{C7D0CE28-60E1-4FC8-B9E0-DBB9F683E95E}</Project> 
     75      <Name>daap-sharp</Name> 
     76    </ProjectReference> 
     77    <ProjectReference Include="..\DataObjects\DataObjects.csproj"> 
     78      <Project>{D3451818-BACA-4462-BC01-3E98F10BDF1A}</Project> 
     79      <Name>DataObjects</Name> 
     80    </ProjectReference> 
    7381    <ProjectReference Include="..\XmlRpcUnaltered\XmlRpcUnaltered.csproj"> 
    7482      <Project>{115E72B8-DDB0-4730-B25B-8C962ADF8D91}</Project> 
  • dmp/trunk/gwt-windows-1.3.3/.classpath

    r85 r99  
    99        <classpathentry kind="lib" path="C:/Documents and Settings/Beverly Fitzpatrick/My Documents/Visual Studio 2005/Projects/DMP/gwt-windows-1.3.3/xmlrpc-3.0/lib/xmlrpc-client-3.0.jar" sourcepath="C:/Documents and Settings/Beverly Fitzpatrick/My Documents/Visual Studio 2005/Projects/DMP/gwt-windows-1.3.3/xmlrpc-3.0/lib/xmlrpc-client-3.0-sources.jar"/> 
    1010        <classpathentry kind="lib" path="C:/Documents and Settings/Beverly Fitzpatrick/My Documents/Visual Studio 2005/Projects/DMP/gwt-windows-1.3.3/xmlrpc-3.0/lib/xmlrpc-common-3.0.jar" sourcepath="C:/Documents and Settings/Beverly Fitzpatrick/My Documents/Visual Studio 2005/Projects/DMP/gwt-windows-1.3.3/xmlrpc-3.0/lib/xmlrpc-common-3.0-sources.jar"/> 
    11         <classpathentry kind="lib" path="translate-as1-2.0.5/translate.jar" sourcepath="C:/Documents and Settings/Beverly Fitzpatrick/My Documents/Visual Studio 2005/Projects/DMP/gwt-windows-1.3.3/translate-as1-2.0.5/src"> 
    12                 <attributes> 
    13                         <attribute name="javadoc_location" value="file:/C:/Documents and Settings/Beverly Fitzpatrick/My Documents/Visual Studio 2005/Projects/DMP/gwt-windows-1.3.3/translate-as1-2.0.5/doc/datasheets/"/> 
    14                 </attributes> 
    15         </classpathentry> 
    1611        <classpathentry kind="lib" path="transform-2.1.5/transform.jar" sourcepath="transform-2.1.5/src"> 
    1712                <attributes> 
  • dmp/trunk/gwt-windows-1.3.3/src/DMP/client/DMPWebsite.java

    r78 r99  
    8484                topPanel.add(logo); 
    8585                topPanel.add(flashPanel); 
     86                Button refreshButton = new Button("Refresh"); 
     87                refreshButton.addClickListener(new ClickListener(){ 
     88                        public void onClick(Widget w) 
     89                        { 
     90                                getSongsFromCollection(); 
     91                        } 
     92                }); 
     93                topPanel.add(refreshButton); 
    8694                mainPanel.add(topPanel, DockPanel.NORTH); 
    8795