summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/nntpwrapper.h
blob: 8c54f1247ad875106a46421bffc2b9a38fb3fa6d (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
// CHANGED 2004-09-31 Lutz Rogowski
#ifndef __NNTPWRAPPER
#define __NNTPWRAPPER

#include "mailwrapper.h"
#include "genericwrapper.h"
#include <qstring.h>
#include <libetpan/clist.h>

class encodedString;
struct mailstorage;
struct mailfolder;

class NNTPwrapper : public Genericwrapper
{

 Q_OBJECT

public:
    NNTPwrapper( NNTPaccount *a );
    virtual ~NNTPwrapper();

   /* mailbox will be ignored */
    virtual void listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 );
    /* should only get the subscribed one */
    virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders();
    /* mailbox will be ignored */
    virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX");
    QStringList listAllNewsgroups(const QString&mask = QString::null);
    virtual void deleteMail(const RecMailP&mail);
    virtual void answeredMail(const RecMailP&mail);
    virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&);

    virtual RecBodyP fetchBody( const RecMailP &mail );
    virtual encodedString* fetchRawBody(const RecMailP&mail);
    virtual void logout();
    virtual MAILLIB::ATYPE getType()const;
    virtual const QString&getName()const;
    static void nntp_progress( size_t current, size_t maximum );
    virtual Account* getAccount() { return account; };

protected:
    void login();
    NNTPaccount *account;
    mailstorage* m_nntp;


};

#endif