OSDN Git Service

Move the directories
[kita/kita.git] / src / libkita / threadinfo.h
diff --git a/src/libkita/threadinfo.h b/src/libkita/threadinfo.h
new file mode 100644 (file)
index 0000000..9efc7e4
--- /dev/null
@@ -0,0 +1,42 @@
+/***************************************************************************
+*   Copyright (C) 2003 by Hideki Ikemoto                                  *
+*   ikemo@users.sourceforge.jp                                            *
+*                                                                         *
+*   This program is free software; you can redistribute it and/or modify  *
+*   it under the terms of the GNU General Public License as published by  *
+*   the Free Software Foundation; either version 2 of the License, or     *
+*   (at your option) any later version.                                   *
+***************************************************************************/
+#ifndef KITATHREADINFO_H
+#define KITATHREADINFO_H
+
+#include <QtCore/QMap>
+
+#include <kdemacros.h>
+
+namespace Kita
+{
+    /**
+     * 
+     * Hideki Ikemoto
+     **/
+    class KDE_EXPORT ThreadInfo
+    {
+    public:
+        static ThreadInfo* getInstance();
+        static void setReadNum(const QString& url, int num);
+        static int readNum(const QString& url);
+        static void replace(const QString& fromUrl, const QString& toUrl);
+        static void removeThreadInfo(const QString& url);
+        KDE_EXPORT friend QDataStream& operator<<(QDataStream& s, ThreadInfo& c);
+        KDE_EXPORT friend QDataStream& operator>>(QDataStream& s, ThreadInfo& c);
+    private:
+        ThreadInfo();
+        ~ThreadInfo();
+        QMap<QString, int> m_readDict;
+        QMap<QString, int> m_resNumDict;
+        static ThreadInfo* instance;
+    };
+}
+
+#endif