summaryrefslogtreecommitdiffstats
path: root/libkcddb/test/utf8test.cpp
blob: 8c255962338c0abc0c08d735e22716c70de2bb47 (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 <tdeapplication.h>
#include <tdecmdlineargs.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;
}