OSDN Git Service

Use `record' instead of `enroll'
authornogu <nogu@users.sourceforge.jp>
Fri, 12 Feb 2010 22:32:49 +0000 (07:32 +0900)
committernogu <nogu@users.sourceforge.jp>
Fri, 12 Feb 2010 22:32:49 +0000 (07:32 +0900)
src/bbsview.cpp
src/libkita/boarddata.h
src/libkita/boarddatabase.cpp
src/libkita/boarddatabase.h
src/libkita/cache.cpp
src/libkita/datmanager.cpp
src/libkita/datmanager.h
src/libkita/kita_misc.cpp
src/viewmediator.cpp

index f38264f..64d71e9 100644 (file)
@@ -149,13 +149,13 @@ bool BBSView::downloadBoardList()
             QString boardName = category.boardNameList[ count ];
             QString oldUrl;
             BoardDatabase db(boardUrl);
             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 */);
                     boardName, oldUrl, Board_Unknown, true /* test only */);
-            if (ret == Board_enrollNew) {
+            if (ret == Board_recordNew) {
                 newBoards += boardName + "  ( " + category.category_name
                     + " )  " + boardUrl + '\n';
             }
                 newBoards += boardName + "  ( " + category.category_name
                     + " )  " + boardUrl + '\n';
             }
-            if (ret == Board_enrollMoved) {
+            if (ret == Board_recordMoved) {
                 oldBoards += boardName + "  ( " + category.category_name
                     + " )  " + oldUrl + "  ->  " + boardUrl + '\n';
             }
                 oldBoards += boardName + "  ( " + category.category_name
                     + " )  " + oldUrl + "  ->  " + boardUrl + '\n';
             }
@@ -313,7 +313,7 @@ void BBSView::showBoardList()
             }
             QString oldUrl;
             BoardDatabase db(boardUrl);
             }
             QString oldUrl;
             BoardDatabase db(boardUrl);
-            db.enrollBoard(boardName, oldUrl);
+            db.recordBoard(boardName, oldUrl);
             db.loadBBSHistory();
             previousBoard = new ListViewItem(categoryItem, previousBoard,
                     QStringList() << boardName << boardUrl);
             db.loadBBSHistory();
             previousBoard = new ListViewItem(categoryItem, previousBoard,
                     QStringList() << boardName << boardUrl);
@@ -326,7 +326,7 @@ void BBSView::showBoardList()
     QString oldUrl;
     new ListViewItem(m_boardList, 0, QStringList() << boardName << boardUrl);
     BoardDatabase db(boardUrl);
     QString oldUrl;
     new ListViewItem(m_boardList, 0, QStringList() << boardName << boardUrl);
     BoardDatabase db(boardUrl);
-    db.enrollBoard(boardName, oldUrl);
+    db.recordBoard(boardName, oldUrl);
 
     loadExtBoard();
     refreshFavoriteBoards();
 
     loadExtBoard();
     refreshFavoriteBoards();
@@ -363,7 +363,7 @@ void BBSView::loadExtBoard()
                     int type = Board_Unknown;
                     if (list.size() == 3) type = list[ 2 ].toInt();
                     BoardDatabase db(board_url);
                     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);
                 }
             }
         }
                 }
             }
         }
index 6445f74..3d14483 100644 (file)
@@ -27,12 +27,12 @@ namespace Kita
     };
 
 
     };
 
 
-    /* return value of BoardManager::enrollBoard */
+    /* return value of BoardManager::recordBoard */
     enum {
     enum {
-        Board_enrollNew,
-        Board_enrollEnrolled,
-        Board_enrollMoved,
-        Board_enrollFailed
+        Board_recordNew,
+        Board_recordRecorded,
+        Board_recordMoved,
+        Board_recordFailed
     };
 
     /*---------------------------------*/
     };
 
     /*---------------------------------*/
