OSDN Git Service

Use `record' instead of `enroll'
[kita/kita.git] / src / libkita / boarddatabase.cpp
index 3e1a0d9..081f2c2 100644 (file)
@@ -345,20 +345,20 @@ void BoardDatabase::clearBoardData()
  *
  * @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;
@@ -368,9 +368,9 @@ int BoardDatabase::enrollBoard(const QString& boardName, QString& oldUrl, int ty
     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) {
 
@@ -379,24 +379,24 @@ int BoardDatabase::enrollBoard(const QString& boardName, QString& oldUrl, int ty
                 && 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      */
@@ -483,7 +483,7 @@ int BoardDatabase::parseBoardUrl(
 }
 
 /* public */
-bool BoardDatabase::isEnrolled()
+bool BoardDatabase::isRecorded()
 {
     return getBoardData() != 0;
 }
@@ -529,7 +529,7 @@ BoardData* BoardDatabase::getBoardData()
 
 
 /* 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 :
  
@@ -588,11 +588,11 @@ bool BoardDatabase::moveBoard(const KUrl& fromUrl, const KUrl& toUrl)
 
     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;
     }