QString boardName = category.boardNameList[ count ];
QString oldUrl;
BoardDatabase db(boardUrl);
- int ret = db.enrollBoard(
+ int ret = db.recordBoard(
boardName, oldUrl, Board_Unknown, true /* test only */);
- if (ret == Board_enrollNew) {
+ if (ret == Board_recordNew) {
newBoards += boardName + " ( " + category.category_name
+ " ) " + boardUrl + '\n';
}
- if (ret == Board_enrollMoved) {
+ if (ret == Board_recordMoved) {
oldBoards += boardName + " ( " + category.category_name
+ " ) " + oldUrl + " -> " + boardUrl + '\n';
}
}
QString oldUrl;
BoardDatabase db(boardUrl);
- db.enrollBoard(boardName, oldUrl);
+ db.recordBoard(boardName, oldUrl);
db.loadBBSHistory();
previousBoard = new ListViewItem(categoryItem, previousBoard,
QStringList() << boardName << boardUrl);
QString oldUrl;
new ListViewItem(m_boardList, 0, QStringList() << boardName << boardUrl);
BoardDatabase db(boardUrl);
- db.enrollBoard(boardName, oldUrl);
+ db.recordBoard(boardName, oldUrl);
loadExtBoard();
refreshFavoriteBoards();
int type = Board_Unknown;
if (list.size() == 3) type = list[ 2 ].toInt();
BoardDatabase db(board_url);
- db.enrollBoard(board_title, oldUrl, type);
+ db.recordBoard(board_title, oldUrl, type);
}
}
}
};
- /* return value of BoardManager::enrollBoard */
+ /* return value of BoardManager::recordBoard */
enum {
- Board_enrollNew,
- Board_enrollEnrolled,
- Board_enrollMoved,
- Board_enrollFailed
+ Board_recordNew,
+ Board_recordRecorded,
+ Board_recordMoved,
+ Board_recordFailed
};
/*---------------------------------*/
*
* @param[out] oldURL
*
- * @retval Board_enrollEnrolled if board is already enrolled. oldURL is QString().
- * @retval Board_enrollNew if board is new board. oldURL is QString().
- * @retval Board_enrollMoved if board is moved. oldURL is old URL.
+ * @retval Board_recordRecorded if board is already recorded. oldURL is QString().
+ * @retval Board_recordNew if board is new board. oldURL is QString().
+ * @retval Board_recordMoved if board is moved. oldURL is old URL.
*
- * @note board is NOT enrolled when board is moved.
- * To enroll new URL, call BoardDatabase::moveBoard().
+ * @note board is NOT recorded when board is moved.
+ * To record new URL, call BoardDatabase::moveBoard().
*
* "int type" is type of board. It could be "Board_Unknown". See also parseBoardURL().
*
- * If "bool test" is true, this function just checks if the board is enrolled (never enroll board).
+ * If "bool test" is true, this function just checks if the board is recorded (never record board).
*
*/
/* public */
-int BoardDatabase::enrollBoard(const QString& boardName, QString& oldUrl, int type, bool test)
+int BoardDatabase::recordBoard(const QString& boardName, QString& oldUrl, int type, bool test)
{
QString hostname;
QString rootPath;
type = parseBoardUrl(type, hostname, rootPath, delimiter, bbsPath, ext);
oldUrl.clear();
- if (type == Board_Unknown) return Board_enrollFailed;
+ if (type == Board_Unknown) return Board_recordFailed;
- /* check if the board is enrolled or moved. */
+ /* check if the board is recorded or moved. */
BoardData *data;
foreach (data, m_boardDataList) {
&& data->bbsPath() == bbsPath) {
if (data->hostName() == hostname
- && data->rootPath() == rootPath) { /* enrolled */
- return Board_enrollEnrolled;
+ && data->rootPath() == rootPath) { /* recorded */
+ return Board_recordRecorded;
} else { /* moved */
oldUrl = data->basePath();
- return Board_enrollMoved;
+ return Board_recordMoved;
}
}
}
/* test only */
if (test)
- return Board_enrollNew;
+ return Board_recordNew;
- /* enroll new board */
+ /* record new board */
BoardData* bdata = new BoardData(boardName, hostname, rootPath, delimiter, bbsPath, ext, type);
m_boardDataList.append(bdata);
- return Board_enrollNew;
+ return Board_recordNew;
}
/* parse board URL */
}
/* public */
-bool BoardDatabase::isEnrolled()
+bool BoardDatabase::isRecorded()
{
return getBoardData() != 0;
}
/* load the bbs history file (BBSHISTORY), and create keys of Data Base. */
-/* Before calling this, enroll the board by enrollBoard(). */
+/* Before calling this, record the board by recordBoard(). */
/*
ex) If the host of board moved like :
if (oldUrl == newUrl) return false;
- /* Is oldURL enrolled? */
+ /* Is oldURL recorded? */
BoardData* bdata = getBoardData(oldUrl);
if (bdata == 0) {
- /* Is newURL enrolled? */
+ /* Is newURL recorded? */
bdata = getBoardData(newUrl);
if (bdata == 0) return false;
}
/* BoardData */
void clearBoardData();
- int enrollBoard(const QString& boardName, QString& oldUrl,
+ int recordBoard(const QString& boardName, QString& oldUrl,
int type = Board_Unknown, bool test = false);
- bool isEnrolled();
+ bool isRecorded();
BoardData* getBoardData();
/* BBSHISTORY */
QString Cache::serverDir() const
{
- /* Is board enrolled ? */
+ /* Is board recorded ? */
BoardDatabase db(m_url);
BoardData * bdata = db.getBoardData();
if (bdata == 0) return QString();
QString Cache::boardDir() const
{
- /* Is board enrolled ? */
+ /* Is board recorded ? */
BoardDatabase db(m_url);
BoardData * bdata = db.getBoardData();
if (bdata == 0) return QString();
DatInfo* DatManager::getDatInfo(bool checkCached) const
{
/* search */
- /* create and enroll instance */
+ /* create and record instance */
return (m_searchDatInfo != 0)
- ? m_searchDatInfo : enrollDatInfo(checkCached);
+ ? m_searchDatInfo : recordDatInfo(checkCached);
}
DatInfo* DatManager::searchDatInfo() const
{
if (m_datUrl.isEmpty())
- return 0; /* This url is not enrolled in BoardManager. */
+ return 0; /* This url is not recorded in BoardManager. */
if (m_datInfoList.isEmpty())
return 0;
}
-/* create and enroll the instance of DatInfo and delete old instances.
+/* create and record the instance of DatInfo and delete old instances.
Note that DatInfo::DatInfo() opens cached data and reads it. */
/* private */
-DatInfo* DatManager::enrollDatInfo(bool checkCached) const
+DatInfo* DatManager::recordDatInfo(bool checkCached) const
{
if (m_datUrl.isEmpty())
- return 0; /* This url is not enrolled in BoardManager. */
+ return 0; /* This url is not recorded in BoardManager. */
/* create DatInfo & read cached data */
DatInfo* datInfo = new DatInfo(m_datUrl);
/* public */
-bool DatManager::isThreadEnrolled() const
+bool DatManager::isThreadRecorded() const
{
return !m_datUrl.isEmpty();
}
/* another information */
- bool isThreadEnrolled() const;
+ bool isThreadRecorded() const;
bool is2chThread() const;
bool isResValid(int num) const;
bool isBroken() const;
private:
DatInfo* getDatInfo(bool checkCached = true) const;
DatInfo* searchDatInfo() const;
- DatInfo* enrollDatInfo(bool checkCached) const;
+ DatInfo* recordDatInfo(bool checkCached) const;
KUrl m_url;
KUrl m_datUrl;
If mode = URLMODE_DAT, output is URL of dat file.
If mode = URLMODE_THREAD, output is URL of read.cgi .
- If url is NOT enrolled, return QString().
+ If url is NOT recorded, return QString().
(ex.1)
return m_prevConvNewUrl;
}
- /* Is board enrolled ? */
+ /* Is board recorded ? */
BoardDatabase db(url);
BoardData* bdata = db.getBoardData();
if (bdata == 0) return QString();
void ViewMediator::openUrl(const KUrl& url)
{
// open thread.
- if (DatManager(url).isThreadEnrolled()) {
+ if (DatManager(url).isThreadRecorded()) {
m_threadTabWidget->slotShowMainThread(url);
return;
}