aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/provider/MCMailProvider.h
blob: 04f46750e3fa069e549811c101792374ce63b566 (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
57
58
59
60
61
62
63
64
//
//  MCMailProvider.h
//  mailcore2
//
//  Created by Robert Widmann on 4/28/13.
//  Copyright (c) 2013 MailCore. All rights reserved.
//

#ifndef __MAILCORE__MCMailProvider__
#define __MAILCORE__MCMailProvider__

#include <MailCore/MCBaseTypes.h>

#ifdef __cplusplus

namespace mailcore {
    class NetService;
	
    class MailProvider : public Object {
        
    public:
		MailProvider(HashMap * info);
		MailProvider(Data * infoData);
		~MailProvider();
		
		void setIdentifier(String * identifier);
		String * identifier();
		
		Array * imapServices();
		Array * smtpServices();
		Array * popServices();
		
		bool matchEmail(String * email);
		bool matchMX(String * hostname);
		
		String * sentMailFolderPath();
		String * starredFolderPath();
		String * allMailFolderPath();
		String * trashFolderPath();
		String * draftsFolderPath();
		String * spamFolderPath();
		String * importantFolderPath();
		
		bool isMainFolder(String * folderPath, String * prefix);
		
		virtual String * description();
		
	private:
		String * mIdentifier;
		Array * mDomainMatch;
		Array * mImapServices;
		Array * mSmtpServices;
		Array * mPopServices;
		HashMap * mMailboxPaths;
		Set* mMxSet;
		
		void init();
		void initWihInfo(HashMap * info);
    };
};

#endif

#endif /* defined(__MAILCORE__MCMailProvider__) */