summaryrefslogtreecommitdiffstats
path: root/libmail/nntpnewsrc.H
diff options
context:
space:
mode:
Diffstat (limited to 'libmail/nntpnewsrc.H')
-rw-r--r--libmail/nntpnewsrc.H43
1 files changed, 43 insertions, 0 deletions
diff --git a/libmail/nntpnewsrc.H b/libmail/nntpnewsrc.H
new file mode 100644
index 0000000..d19534d
--- /dev/null
+++ b/libmail/nntpnewsrc.H
@@ -0,0 +1,43 @@
+/*
+** Copyright 2003, Double Precision Inc.
+**
+** See COPYING for distribution information.
+*/
+#ifndef libmail_nntpnewsrc_H
+#define libmail_nntpnewsrc_H
+
+#include "libmail_config.h"
+#include "nntp.H"
+#include <string>
+#include <vector>
+
+LIBMAIL_START
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// The objects that represents lines in a newsrc file
+
+class mail::nntp::newsrc {
+
+public:
+ std::string newsgroupname;
+ bool subscribed;
+
+ std::vector< std::pair<msgnum_t, msgnum_t> > msglist;
+ // A list of read messages, in strict ascending order.
+
+ newsrc();
+ ~newsrc();
+
+ newsrc(std::string); // Construct from a line of text in newsrc
+
+ operator std::string() const;
+
+
+ void read(msgnum_t);
+ void unread(msgnum_t);
+};
+
+LIBMAIL_END
+
+#endif