ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/DecentralizedMedia/MediaFile.cpp
(Generate patch)

Comparing DecentralizedMedia/MediaFile.cpp (file contents):
Revision 487 by douglas, 2005-06-16T23:12:24-07:00 vs.
Revision 488 by douglas, 2005-06-17T00:21:30-07:00

# Line 8 | Line 8
8  
9   MediaFile::MediaFile(_H<dbi::Connection>& connection, const api::Path& path) : connection(connection), path(path)
10   {
11 <        // XXX: implement
11 >        _H<dbi::ResultSet> info(connection->Parse(_B("SELECT artist, title, album, genre FROM files WHERE path = ?"))->Execute(path.GetPath()));
12 >
13 >        if (info->MoveNext())
14 >        {
15 >                artist = info->GetString(_B("artist"));
16 >                title = info->GetString(_B("title"));
17 >                album = info->GetString(_B("album"));
18 >                genre = info->GetString(_B("genre"));
19 >        }
20 >        else
21 >                throw;
22   }
23  
24   MediaFile::MediaFile(_H<dbi::Connection>& connection, const api::Path& path, const ext::String& artist, const ext::String& title, const ext::String& album, const ext::String& genre) : connection(connection), path(path), artist(artist), title(title), album(album), genre(genre)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines