1 /***************************************************************************
2 * Copyright (C) 2010 by Kita Developers *
3 * ikemo@users.sourceforge.jp *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 ***************************************************************************/
10 #ifndef KITABOARDDATABASE_H
11 #define KITABOARDDATABASE_H
13 #include "boarddata.h"
18 class KDE_EXPORT BoardDatabase
20 static BoardDataList m_boardDataList;
21 static BoardData* m_previousBoardData;
22 static QString m_previousBoardUrl;
23 static QTextCodec* m_cp932Codec;
24 static QTextCodec* m_eucJpCodec;
28 explicit BoardDatabase(const KUrl& url = KUrl());
30 void setUrl(const KUrl& url);
32 QStringList allBoardUrlList();
42 void getThreadList(bool oldLogs, bool online,
43 QList<Thread*>& threadList, QList<Thread*>& oldLogList);
46 void clearBoardData();
47 int enrollBoard(const QString& boardName, QString& oldUrl,
48 int type = Board_Unknown, bool test = false);
50 BoardData* getBoardData();
53 bool loadBBSHistory();
54 bool moveBoard(const KUrl& fromUrl, const KUrl& toUrl);
58 BoardData* getBoardData(const KUrl& url);
59 int parseBoardUrl(int type, QString& hostname,
60 QString& rootPath, QString& delimiter,
61 QString& bbsPath, QString& ext);
65 void getCachedThreadList(const KUrl& url, QList<Thread*>& threadList);
66 bool readSubjectTxt(BoardData* bdata, QList<Thread*>& threadList);
70 BoardData* openSettingTxt();