index 3e1a0d9..081f2c2 100644 (file)
@@ -345,20 +345,20 @@ void BoardDatabase::clearBoardData()
  *
  * @param[out] oldURL
  *
  *
  * @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().
  * 
  *
  * "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 */
  *
  */ 
 /* 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;
 {
     QString hostname;
     QString rootPath;
@@ -368,9 +368,9 @@ int BoardDatabase::enrollBoard(const QString& boardName, QString& oldUrl, int ty
     type = parseBoardUrl(type, hostname, rootPath, delimiter, bbsPath, ext);
     oldUrl.clear();
 
     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) {
 
     BoardData *data;
     foreach (data, m_boardDataList) {
 
@@ -379,24 +379,24 @@ int BoardDatabase::enrollBoard(const QString& boardName, QString& oldUrl, int ty
                 && data->bbsPath() == bbsPath) {
 
             if (data->hostName() == hostname
                 && 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();
             } else { /* moved */
                 oldUrl = data->basePath();
-                return Board_enrollMoved;
+                return Board_recordMoved;
             }
         }
     }
 
     /* test only */
     if (test)
             }
         }
     }
 
     /* 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);
 
     BoardData* bdata = new BoardData(boardName, hostname, rootPath, delimiter, bbsPath, ext, type);
     m_boardDataList.append(bdata);
 
-    return Board_enrollNew;
+    return Board_recordNew;
 }
 
 /* parse board URL      */
 }
 
 /* parse board URL      */
@@ -483,7 +483,7 @@ int BoardDatabase::parseBoardUrl(
 }
 
 /* public */
 }
 
 /* public */
-bool BoardDatabase::isEnrolled()
+bool BoardDatabase::isRecorded()
 {
     return getBoardData() != 0;
 }
 {
     return getBoardData() != 0;
 }
@@ -529,7 +529,7 @@ BoardData* BoardDatabase::getBoardData()
 
 
 /* load the bbs history file (BBSHISTORY), and create keys of Data Base.  */
 
 
 /* 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 :
  
 /*
     ex) If the host of board moved like :
  
@@ -588,11 +588,11 @@ bool BoardDatabase::moveBoard(const KUrl& fromUrl, const KUrl& toUrl)
 
     if (oldUrl == newUrl) return false;
 
 
     if (oldUrl == newUrl) return false;
 
-    /* Is oldURL enrolled? */
+    /* Is oldURL recorded? */
     BoardData* bdata = getBoardData(oldUrl);
     if (bdata == 0) {
 
     BoardData* bdata = getBoardData(oldUrl);
     if (bdata == 0) {
 
-        /* Is newURL enrolled? */
+        /* Is newURL recorded? */
         bdata = getBoardData(newUrl);
         if (bdata == 0) return false;
     }
         bdata = getBoardData(newUrl);
         if (bdata == 0) return false;
     }
