1 /***************************************************************************
2 * Copyright (C) 2004 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 KITABOARDDATA_H
11 #define KITABOARDDATA_H
13 #include <QtCore/QList>
14 #include <QtCore/QStringList>
30 /* return value of BoardManager::enrollBoard */
38 /*---------------------------------*/
40 /* Data Base of board */
44 bool m_readIdx; /* If true, idx file has been read. */
46 QString m_hostname; /* latest host name */
48 QString m_delimiter; /* "/test/read.cgi", "/bbs/read.pl", etc. */
50 QString m_ext; /* ".dat", ".cgi", etc. */
53 QString m_basePath; /* = (hostname)/(rootPath)/(bbsPath)/ */
54 QString m_cgiBasePath; /* = (hostname)/(rootPath)/(delimiter)/(bbsPath)/ */
58 QString m_defaultName;
64 QStringList m_keyHostList; /* list of host names. They are keys of DB. */
65 QStringList m_keyBasePathList;
66 QStringList m_keyCgiBasePathList;
69 BoardData(const QString& boardName, const QString& hostname,
70 const QString& rootPath, const QString& delimiter,
71 const QString& bbsPath, const QString& ext, int boardtype);
74 void setHostName(const QString& hostname);
78 void setReadIdx(bool idx);
79 const QString& boardName() const;
80 const QString& hostName() const;
81 const QString& rootPath() const;
82 const QString& delimiter() const;
83 const QString& bbsPath() const;
84 const QString& ext() const;
87 const QString& basePath() const;
88 const QString& cgiBasePath() const;
91 const QString settingUrl() const;
92 bool settingLoaded() const;
93 const QString& defaultName() const;
96 const KUrl& titleImgUrl() const;
97 void setSettingLoaded(bool set);
98 void setDefaultName(const QString& newName);
99 void setLineNum(int newLine);
100 void setMsgCount(int msgCount);
101 void setTitleImgUrl(const KUrl& url);
104 void createKeys(const QStringList& keyHostList);
105 const QStringList& keyHostList() const;
106 const QStringList& keyBasePathList() const;
107 const QStringList& keyCgiBasePathList() const;
111 /*--------------------------------------*/
113 typedef QList<BoardData*> BoardDataList;