blob: 306b180d5d8eacfa6e345e31c844aaa4560650f4 (
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
65
66
67
68
69
|
//
// MCMailProvider.h
// mailcore2
//
// Created by Robert Widmann on 4/28/13.
// Copyright (c) 2013 MailCore. All rights reserved.
//
#ifndef __MAILCORE_MCMAILPROVIDER_H_
#define __MAILCORE_MCMAILPROVIDER_H_
#include <MailCore/MCBaseTypes.h>
#ifdef __cplusplus
namespace mailcore {
class NetService;
class MailProvider : public Object {
public:
static MailProvider * providerWithInfo(HashMap * info);
MailProvider();
virtual ~MailProvider();
virtual String * identifier();
virtual Array * /* NetService */ imapServices();
virtual Array * /* NetService */ smtpServices();
virtual Array * /* NetService */ popServices();
virtual bool matchEmail(String * email);
virtual bool matchMX(String * hostname);
virtual String * sentMailFolderPath();
virtual String * starredFolderPath();
virtual String * allMailFolderPath();
virtual String * trashFolderPath();
virtual String * draftsFolderPath();
virtual String * spamFolderPath();
virtual String * importantFolderPath();
// Returns true if one of the folders above matches the given one.
virtual bool isMainFolder(String * folderPath, String * prefix);
public: // subclass behavior
virtual String * description();
public: // private
virtual void setIdentifier(String * identifier);
virtual void fillWithInfo(HashMap * info);
private:
String * mIdentifier;
Array * /* String */ mDomainMatch;
Array * /* NetService */ mImapServices;
Array * /* NetService */ mSmtpServices;
Array * /* NetService */ mPopServices;
HashMap * mMailboxPaths;
Set * mMxSet;
void init();
};
};
#endif
#endif
|