51 lines
900 B
C++
Executable File
51 lines
900 B
C++
Executable File
#ifndef KONACLIENT_H
|
|
#define KONACLIENT_H
|
|
|
|
#include <QObject>
|
|
#include <QDir>
|
|
|
|
|
|
|
|
// ERROR CODES
|
|
#define ERROR_TAGS_TEMPFILE 1
|
|
#define ERROR_TAGS_FORMAT 2
|
|
|
|
#define ERROR_SEARCH_TEMPFILE 1
|
|
#define ERROR_SEARCH_FORMAT 2
|
|
#define ERROR_SEARCH_XML 3
|
|
#define ERROR_SEARCH_HTTP 4
|
|
|
|
|
|
|
|
|
|
// Windows-Compatibility
|
|
#ifdef _WIN32
|
|
#define SLASH "\\"
|
|
#else
|
|
#define SLASH "/"
|
|
#endif
|
|
|
|
|
|
|
|
class KonaClient : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
KonaClient(QString TempDir, QString CacheDir, QString ArchiveDir, QString Server = "konachan.com");
|
|
~KonaClient();
|
|
QString getTempDir() {return tempDir;}
|
|
QString getCacheDir() {return cacheDir;}
|
|
QString getArchiveDir() {return archiveDir;}
|
|
QString getServer() {return server;}
|
|
|
|
private:
|
|
QString tempDir;
|
|
QString cacheDir;
|
|
QString archiveDir;
|
|
QString server;
|
|
|
|
void removeDir(const QString &path);
|
|
};
|
|
|
|
#endif // KONACLIENT_H
|