index c6954bf..7060373 100644 (file)
@@ -44,9 +44,9 @@ namespace Kita {
 
         /* BoardData */
         void clearBoardData();
 
         /* BoardData */
         void clearBoardData();
-        int enrollBoard(const QString& boardName, QString& oldUrl,
+        int recordBoard(const QString& boardName, QString& oldUrl,
                                 int type = Board_Unknown, bool test = false);
                                 int type = Board_Unknown, bool test = false);
-        bool isEnrolled();
+        bool isRecorded();
         BoardData* getBoardData();
 
         /* BBSHISTORY */
         BoardData* getBoardData();
 
         /* BBSHISTORY */
index c988f61..cc63b63 100644 (file)
@@ -32,7 +32,7 @@ QString Cache::baseDir()
 
 QString Cache::serverDir() const
 {
 
 QString Cache::serverDir() const
 {
-    /* Is board enrolled ? */
+    /* Is board recorded ? */
     BoardDatabase db(m_url);
     BoardData * bdata = db.getBoardData();
     if (bdata == 0) return QString();
     BoardDatabase db(m_url);
     BoardData * bdata = db.getBoardData();
     if (bdata == 0) return QString();
@@ -45,7 +45,7 @@ QString Cache::serverDir() const
 
 QString Cache::boardDir() const
 {
 
 QString Cache::boardDir() const
 {
-    /* Is board enrolled ? */
+    /* Is board recorded ? */
     BoardDatabase db(m_url);
     BoardData * bdata = db.getBoardData();
     if (bdata == 0) return QString();
     BoardDatabase db(m_url);
     BoardData * bdata = db.getBoardData();
     if (bdata == 0) return QString();
index 1415a03..bd77e98 100644 (file)
@@ -77,9 +77,9 @@ DatInfo * DatManager::getDatInfoPointer() const
 DatInfo* DatManager::getDatInfo(bool checkCached) const
 {
     /* search */
 DatInfo* DatManager::getDatInfo(bool checkCached) const
 {
     /* search */
-    /* create and enroll instance */
+    /* create and record instance */
     return (m_searchDatInfo != 0)
     return (m_searchDatInfo != 0)
-        ? m_searchDatInfo : enrollDatInfo(checkCached);
+        ? m_searchDatInfo : recordDatInfo(checkCached);
 }
 
 
 }
 
 
@@ -88,7 +88,7 @@ DatInfo* DatManager::getDatInfo(bool checkCached) const
 DatInfo* DatManager::searchDatInfo() const
 {
     if (m_datUrl.isEmpty())
 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;
 
     if (m_datInfoList.isEmpty())
         return 0;
 
@@ -116,13 +116,13 @@ DatInfo* DatManager::searchDatInfo() const
 }
 
 
 }
 
 
-/* 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 */
    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())
 {
     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);
 
     /* create DatInfo & read cached data */
     DatInfo* datInfo = new DatInfo(m_datUrl);
@@ -374,7 +374,7 @@ int DatManager::getNumById(const QString& strid) const
 
 
 /* public */
 
 
 /* public */
-bool DatManager::isThreadEnrolled() const
+bool DatManager::isThreadRecorded() const
 {
     return !m_datUrl.isEmpty();
 }
 {
     return !m_datUrl.isEmpty();
 }
index d3b9e8b..c9eacc8 100644 (file)
@@ -69,7 +69,7 @@ namespace Kita
 
 
         /* another information */
 
 
         /* another information */
-        bool isThreadEnrolled() const;
+        bool isThreadRecorded() const;
         bool is2chThread() const;
         bool isResValid(int num) const;
         bool isBroken() const;
         bool is2chThread() const;
         bool isResValid(int num) const;
         bool isBroken() const;
@@ -95,7 +95,7 @@ namespace Kita
     private:
         DatInfo* getDatInfo(bool checkCached = true) const;
         DatInfo* searchDatInfo() 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;
 
         KUrl m_url;
         KUrl m_datUrl;
index e61fbb2..2ee3016 100644 (file)
@@ -98,7 +98,7 @@ QString Kita::getWriteUrl(const KUrl& m_datUrl)
    If mode = URLMODE_DAT, output is URL of dat file.
    If mode = URLMODE_THREAD, output is URL of read.cgi .
  
    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)
  
    
 (ex.1)
  
@@ -145,7 +145,7 @@ QString Kita::convertUrl(
         return m_prevConvNewUrl;
     }
 
         return m_prevConvNewUrl;
     }
 
-    /* Is board enrolled ? */
+    /* Is board recorded ? */
     BoardDatabase db(url);
     BoardData* bdata = db.getBoardData();
     if (bdata == 0) return QString();
     BoardDatabase db(url);
     BoardData* bdata = db.getBoardData();
     if (bdata == 0) return QString();
index 8fa85a2..17a51d1 100644 (file)
@@ -137,7 +137,7 @@ void ViewMediator::updateFavoriteListView()
 void ViewMediator::openUrl(const KUrl& url)
 {
     // open thread.
 void ViewMediator::openUrl(const KUrl& url)
 {
     // open thread.
-    if (DatManager(url).isThreadEnrolled()) {
+    if (DatManager(url).isThreadRecorded()) {
         m_threadTabWidget->slotShowMainThread(url);
         return;
     }
         m_threadTabWidget->slotShowMainThread(url);
         return;
     }