Debian Codegraph @

include/cddb/cddbbatch.h

raw symbols SCIP
1 /* fre:ac - free audio converter
2 * Copyright (C) 2001-2020 Robert Kausch <[email protected]>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation, either version 2 of
7 * the License, or (at your option) any later version.
8 *
9 * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
10 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
11 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */
12
13 #ifndef H_FREAC_CDDB_BATCH
14 #define H_FREAC_CDDB_BATCH
15
16 #include <cddb/cddb.h>
17
18 namespace freac
19 {
20 class CDDBBatch : public CDDB
21 {
22 private:
23 Array<String> queries;
24 Array<CDDBInfo> submits;
25
26 Array<String> queryErrors;
27
28 Bool ReadEntries();
29 Bool ReadEntriesXML(XML::Document *);
30
31 Bool SaveEntries();
32
33 Bool ConnectToServer() { return True; }
34 Int Query(const String &) { return QUERY_RESULT_NONE; }
35 Bool Read(const String &, UnsignedInt32, CDDBInfo &) { return False; }
36 Bool CloseConnection() { return True; }
37 public:
38 CDDBBatch();
39 virtual ~CDDBBatch();
40
41 const Array<String> &GetQueries() const { return queries; }
42 const Array<CDDBInfo> &GetSubmits() const { return submits; }
43
44 Bool AddQuery(const String &);
45 Bool DeleteQuery(Int);
46
47 Bool AddSubmit(const CDDBInfo &);
48 Bool DeleteSubmit(const CDDBInfo &);
49
50 Int Query(Int);
51 Bool QueryAll();
52
53 Bool Submit(const CDDBInfo &);
54 Bool SubmitAll();
55 };
56 };
57
58 #endif