summaryrefslogtreecommitdiffstats
path: root/libmail/nntpgroup.H
blob: ebd2cae4b94d3a375583aadcf1201953ebf7a1b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
** Copyright 2003, Double Precision Inc.
**
** See COPYING for distribution information.
*/
#ifndef libmail_nntpgroup_H
#define libmail_nntpgroup_H

#include "libmail_config.h"

#include "nntp.H"
#include "nntplogin.H"

#include <string>

LIBMAIL_START

//
// Open a specific group


class mail::nntp::GroupTask : public mail::nntp::LoggedInTask {

	void (mail::nntp::GroupTask::*response_func)(const char *);

protected:
	std::string groupName;

public:

	GroupTask(callback *callbackArg, nntp &myserverArg,
		  std::string groupNameArg);
	~GroupTask();

	// Implements:

	void loggedIn();
	void processLine(const char *message);

	// Subclasses must defined:

	virtual void selectedGroup(msgnum_t estimatedCount,
				   msgnum_t loArticleCount,
				   msgnum_t hiArticleCount)=0;
	virtual void processGroup(const char *)=0;

private:
	void processGroupStatus(const char *);
	void processOtherStatus(const char *);

	void selectedCurrentGroup();
};

LIBMAIL_END

#endif