blob: 6d7b4f2b0d93a0e2788be6a46ca9e09337037d50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kdebug.h>
#include "libkcddb/client.h"
#include "libkcddb/cache.h"
#include "libkcddb/lookup.h"
int
main(int argc, char ** argv)
{
TDECmdLineArgs::init(argc, argv, "libkcddb_test", "", "", "");
TDEApplication app;
using namespace KCDDB;
Client c;
TrackOffsetList list;
list
<< 150
<< 61408
<< 0
<< 177675;
kdDebug() << "Stuff to send to server:" << endl;
kdDebug()
<< CDDB::trackOffsetListToId(list)
<< " "
//<< trackOffsetListToString(list)
<< endl;
CDDB::Result r = c.lookup(list);
kdDebug() << "Client::lookup gave : " << CDDB::resultToString(r) << endl;
CDInfoList response = c.lookupResponse();
kdDebug() << "Client::lookup returned : " << response.count() << " entries"
<< endl;
CDInfo i( c.bestLookupResponse() );
kdDebug() << "Best CDInfo had title: " << i.title << endl;
return 0;
}
|