summaryrefslogtreecommitdiffstats
path: root/knode/knnntpaccount.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch)
tree67208f7c145782a7e90b123b982ca78d88cc2c87 /knode/knnntpaccount.h
downloadtdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz
tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knode/knnntpaccount.h')
-rw-r--r--knode/knnntpaccount.h117
1 files changed, 117 insertions, 0 deletions
diff --git a/knode/knnntpaccount.h b/knode/knnntpaccount.h
new file mode 100644
index 00000000..4c7694ff
--- /dev/null
+++ b/knode/knnntpaccount.h
@@ -0,0 +1,117 @@
+/*
+ knnntpaccount.h
+
+ KNode, the KDE newsreader
+ Copyright (c) 1999-2004 the KNode authors.
+ See file AUTHORS for details
+
+ 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.
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
+*/
+
+#ifndef KNNNTPACCOUNT_H
+#define KNNNTPACCOUNT_H
+
+#include <qdatetime.h>
+
+#include "kncollection.h"
+#include "knserverinfo.h"
+#include <qobject.h>
+#include <qtimer.h>
+
+class KNNntpAccount;
+
+namespace KNConfig {
+ class Identity;
+ class Cleanup;
+}
+
+
+class KNNntpAccountIntervalChecking : public QObject {
+
+ Q_OBJECT
+
+ public:
+ KNNntpAccountIntervalChecking(KNNntpAccount *account);
+ ~KNNntpAccountIntervalChecking();
+ void installTimer();
+ void deinstallTimer();
+
+ protected:
+ QTimer *t_imer;
+ KNNntpAccount *a_ccount;
+
+ protected slots:
+ void slotCheckNews();
+
+};
+
+class KNNntpAccount : public KNCollection , public KNServerInfo {
+
+ public:
+ KNNntpAccount();
+ ~KNNntpAccount();
+
+ collectionType type() { return CTnntpAccount; }
+
+ /** tries to read information, returns false if it fails to do so */
+ bool readInfo(const QString &confPath);
+ void saveInfo();
+ //void syncInfo();
+ QString path();
+ /** returns true when the user accepted */
+ bool editProperties(QWidget *parent);
+
+ // news interval checking
+ void startTimer();
+
+ //get
+ bool fetchDescriptions() const { return f_etchDescriptions; }
+ QDate lastNewFetch() const { return l_astNewFetch; }
+ bool wasOpen() const { return w_asOpen; }
+ bool useDiskCache() const { return u_seDiskCache; }
+ KNConfig::Identity* identity() const { return i_dentity; }
+ bool intervalChecking() const { return i_ntervalChecking; }
+ int checkInterval() const { return c_heckInterval; }
+ KNConfig::Cleanup *cleanupConfig() const { return mCleanupConf; }
+
+ /** Returns the cleanup configuration that should be used for this account */
+ KNConfig::Cleanup *activeCleanupConfig() const;
+
+ //set
+ void setFetchDescriptions(bool b) { f_etchDescriptions = b; }
+ void setLastNewFetch(QDate date) { l_astNewFetch = date; }
+ void setUseDiskCache(bool b) { u_seDiskCache=b; }
+ void setCheckInterval(int c);
+ void setIntervalChecking(bool b) { i_ntervalChecking=b; }
+
+ protected:
+ /** server specific identity */
+ KNConfig::Identity *i_dentity;
+ /** account specific cleanup configuration */
+ KNConfig::Cleanup *mCleanupConf;
+ /** use an additional "list newsgroups" command to fetch the newsgroup descriptions */
+ bool f_etchDescriptions;
+ /** last use of "newgroups" */
+ QDate l_astNewFetch;
+ /** was the server open in the listview on the last shutdown? */
+ bool w_asOpen;
+ /** cache fetched articles on disk */
+ bool u_seDiskCache;
+ /** is interval checking enabled */
+ bool i_ntervalChecking;
+ int c_heckInterval;
+
+ /** helper class for news interval checking, manages the QTimer */
+ KNNntpAccountIntervalChecking *a_ccountIntervalChecking;
+
+};
+
+#endif
+
+// kate: space-indent on; indent-width 2;