// // 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 #ifdef __cplusplus namespace mailcore { class NetService; class MailProvider : public Object { public: static MailProvider * providerWithInfo(HashMap * info); MailProvider(); virtual ~MailProvider(); virtual String * identifier(); virtual Array * imapServices(); virtual Array * smtpServices(); virtual Array * 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 * mDomainMatch; Array * mImapServices; Array * mSmtpServices; Array * mPopServices; HashMap * mMailboxPaths; Set* mMxSet; void init(); }; }; #endif #endif /* defined(__MAILCORE__MCMailProvider__) */