| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
#ifndef H_FREAC_CDDB_REMOTE |
| 14 |
#define H_FREAC_CDDB_REMOTE |
| 15 |
|
| 16 |
#include <cddb/cddb.h> |
| 17 |
#include <boca/common/protocol.h> |
| 18 |
|
| 19 |
using namespace smooth::IO; |
| 20 |
|
| 21 |
namespace freac |
| 22 |
{ |
| 23 |
class CDDBRemote : public CDDB |
| 24 |
{ |
| 25 |
private: |
| 26 |
Bool connected; |
| 27 |
|
| 28 |
Buffer<UnsignedByte> httpResultBuffer; |
| 29 |
|
| 30 |
Array<CDDBInfo> readEntries; |
| 31 |
|
| 32 |
Driver *socket; |
| 33 |
InStream *in; |
| 34 |
OutStream *out; |
| 35 |
|
| 36 |
String SendCommand(const String &); |
| 37 |
public: |
| 38 |
CDDBRemote(); |
| 39 |
virtual ~CDDBRemote(); |
| 40 |
|
| 41 |
Bool ConnectToServer(); |
| 42 |
Int Query(const String &); |
| 43 |
Bool Read(const String &, UnsignedInt32, CDDBInfo &); |
| 44 |
Bool Submit(const CDDBInfo &); |
| 45 |
Bool CloseConnection(); |
| 46 |
}; |
| 47 |
}; |
| 48 |
|
| 49 |
#endif |