File: localmailfolder.h

package info (click to toggle)
aethera 0.9.3-7
  • links: PTS
  • area: main
  • in suites: woody
  • size: 8,588 kB
  • ctags: 7,282
  • sloc: cpp: 64,544; sh: 9,913; perl: 1,756; makefile: 1,680; python: 258
file content (60 lines) | stat: -rw-r--r-- 1,657 bytes parent folder | download
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
57
58
59
60
/***************************************************************************
                  localmailfolder.h  -  the local mail folder class
                             -------------------
    begin                : Mon Mar  5 16:16:00 EET 2001
    copyright            : (C) 2001 by theKompany (www.thekompany.com>
    author               : Eugen Constantinescu
    email                : eug@thekompany.com
 ***************************************************************************/

#ifndef __LocalMailFolder__
#define __LocalMailFolder__

#include <qstring.h>
#include <qcstring.h>
#include <qdir.h>
#include <qstringlist.h>
#include <qdict.h>
#include <qlist.h>
#include <qmap.h>
#include <qdatetime.h>

#include <mailclasses.h>
#include <messageclass.h>
#include <mailfolder.h>

class LocalMailFolder : public MailFolder
{
	public:		
		LocalMailFolder(const QString &_storageDevice);
		~LocalMailFolder();

		// message file
		QString getMessagesFileName() const;
		
		// message generators
		IndexClass *createMessage(const QCString &text, const QCString &uid, const QDateTime &rcvtime,
		                          const QString &account=QString::null, MessageClass *parsedMessage = 0,
		                          bool bSync=false, const unsigned flags=0);
		
		// copy/move/delete/expunge
		IndexClass *copyMessage(IndexClass *);
		IndexClass *moveMessage(IndexClass *);
		bool deleteMessage(IndexClass *);
		bool expunge(bool force=false);

		/** sync the messages from the list.*/
		void sync();
	
	private: // methods
		void setupFiles();
		void loadIndex();
		bool shouldExpunge();
		
		// files
		QString messagesFileName;
};

#endif