diff --git a/Pods/Headers/Public/mailcore2-ios/MailCore/MCIMAPCheckAccountOperation.h b/Pods/Headers/Public/mailcore2-ios/MailCore/MCIMAPCheckAccountOperation.h new file mode 120000 index 0000000000000000000000000000000000000000..d1f94a9bafe6b9942cba8c4efb5c140f5fa09122 --- /dev/null +++ b/Pods/Headers/Public/mailcore2-ios/MailCore/MCIMAPCheckAccountOperation.h @@ -0,0 +1 @@ +../../../../mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPCheckAccountOperation.h \ No newline at end of file diff --git a/Pods/Headers/Public/mailcore2-ios/MailCore/MCIMAPFetchContentToFileOperation.h b/Pods/Headers/Public/mailcore2-ios/MailCore/MCIMAPFetchContentToFileOperation.h new file mode 120000 index 0000000000000000000000000000000000000000..0d17058fe82613e6a822e0da13b94a1a6a3ee3f6 --- /dev/null +++ b/Pods/Headers/Public/mailcore2-ios/MailCore/MCIMAPFetchContentToFileOperation.h @@ -0,0 +1 @@ +../../../../mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFetchContentToFileOperation.h \ No newline at end of file diff --git a/Pods/Headers/Public/mailcore2-ios/MailCore/MCIMAPMoveMessagesOperation.h b/Pods/Headers/Public/mailcore2-ios/MailCore/MCIMAPMoveMessagesOperation.h new file mode 120000 index 0000000000000000000000000000000000000000..15c0b4054cc123dad8d90b996d5c0412856a9c8f --- /dev/null +++ b/Pods/Headers/Public/mailcore2-ios/MailCore/MCIMAPMoveMessagesOperation.h @@ -0,0 +1 @@ +../../../../mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPMoveMessagesOperation.h \ No newline at end of file diff --git a/Pods/Headers/Public/mailcore2-ios/MailCore/MCNNTPPostOperation.h b/Pods/Headers/Public/mailcore2-ios/MailCore/MCNNTPPostOperation.h new file mode 120000 index 0000000000000000000000000000000000000000..3561e11d7f57e13b4f9c1e28a5e350aa374e40eb --- /dev/null +++ b/Pods/Headers/Public/mailcore2-ios/MailCore/MCNNTPPostOperation.h @@ -0,0 +1 @@ +../../../../mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPPostOperation.h \ No newline at end of file diff --git a/Pods/Headers/Public/mailcore2-ios/MailCore/MCOIMAPFetchContentToFileOperation.h b/Pods/Headers/Public/mailcore2-ios/MailCore/MCOIMAPFetchContentToFileOperation.h new file mode 120000 index 0000000000000000000000000000000000000000..1d6f7d5f3e94d8ffab4cd01f0a7353c283541a2a --- /dev/null +++ b/Pods/Headers/Public/mailcore2-ios/MailCore/MCOIMAPFetchContentToFileOperation.h @@ -0,0 +1 @@ +../../../../mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFetchContentToFileOperation.h \ No newline at end of file diff --git a/Pods/Headers/Public/mailcore2-ios/MailCore/MCOIMAPMoveMessagesOperation.h b/Pods/Headers/Public/mailcore2-ios/MailCore/MCOIMAPMoveMessagesOperation.h new file mode 120000 index 0000000000000000000000000000000000000000..0ccb39e2e3c5220d6119be44d425f781d3a4195e --- /dev/null +++ b/Pods/Headers/Public/mailcore2-ios/MailCore/MCOIMAPMoveMessagesOperation.h @@ -0,0 +1 @@ +../../../../mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPMoveMessagesOperation.h \ No newline at end of file diff --git a/Pods/Headers/Public/mailcore2-ios/MailCore/MCONNTPPostOperation.h b/Pods/Headers/Public/mailcore2-ios/MailCore/MCONNTPPostOperation.h new file mode 120000 index 0000000000000000000000000000000000000000..35b972e724d2092c3a4111a9d51b0a04c2dbee21 --- /dev/null +++ b/Pods/Headers/Public/mailcore2-ios/MailCore/MCONNTPPostOperation.h @@ -0,0 +1 @@ +../../../../mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPPostOperation.h \ No newline at end of file diff --git a/Pods/Local Podspecs/mailcore2-ios.podspec.json b/Pods/Local Podspecs/mailcore2-ios.podspec.json new file mode 100644 index 0000000000000000000000000000000000000000..275d01d6ceee855b742aa67fb9b24793b48814af --- /dev/null +++ b/Pods/Local Podspecs/mailcore2-ios.podspec.json @@ -0,0 +1,32 @@ +{ + "name": "mailcore2-ios", + "version": "0.6.4", + "summary": "Mailcore 2 for iOS", + "description": "MailCore 2 provide a simple and asynchronous API to work with e-mail protocols IMAP, POP and SMTP.", + "homepage": "http://libmailcore.com", + "license": { + "type": "BSD", + "file": "LICENSE" + }, + "authors": "MailCore Authors", + "source": { + "git": "http://github.com/MailCore/mailcore2.git", + "branch": "master" + }, + "platforms": { + "ios": "8.0" + }, + "header_dir": "MailCore", + "requires_arc": false, + "public_header_files": "cocoapods-build/include/MailCore/*.h", + "preserve_paths": "cocoapods-build/include/MailCore/*.h", + "vendored_libraries": "cocoapods-build/lib/libMailCore-ios.a", + "libraries": [ + "xml2", + "iconv", + "z", + "c++", + "resolv" + ], + "prepare_command": "./scripts/build-mailcore2-ios-cocoapod.sh" +} diff --git a/Pods/mailcore2-ios/README.md b/Pods/mailcore2-ios/README.md new file mode 100644 index 0000000000000000000000000000000000000000..048742d6b01857eae2638ed98a3d2a791192b3da --- /dev/null +++ b/Pods/mailcore2-ios/README.md @@ -0,0 +1,72 @@ +## MailCore 2: Introduction ## + +MailCore 2 provides a simple and asynchronous Objective-C API to work with the e-mail protocols **IMAP**, **POP** and **SMTP**. The API has been redesigned from the ground up. It features: + +- **POP**, **IMAP** and **SMTP** support +- **[RFC822](http://www.ietf.org/rfc/rfc0822.txt)** parser and generator +- **Asynchronous** APIs +- **HTML** rendering of messages +- **iOS** and **Mac** support + +[](https://travis-ci.org/MailCore/mailcore2) + + +## Installation ## + +### Build for iOS/OSX ### + +Read [instructions for iOS/OSX](https://github.com/MailCore/mailcore2/blob/master/build-mac/README.md). + +### Build for Android ### + +Read [instructions for Android](https://github.com/MailCore/mailcore2/blob/master/build-android/README.md). + +### Build for Windows ### + +Read [instructions for Windows](https://github.com/MailCore/mailcore2/blob/master/build-windows/README.md). + +### Build for Linux ### + +Read [instructions for Linux](https://github.com/MailCore/mailcore2/blob/master/build-linux/README.md). + +## Basic IMAP Usage ## + +Using MailCore 2 is just a little more complex conceptually than the original MailCore. All fetch requests in MailCore 2 are made asynchronously through a queue. What does this mean? Well, let's take a look at a simple example: + +```objc + MCOIMAPSession *session = [[MCOIMAPSession alloc] init]; + [session setHostname:@"imap.gmail.com"]; + [session setPort:993]; + [session setUsername:@"ADDRESS@gmail.com"]; + [session setPassword:@"123456"]; + [session setConnectionType:MCOConnectionTypeTLS]; + + MCOIMAPMessagesRequestKind requestKind = MCOIMAPMessagesRequestKindHeaders; + NSString *folder = @"INBOX"; + MCOIndexSet *uids = [MCOIndexSet indexSetWithRange:MCORangeMake(1, UINT64_MAX)]; + + MCOIMAPFetchMessagesOperation *fetchOperation = [session fetchMessagesOperationWithFolder:folder requestKind:requestKind uids:uids]; + + [fetchOperation start:^(NSError * error, NSArray * fetchedMessages, MCOIndexSet * vanishedMessages) { + //We've finished downloading the messages! + + //Let's check if there was an error: + if(error) { + NSLog(@"Error downloading message headers:%@", error); + } + + //And, let's print out the messages... + NSLog(@"The post man delivereth:%@", fetchedMessages); + }]; +``` + +In this sample, we retrieved and printed a list of email headers from an IMAP server. In order to execute the fetch, we request an asynchronous operation object from the `MCOIMAPSession` instance with our parameters (more on this later). This operation object is able to initiate a connection to Gmail when we call the `start` method. Now here's where things get a little tricky. We call the `start` function with an Objective-C block, which is executed on the main thread when the fetch operation completes. The actual fetching from IMAP is done on a **background thread**, leaving your UI and other processing **free to use the main thread**. + +## Documentation ## + +* Class documentation [Obj-C](http://libmailcore.com/api/objc/index.html) / [Java](http://libmailcore.com/api/java/index.html) +* [Wiki](https://github.com/MailCore/mailcore2/wiki) + +## License ## + +MailCore 2 is BSD-Licensed. diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAbstract.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAbstract.h new file mode 100644 index 0000000000000000000000000000000000000000..03299ec4aaacd17a44a59740a2e8c667f97efe7d --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAbstract.h @@ -0,0 +1,13 @@ +#ifndef MAILCORE_MCABSTRACT_H + +#define MAILCORE_MCABSTRACT_H + +#include <MailCore/MCAbstractMessage.h> +#include <MailCore/MCAbstractMessagePart.h> +#include <MailCore/MCAbstractMultipart.h> +#include <MailCore/MCAbstractPart.h> +#include <MailCore/MCAddress.h> +#include <MailCore/MCMessageConstants.h> +#include <MailCore/MCMessageHeader.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAbstractMessage.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAbstractMessage.h new file mode 100644 index 0000000000000000000000000000000000000000..1f567a52efd16db25ba17478e36ebc01f4b83e22 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAbstractMessage.h @@ -0,0 +1,53 @@ +#ifndef MAILCORE_MCABSTRACTMESSAGE_H + +#define MAILCORE_MCABSTRACTMESSAGE_H + +#include <MailCore/MCBaseTypes.h> + +#ifdef __cplusplus + +namespace mailcore { + + class AbstractPart; + class MessageHeader; + + class MAILCORE_EXPORT AbstractMessage : public Object { + public: + AbstractMessage(); + virtual ~AbstractMessage(); + + /** Header of the message. */ + virtual MessageHeader * header(); + /** Set a header of the message. */ + virtual void setHeader(MessageHeader * header); + + /** Returns a part matching the given contentID. */ + virtual AbstractPart * partForContentID(String * contentID); + /** Returns a part matching the given uniqueID */ + virtual AbstractPart * partForUniqueID(String * uniqueID); + + /** Returns the list of attachments, not part of the content of the message. */ + virtual Array * /* AbstractPart */ attachments(); + /** Returns the list of attachments that are shown inline in the content of the message. */ + virtual Array * /* AbstractPart */ htmlInlineAttachments(); + /** Returns the list of the text parts required to render the message properly. */ + virtual Array * /* AbstractPart */ requiredPartsForRendering(); + + public: //subclass behavior + AbstractMessage(AbstractMessage * other); + virtual String * description(); + virtual Object * copy(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * hashmap); + + private: + MessageHeader * mHeader; + void init(); + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAbstractMessagePart.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAbstractMessagePart.h new file mode 100644 index 0000000000000000000000000000000000000000..74be7579717e1cacbe58ad40b516c0c56746361e --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAbstractMessagePart.h @@ -0,0 +1,45 @@ +#ifndef MAILCORE_MCABSTRACTMESSAGEPART_H + +#define MAILCORE_MCABSTRACTMESSAGEPART_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCAbstractPart.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MessageHeader; + + class MAILCORE_EXPORT AbstractMessagePart : public AbstractPart { + public: + AbstractMessagePart(); + virtual ~AbstractMessagePart(); + + virtual MessageHeader * header(); + virtual void setHeader(MessageHeader * header); + + virtual AbstractPart * mainPart(); + virtual void setMainPart(AbstractPart * mainPart); + + public: //subclass behavior + AbstractMessagePart(AbstractMessagePart * other); + virtual String * description(); + virtual Object * copy(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + + virtual AbstractPart * partForContentID(String * contentID); + virtual AbstractPart * partForUniqueID(String * uniqueID); + + private: + AbstractPart * mMainPart; + MessageHeader * mHeader; + void init(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAbstractMultipart.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAbstractMultipart.h new file mode 100644 index 0000000000000000000000000000000000000000..814ee6dfad4aaa20583ccb793a9ecf99908d7cab --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAbstractMultipart.h @@ -0,0 +1,39 @@ +#ifndef MAILCORE_MCABSTRACTMULTIPART_H + +#define MAILCORE_MCABSTRACTMULTIPART_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCAbstractPart.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT AbstractMultipart : public AbstractPart { + public: + AbstractMultipart(); + virtual ~AbstractMultipart(); + + virtual Array * parts(); + virtual void setParts(Array * parts); + + public: //subclass behavior + AbstractMultipart(AbstractMultipart * other); + virtual String * description(); + virtual Object * copy(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + + virtual AbstractPart * partForContentID(String * contentID); + virtual AbstractPart * partForUniqueID(String * uniqueID); + + private: + Array * mParts; + void init(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAbstractPart.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAbstractPart.h new file mode 100644 index 0000000000000000000000000000000000000000..88b5b331c57a074ef3774d885919fed5ad590268 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAbstractPart.h @@ -0,0 +1,91 @@ +#ifndef MAILCORE_MCABSTRACTPART_H + +#define MAILCORE_MCABSTRACTPART_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCMessageConstants.h> + +#ifdef __cplusplus + +namespace mailcore { + + class AbstractMessage; + + class MAILCORE_EXPORT AbstractPart : public Object { + public: + AbstractPart(); + virtual ~AbstractPart(); + + virtual PartType partType(); + virtual void setPartType(PartType type); + + virtual String * filename(); + virtual void setFilename(String * filename); + + virtual String * mimeType(); + virtual void setMimeType(String * mimeType); + + virtual String * charset(); + virtual void setCharset(String * charset); + + virtual String * uniqueID(); + virtual void setUniqueID(String * uniqueID); + + virtual String * contentID(); + virtual void setContentID(String * contentID); + + virtual String * contentLocation(); + virtual void setContentLocation(String * contentLocation); + + virtual String * contentDescription(); + virtual void setContentDescription(String * contentDescription); + + virtual bool isInlineAttachment(); + virtual void setInlineAttachment(bool inlineAttachment); + + virtual bool isAttachment(); + virtual void setAttachment(bool attachment); + + virtual AbstractPart * partForContentID(String * contentID); + virtual AbstractPart * partForUniqueID(String * uniqueID); + + virtual String * decodedStringForData(Data * data); + + void setContentTypeParameters(HashMap * parameters); + Array * allContentTypeParametersNames(); + void setContentTypeParameter(String * name, String * object); + void removeContentTypeParameter(String * name); + String * contentTypeParameterValueForName(String * name); + + public: // subclass behavior + AbstractPart(AbstractPart * other); + virtual String * description(); + virtual Object * copy(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + + public: // private + virtual void importIMAPFields(struct mailimap_body_fields * fields, + struct mailimap_body_ext_1part * extension); + virtual void applyUniquePartID(); + + private: + String * mUniqueID; + String * mFilename; + String * mMimeType; + String * mCharset; + String * mContentID; + String * mContentLocation; + String * mContentDescription; + bool mInlineAttachment; + bool mAttachment; + PartType mPartType; + HashMap * mContentTypeParameters; + void init(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAccountValidator.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAccountValidator.h new file mode 100644 index 0000000000000000000000000000000000000000..a1d6299f0adb3a4f9b6eb370d98dd7e32fee9af9 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAccountValidator.h @@ -0,0 +1,131 @@ +// +// MCAccountValidator.h +// mailcore2 +// +// Created by Christopher Hockley on 22/01/15. +// Copyright (c) 2015 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCACCOUNTVALIDATOR_H + +#define MAILCORE_MCACCOUNTVALIDATOR_H + +#include <MailCore/MCBaseTypes.h> + +#ifdef __cplusplus + +namespace mailcore { + + class NetService; + class MailProvider; + class MXRecordResolverOperation; + class IMAPAsyncSession; + class POPAsyncSession; + class SMTPAsyncSession; + + class MAILCORE_EXPORT AccountValidator : public Operation, public OperationCallback, public ConnectionLogger { + public: + AccountValidator(); + virtual ~AccountValidator(); + + virtual void setEmail(String * email); + virtual String * email(); /* for SMTP */ + virtual void setUsername(String * username); + virtual String * username(); + virtual void setPassword(String * password); + virtual String * password(); + virtual void setOAuth2Token(String * OAuth2Token); + virtual String * OAuth2Token(); + + virtual void setImapEnabled(bool enabled); + virtual bool isImapEnabled(); + + virtual void setPopEnabled(bool enabled); + virtual bool isPopEnabled(); + + virtual void setSmtpEnabled(bool enabled); + virtual bool isSmtpEnabled(); + + virtual void setImapServices(Array * imapServices); + virtual Array * /* NetService */ imapServices(); + virtual void setSmtpServices(Array * smtpServices); + virtual Array * /* NetService */ smtpServices(); + virtual void setPopServices(Array * popServices); + virtual Array * /* NetService */ popServices(); + + virtual void setConnectionLogger(ConnectionLogger * logger); + virtual ConnectionLogger * connectionLogger(); + + // result + virtual String * identifier(); + virtual NetService * imapServer(); + virtual NetService * popServer(); + virtual NetService * smtpServer(); + virtual ErrorCode imapError(); + virtual ErrorCode popError(); + virtual ErrorCode smtpError(); + virtual String * imapLoginResponse(); + + virtual void start(); + virtual void cancel(); + + public: // ConnectionLogger + virtual void log(void * sender, ConnectionLogType logType, Data * buffer); + + private: + String * mEmail; /* for SMTP */ + String * mUsername; + String * mPassword; + String * mOAuth2Token; + + Array * /* NetService */ mImapServices; + Array * /* NetService */ mSmtpServices; + Array * /* NetService */ mPopServices; + + // result + String * mIdentifier; + NetService * mImapServer; + NetService * mPopServer; + NetService * mSmtpServer; + ErrorCode mImapError; + ErrorCode mPopError; + ErrorCode mSmtpError; + String * mImapLoginResponse; + + MailProvider * mProvider; + + //indexs for services being tested + int mCurrentServiceIndex; + int mCurrentServiceTested; + + Operation * mOperation; + virtual void operationFinished(Operation * op); + + OperationQueue * mQueue; + MXRecordResolverOperation * mResolveMX; + + IMAPAsyncSession * mImapSession; + POPAsyncSession * mPopSession; + SMTPAsyncSession * mSmtpSession; + + bool mImapEnabled; + bool mPopEnabled; + bool mSmtpEnabled; + + pthread_mutex_t mConnectionLoggerLock; + ConnectionLogger * mConnectionLogger; + + void init(); + void setupServices(); + void resolveMX(); + void resolveMXDone(); + void resolveMXTimeout(void * context); + void startCheckingHosts(); + void checkNextHost(); + void checkNextHostDone(); + }; +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAddress.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAddress.h new file mode 100644 index 0000000000000000000000000000000000000000..e6644576e41d82cb8194f0d5c53142ad6922e639 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAddress.h @@ -0,0 +1,65 @@ +#ifndef MAILCORE_MCADDRESS_H + +#define MAILCORE_MCADDRESS_H + +#include <MailCore/MCBaseTypes.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT Address : public Object { + public: + Address(); + virtual ~Address(); + + static Address * addressWithDisplayName(String * displayName, String * mailbox); + static Address * addressWithMailbox(String * mailbox); + static Address * addressWithRFC822String(String * RFC822String); + static Address * addressWithNonEncodedRFC822String(String * nonEncodedRFC822String); + + static Array * addressesWithRFC822String(String * string); + static Array * addressesWithNonEncodedRFC822String(String * string); + + static String * RFC822StringForAddresses(Array * addresses); + static String * nonEncodedRFC822StringForAddresses(Array * addresses); + + virtual void setDisplayName(String * displayName); + virtual String * displayName(); + + virtual void setMailbox(String * address); + virtual String * mailbox(); + + virtual String * RFC822String(); + virtual String * nonEncodedRFC822String(); + + public: // subclass behavior. + Address(Address * other); + virtual String * description(); + virtual bool isEqual(Object * otherObject); + virtual unsigned int hash(); + virtual Object * copy(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + + public: // private + // Must be released + virtual struct mailimf_address * createIMFAddress(); + virtual struct mailimf_mailbox * createIMFMailbox(); + + // Additions + static Address * addressWithIMFMailbox(struct mailimf_mailbox * mb); + static Address * addressWithNonEncodedIMFMailbox(struct mailimf_mailbox * mb); + static Address * addressWithIMAPAddress(struct mailimap_address * imap_addr); + + private: + String * mDisplayName; + String * mMailbox; + void init(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAddressDisplay.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAddressDisplay.h new file mode 100644 index 0000000000000000000000000000000000000000..d4841469b99aa5f32ed860624d8e498f65c1acca --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAddressDisplay.h @@ -0,0 +1,36 @@ +// +// MCAddressDisplay.h +// testUI +// +// Created by DINH Viêt Hoà on 1/27/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCADDRESSDISPLAY_H + +#define MAILCORE_MCADDRESSDISPLAY_H + +#include <MailCore/MCAbstract.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT AddressDisplay { + public: + static String * sanitizeDisplayName(String * displayName); + + static String * displayStringForAddress(Address * address); + static String * shortDisplayStringForAddress(Address * address); + static String * veryShortDisplayStringForAddress(Address * address); + + static String * displayStringForAddresses(Array * /* Address */ addresses); + static String * shortDisplayStringForAddresses(Array * /* Address */ addresses); + static String * veryShortDisplayStringForAddresses(Array * /* Address */ addresses); + }; + +}; + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCArray.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCArray.h new file mode 100644 index 0000000000000000000000000000000000000000..bed43fe52f92b3b51d70331d54947ebe952fa564 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCArray.h @@ -0,0 +1,59 @@ +#ifndef MAILCORE_MCARRAY_H + +#define MAILCORE_MCARRAY_H + +#include <MailCore/MCObject.h> + +#ifdef __cplusplus + +typedef struct carray_s carray; + +namespace mailcore { + + class String; + + class MAILCORE_EXPORT Array : public Object { + public: + Array(); + virtual ~Array(); + + static Array * array(); + static Array * arrayWithObject(Object * obj); + + virtual unsigned int count(); + virtual void addObject(Object * obj); + virtual void removeObjectAtIndex(unsigned int idx); + virtual void removeObject(Object * obj); + virtual int indexOfObject(Object * obj); + virtual Object * objectAtIndex(unsigned int idx) ATTRIBUTE_RETURNS_NONNULL; + virtual void replaceObject(unsigned int idx, Object * obj); + virtual void insertObject(unsigned int idx, Object * obj); + virtual void removeAllObjects(); + + virtual void addObjectsFromArray(Array * array); + virtual Object * lastObject(); + virtual void removeLastObject(); + virtual bool containsObject(Object * obj); + + virtual Array * sortedArray(int (* compare)(void * a, void * b, void * context), void * context); + virtual void sortArray(int (* compare)(void * a, void * b, void * context), void * context); + virtual String * componentsJoinedByString(String * delimiter); + + public: // subclass behavior + Array(Array * o); + virtual String * description(); + virtual Object * copy(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + virtual bool isEqual(Object * otherObject); + + private: + carray * mArray; + void init(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAssert.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAssert.h new file mode 100644 index 0000000000000000000000000000000000000000..7858693f8289c2c93f65e59790d68f285cfdf217 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAssert.h @@ -0,0 +1,18 @@ +#ifndef MAILCORE_MCASSERT_H + +#define MAILCORE_MCASSERT_H + +#include <MailCore/MCUtils.h> + +#define MCAssert(cond) MCAssertInternal(__FILE__, __LINE__, cond, #cond) + +#ifdef __cplusplus +extern "C" { +#endif + MAILCORE_EXPORT + void MCAssertInternal(const char * filename, unsigned int line, int cond, const char * condString) CLANG_ANALYZER_NORETURN; +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAsync.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAsync.h new file mode 100644 index 0000000000000000000000000000000000000000..90b3e26332828a5572ad796099418893cea59eeb --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAsync.h @@ -0,0 +1,18 @@ +// +// MCAsync.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/11/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCASYNC_H + +#define MAILCORE_MCASYNC_H + +#include <MailCore/MCAsyncSMTP.h> +#include <MailCore/MCAsyncIMAP.h> +#include <MailCore/MCAsyncPOP.h> +#include <MailCore/MCAsyncNNTP.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAsyncIMAP.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAsyncIMAP.h new file mode 100644 index 0000000000000000000000000000000000000000..effa094733c61244e7b0721ebc9ed750f19c490a --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAsyncIMAP.h @@ -0,0 +1,41 @@ +// +// MCAsyncIMAP.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/12/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCASYNCIMAP_H + +#define MAILCORE_MCASYNCIMAP_H + +#include <MailCore/MCIMAPAsyncSession.h> +#include <MailCore/MCIMAPOperation.h> +#include <MailCore/MCIMAPFetchFoldersOperation.h> +#include <MailCore/MCIMAPAppendMessageOperation.h> +#include <MailCore/MCIMAPCopyMessagesOperation.h> +#include <MailCore/MCIMAPMoveMessagesOperation.h> +#include <MailCore/MCIMAPFetchMessagesOperation.h> +#include <MailCore/MCIMAPFetchContentOperation.h> +#include <MailCore/MCIMAPFetchContentToFileOperation.h> +#include <MailCore/MCIMAPFetchParsedContentOperation.h> +#include <MailCore/MCIMAPIdleOperation.h> +#include <MailCore/MCIMAPFolderInfo.h> +#include <MailCore/MCIMAPFolderInfoOperation.h> +#include <MailCore/MCIMAPFolderStatusOperation.h> +#include <MailCore/MCIMAPSession.h> +#include <MailCore/MCIMAPNamespace.h> +#include <MailCore/MCIMAPIdentity.h> +#include <MailCore/MCIMAPSearchOperation.h> +#include <MailCore/MCIMAPSearchExpression.h> +#include <MailCore/MCIMAPFetchNamespaceOperation.h> +#include <MailCore/MCIMAPIdentityOperation.h> +#include <MailCore/MCIMAPCapabilityOperation.h> +#include <MailCore/MCIMAPQuotaOperation.h> +#include <MailCore/MCIMAPOperationCallback.h> +#include <MailCore/MCIMAPMessageRenderingOperation.h> +#include <MailCore/MCIMAPCustomCommandOperation.h> +#include <MailCore/MCIMAPCheckAccountOperation.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAsyncNNTP.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAsyncNNTP.h new file mode 100644 index 0000000000000000000000000000000000000000..326138dc1e468f7bd50abc9c5a5de8800f8bef60 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAsyncNNTP.h @@ -0,0 +1,24 @@ +// +// MCAsyncNNTP.h +// mailcore2 +// +// Created by Robert Widmann on 8/13/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCASYNCNNTP_H + +#define MAILCORE_MCASYNCNNTP_H + +#include <MailCore/MCNNTPAsyncSession.h> +#include <MailCore/MCNNTPOperation.h> +#include <MailCore/MCNNTPFetchHeaderOperation.h> +#include <MailCore/MCNNTPFetchArticleOperation.h> +#include <MailCore/MCNNTPFetchAllArticlesOperation.h> +#include <MailCore/MCNNTPListNewsgroupsOperation.h> +#include <MailCore/MCNNTPFetchOverviewOperation.h> +#include <MailCore/MCNNTPFetchServerTimeOperation.h> +#include <MailCore/MCNNTPPostOperation.h> +#include <MailCore/MCNNTPOperationCallback.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAsyncPOP.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAsyncPOP.h new file mode 100644 index 0000000000000000000000000000000000000000..797403102a1e6fbf478d17f2ace6ae10ffe0b329 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAsyncPOP.h @@ -0,0 +1,20 @@ +// +// MCAsyncPOP.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/16/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCASYNCPOP_H + +#define MAILCORE_MCASYNCPOP_H + +#include <MailCore/MCPOPAsyncSession.h> +#include <MailCore/MCPOPOperation.h> +#include <MailCore/MCPOPFetchHeaderOperation.h> +#include <MailCore/MCPOPFetchMessageOperation.h> +#include <MailCore/MCPOPFetchMessagesOperation.h> +#include <MailCore/MCPOPOperationCallback.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAsyncSMTP.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAsyncSMTP.h new file mode 100644 index 0000000000000000000000000000000000000000..d7bac9db6fa318d74bf2440a9d226e557073208a --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAsyncSMTP.h @@ -0,0 +1,17 @@ +// +// MCAsyncSMTP.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/11/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCASYNCSMTP_H + +#define MAILCORE_MCASYNCSMTP_H + +#include <MailCore/MCSMTPAsyncSession.h> +#include <MailCore/MCSMTPOperation.h> +#include <MailCore/MCSMTPOperationCallback.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAttachment.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAttachment.h new file mode 100644 index 0000000000000000000000000000000000000000..ae02d256c490f06ba527510f3fc84ef19148d72b --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAttachment.h @@ -0,0 +1,61 @@ +#ifndef MAILCORE_MCATTACHMENT_H + +#define MAILCORE_MCATTACHMENT_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCAbstractPart.h> +#include <MailCore/MCAbstractMultipart.h> +#include <MailCore/MCMessageConstants.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MessagePart; + + class MAILCORE_EXPORT Attachment : public AbstractPart { + public: + static String * mimeTypeForFilename(String * filename); + static Attachment * attachmentWithContentsOfFile(String * filename); + static Attachment * attachmentWithData(String * filename, Data * data); + static Attachment * attachmentWithHTMLString(String * htmlString); + static Attachment * attachmentWithRFC822Message(Data * messageData); + static Attachment * attachmentWithText(String * text); + + Attachment(); + virtual ~Attachment(); + + virtual void setPartID(String * partID); + virtual String * partID(); + + virtual void setData(Data * data); + virtual Data * data(); + virtual String * decodedString(); + + public: // subclass behavior + Attachment(Attachment * other); + virtual String * description(); + virtual Object * copy(); + + public: // private + static AbstractPart * attachmentsWithMIME(struct mailmime * mime); + + private: + Data * mData; + String * mPartID; + + void init(); + static void fillMultipartSubAttachments(AbstractMultipart * multipart, struct mailmime * mime); + static AbstractPart * attachmentsWithMIMEWithMain(struct mailmime * mime, bool isMain); + static Attachment * attachmentWithSingleMIME(struct mailmime * mime); + static MessagePart * attachmentWithMessageMIME(struct mailmime * mime); + static Encoding encodingForMIMEEncoding(struct mailmime_mechanism * mechanism, int defaultMimeEncoding); + static HashMap * readMimeTypesFile(String * filename); + void setContentTypeParameters(HashMap * parameters); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAutoreleasePool.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAutoreleasePool.h new file mode 100644 index 0000000000000000000000000000000000000000..c3abf4779325cf9700a6fd902bdca060dbf9b56c --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCAutoreleasePool.h @@ -0,0 +1,44 @@ +#ifndef MAILCORE_MCAUTORELEASEPOOL_H + +#define MAILCORE_MCAUTORELEASEPOOL_H + +#include <MailCore/MCObject.h> +#include <pthread.h> + +#ifdef __cplusplus + +typedef struct carray_s carray; + +namespace mailcore { + + class MAILCORE_EXPORT AutoreleasePool : public Object { + public: + AutoreleasePool(); + virtual ~AutoreleasePool(); + + static void autorelease(Object * obj); + + public: // subclass behavior + virtual String * description(); + + private: + static void init(); + static pthread_key_t autoreleasePoolStackKey; + carray * mPoolObjects; + static carray * createAutoreleasePoolStackIfNeeded(); + static void destroyAutoreleasePoolStack(void *); + static void initAutoreleasePoolStackKey(); + static AutoreleasePool * currentAutoreleasePool(); + virtual void add(Object * obj); +#ifdef __APPLE__ + void * mAppleAutoreleasePool; + static void * createAppleAutoreleasePool(); + static void releaseAppleAutoreleasePool(void * appleAutoreleasePool); +#endif + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCBaseTypes.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCBaseTypes.h new file mode 100644 index 0000000000000000000000000000000000000000..3088d4c216c7bfa0f6f3a09ce4e449fd7f8b0d67 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCBaseTypes.h @@ -0,0 +1,31 @@ +#ifndef MAILCORE_MCBASETYPES_H + +#define MAILCORE_MCBASETYPES_H + +#include <MailCore/MCAutoreleasePool.h> +#include <MailCore/MCObject.h> +#include <MailCore/MCValue.h> +#include <MailCore/MCString.h> +#include <MailCore/MCData.h> +#include <MailCore/MCArray.h> +#include <MailCore/MCHashMap.h> +#include <MailCore/MCJSON.h> +#include <MailCore/MCMD5.h> +#include <MailCore/MCNull.h> +#include <MailCore/MCSet.h> +#include <MailCore/MCHash.h> +#include <MailCore/MCLog.h> +#include <MailCore/MCAssert.h> +#include <MailCore/MCUtils.h> +#include <MailCore/MCRange.h> +#include <MailCore/MCIndexSet.h> +#include <MailCore/MCOperation.h> +#include <MailCore/MCOperationQueue.h> +#include <MailCore/MCOperationCallback.h> +#include <MailCore/MCLibetpanTypes.h> +#include <MailCore/MCICUTypes.h> +#include <MailCore/MCIterator.h> +#include <MailCore/MCConnectionLogger.h> +#include <MailCore/MCHTMLCleaner.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCConnectionLogger.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCConnectionLogger.h new file mode 100644 index 0000000000000000000000000000000000000000..d5282db46d5a4432d6582eadf68aba5cb2ac6fde --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCConnectionLogger.h @@ -0,0 +1,47 @@ +// +// MCConnectionLogger.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 6/24/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_CONNECTION_LOGGER_H + +#define MAILCORE_CONNECTION_LOGGER_H + +#include <stdlib.h> + +#include <MailCore/MCUtils.h> + +#ifdef __cplusplus + +namespace mailcore { + + class Data; + + enum ConnectionLogType { + // Received data + ConnectionLogTypeReceived, + // Sent data + ConnectionLogTypeSent, + // Sent private data + ConnectionLogTypeSentPrivate, + // Parse error + ConnectionLogTypeErrorParse, + // Error while receiving data - log() is called with a NULL buffer. + ConnectionLogTypeErrorReceived, + // Error while sending data - log() is called with a NULL buffer. + ConnectionLogTypeErrorSent, + }; + + class MAILCORE_EXPORT ConnectionLogger { + public: + virtual void log(void * sender, ConnectionLogType logType, Data * buffer) {} + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCCore.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCCore.h new file mode 100644 index 0000000000000000000000000000000000000000..323bb606cc3dbe396856544b91ba5d71860ef502 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCCore.h @@ -0,0 +1,23 @@ +// +// Core.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/10/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCCORE_H + +#define MAILCORE_MCCORE_H + +#include <MailCore/MCAbstract.h> +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCIMAP.h> +#include <MailCore/MCPOP.h> +#include <MailCore/MCNNTP.h> +#include <MailCore/MCRFC822.h> +#include <MailCore/MCSMTP.h> +#include <MailCore/MCRenderer.h> +#include <MailCore/MCProvider.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCData.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCData.h new file mode 100644 index 0000000000000000000000000000000000000000..ef7acda3a844fb0b65a2b06ad1166d90279a03e2 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCData.h @@ -0,0 +1,93 @@ +#ifndef MAILCORE_MCDATA_H + +#define MAILCORE_MCDATA_H + +#include <stdlib.h> + +#include <MailCore/MCObject.h> +#include <MailCore/MCMessageConstants.h> + +#ifdef __APPLE__ +#import <CoreFoundation/CoreFoundation.h> +#endif + +#ifdef __cplusplus + +namespace mailcore { + + class String; + + typedef void (*BytesDeallocator)(char * bytes, unsigned int length); + + class MAILCORE_EXPORT Data : public Object { + public: + Data(); + Data(int capacity); + Data(const char * bytes, unsigned int length); + virtual ~Data(); + + static Data * data(); + static Data * dataWithCapacity(int capacity); + static Data * dataWithContentsOfFile(String * filename); + static Data * dataWithBytes(const char * bytes, unsigned int length); + + virtual char * bytes(); + virtual unsigned int length(); + + virtual void increaseCapacity(unsigned int length); + + virtual void appendData(Data * otherData); + virtual void appendBytes(const char * bytes, unsigned int length); + virtual void setBytes(const char * bytes, unsigned int length); + virtual void setData(Data * otherData); + + // Helpers + virtual String * stringWithDetectedCharset(); + virtual String * stringWithDetectedCharset(String * charset, bool isHTML); + virtual String * stringWithCharset(const char * charset); + virtual Data * decodedDataUsingEncoding(Encoding encoding); + + virtual String * base64String(); + + virtual ErrorCode writeToFile(String * filename); + + public: // private + virtual String * charsetWithFilteredHTML(bool filterHTML, String * hintCharset = NULL); + + /* Replace contents of Data instance with contents of a given bytes without extra copying. + Memory ownership transferred from client code to the Data instance. + Data destructor will call bytesDeallocator function for memory releasing. + */ + void takeBytesOwnership(char * bytes, unsigned int length, BytesDeallocator bytesDeallocator); + +#ifdef __APPLE__ + virtual CFDataRef destructiveNSData(); +#endif + + public: // subclass behavior + Data(Data * otherData); + virtual String * description(); + virtual Object * copy(); + virtual bool isEqual(Object * otherObject); + virtual unsigned int hash(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + + private: + char * mBytes; + unsigned int mLength; + unsigned int mAllocated; + bool mExternallyAllocatedMemory; + BytesDeallocator mBytesDeallocator; + void allocate(unsigned int length, bool force = false); + void init(); + void reset(); + String * charsetWithFilteredHTMLWithoutHint(bool filterHTML); + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCDateFormatter.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCDateFormatter.h new file mode 100644 index 0000000000000000000000000000000000000000..4a789b1dd1f4157734a52606b1e6df878fedc32c --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCDateFormatter.h @@ -0,0 +1,75 @@ +// +// MCDateFormatter.h +// testUI +// +// Created by DINH Viêt Hoà on 1/28/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCDATEFORMATTER_H + +#define MAILCORE_MCDATEFORMATTER_H + +#include <MailCore/MCBaseTypes.h> + +// predeclare UDateFormat +// copied from <unicode/udat.h> +typedef void * UDateFormat; + +#ifdef __cplusplus + +namespace mailcore { + + class String; + + // Uses same values as UDateFormatStyle + enum DateFormatStyle { + DateFormatStyleFull = 0 /* UDAT_FULL*/, + DateFormatStyleLong = 1 /* UDAT_LONG */, + DateFormatStyleMedium = 2 /* UDAT_MEDIUM */, + DateFormatStyleShort = 3 /* UDAT_SHORT */, + DateFormatStyleNone = -1 /* UDAT_NONE */, + }; + + class MAILCORE_EXPORT DateFormatter : public Object { + public: + DateFormatter(); + virtual ~DateFormatter(); + + static DateFormatter * dateFormatter(); + + virtual void prepare(); + + virtual void setDateStyle(DateFormatStyle style); + virtual DateFormatStyle dateStyle(); + + virtual void setTimeStyle(DateFormatStyle style); + virtual DateFormatStyle timeStyle(); + + virtual void setLocale(String * locale); + virtual String * locale(); + + virtual void setTimezone(String * timezone); + virtual String * timezone(); + + virtual void setDateFormat(String * dateFormat); + virtual String * dateFormat(); + + virtual String * stringFromDate(time_t date); + virtual time_t dateFromString(String * dateString); + + private: + UDateFormat * mDateFormatter; + DateFormatStyle mDateStyle; + DateFormatStyle mTimeStyle; + String * mDateFormat; + String * mTimezone; + String * mLocale; + void * mAppleDateFormatter; + }; + +} + +#endif + +#endif /* defined(__testUI__MCDateFormatter__) */ diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCHTMLCleaner.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCHTMLCleaner.h new file mode 100644 index 0000000000000000000000000000000000000000..eccf88c9263682461ba8165885787a732880b937 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCHTMLCleaner.h @@ -0,0 +1,29 @@ +// +// HTMLCleaner.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 2/3/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_HTMLCLEANER_H + +#define MAILCORE_HTMLCLEANER_H + +#include <MailCore/MCString.h> +#include <MailCore/MCUtils.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT HTMLCleaner { + public: + static String * cleanHTML(String * input); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCHTMLRendererCallback.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCHTMLRendererCallback.h new file mode 100644 index 0000000000000000000000000000000000000000..6078f9eb4af60a13aee18facb297150e4f67de4c --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCHTMLRendererCallback.h @@ -0,0 +1,74 @@ +// +// MCHTMLRendererCallback.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 2/2/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCHTMLRENDERERCALLBACK_H + +#define MAILCORE_MCHTMLRENDERERCALLBACK_H + +#include <MailCore/MCAbstract.h> +#include <MailCore/MCIMAP.h> +#include <MailCore/MCUtils.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MessageParser; + class Attachment; + + class MAILCORE_EXPORT HTMLRendererIMAPCallback { + public: + HTMLRendererIMAPCallback() {} + virtual ~HTMLRendererIMAPCallback() {} + + virtual Data * dataForIMAPPart(String * folder, IMAPPart * part) { return NULL; } + virtual void prefetchAttachmentIMAPPart(String * folder, IMAPPart * part) {} + virtual void prefetchImageIMAPPart(String * folder, IMAPPart * part) {} + }; + + class MAILCORE_EXPORT HTMLRendererTemplateCallback { + public: + HTMLRendererTemplateCallback(); + virtual ~HTMLRendererTemplateCallback(); + + virtual void setMixedTextAndAttachmentsModeEnabled(bool enabled); + + virtual bool canPreviewPart(AbstractPart * part); + virtual bool shouldShowPart(AbstractPart * part); + + virtual HashMap * templateValuesForHeader(MessageHeader * header); + virtual HashMap * templateValuesForPart(AbstractPart * part); + + virtual String * templateForMainHeader(MessageHeader * header); + virtual String * templateForImage(AbstractPart * part); + virtual String * templateForAttachment(AbstractPart * part); + virtual String * templateForMessage(AbstractMessage * message); + virtual String * templateForEmbeddedMessage(AbstractMessagePart * part); + virtual String * templateForEmbeddedMessageHeader(MessageHeader * header); + virtual String * templateForAttachmentSeparator(); + + virtual String * cleanHTMLForPart(String * html); + + // Can be used to filter some HTML tags. + virtual String * filterHTMLForPart(String * html); + + // Can be used to hide quoted text. + virtual String * filterHTMLForMessage(String * html); + }; + + class MAILCORE_EXPORT HTMLRendererRFC822Callback { + public: + virtual Data * dataForRFC822Part(String * folder, Attachment * part) { return NULL; } + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCHash.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCHash.h new file mode 100644 index 0000000000000000000000000000000000000000..5ef0c291959342af6a6a54233faba3f3b6a4bb85 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCHash.h @@ -0,0 +1,15 @@ +#ifndef MAILCORE_MCHASH_H + +#define MAILCORE_MCHASH_H + +#ifdef __cplusplus + +namespace mailcore { + + unsigned int hashCompute(const char * key, unsigned int len); + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCHashMap.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCHashMap.h new file mode 100644 index 0000000000000000000000000000000000000000..b6ac6d2f8fab0b8a70b481230e5f19ae0463a053 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCHashMap.h @@ -0,0 +1,53 @@ +#ifndef MAILCORE_MCHASHMAP_H + +#define MAILCORE_MCHASHMAP_H + +#include <MailCore/MCObject.h> + +#ifdef __cplusplus + +namespace mailcore { + + class String; + class Array; + struct HashMapCell; + typedef HashMapCell HashMapIter; + + class MAILCORE_EXPORT HashMap : public Object { + public: + HashMap(); + virtual ~HashMap(); + + static HashMap * hashMap(); + + virtual unsigned int count(); + virtual void setObjectForKey(Object * key, Object * value); + virtual void removeObjectForKey(Object * key); + virtual Object * objectForKey(Object * key); + virtual Array * allKeys(); + virtual Array * allValues(); + virtual void removeAllObjects(); + + public: // subclass behavior + HashMap(HashMap * o); + virtual String * description(); + virtual Object * copy(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + virtual bool isEqual(Object * otherObject); + + private: + unsigned int mAllocated; + unsigned int mCount; + void ** mCells; + HashMapIter * iteratorBegin(); + HashMapIter * iteratorNext(HashMapIter * iter); + void allocate(unsigned int size); + void init(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCICUTypes.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCICUTypes.h new file mode 100644 index 0000000000000000000000000000000000000000..cf3bfa42cb0fc7a407ba645fe35251948ce915af --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCICUTypes.h @@ -0,0 +1,21 @@ +// +// MCICUTypes.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 4/18/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCICUTYPES_H + +#define MAILCORE_MCICUTYPES_H + +#ifdef _MSC_VER +typedef wchar_t UChar; +#elif defined(__CHAR16_TYPE__) +typedef __CHAR16_TYPE__ UChar; +#else +typedef uint16_t UChar; +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAP.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAP.h new file mode 100644 index 0000000000000000000000000000000000000000..6e80995f6a16827418e44a364ae9f548e82a64b8 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAP.h @@ -0,0 +1,19 @@ +#ifndef MAILCORE_MCIMAP_H + +#define MAILCORE_MCIMAP_H + +#include <MailCore/MCIMAPFolder.h> +#include <MailCore/MCIMAPMessage.h> +#include <MailCore/MCIMAPMessagePart.h> +#include <MailCore/MCIMAPMultipart.h> +#include <MailCore/MCIMAPNamespace.h> +#include <MailCore/MCIMAPNamespaceItem.h> +#include <MailCore/MCIMAPPart.h> +#include <MailCore/MCIMAPProgressCallback.h> +#include <MailCore/MCIMAPSearchExpression.h> +#include <MailCore/MCIMAPSession.h> +#include <MailCore/MCIMAPSyncResult.h> +#include <MailCore/MCIMAPFolderStatus.h> +#include <MailCore/MCIMAPIdentity.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPAppendMessageOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPAppendMessageOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..f711c9882ca1e4bd38e50770f66335b6e3c54ab4 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPAppendMessageOperation.h @@ -0,0 +1,59 @@ +// +// MCIMAPAppendMessageOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/12/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPAPPENDMESSAGEOPERATION_H + +#define MAILCORE_MCIMAPAPPENDMESSAGEOPERATION_H + +#include <MailCore/MCIMAPOperation.h> +#include <MailCore/MCMessageConstants.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPAppendMessageOperation : public IMAPOperation { + public: + IMAPAppendMessageOperation(); + virtual ~IMAPAppendMessageOperation(); + + virtual void setMessageData(Data * messageData); + virtual Data * messageData(); + + virtual void setMessageFilepath(String * path); + virtual String * messageFilepath(); + + virtual void setFlags(MessageFlag flags); + virtual MessageFlag flags(); + + virtual void setCustomFlags(Array * customFlags); + virtual Array * customFlags(); + + virtual void setDate(time_t date); + virtual time_t date(); + + virtual uint32_t createdUID(); + + public: // subclass behavior + virtual void main(); + + private: + Data * mMessageData; + String * mMessageFilepath; + MessageFlag mFlags; + Array * mCustomFlags; + time_t mDate; + uint32_t mCreatedUID; + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPAsyncSession.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPAsyncSession.h new file mode 100644 index 0000000000000000000000000000000000000000..05437207371bb61326bb0e3ff952b5abd7355dd0 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPAsyncSession.h @@ -0,0 +1,244 @@ +// +// MCIMAPAccount.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/17/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPACCOUNT_H + +#define MAILCORE_MCIMAPACCOUNT_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCMessageConstants.h> + +#ifdef __cplusplus + +namespace mailcore { + + class IMAPOperation; + class IMAPFetchFoldersOperation; + class IMAPAppendMessageOperation; + class IMAPCopyMessagesOperation; + class IMAPMoveMessagesOperation; + class IMAPFetchMessagesOperation; + class IMAPFetchContentOperation; + class IMAPFetchContentToFileOperation; + class IMAPFetchParsedContentOperation; + class IMAPIdleOperation; + class IMAPFolderInfoOperation; + class IMAPFolderStatusOperation; + class IMAPNamespace; + class IMAPSearchOperation; + class IMAPSearchExpression; + class IMAPFetchNamespaceOperation; + class IMAPIdentityOperation; + class IMAPAsyncConnection; + class IMAPCapabilityOperation; + class IMAPQuotaOperation; + class IMAPMessageRenderingOperation; + class IMAPMessage; + class IMAPSession; + class IMAPIdentity; + class OperationQueueCallback; + class IMAPCustomCommandOperation; + class IMAPCheckAccountOperation; + + class MAILCORE_EXPORT IMAPAsyncSession : public Object { + public: + IMAPAsyncSession(); + virtual ~IMAPAsyncSession(); + + virtual void setHostname(String * hostname); + virtual String * hostname(); + + virtual void setPort(unsigned int port); + virtual unsigned int port(); + + virtual void setUsername(String * username); + virtual String * username(); + + virtual void setPassword(String * password); + virtual String * password(); + + // To authenticate using OAuth2, username and oauth2token should be set. + // auth type to use is AuthTypeOAuth2. + virtual void setOAuth2Token(String * token); + virtual String * OAuth2Token(); + + virtual void setAuthType(AuthType authType); + virtual AuthType authType(); + + virtual void setConnectionType(ConnectionType connectionType); + virtual ConnectionType connectionType(); + + virtual void setTimeout(time_t timeout); + virtual time_t timeout(); + + virtual void setCheckCertificateEnabled(bool enabled); + virtual bool isCheckCertificateEnabled(); + + virtual void setVoIPEnabled(bool enabled); + virtual bool isVoIPEnabled(); + + virtual void setDefaultNamespace(IMAPNamespace * ns); + virtual IMAPNamespace * defaultNamespace(); + + virtual void setAllowsFolderConcurrentAccessEnabled(bool enabled); + virtual bool allowsFolderConcurrentAccessEnabled(); + + virtual void setMaximumConnections(unsigned int maxConnections); + virtual unsigned int maximumConnections(); + + virtual void setConnectionLogger(ConnectionLogger * logger); + virtual ConnectionLogger * connectionLogger(); + +#ifdef __APPLE__ + virtual void setDispatchQueue(dispatch_queue_t dispatchQueue); + virtual dispatch_queue_t dispatchQueue(); +#endif + + virtual void setOperationQueueCallback(OperationQueueCallback * callback); + virtual OperationQueueCallback * operationQueueCallback(); + virtual bool isOperationQueueRunning(); + virtual void cancelAllOperations(); + + virtual IMAPIdentity * serverIdentity(); + virtual IMAPIdentity * clientIdentity(); + virtual void setClientIdentity(IMAPIdentity * clientIdentity); + + virtual String * gmailUserDisplayName() DEPRECATED_ATTRIBUTE; + + virtual bool isIdleEnabled(); + + virtual IMAPFolderInfoOperation * folderInfoOperation(String * folder); + virtual IMAPFolderStatusOperation * folderStatusOperation(String * folder); + + virtual IMAPFetchFoldersOperation * fetchSubscribedFoldersOperation(); + virtual IMAPFetchFoldersOperation * fetchAllFoldersOperation(); + + virtual IMAPOperation * renameFolderOperation(String * folder, String * otherName); + virtual IMAPOperation * deleteFolderOperation(String * folder); + virtual IMAPOperation * createFolderOperation(String * folder); + + virtual IMAPOperation * subscribeFolderOperation(String * folder); + virtual IMAPOperation * unsubscribeFolderOperation(String * folder); + + virtual IMAPAppendMessageOperation * appendMessageOperation(String * folder, Data * messageData, MessageFlag flags, Array * customFlags = NULL); + virtual IMAPAppendMessageOperation * appendMessageOperation(String * folder, String * messagePath, MessageFlag flags, Array * customFlags = NULL); + + virtual IMAPCopyMessagesOperation * copyMessagesOperation(String * folder, IndexSet * uids, String * destFolder); + virtual IMAPMoveMessagesOperation * moveMessagesOperation(String * folder, IndexSet * uids, String * destFolder); + + virtual IMAPOperation * expungeOperation(String * folder); + + virtual IMAPFetchMessagesOperation * fetchMessagesByUIDOperation(String * folder, IMAPMessagesRequestKind requestKind, + IndexSet * indexes); + virtual IMAPFetchMessagesOperation * fetchMessagesByNumberOperation(String * folder, IMAPMessagesRequestKind requestKind, + IndexSet * indexes); + virtual IMAPFetchMessagesOperation * syncMessagesByUIDOperation(String * folder, IMAPMessagesRequestKind requestKind, + IndexSet * indexes, uint64_t modSeq); + + virtual IMAPFetchContentOperation * fetchMessageByUIDOperation(String * folder, uint32_t uid, bool urgent = false); + virtual IMAPFetchContentOperation * fetchMessageAttachmentByUIDOperation(String * folder, uint32_t uid, String * partID, + Encoding encoding, bool urgent = false); + + virtual IMAPFetchContentToFileOperation * fetchMessageAttachmentToFileByUIDOperation( + String * folder, uint32_t uid, String * partID, + Encoding encoding, + String * filename, + bool urgent = false); + + virtual IMAPFetchContentOperation * fetchMessageByNumberOperation(String * folder, uint32_t number, bool urgent = false); + virtual IMAPCustomCommandOperation * customCommand(String *command, bool urgent); + virtual IMAPFetchContentOperation * fetchMessageAttachmentByNumberOperation(String * folder, uint32_t number, String * partID, + Encoding encoding, bool urgent = false); + + virtual IMAPFetchParsedContentOperation * fetchParsedMessageByUIDOperation(String * folder, uint32_t uid, bool urgent = false); + virtual IMAPFetchParsedContentOperation * fetchParsedMessageByNumberOperation(String * folder, uint32_t number, bool urgent = false); + + virtual IMAPOperation * storeFlagsByUIDOperation(String * folder, IndexSet * uids, IMAPStoreFlagsRequestKind kind, MessageFlag flags, Array * customFlags = NULL); + virtual IMAPOperation * storeFlagsByNumberOperation(String * folder, IndexSet * numbers, IMAPStoreFlagsRequestKind kind, MessageFlag flags, Array * customFlags = NULL); + virtual IMAPOperation * storeLabelsByUIDOperation(String * folder, IndexSet * uids, IMAPStoreFlagsRequestKind kind, Array * labels); + virtual IMAPOperation * storeLabelsByNumberOperation(String * folder, IndexSet * numbers, IMAPStoreFlagsRequestKind kind, Array * labels); + + virtual IMAPSearchOperation * searchOperation(String * folder, IMAPSearchKind kind, String * searchString); + virtual IMAPSearchOperation * searchOperation(String * folder, IMAPSearchExpression * expression); + + virtual IMAPIdleOperation * idleOperation(String * folder, uint32_t lastKnownUID); + + virtual IMAPFetchNamespaceOperation * fetchNamespaceOperation(); + + virtual IMAPIdentityOperation * identityOperation(IMAPIdentity * identity); + + virtual IMAPOperation * connectOperation(); + virtual IMAPCheckAccountOperation * checkAccountOperation(); + virtual IMAPOperation * disconnectOperation(); + + virtual IMAPCapabilityOperation * capabilityOperation(); + virtual IMAPQuotaOperation * quotaOperation(); + + virtual IMAPOperation * noopOperation(); + + virtual IMAPMessageRenderingOperation * htmlRenderingOperation(IMAPMessage * message, String * folder); + virtual IMAPMessageRenderingOperation * htmlBodyRenderingOperation(IMAPMessage * message, String * folder); + virtual IMAPMessageRenderingOperation * plainTextRenderingOperation(IMAPMessage * message, String * folder); + virtual IMAPMessageRenderingOperation * plainTextBodyRenderingOperation(IMAPMessage * message, String * folder, bool stripWhitespace); + + public: // private + virtual void automaticConfigurationDone(IMAPSession * session); + virtual void operationRunningStateChanged(); + virtual IMAPAsyncConnection * sessionForFolder(String * folder, bool urgent = false); + + private: + Array * mSessions; + + String * mHostname; + unsigned int mPort; + String * mUsername; + String * mPassword; + String * mOAuth2Token; + AuthType mAuthType; + ConnectionType mConnectionType; + bool mCheckCertificateEnabled; + bool mVoIPEnabled; + IMAPNamespace * mDefaultNamespace; + time_t mTimeout; + bool mAllowsFolderConcurrentAccessEnabled; + unsigned int mMaximumConnections; + ConnectionLogger * mConnectionLogger; + bool mAutomaticConfigurationDone; + IMAPIdentity * mServerIdentity; + IMAPIdentity * mClientIdentity; + bool mQueueRunning; + OperationQueueCallback * mOperationQueueCallback; +#if __APPLE__ + dispatch_queue_t mDispatchQueue; +#endif + String * mGmailUserDisplayName; + bool mIdleEnabled; + + /*! Create new IMAP session */ + virtual IMAPAsyncConnection * session(); + /*! Returns a new or an existing session, it is best suited to run the IMAP command + in the specified folder. */ + virtual IMAPAsyncConnection * matchingSessionForFolder(String * folder); + /*! Returns a session with minimum operation queue among already created ones. + If @param filterByFolder is true, then function filters sessions with + predicate (lastFolder() EQUALS TO @param folder). In case of @param folder is NULL + the function would search a session among non-selected ones. */ + virtual IMAPAsyncConnection * sessionWithMinQueue(bool filterByFolder, String * folder); + /*! Returns existant or new session with empty operation queue, if it can. + Otherwise, returns the session with the minimum size of the operation queue. */ + virtual IMAPAsyncConnection * availableSession(); + virtual IMAPMessageRenderingOperation * renderingOperation(IMAPMessage * message, + String * folder, + IMAPMessageRenderingType type); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPCapabilityOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPCapabilityOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..486d54cf06d01be17b4f964d7580d4c3f660ce7e --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPCapabilityOperation.h @@ -0,0 +1,38 @@ +// +// MCIMAPCapabilityOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/4/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPCAPABILITYOPERATION_H + +#define MAILCORE_MCIMAPCAPABILITYOPERATION_H + +#include <MailCore/MCIMAPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPCapabilityOperation : public IMAPOperation { + public: + IMAPCapabilityOperation(); + virtual ~IMAPCapabilityOperation(); + + // Result. + virtual IndexSet * capabilities(); + + public: // subclass behavior + virtual void main(); + + private: + IndexSet * mCapabilities; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPCheckAccountOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPCheckAccountOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..c8d987f302d0adce9982734d5318544fe239cc49 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPCheckAccountOperation.h @@ -0,0 +1,39 @@ +// +// MCIMAPCheckAccountOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/12/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPCHECKACCOUNTOPERATION_H + +#define MAILCORE_MCIMAPCHECKACCOUNTOPERATION_H + +#include <MailCore/MCIMAPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPCheckAccountOperation : public IMAPOperation { + public: + IMAPCheckAccountOperation(); + virtual ~IMAPCheckAccountOperation(); + + virtual String * loginResponse(); + virtual Data * loginUnparsedResponseData(); + + public: // subclass behavior + virtual void main(); + + private: + String * mLoginResponse; + Data * mLoginUnparsedResponseData; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPCopyMessagesOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPCopyMessagesOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..c6d75447985aa7abe607570c5bef36c8936d7723 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPCopyMessagesOperation.h @@ -0,0 +1,46 @@ +// +// MCIMAPCopyMessagesOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/12/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPCOPYMESSAGESOPERATION_H + +#define MAILCORE_MCIMAPCOPYMESSAGESOPERATION_H + +#include <MailCore/MCIMAPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPCopyMessagesOperation : public IMAPOperation { + public: + IMAPCopyMessagesOperation(); + virtual ~IMAPCopyMessagesOperation(); + + virtual void setDestFolder(String * destFolder); + virtual String * destFolder(); + + virtual void setUids(IndexSet * uids); + virtual IndexSet * uids(); + + // Result. + virtual HashMap * uidMapping(); + + public: // subclass behavior + virtual void main(); + + private: + IndexSet * mUids; + String * mDestFolder; + HashMap * mUidMapping; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPCustomCommandOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPCustomCommandOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..a2ce20feb7518d12ec656193284308522edda11c --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPCustomCommandOperation.h @@ -0,0 +1,39 @@ +// +// MCIMAPCustomCommandOperation.h +// mailcore2 +// +// Created by Libor Huspenina on 18/10/2015. +// Copyright © 2015 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPCUSTOMCOMMANDOPERATION_H + +#define MAILCORE_MCIMAPCUSTOMCOMMANDOPERATION_H + +#include <MailCore/MCIMAPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPCustomCommandOperation : public IMAPOperation { + public: + IMAPCustomCommandOperation(); + virtual ~IMAPCustomCommandOperation(); + + virtual void setCustomCommand(String *command); + virtual String * response(); + + public: // subclass behavior + virtual void main(); + + private: + String * mCustomCommand; + String * mResponse; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFetchContentOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFetchContentOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..0b5b70f2841006516be5cdc2cbc9808b3a40917d --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFetchContentOperation.h @@ -0,0 +1,55 @@ +// +// IMAPFetchContentOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/12/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_IMAPFETCHCONTENTOPERATION_H + +#define MAILCORE_IMAPFETCHCONTENTOPERATION_H + +#include <MailCore/MCIMAPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPFetchContentOperation : public IMAPOperation { + public: + IMAPFetchContentOperation(); + virtual ~IMAPFetchContentOperation(); + + virtual void setUid(uint32_t uid); + virtual uint32_t uid(); + + virtual void setNumber(uint32_t value); + virtual uint32_t number(); + + virtual void setPartID(String * partID); + virtual String * partID(); + + virtual void setEncoding(Encoding encoding); + virtual Encoding encoding(); + + // Result. + virtual Data * data(); + + public: // subclass behavior + virtual void main(); + + private: + uint32_t mUid; + uint32_t mNumber; + String * mPartID; + Encoding mEncoding; + Data * mData; + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFetchContentToFileOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFetchContentToFileOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..35d7026f1ddb5888bbc5499eaf5fba5e4ec8a8a0 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFetchContentToFileOperation.h @@ -0,0 +1,53 @@ +// +// IMAPFetchContentToFileOperation.h +// mailcore2 +// +// Created by Dmitry Isaikin on 2/08/16. +// Copyright (c) 2016 MailCore. All rights reserved. +// + +#ifndef MAILCORE_IMAPFETCHCONTENTTOFILEOPERATION_H + +#define MAILCORE_IMAPFETCHCONTENTTOFILEOPERATION_H + +#include <MailCore/MCIMAPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPFetchContentToFileOperation : public IMAPOperation { + public: + IMAPFetchContentToFileOperation(); + virtual ~IMAPFetchContentToFileOperation(); + + virtual void setUid(uint32_t uid); + virtual void setPartID(String * partID); + virtual void setEncoding(Encoding encoding); + virtual void setFilename(String * filename); + + virtual void setLoadingByChunksEnabled(bool loadingByChunksEnabled); + virtual bool isLoadingByChunksEnabled(); + virtual void setChunksSize(uint32_t chunksSize); + virtual uint32_t chunksSize(); + virtual void setEstimatedSize(uint32_t estimatedSize); + virtual uint32_t estimatedSize(); + + public: // subclass behavior + virtual void main(); + + private: + uint32_t mUid; + String * mPartID; + Encoding mEncoding; + String * mFilename; + bool mLoadingByChunksEnabled; + uint32_t mChunksSize; + uint32_t mEstimatedSize; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFetchFoldersOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFetchFoldersOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..f6456a36786d02cc6bd703d76574c18e31aff492 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFetchFoldersOperation.h @@ -0,0 +1,44 @@ +// +// MCIMAPFetchFoldersOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/12/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPFETCHFOLDERSOPERATION_H + +#define MAILCORE_MCIMAPFETCHFOLDERSOPERATION_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCIMAPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPFetchFoldersOperation : public IMAPOperation { + public: + IMAPFetchFoldersOperation(); + virtual ~IMAPFetchFoldersOperation(); + + virtual void setFetchSubscribedEnabled(bool enabled); + virtual bool isFetchSubscribedEnabled(); + + // Result. + virtual Array * /* IMAPFolder */ folders(); + + public: // subclass behavior + virtual void main(); + + private: + bool mFetchSubscribedEnabled; + Array * mFolders; + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFetchMessagesOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFetchMessagesOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..620aead64adf6978052a0c5adfd67a100d41eaad --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFetchMessagesOperation.h @@ -0,0 +1,61 @@ +// +// IMAPFetchMessagesOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/12/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPFETCHMESSAGESOPERATION_H + +#define MAILCORE_MCIMAPFETCHMESSAGESOPERATION_H + +#include <MailCore/MCIMAPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPFetchMessagesOperation : public IMAPOperation { + public: + IMAPFetchMessagesOperation(); + virtual ~IMAPFetchMessagesOperation(); + + virtual void setFetchByUidEnabled(bool enabled); + virtual bool isFetchByUidEnabled(); + + virtual void setIndexes(IndexSet * indexes); + virtual IndexSet * indexes(); + + virtual void setModSequenceValue(uint64_t modseq); + virtual uint64_t modSequenceValue(); + + virtual void setKind(IMAPMessagesRequestKind kind); + virtual IMAPMessagesRequestKind kind(); + + virtual void setExtraHeaders(Array * extraHeaders); + virtual Array * extraHeaders(); + + // Result. + virtual Array * /* IMAPMessage */ messages(); + virtual IndexSet * vanishedMessages(); + + public: // subclass behavior + virtual void main(); + + private: + bool mFetchByUidEnabled; + IndexSet * mIndexes; + IMAPMessagesRequestKind mKind; + Array * /* String */ mExtraHeaders; + Array * /* IMAPMessage */ mMessages; + IndexSet * mVanishedMessages; + uint64_t mModSequenceValue; + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFetchNamespaceOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFetchNamespaceOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..35b6ca2b9758daf5c38bdcce55a1c2e9147a0c77 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFetchNamespaceOperation.h @@ -0,0 +1,39 @@ +// +// IMAPFetchNamespaceOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/12/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPFETCHNAMESPACEOPERATION_H + +#define MAILCORE_MCIMAPFETCHNAMESPACEOPERATION_H + +#include <MailCore/MCIMAPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPFetchNamespaceOperation : public IMAPOperation { + public: + IMAPFetchNamespaceOperation(); + virtual ~IMAPFetchNamespaceOperation(); + + // Result. + virtual HashMap * namespaces(); + + public: // subclass behavior + virtual void main(); + + private: + HashMap * mNamespaces; + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFetchParsedContentOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFetchParsedContentOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..ec0485a95f821ad994e6ee0776111c8e7996d271 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFetchParsedContentOperation.h @@ -0,0 +1,53 @@ +// +// IMAPFetchParsedContentOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/12/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_IMAPFETCHPARSEDCONTENTOPERATION_H + +#define MAILCORE_IMAPFETCHPARSEDCONTENTOPERATION_H + +#include <MailCore/MCIMAPOperation.h> + +#include <MailCore/MCRFC822.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPFetchParsedContentOperation : public IMAPOperation { + public: + IMAPFetchParsedContentOperation(); + virtual ~IMAPFetchParsedContentOperation(); + + virtual void setUid(uint32_t uid); + virtual uint32_t uid(); + + virtual void setNumber(uint32_t value); + virtual uint32_t number(); + + virtual void setEncoding(Encoding encoding); + virtual Encoding encoding(); + + // Result. + virtual MessageParser * parser(); + + public: // subclass behavior + virtual void main(); + + private: + uint32_t mUid; + uint32_t mNumber; + Encoding mEncoding; + MessageParser * mParser; + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFolder.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFolder.h new file mode 100644 index 0000000000000000000000000000000000000000..5d9c111f9f27dad24d05839967548068cf97c5bd --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFolder.h @@ -0,0 +1,42 @@ +#ifndef MAILCORE_MCIMAPFOLDER_H + +#define MAILCORE_MCIMAPFOLDER_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCMessageConstants.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPFolder : public Object { + public: + IMAPFolder(); + virtual ~IMAPFolder(); + + virtual void setPath(String * path); + virtual String * path(); + + virtual void setDelimiter(char delimiter); + virtual char delimiter(); + + virtual void setFlags(IMAPFolderFlag flags); + virtual IMAPFolderFlag flags(); + + public: // subclass behavior + IMAPFolder(IMAPFolder * other); + virtual Object * copy(); + virtual String * description(); + + private: + String * mPath; + char mDelimiter; + IMAPFolderFlag mFlags; + void init(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFolderInfo.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFolderInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..c0fa7c3562e7342ab3a448cc8eace341c82b4db8 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFolderInfo.h @@ -0,0 +1,63 @@ +// +// MCIMAPFolderInfo.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 12/6/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPFolderInfo_H + +#define MAILCORE_MCIMAPFolderInfo_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCMessageConstants.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPFolderInfo : public Object { + public: + IMAPFolderInfo(); + virtual ~IMAPFolderInfo(); + + virtual void setUidNext(uint32_t uidNext); + virtual uint32_t uidNext(); + + virtual void setUidValidity(uint32_t uidValidity); + virtual uint32_t uidValidity(); + + virtual void setModSequenceValue(uint64_t modSequenceValue); + virtual uint64_t modSequenceValue(); + + virtual void setMessageCount(int messageCount); + virtual int messageCount(); + + virtual void setFirstUnseenUid(uint32_t firstUnseenUid); + virtual uint32_t firstUnseenUid(); + + virtual void setAllowsNewPermanentFlags(bool allowsNewPermanentFlags); + virtual bool allowsNewPermanentFlags(); + + public: // subclass behavior + IMAPFolderInfo(IMAPFolderInfo * other); + virtual Object * copy(); + + private: + uint32_t mUidNext; + uint32_t mUidValidity; + uint64_t mModSequenceValue; + int mMessageCount; + uint32_t mFirstUnseenUid; + bool mAllowsNewPermanentFlags; + + void init(); + }; + +} + +#endif + +#endif + diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFolderInfoOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFolderInfoOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..e0b5128c7d0dcc9e47bb7680a3e6be863dc1bea4 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFolderInfoOperation.h @@ -0,0 +1,41 @@ +// +// MCIMAPFolderInfoOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/13/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPFOLDERINFOOPERATION_H + +#define MAILCORE_MCIMAPFOLDERINFOOPERATION_H + +#include <MailCore/MCIMAPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class IMAPFolderInfo; + + class MAILCORE_EXPORT IMAPFolderInfoOperation : public IMAPOperation { + public: + IMAPFolderInfoOperation(); + virtual ~IMAPFolderInfoOperation(); + + IMAPFolderInfo * info(); + + public: // subclass behavior + virtual void main(); + + private: + + IMAPFolderInfo * mInfo; + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFolderStatus.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFolderStatus.h new file mode 100644 index 0000000000000000000000000000000000000000..8bfac59f78874f65a7a7209d47f3abe1457cf689 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFolderStatus.h @@ -0,0 +1,64 @@ +// +// MCIMAPFolderStatus.h +// mailcore2 +// +// Created by Sebastian on 6/11/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPFOLDERSTATUS_H + +#define MAILCORE_MCIMAPFOLDERSTATUS_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCMessageConstants.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPFolderStatus : public Object { + public: + IMAPFolderStatus(); + virtual ~IMAPFolderStatus(); + + virtual void setUnseenCount(uint32_t unseen); + virtual uint32_t unseenCount(); + + virtual void setMessageCount(uint32_t messages); + virtual uint32_t messageCount(); + + virtual void setRecentCount(uint32_t recent); + virtual uint32_t recentCount(); + + virtual void setUidNext(uint32_t uidNext); + virtual uint32_t uidNext(); + + virtual void setUidValidity(uint32_t uidValidity); + virtual uint32_t uidValidity(); + + virtual void setHighestModSeqValue(uint64_t highestModSeqValue); + virtual uint64_t highestModSeqValue(); + + public: // subclass behavior + IMAPFolderStatus(IMAPFolderStatus * other); + virtual Object * copy(); + virtual String * description(); + + private: + uint32_t mUnseenCount; + uint32_t mMessageCount; + uint32_t mRecentCount; + uint32_t mUidNext; + uint32_t mUidValidity; + uint64_t mHighestModSeqValue; + + void init(); + }; + +} + +#endif + +#endif + diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFolderStatusOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFolderStatusOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..53e3025bea2e66dda843277a11c58330025b2569 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPFolderStatusOperation.h @@ -0,0 +1,41 @@ +// +// MCIMAPFolderStatusOperation.h +// mailcore2 +// +// Created by Sebastian on 6/5/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + + +#ifndef MAILCORE_MCIMAPFOLDERSTATUSOPERATION_H + +#define MAILCORE_MCIMAPFOLDERSTATUSOPERATION_H + +#include <MailCore/MCIMAPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class IMAPFolderStatus; + + class MAILCORE_EXPORT IMAPFolderStatusOperation : public IMAPOperation { + public: + IMAPFolderStatusOperation(); + virtual ~IMAPFolderStatusOperation(); + + // Results. + virtual IMAPFolderStatus * status(); + + public: // subclass behavior + virtual void main(); + + private: + IMAPFolderStatus * mStatus; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPIdentity.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPIdentity.h new file mode 100644 index 0000000000000000000000000000000000000000..ee6b3c5e637f65d10a02ecb115c2806c85f89159 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPIdentity.h @@ -0,0 +1,56 @@ +// +// MCIMAPIdentity.h +// mailcore2 +// +// Created by Hoa V. DINH on 8/24/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPIDENTITY_H + +#define MAILCORE_MCIMAPIDENTITY_H + +#include <MailCore/MCBaseTypes.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPIdentity : public Object { + public: + + IMAPIdentity(); + virtual ~IMAPIdentity(); + + virtual void setVendor(String * vendor); + virtual String * vendor(); + + virtual void setName(String * name); + virtual String * name(); + + virtual void setVersion(String * version); + virtual String * version(); + + virtual void removeAllInfos(); + + virtual Array * allInfoKeys(); + virtual String * infoForKey(String * key); + virtual void setInfoForKey(String * key, String * value); + + public: // subclass behavior + IMAPIdentity(IMAPIdentity * identity); + virtual Object * copy(); + virtual String * description(); + + private: + HashMap * mValues; + + void init(); + }; + +} + +#endif + +#endif + diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPIdentityOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPIdentityOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..70cc7d523242d69f5813690bd736d34b0bc55515 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPIdentityOperation.h @@ -0,0 +1,45 @@ +// +// IMAPIdentityOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/12/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPIDENTITYOPERATION_H + +#define MAILCORE_MCIMAPIDENTITYOPERATION_H + +#include <MailCore/MCIMAPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class IMAPIdentity; + + class MAILCORE_EXPORT IMAPIdentityOperation : public IMAPOperation { + public: + IMAPIdentityOperation(); + virtual ~IMAPIdentityOperation(); + + virtual void setClientIdentity(IMAPIdentity * identity); + virtual IMAPIdentity * clientIdentity(); + + // Result. + virtual IMAPIdentity * serverIdentity(); + + public: // subclass behavior + virtual void main(); + + private: + IMAPIdentity * mClientIdentity; + IMAPIdentity * mServerIdentity; + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPIdleOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPIdleOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..5a383bfd93638edc07e2c5967121431510c2c4d8 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPIdleOperation.h @@ -0,0 +1,46 @@ +// +// IMAPIdleOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/12/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPIDLEOPERATION_H + +#define MAILCORE_MCIMAPIDLEOPERATION_H + +#include <MailCore/MCIMAPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPIdleOperation : public IMAPOperation { + public: + IMAPIdleOperation(); + virtual ~IMAPIdleOperation(); + + virtual void setLastKnownUID(uint32_t uid); + virtual uint32_t lastKnownUID(); + + virtual void interruptIdle(); + + public: // subclass behavior + virtual void main(); + + private: + uint32_t mLastKnownUid; + bool mSetupSuccess; + bool mInterrupted; + pthread_mutex_t mLock; + void prepare(void * data); + void unprepare(void * data); + bool isInterrupted(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPMessage.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPMessage.h new file mode 100644 index 0000000000000000000000000000000000000000..c36a9ad1a62f74af0b37d29de44c8cf11c628d7d --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPMessage.h @@ -0,0 +1,92 @@ +#ifndef MAILCORE_IMAP_MESSAGE_H + +#define MAILCORE_IMAP_MESSAGE_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCAbstractMessage.h> +#include <MailCore/MCMessageConstants.h> +#include <MailCore/MCAbstractPart.h> + +#ifdef __cplusplus + +namespace mailcore { + + class IMAPPart; + class HTMLRendererIMAPCallback; + class HTMLRendererTemplateCallback; + + class MAILCORE_EXPORT IMAPMessage : public AbstractMessage { + public: + IMAPMessage(); + virtual ~IMAPMessage(); + + virtual uint32_t sequenceNumber(); + virtual void setSequenceNumber(uint32_t sequenceNumber); + + virtual uint32_t uid(); + virtual void setUid(uint32_t uid); + + virtual uint32_t size(); + virtual void setSize(uint32_t size); + + virtual void setFlags(MessageFlag flags); + virtual MessageFlag flags(); + + virtual void setOriginalFlags(MessageFlag flags); + virtual MessageFlag originalFlags(); + + virtual void setCustomFlags(Array * customFlags); + virtual Array * customFlags(); + + virtual uint64_t modSeqValue(); + virtual void setModSeqValue(uint64_t uid); + + virtual void setMainPart(AbstractPart * mainPart); + virtual AbstractPart * mainPart(); + + virtual void setGmailLabels(Array * /* String */ labels); + virtual Array * /* String */ gmailLabels(); + + virtual void setGmailMessageID(uint64_t msgID); + virtual uint64_t gmailMessageID(); + + virtual void setGmailThreadID(uint64_t threadID); + virtual uint64_t gmailThreadID(); + + virtual AbstractPart * partForPartID(String * partID); + + virtual AbstractPart * partForContentID(String * contentID); + virtual AbstractPart * partForUniqueID(String * uniqueID); + + virtual String * htmlRendering(String * folder, + HTMLRendererIMAPCallback * dataCallback, + HTMLRendererTemplateCallback * htmlCallback = NULL); + + public: // subclass behavior + IMAPMessage(IMAPMessage * other); + virtual Object * copy(); + virtual String * description(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + + private: + uint64_t mModSeqValue; + uint32_t mUid; + uint32_t mSize; + uint32_t mSequenceNumber; // not serialized. + + MessageFlag mFlags; + MessageFlag mOriginalFlags; + Array * /* String */ mCustomFlags; + AbstractPart * mMainPart; + Array * /* String */ mGmailLabels; + uint64_t mGmailMessageID; + uint64_t mGmailThreadID; + void init(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPMessagePart.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPMessagePart.h new file mode 100644 index 0000000000000000000000000000000000000000..76317201772d065c0ee3fea5fbd4b76fea01f093 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPMessagePart.h @@ -0,0 +1,34 @@ +#ifndef MAILCORE_IMAPMESSAGEPART_H + +#define MAILCORE_IMAPMESSAGEPART_H + +#include <MailCore/MCAbstractMessagePart.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPMessagePart : public AbstractMessagePart { + public: + IMAPMessagePart(); + virtual ~IMAPMessagePart(); + + virtual void setPartID(String * partID); + virtual String * partID(); + + public: // subclass behavior + IMAPMessagePart(IMAPMessagePart * other); + virtual Object * copy(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + + private: + String * mPartID; + void init(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPMessageRenderingOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPMessageRenderingOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..7a02b4ae13b7ae6a4f4af6c2f0664d2422959691 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPMessageRenderingOperation.h @@ -0,0 +1,48 @@ +// +// MCIMAPMessageRenderingOperation.h +// mailcore2 +// +// Created by Paul Young on 27/06/2013. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPMessageRenderingOperation_H + +#define MAILCORE_MCIMAPMessageRenderingOperation_H + +#include <MailCore/MCIMAPOperation.h> +#include <MailCore/MCIMAPMessage.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPMessageRenderingOperation : public IMAPOperation { + public: + IMAPMessageRenderingOperation(); + virtual ~IMAPMessageRenderingOperation(); + + virtual void setRenderingType(IMAPMessageRenderingType type); + virtual IMAPMessageRenderingType renderingType(); + + virtual void setMessage(IMAPMessage * message); + virtual IMAPMessage * message(); + + // Result. + virtual String * result(); + + public: // subclass behavior + virtual void main(); + + private: + IMAPMessageRenderingType mRenderingType; + String * mResult; + IMAPMessage * mMessage; + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPMoveMessagesOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPMoveMessagesOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..1c4342f5c9c8a05ff892dd64dbc7e9af8afd3836 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPMoveMessagesOperation.h @@ -0,0 +1,46 @@ +// +// IMAPMoveMessagesOperation.hpp +// mailcore2 +// +// Created by Nikolay Morev on 02/02/16. +// Copyright © 2016 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPMOVEMESSAGESOPERATION_H + +#define MAILCORE_MCIMAPMOVEMESSAGESOPERATION_H + +#include <MailCore/MCIMAPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPMoveMessagesOperation : public IMAPOperation { + public: + IMAPMoveMessagesOperation(); + virtual ~IMAPMoveMessagesOperation(); + + virtual void setDestFolder(String * destFolder); + virtual String * destFolder(); + + virtual void setUids(IndexSet * uids); + virtual IndexSet * uids(); + + // Result. + virtual HashMap * uidMapping(); + + public: // subclass behavior + virtual void main(); + + private: + IndexSet * mUids; + String * mDestFolder; + HashMap * mUidMapping; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPMultipart.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPMultipart.h new file mode 100644 index 0000000000000000000000000000000000000000..913966245c09c53d9c231d32389c16e67f5fef39 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPMultipart.h @@ -0,0 +1,34 @@ +#ifndef MAILCORE_MCIMAPMULTIPART_H + +#define MAILCORE_MCIMAPMULTIPART_H + +#include <MailCore/MCAbstractMultipart.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPMultipart : public AbstractMultipart { + public: + IMAPMultipart(); + virtual ~IMAPMultipart(); + + virtual void setPartID(String * partID); + virtual String * partID(); + + public: // subclass behavior + IMAPMultipart(IMAPMultipart * other); + virtual Object * copy(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + + private: + String * mPartID; + void init(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPNamespace.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPNamespace.h new file mode 100644 index 0000000000000000000000000000000000000000..711fb7e5fd761dee10561a52a00702f67e21d463 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPNamespace.h @@ -0,0 +1,53 @@ +#ifndef MAILCORE_MCIMAPNAMESPACE_H + +#define MAILCORE_MCIMAPNAMESPACE_H + +#include <MailCore/MCBaseTypes.h> + +#ifdef __cplusplus + +namespace mailcore { + + class IMAPNamespaceItem; + + class MAILCORE_EXPORT IMAPNamespace : public Object { + public: + IMAPNamespace(); + virtual ~IMAPNamespace(); + + virtual String * mainPrefix(); + virtual char mainDelimiter(); + + virtual Array * /* String */ prefixes(); + + virtual String * pathForComponents(Array * components); + virtual String * pathForComponentsAndPrefix(Array * components, String * prefix); + + virtual Array * /* String */ componentsFromPath(String * path); + + virtual bool containsFolderPath(String * path); + + static IMAPNamespace * namespaceWithPrefix(String * prefix, char delimiter); + + public: // subclass behavior + IMAPNamespace(IMAPNamespace * other); + virtual String * description(); + virtual Object * copy(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + + private: + Array * /* String */ mItems; + void init(); + IMAPNamespaceItem * mainItem(); + IMAPNamespaceItem * itemForPath(String * path); + + public: // private + virtual void importIMAPNamespace(struct mailimap_namespace_item * item); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPNamespaceItem.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPNamespaceItem.h new file mode 100644 index 0000000000000000000000000000000000000000..0fffed983fbd60a736c427d9b18a10d9db5a1f2b --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPNamespaceItem.h @@ -0,0 +1,48 @@ +#ifndef MAILCORE_MCIMAPNAMESPACEITEM_H + +#define MAILCORE_MCIMAPNAMESPACEITEM_H + +#include <MailCore/MCBaseTypes.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPNamespaceItem : public Object { + public: + IMAPNamespaceItem(); + virtual ~IMAPNamespaceItem(); + + virtual void setPrefix(String * prefix); + virtual String * prefix(); + + virtual void setDelimiter(char delimiter); + virtual char delimiter(); + + virtual String * pathForComponents(Array * components); + virtual Array * /* String */ componentsForPath(String * path); + + virtual bool containsFolder(String * folder); + + public: // subclass behavior + IMAPNamespaceItem(IMAPNamespaceItem * other); + virtual String * description(); + virtual Object * copy(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + + private: + char mDelimiter; + String * mPrefix; + void init(); + + public: // private + virtual void importIMAPNamespaceInfo(struct mailimap_namespace_info * info); + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..a57d74894f0d969679a6924548891d018cd31e45 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPOperation.h @@ -0,0 +1,73 @@ +// +// MCIMAPOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/12/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPOPERATION_H + +#define MAILCORE_MCIMAPOPERATION_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCIMAPProgressCallback.h> + +#ifdef __cplusplus + +namespace mailcore { + + class IMAPAsyncConnection; + class IMAPAsyncSession; + class IMAPOperationCallback; + + class MAILCORE_EXPORT IMAPOperation : public Operation, public IMAPProgressCallback { + public: + IMAPOperation(); + virtual ~IMAPOperation(); + + virtual void setMainSession(IMAPAsyncSession * session); + virtual IMAPAsyncSession * mainSession(); + + virtual void setSession(IMAPAsyncConnection * session); + virtual IMAPAsyncConnection * session(); + + virtual void setFolder(String * folder); + virtual String * folder(); + + virtual void setUrgent(bool urgent); + virtual bool isUrgent(); + + virtual void setImapCallback(IMAPOperationCallback * callback); + virtual IMAPOperationCallback * imapCallback(); + + virtual void beforeMain(); + virtual void afterMain(); + + virtual void start(); + + // Result. + virtual void setError(ErrorCode error); + virtual ErrorCode error(); + + private: + IMAPAsyncSession * mMainSession; + IMAPAsyncConnection * mSession; + String * mFolder; + IMAPOperationCallback * mImapCallback; + ErrorCode mError; + bool mUrgent; + + private: + virtual void bodyProgress(IMAPSession * session, unsigned int current, unsigned int maximum); + virtual void bodyProgressOnMainThread(void * context); + virtual void itemsProgress(IMAPSession * session, unsigned int current, unsigned int maximum); + virtual void itemsProgressOnMainThread(void * context); + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPOperationCallback.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPOperationCallback.h new file mode 100644 index 0000000000000000000000000000000000000000..c5e14ffb201e0ad62ee26295e63ed03e9180ca14 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPOperationCallback.h @@ -0,0 +1,31 @@ +// +// MCIMAPOperationCallback.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/12/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPOPERATIONCALLBACK_H + +#define MAILCORE_MCIMAPOPERATIONCALLBACK_H + +#include <MailCore/MCUtils.h> + +#ifdef __cplusplus + +namespace mailcore { + + class IMAPOperation; + + class MAILCORE_EXPORT IMAPOperationCallback { + public: + virtual void bodyProgress(IMAPOperation * session, unsigned int current, unsigned int maximum) {}; + virtual void itemProgress(IMAPOperation * session, unsigned int current, unsigned int maximum) {}; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPPart.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPPart.h new file mode 100644 index 0000000000000000000000000000000000000000..1a34da21759017dc1913ccc10d6189572f5f2eb2 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPPart.h @@ -0,0 +1,66 @@ +#ifndef MAILCORE_MCIMAPPART_H + +#define MAILCORE_MCIMAPPART_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCAbstractPart.h> + +#ifdef __cplusplus + +namespace mailcore { + + class IMAPMessagePart; + class IMAPMultipart; + + class MAILCORE_EXPORT IMAPPart : public AbstractPart { + public: + IMAPPart(); + virtual ~IMAPPart(); + + virtual void setPartID(String * partID); + virtual String * partID(); + + virtual void setSize(unsigned int size); + virtual unsigned int size(); + + virtual unsigned int decodedSize(); + + virtual void setEncoding(Encoding encoding); + virtual Encoding encoding(); + + public: // subclass behavior + IMAPPart(IMAPPart * other); + virtual Object * copy(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + + public: // private + static AbstractPart * attachmentWithIMAPBody(struct mailimap_body * body); + + virtual void importIMAPFields(struct mailimap_body_fields * fields, + struct mailimap_body_ext_1part * extension); + + private: + String * mPartID; + Encoding mEncoding; + unsigned int mSize; + void init(); + static AbstractPart * attachmentWithIMAPBodyInternal(struct mailimap_body * body, String * partID); + static AbstractPart * attachmentWithIMAPBody1Part(struct mailimap_body_type_1part * body_1part, + String * partID); + static IMAPMessagePart * attachmentWithIMAPBody1PartMessage(struct mailimap_body_type_msg * message, + struct mailimap_body_ext_1part * extension, + String * partID); + static IMAPPart * attachmentWithIMAPBody1PartBasic(struct mailimap_body_type_basic * basic, + struct mailimap_body_ext_1part * extension); + static IMAPPart * attachmentWithIMAPBody1PartText(struct mailimap_body_type_text * text, + struct mailimap_body_ext_1part * extension); + static IMAPMultipart * attachmentWithIMAPBodyMultipart(struct mailimap_body_type_mpart * body_mpart, + String * partID); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPProgressCallback.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPProgressCallback.h new file mode 100644 index 0000000000000000000000000000000000000000..b461eefdbf9dac3f1b66fb0133ecbcb2e1a05b14 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPProgressCallback.h @@ -0,0 +1,23 @@ +#ifndef MAILCORE_MCIMAPPROGRESSCALLBACK_H + +#define MAILCORE_MCIMAPPROGRESSCALLBACK_H + +#ifdef __cplusplus + +#include <MailCore/MCUtils.h> + +namespace mailcore { + + class IMAPSession; + + class MAILCORE_EXPORT IMAPProgressCallback { + public: + virtual void bodyProgress(IMAPSession * session, unsigned int current, unsigned int maximum) {}; + virtual void itemsProgress(IMAPSession * session, unsigned int current, unsigned int maximum) {}; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPQuotaOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPQuotaOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..15a1c676aa82a4d1d99603030f8138a78f523c0c --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPQuotaOperation.h @@ -0,0 +1,40 @@ +// +// MCIMAPQuotaOperation.h +// mailcore2 +// +// Created by Petro Korenev on 8/2/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPQuotaOperation_H + +#define MAILCORE_MCIMAPQuotaOperation_H + +#include "MCIMAPOperation.h" + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPQuotaOperation : public IMAPOperation { + public: + IMAPQuotaOperation(); + virtual ~IMAPQuotaOperation(); + + // Result. + virtual uint32_t limit(); + virtual uint32_t usage(); + + public: // subclass behavior + virtual void main(); + + private: + uint32_t mLimit; + uint32_t mUsage; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPSearchExpression.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPSearchExpression.h new file mode 100644 index 0000000000000000000000000000000000000000..182f301385c5af87b635d385a93d30d3fd6fed70 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPSearchExpression.h @@ -0,0 +1,88 @@ +#ifndef MAILCORE_MCIMAPSEARCHEXPRESSION_H + +#define MAILCORE_MCIMAPSEARCHEXPRESSION_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCMessageConstants.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPSearchExpression : public Object { + public: + IMAPSearchExpression(); + virtual ~IMAPSearchExpression(); + + virtual IMAPSearchKind kind(); + virtual String * header(); + virtual String * value(); + virtual uint64_t longNumber(); + virtual time_t date(); + virtual IndexSet * uids(); + virtual IndexSet * numbers(); + + + virtual IMAPSearchExpression * leftExpression(); + virtual IMAPSearchExpression * rightExpression(); + + static IMAPSearchExpression * searchAll(); + static IMAPSearchExpression * searchFrom(String * value); + static IMAPSearchExpression * searchTo(String *value); + static IMAPSearchExpression * searchCc(String *value); + static IMAPSearchExpression * searchBcc(String *value); + static IMAPSearchExpression * searchRecipient(String * value); + static IMAPSearchExpression * searchSubject(String * value); + static IMAPSearchExpression * searchContent(String * value); + static IMAPSearchExpression * searchBody(String * value); + static IMAPSearchExpression * searchHeader(String * header, String * value); + static IMAPSearchExpression * searchUIDs(IndexSet * uids); + static IMAPSearchExpression * searchNumbers(IndexSet * numbers); + static IMAPSearchExpression * searchRead(); + static IMAPSearchExpression * searchUnread(); + static IMAPSearchExpression * searchFlagged(); + static IMAPSearchExpression * searchUnflagged(); + static IMAPSearchExpression * searchAnswered(); + static IMAPSearchExpression * searchUnanswered(); + static IMAPSearchExpression * searchDraft(); + static IMAPSearchExpression * searchUndraft(); + static IMAPSearchExpression * searchDeleted(); + static IMAPSearchExpression * searchSpam(); + static IMAPSearchExpression * searchBeforeDate(time_t date); + static IMAPSearchExpression * searchOnDate(time_t date); + static IMAPSearchExpression * searchSinceDate(time_t date); + static IMAPSearchExpression * searchBeforeReceivedDate(time_t date); + static IMAPSearchExpression * searchOnReceivedDate(time_t date); + static IMAPSearchExpression * searchSinceReceivedDate(time_t date); + static IMAPSearchExpression * searchSizeLarger(uint32_t size); + static IMAPSearchExpression * searchSizeSmaller(uint32_t size); + static IMAPSearchExpression * searchGmailThreadID(uint64_t number); + static IMAPSearchExpression * searchGmailMessageID(uint64_t number); + static IMAPSearchExpression * searchGmailRaw(String * expr); + static IMAPSearchExpression * searchAnd(IMAPSearchExpression * left, IMAPSearchExpression * right); + static IMAPSearchExpression * searchOr(IMAPSearchExpression * left, IMAPSearchExpression * right); + static IMAPSearchExpression * searchNot(IMAPSearchExpression * notExpr); + + + public: // subclass behavior + IMAPSearchExpression(IMAPSearchExpression * other); + virtual String * description(); + virtual Object * copy(); + + private: + IMAPSearchKind mKind; + String * mHeader; + String * mValue; + uint64_t mLongNumber; + IndexSet * mUids; + IndexSet * mNumbers; + IMAPSearchExpression * mLeftExpression; + IMAPSearchExpression * mRightExpression; + void init(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPSearchOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPSearchOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..bb9cef081bde6869cdceb16c5d6720f543b39a00 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPSearchOperation.h @@ -0,0 +1,54 @@ +// +// IMAPSearchOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/12/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPSEARCHOPERATION_H + +#define MAILCORE_MCIMAPSEARCHOPERATION_H + +#include <MailCore/MCIMAPOperation.h> +#include <MailCore/MCMessageConstants.h> + +#ifdef __cplusplus + +namespace mailcore { + + class IMAPSearchExpression; + + class MAILCORE_EXPORT IMAPSearchOperation : public IMAPOperation { + public: + IMAPSearchOperation(); + virtual ~IMAPSearchOperation(); + + virtual void setSearchKind(IMAPSearchKind kind); + virtual IMAPSearchKind searchKind(); + + virtual void setSearchString(String * searchString); + virtual String * searchString(); + + virtual void setSearchExpression(IMAPSearchExpression * expression); + virtual IMAPSearchExpression * searchExpression(); + + // Result. + virtual IndexSet * uids(); + + public: // subclass behavior + virtual void main(); + + private: + IMAPSearchKind mKind; + String * mSearchString; + IMAPSearchExpression * mExpression; + IndexSet * mUids; + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPSession.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPSession.h new file mode 100644 index 0000000000000000000000000000000000000000..596235372f550cd51081fec6d0c6bb1c4f95a899 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPSession.h @@ -0,0 +1,331 @@ +#ifndef MAILCORE_MCIMAPSESSION_H + +#define MAILCORE_MCIMAPSESSION_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCMessageConstants.h> +#include <MailCore/MCIMAPMessage.h> + +#ifdef __cplusplus + +namespace mailcore { + + extern String * IMAPNamespacePersonal; + extern String * IMAPNamespaceOther; + extern String * IMAPNamespaceShared; + + class IMAPNamespace; + class IMAPSearchExpression; + class IMAPFolder; + class IMAPProgressCallback; + class IMAPSyncResult; + class IMAPFolderStatus; + class IMAPIdentity; + + class MAILCORE_EXPORT IMAPSession : public Object { + public: + IMAPSession(); + virtual ~IMAPSession(); + + virtual void setHostname(String * hostname); + virtual String * hostname(); + + virtual void setPort(unsigned int port); + virtual unsigned int port(); + + virtual void setUsername(String * username); + virtual String * username(); + + virtual void setPassword(String * password); + virtual String * password(); + + // To authenticate using OAuth2, username and oauth2token should be set. + // auth type to use is AuthTypeOAuth2. + virtual void setOAuth2Token(String * token); + virtual String * OAuth2Token(); + + virtual void setAuthType(AuthType authType); + virtual AuthType authType(); + + virtual void setConnectionType(ConnectionType connectionType); + virtual ConnectionType connectionType(); + + virtual void setTimeout(time_t timeout); + virtual time_t timeout(); + + virtual void setCheckCertificateEnabled(bool enabled); + virtual bool isCheckCertificateEnabled(); + + virtual void setVoIPEnabled(bool enabled); + virtual bool isVoIPEnabled(); + + // Needed for fetchSubscribedFolders() and fetchAllFolders(). + virtual void setDefaultNamespace(IMAPNamespace * ns); + virtual IMAPNamespace * defaultNamespace(); + + virtual IMAPIdentity * serverIdentity(); + virtual IMAPIdentity * clientIdentity(); + virtual void setClientIdentity(IMAPIdentity * identity); + + virtual void select(String * folder, ErrorCode * pError); + virtual IMAPFolderStatus * folderStatus(String * folder, ErrorCode * pError); + + virtual Array * /* IMAPFolder */ fetchSubscribedFolders(ErrorCode * pError); + virtual Array * /* IMAPFolder */ fetchAllFolders(ErrorCode * pError); // will use xlist if available + + virtual void renameFolder(String * folder, String * otherName, ErrorCode * pError); + virtual void deleteFolder(String * folder, ErrorCode * pError); + virtual void createFolder(String * folder, ErrorCode * pError); + + virtual void subscribeFolder(String * folder, ErrorCode * pError); + virtual void unsubscribeFolder(String * folder, ErrorCode * pError); + + virtual void appendMessage(String * folder, Data * messageData, MessageFlag flags, + IMAPProgressCallback * progressCallback, uint32_t * createdUID, ErrorCode * pError); + virtual void appendMessageWithCustomFlags(String * folder, Data * messageData, MessageFlag flags, Array * customFlags, + IMAPProgressCallback * progressCallback, uint32_t * createdUID, ErrorCode * pError); + virtual void appendMessageWithCustomFlagsAndDate(String * folder, Data * messageData, MessageFlag flags, Array * customFlags, time_t date, + IMAPProgressCallback * progressCallback, uint32_t * createdUID, ErrorCode * pError); + virtual void appendMessageWithCustomFlagsAndDate(String * folder, String * messagePath, MessageFlag flags, Array * customFlags, time_t date, + IMAPProgressCallback * progressCallback, uint32_t * createdUID, ErrorCode * pError); + + virtual void copyMessages(String * folder, IndexSet * uidSet, String * destFolder, + HashMap ** pUidMapping, ErrorCode * pError); + + virtual void moveMessages(String * folder, IndexSet * uidSet, String * destFolder, + HashMap ** pUidMapping, ErrorCode * pError); + + virtual void expunge(String * folder, ErrorCode * pError); + + virtual Array * /* IMAPMessage */ fetchMessagesByUID(String * folder, IMAPMessagesRequestKind requestKind, + IndexSet * uids, IMAPProgressCallback * progressCallback, + ErrorCode * pError); + virtual Array * /* IMAPMessage */ fetchMessagesByUIDWithExtraHeaders(String * folder, + IMAPMessagesRequestKind requestKind, + IndexSet * uids, + IMAPProgressCallback * progressCallback, + Array * extraHeaders, ErrorCode * pError); + virtual Array * /* IMAPMessage */ fetchMessagesByNumber(String * folder, IMAPMessagesRequestKind requestKind, + IndexSet * numbers, IMAPProgressCallback * progressCallback, + ErrorCode * pError); + virtual Array * /* IMAPMessage */ fetchMessagesByNumberWithExtraHeaders(String * folder, + IMAPMessagesRequestKind requestKind, + IndexSet * numbers, + IMAPProgressCallback * progressCallback, + Array * extraHeaders, ErrorCode * pError); + virtual String * customCommand(String * command, ErrorCode * pError); + + virtual Data * fetchMessageByUID(String * folder, uint32_t uid, + IMAPProgressCallback * progressCallback, ErrorCode * pError); + virtual Data * fetchMessageByNumber(String * folder, uint32_t number, + IMAPProgressCallback * progressCallback, ErrorCode * pError); + virtual Data * fetchMessageAttachmentByUID(String * folder, uint32_t uid, String * partID, + Encoding encoding, IMAPProgressCallback * progressCallback, ErrorCode * pError); + + virtual void fetchMessageAttachmentToFileByChunksByUID(String * folder, uint32_t uid, String * partID, + uint32_t estimatedSize, Encoding encoding, + String * outputFile, uint32_t chunkSize, + IMAPProgressCallback * progressCallback, ErrorCode * pError); + virtual void fetchMessageAttachmentToFileByUID(String * folder, uint32_t uid, String * partID, + Encoding encoding, String * outputFile, + IMAPProgressCallback * progressCallback, ErrorCode * pError); + + virtual Data * fetchMessageAttachmentByNumber(String * folder, uint32_t number, String * partID, + Encoding encoding, IMAPProgressCallback * progressCallback, ErrorCode * pError); + virtual HashMap * fetchMessageNumberUIDMapping(String * folder, uint32_t fromUID, uint32_t toUID, + ErrorCode * pError); + + /* When CONDSTORE or QRESYNC is available */ + virtual IMAPSyncResult * syncMessagesByUID(String * folder, IMAPMessagesRequestKind requestKind, + IndexSet * uids, uint64_t modseq, + IMAPProgressCallback * progressCallback, ErrorCode * pError); + /* Same as syncMessagesByUID, allows for extra headers */ + virtual IMAPSyncResult * syncMessagesByUIDWithExtraHeaders(String * folder, IMAPMessagesRequestKind requestKind, + IndexSet * uids, uint64_t modseq, + IMAPProgressCallback * progressCallback, + Array * extraHeaders, ErrorCode * pError); + + virtual void storeFlagsByUID(String * folder, IndexSet * uids, IMAPStoreFlagsRequestKind kind, MessageFlag flags, ErrorCode * pError); + virtual void storeFlagsAndCustomFlagsByUID(String * folder, IndexSet * uids, IMAPStoreFlagsRequestKind kind, MessageFlag flags, Array * customFlags, ErrorCode * pError); + virtual void storeFlagsByNumber(String * folder, IndexSet * numbers, IMAPStoreFlagsRequestKind kind, MessageFlag flags, ErrorCode * pError); + virtual void storeFlagsAndCustomFlagsByNumber(String * folder, IndexSet * numbers, IMAPStoreFlagsRequestKind kind, MessageFlag flags, Array * customFlags, ErrorCode * pError); + + virtual void storeLabelsByUID(String * folder, IndexSet * uids, IMAPStoreFlagsRequestKind kind, Array * labels, ErrorCode * pError); + virtual void storeLabelsByNumber(String * folder, IndexSet * numbers, IMAPStoreFlagsRequestKind kind, Array * labels, ErrorCode * pError); + + virtual IndexSet * search(String * folder, IMAPSearchKind kind, String * searchString, ErrorCode * pError); + virtual IndexSet * search(String * folder, IMAPSearchExpression * expression, ErrorCode * pError); + virtual void getQuota(uint32_t *usage, uint32_t *limit, ErrorCode * pError); + + virtual bool setupIdle(); + virtual void idle(String * folder, uint32_t lastKnownUID, ErrorCode * pError); + virtual void interruptIdle(); + virtual void unsetupIdle(); + + virtual void connect(ErrorCode * pError); + virtual void disconnect(); + + virtual void noop(ErrorCode * pError); + + virtual HashMap * fetchNamespace(ErrorCode * pError); + + virtual void login(ErrorCode * pError); + + virtual IMAPIdentity * identity(IMAPIdentity * clientIdentity, ErrorCode * pError); + + virtual IndexSet * capability(ErrorCode * pError); + + virtual void enableCompression(ErrorCode * pError); + + virtual uint32_t uidValidity(); + virtual uint32_t uidNext(); + virtual uint64_t modSequenceValue(); + virtual unsigned int lastFolderMessageCount(); + virtual uint32_t firstUnseenUid(); + + virtual bool isIdleEnabled(); + virtual bool isXListEnabled(); + virtual bool isCondstoreEnabled(); + virtual bool isQResyncEnabled(); + virtual bool isIdentityEnabled(); + virtual bool isXOAuthEnabled(); + virtual bool isNamespaceEnabled(); + virtual bool isCompressionEnabled(); + virtual bool allowsNewPermanentFlags(); + + virtual String * gmailUserDisplayName() DEPRECATED_ATTRIBUTE; + + virtual void setConnectionLogger(ConnectionLogger * logger); + virtual ConnectionLogger * connectionLogger(); + + /** HTML rendering of the body of the message to be displayed in a web view.*/ + virtual String * htmlRendering(IMAPMessage * message, String * folder, ErrorCode * pError); + + /** HTML rendering of the body of the message.*/ + virtual String * htmlBodyRendering(IMAPMessage * message, String * folder, ErrorCode * pError); + + /** Text rendering of the message.*/ + virtual String * plainTextRendering(IMAPMessage * message, String * folder, ErrorCode * pError); + + /** Text rendering of the body of the message. All end of line will be removed and white spaces cleaned up if requested. + This method can be used to generate the summary of the message.*/ + virtual String * plainTextBodyRendering(IMAPMessage * message, String * folder, bool stripWhitespace, ErrorCode * pError); + + /** Enable automatic query of the capabilities of the IMAP server when set to true. */ + virtual void setAutomaticConfigurationEnabled(bool enabled); + + /** Check if the automatic query of the capabilities of the IMAP server is enabled. */ + virtual bool isAutomaticConfigurationEnabled(); + + virtual String * loginResponse(); + /** Filled by unparsed protocol data in case of ParseError (only for login for now). */ + virtual Data * unparsedResponseData(); + + public: // private + virtual void loginIfNeeded(ErrorCode * pError); + virtual void connectIfNeeded(ErrorCode * pError); + virtual void selectIfNeeded(String * folder, ErrorCode * pError); + virtual bool isDisconnected(); + virtual bool isAutomaticConfigurationDone(); + virtual void resetAutomaticConfigurationDone(); + virtual void applyCapabilities(IndexSet * capabilities); + virtual IndexSet * storedCapabilities(); + virtual void lockConnectionLogger(); + virtual void unlockConnectionLogger(); + virtual ConnectionLogger * connectionLoggerNoLock(); + + private: + String * mHostname; + unsigned int mPort; + String * mUsername; + String * mPassword; + String * mOAuth2Token; + AuthType mAuthType; + ConnectionType mConnectionType; + bool mCheckCertificateEnabled; + bool mVoIPEnabled; + char mDelimiter; + IMAPNamespace * mDefaultNamespace; + IMAPIdentity * mServerIdentity; + IMAPIdentity * mClientIdentity; + time_t mTimeout; + + bool mBodyProgressEnabled; + bool mIdleEnabled; + bool mXListEnabled; + bool mCondstoreEnabled; + bool mQResyncEnabled; + bool mXYMHighestModseqEnabled; + bool mIdentityEnabled; + bool mXOauth2Enabled; + bool mNamespaceEnabled; + bool mCompressionEnabled; + bool mIsGmail; + bool mAllowsNewPermanentFlags; + String * mWelcomeString; + bool mNeedsMboxMailWorkaround; + uint32_t mUIDValidity; + uint32_t mUIDNext; + uint64_t mModSequenceValue; + unsigned int mFolderMsgCount; + uint32_t mFirstUnseenUid; + bool mYahooServer; + bool mRamblerRuServer; + bool mHermesServer; + bool mQipServer; + + unsigned int mLastFetchedSequenceNumber; + String * mCurrentFolder; + pthread_mutex_t mIdleLock; + int mState; + mailimap * mImap; + IMAPProgressCallback * mProgressCallback; + unsigned int mProgressItemsCount; + ConnectionLogger * mConnectionLogger; + pthread_mutex_t mConnectionLoggerLock; + bool mAutomaticConfigurationEnabled; + bool mAutomaticConfigurationDone; + bool mShouldDisconnect; + + String * mLoginResponse; + String * mGmailUserDisplayName; + Data * mUnparsedResponseData; + + void init(); + void bodyProgress(unsigned int current, unsigned int maximum); + void itemsProgress(unsigned int current, unsigned int maximum); + bool checkCertificate(); + static void body_progress(size_t current, size_t maximum, void * context); + static void items_progress(size_t current, size_t maximum, void * context); + void setup(); + void unsetup(); + char fetchDelimiterIfNeeded(char defaultDelimiter, ErrorCode * pError); + IMAPSyncResult * fetchMessages(String * folder, IMAPMessagesRequestKind requestKind, + bool fetchByUID, struct mailimap_set * imapset, + IndexSet * uidsFilter, IndexSet * numbersFilter, + uint64_t modseq, + HashMap * mapping, IMAPProgressCallback * progressCallback, + Array * extraHeaders, ErrorCode * pError); + void capabilitySetWithSessionState(IndexSet * capabilities); + bool enableFeature(String * feature); + void enableFeatures(); + Data * fetchMessage(String * folder, bool identifier_is_uid, uint32_t identifier, + IMAPProgressCallback * progressCallback, ErrorCode * pError); + void storeFlagsAndCustomFlags(String * folder, bool identifier_is_uid, IndexSet * identifiers, + IMAPStoreFlagsRequestKind kind, MessageFlag flags, Array * customFlags, ErrorCode * pError); + Data * fetchMessageAttachment(String * folder, bool identifier_is_uid, + uint32_t identifier, String * partID, + Encoding encoding, IMAPProgressCallback * progressCallback, ErrorCode * pError); + // in case of wholePart is false, receives range [offset, length] + Data * fetchNonDecodedMessageAttachment(String * folder, bool identifier_is_uid, + uint32_t identifier, String * partID, + bool wholePart, uint32_t offset, uint32_t length, + Encoding encoding, IMAPProgressCallback * progressCallback, ErrorCode * pError); + void storeLabels(String * folder, bool identifier_is_uid, IndexSet * identifiers, IMAPStoreFlagsRequestKind kind, Array * labels, ErrorCode * pError); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPSyncResult.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPSyncResult.h new file mode 100644 index 0000000000000000000000000000000000000000..683ca6cc467e57e2ee48c88f9d50a94febdf463c --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIMAPSyncResult.h @@ -0,0 +1,39 @@ +// +// MCIMAPSyncResult.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/3/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCIMAPSYNCRESULT_H + +#define MAILCORE_MCIMAPSYNCRESULT_H + +#include <MailCore/MCBaseTypes.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT IMAPSyncResult : public Object { + public: + IMAPSyncResult(); + virtual ~IMAPSyncResult(); + + virtual void setModifiedOrAddedMessages(Array * /* IMAPMessage */ messages); + virtual Array * /* IMAPMessage */ modifiedOrAddedMessages(); + + virtual void setVanishedMessages(IndexSet * vanishedMessages); + virtual IndexSet * vanishedMessages(); + + private: + Array * /* IMAPMessage */ mModifiedOrAddedMessages; + IndexSet * mVanishedMessages; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIndexSet.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIndexSet.h new file mode 100644 index 0000000000000000000000000000000000000000..5fd66cfaf641774f8c56316aa80d3997df9660e8 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIndexSet.h @@ -0,0 +1,77 @@ +// +// MCIndexSet.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/4/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCINDEXSET_H + +#define MAILCORE_MCINDEXSET_H + +#include <MailCore/MCObject.h> +#include <MailCore/MCRange.h> + +#ifdef __cplusplus + +#include <inttypes.h> + +namespace mailcore { + + class MAILCORE_EXPORT IndexSet : public Object { + public: + IndexSet(); + virtual ~IndexSet(); + + static IndexSet * indexSet(); + static IndexSet * indexSetWithRange(Range range); + static IndexSet * indexSetWithIndex(uint64_t idx); + + virtual unsigned int count(); + virtual void addIndex(uint64_t idx); + virtual void removeIndex(uint64_t idx); + virtual bool containsIndex(uint64_t idx); + + virtual void addRange(Range range); + virtual void removeRange(Range range); + virtual void intersectsRange(Range range); + + virtual void addIndexSet(IndexSet * indexSet); + virtual void removeIndexSet(IndexSet * indexSet); + virtual void intersectsIndexSet(IndexSet * indexSet); + + virtual Range * allRanges(); + virtual unsigned int rangesCount(); + virtual void removeAllIndexes(); + + public: // subclass behavior + IndexSet(IndexSet * o); + virtual String * description(); + virtual Object * copy(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + virtual bool isEqual(Object * otherObject); + + private: + Range * mRanges; + unsigned int mCount; + unsigned int mAllocated; + void init(); + int rangeIndexForIndex(uint64_t idx); + int rangeIndexForIndexWithBounds(uint64_t idx, unsigned int left, unsigned int right); + void addRangeIndex(unsigned int rangeIndex); + void removeRangeIndex(unsigned int rangeIndex, unsigned int count); + int rightRangeIndexForIndex(uint64_t idx); + int rightRangeIndexForIndexWithBounds(uint64_t idx, unsigned int left, unsigned int right); + int leftRangeIndexForIndex(uint64_t idx); + int leftRangeIndexForIndexWithBounds(uint64_t idx, unsigned int left, unsigned int right); + void mergeRanges(unsigned int rangeIndex); + void tryToMergeAdjacentRanges(unsigned int rangeIndex); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIterator.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIterator.h new file mode 100644 index 0000000000000000000000000000000000000000..a3e5b1c1714726b7091c72730e9da721b1f45bc9 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCIterator.h @@ -0,0 +1,189 @@ +// +// MCIterator.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 4/18/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_ITERATOR_H + +#define MAILCORE_ITERATOR_H + +#include <MailCore/MCArray.h> +#include <MailCore/MCHashMap.h> +#include <MailCore/MCIndexSet.h> +#include <MailCore/MCAutoreleasePool.h> +#include <MailCore/MCAssert.h> +#include <string.h> + +#ifdef __cplusplus + +#define mc_foreacharray(type, __variable, __array) \ +type * __variable; \ +mailcore::ArrayIterator __variable##__iterator = mailcore::ArrayIteratorInit(__array); \ +for (; NULL != (__variable = (type *) mailcore::ArrayIteratorNext(&__variable##__iterator)); ) + +#define mc_foreacharrayIndex(__index, type, __variable, __array) \ +type * __variable; \ +mailcore::ArrayIterator __variable##__iterator = mailcore::ArrayIteratorInit(__array); \ +for (unsigned int __index = 0; NULL != (__variable = (type *) mailcore::ArrayIteratorNext(&__variable##__iterator)); __index++) + +#define mc_foreachhashmapKey(keyType, __key, __hashmap) \ +keyType * __key; \ +HashMapIterator __key##__iterator = HashMapIteratorInit(__hashmap, true, false); \ +while (HashMapIteratorRun(&__key##__iterator)) \ +while (HashMapIteratorNext(&__key##__iterator, (Object **) &__key, (Object **) NULL)) + +#define mc_foreachhashmapValue(valueType, __value, __hashmap) \ +valueType * __value; \ +HashMapIterator __value##__iterator = HashMapIteratorInit(__hashmap, false, true); \ +while (HashMapIteratorRun(&__value##__iterator)) \ +while (HashMapIteratorNext(&__value##__iterator, (Object **) NULL, (Object **) &__value)) + +#define mc_foreachhashmapKeyAndValue(keyType, __key, valueType, __value, __hashmap) \ +keyType * __key; \ +valueType * __value; \ +HashMapIterator __key##__value##__iterator = HashMapIteratorInit(__hashmap, true, true); \ +while (HashMapIteratorRun(&__key##__value##__iterator)) \ +while (HashMapIteratorNext(&__key##__value##__iterator, (Object **) &__key, (Object **) &__value)) + +#define mc_foreachindexset(__variable, __indexset) \ +int64_t __variable; \ +mailcore::IndexSetIterator __variable##__iterator = mailcore::IndexSetIteratorInit(__indexset); \ +for (; (__variable = IndexSetIteratorValue(&__variable##__iterator)), IndexSetIteratorIsValid(&__variable##__iterator) ; mailcore::IndexSetIteratorNext(&__variable##__iterator)) + +namespace mailcore { + + struct IndexSetIterator { + unsigned int rangeIndex; + unsigned int index; + Range * currentRange; + IndexSet * indexSet; + }; + + static inline IndexSetIterator IndexSetIteratorInit(IndexSet * indexSet) + { + IndexSetIterator iterator = { 0, 0, NULL, indexSet }; + if (indexSet->rangesCount() >= 1) { + iterator.currentRange = &indexSet->allRanges()[0]; + } + return iterator; + } + + static inline bool IndexSetIteratorIsValid(IndexSetIterator * iterator) + { + return iterator->currentRange != NULL; + } + + static inline int64_t IndexSetIteratorValue(IndexSetIterator * iterator) + { + return iterator->currentRange == NULL ? -1 : iterator->currentRange->location + iterator->index; + } + + static inline bool IndexSetIteratorNext(IndexSetIterator * iterator) + { + iterator->index ++; + if (iterator->index > iterator->currentRange->length) { + // switch to an other range + iterator->index = 0; + iterator->rangeIndex ++; + if (iterator->rangeIndex >= iterator->indexSet->rangesCount()) { + iterator->currentRange = NULL; + return false; + } + else { + iterator->currentRange = &iterator->indexSet->allRanges()[iterator->rangeIndex]; + return true; + } + } + else { + return true; + } + } + + struct ArrayIterator { + unsigned index; + unsigned count; + Array * array; + }; + + static inline ArrayIterator ArrayIteratorInit(Array * array) + { + ArrayIterator iterator = { 0, array != NULL ? array->count() : 0, array }; + return iterator; + } + + static inline Object * ArrayIteratorNext(ArrayIterator * iterator) + { + if (iterator->index >= iterator->count) { + return NULL; + } + + Object * result = iterator->array->objectAtIndex(iterator->index); + ++ iterator->index; + return result; + } + + + struct HashMapIterator { + bool cleanup; + unsigned index; + unsigned count; + Array * keys; + Array * values; + }; + + static inline HashMapIterator HashMapIteratorInit(HashMap * hashmap, bool useKeys, bool useValues) + { + AutoreleasePool * pool = new AutoreleasePool(); + Array * keys = useKeys ? (hashmap != NULL ? hashmap->allKeys() : NULL) : NULL; + Array * values = useValues ? (hashmap != NULL ? hashmap->allValues() : NULL) : NULL; + if (keys != NULL) { + keys->retain(); + } + if (values != NULL) { + values->retain(); + } + HashMapIterator iterator = { false, 0, hashmap != NULL ? hashmap->count() : 0, keys, values }; + pool->release(); + + return iterator; + } + + static inline bool HashMapIteratorNext(HashMapIterator * iterator, Object ** keyp, Object ** valuep) + { + if (iterator->index >= iterator->count) { + return false; + } + + if (keyp != NULL) { + MCAssert(iterator->keys != NULL); + * keyp = iterator->keys->objectAtIndex(iterator->index); + } + if (valuep != NULL) { + MCAssert(iterator->values != NULL); + * valuep = iterator->values->objectAtIndex(iterator->index); + } + iterator->index ++; + return true; + } + + + static inline bool HashMapIteratorRun(HashMapIterator * iterator) + { + if (!iterator->cleanup) { + iterator->cleanup = true; + return true; + } else { + MC_SAFE_RELEASE(iterator->keys); + MC_SAFE_RELEASE(iterator->values); + return false; + } + } + +}; + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCJSON.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCJSON.h new file mode 100644 index 0000000000000000000000000000000000000000..f000dc2de5039f55c2a82a9f412fada2fa7c55fd --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCJSON.h @@ -0,0 +1,38 @@ +// +// MCJSON.h +// hermes +// +// Created by DINH Viêt Hoà on 4/8/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCJSON_H + +#define MAILCORE_MCJSON_H + +#include <MailCore/MCObject.h> +#include <MailCore/MCHashMap.h> +#include <MailCore/MCArray.h> +#include <MailCore/MCValue.h> +#include <MailCore/MCString.h> +#include <MailCore/MCData.h> + +#ifdef __cplusplus + +namespace mailcore { + + class Null; + + class MAILCORE_EXPORT JSON { + public: + static String * objectToJSONString(Object * object); + static Data * objectToJSONData(Object * object); + static Object * objectFromJSONString(String * json); + static Object * objectFromJSONData(Data * json); + }; + +} + +#endif + +#endif /* defined(__hermes__MCJSON__) */ diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCLibetpanTypes.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCLibetpanTypes.h new file mode 100644 index 0000000000000000000000000000000000000000..fcb8e70adabe9e45c1dd921ea154449e12c5b916 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCLibetpanTypes.h @@ -0,0 +1,46 @@ +// +// MCLibetpanTypes.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 4/7/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCLIBETPANTYPES_H + +#define MAILCORE_MCLIBETPANTYPES_H + +#ifdef __cplusplus +extern "C" { +#endif + struct mailimap_body_fields; + struct mailimap_body_ext_1part; + struct mailimf_address; + struct mailimf_mailbox; + struct mailimap_address; + struct mailmime; + struct mailmime_mechanism; + struct mailimap_namespace_item; + struct mailimap_namespace_info; + struct mailimap_body; + struct mailimap_body_fields; + struct mailimap_body_ext_1part; + struct mailimap_body_type_1part; + struct mailimap_body_type_basic; + struct mailimap_body_type_text; + struct mailimap_body_type_mpart; + struct mailimap_body_type_msg; + typedef struct mailimap mailimap; + struct mailimap_set; + struct mailimap_date_time; + struct mailimf_fields; + struct mailimap_envelope; + typedef struct mailpop3 mailpop3; + typedef struct mailsmtp mailsmtp; + typedef struct newsnntp newsnntp; + struct mailsem; +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCLog.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCLog.h new file mode 100644 index 0000000000000000000000000000000000000000..5f3efdb5bb72fdb35eff2d253027453cbff9cbde --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCLog.h @@ -0,0 +1,31 @@ +#ifndef MAILCORE_MCLOG_H + +#define MAILCORE_MCLOG_H + +#include <stdio.h> +#include <MailCore/MCUtils.h> + +#define MCLog(...) MCLogInternal(NULL, __FILE__, __LINE__, 0, __VA_ARGS__) +#define MCLogStack(...) MCLogInternal(NULL, __FILE__, __LINE__, 1, __VA_ARGS__) + +MAILCORE_EXPORT +extern int MCLogEnabled; + +#ifndef __printflike +#define __printflike(a,b) +#endif + +#ifdef __cplusplus +extern "C" { +#endif + MAILCORE_EXPORT + void MCLogInternal(const char * user, + const char * filename, + unsigned int line, + int dumpStack, + const char * format, ...) __printflike(5, 6); +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMD5.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMD5.h new file mode 100644 index 0000000000000000000000000000000000000000..b8cde2e9a95cde3ae8a7018f2b1d2a04f4c8783e --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMD5.h @@ -0,0 +1,28 @@ +// +// MCMD5.h +// hermes +// +// Created by DINH Viêt Hoà on 4/11/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCMD5_H + +#define MAILCORE_MCMD5_H + +#include <MailCore/MCData.h> +#include <MailCore/MCString.h> + +#ifdef __cplusplus + +namespace mailcore { + MAILCORE_EXPORT + Data * md5Data(Data * data); + + MAILCORE_EXPORT + String * md5String(Data * data); +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMailProvider.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMailProvider.h new file mode 100644 index 0000000000000000000000000000000000000000..e0801da5b89c5ddfb04a7aebf0ac0e5e652b1764 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMailProvider.h @@ -0,0 +1,75 @@ +// +// 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 MAILCORE_EXPORT 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 + MailProvider(MailProvider * other); + virtual String * description(); + virtual Object * copy(); + + public: // private + virtual void setIdentifier(String * identifier); + virtual void fillWithInfo(HashMap * info); + + private: + String * mIdentifier; + Array * /* String */ mDomainMatch; + Array * /* String */ mDomainExclude; + Array * /* String */ mMxMatch; + Array * /* NetService */ mImapServices; + Array * /* NetService */ mSmtpServices; + Array * /* NetService */ mPopServices; + HashMap * mMailboxPaths; + + virtual bool matchDomain(String * match, String * domain); + void init(); + }; + +}; + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMailProvidersManager.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMailProvidersManager.h new file mode 100644 index 0000000000000000000000000000000000000000..774c2d30767905ffcb7fed0fe546b126b93c2534 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMailProvidersManager.h @@ -0,0 +1,43 @@ +// +// MCMailProvidersManager.h +// mailcore2 +// +// Created by Robert Widmann on 4/28/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCMAILPROVIDERSMANAGER_H + +#define MAILCORE_MCMAILPROVIDERSMANAGER_H + +#include <MailCore/MCBaseTypes.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MailProvider; + + class MAILCORE_EXPORT MailProvidersManager : public Object { + public: + static MailProvidersManager * sharedManager(); + + virtual MailProvider * providerForEmail(String * email); + virtual MailProvider * providerForMX(String * hostname); + virtual MailProvider * providerForIdentifier(String * identifier); + + virtual void registerProvidersWithFilename(String * filename); + + private: + MailProvidersManager(); + void registerProviders(HashMap * providers); + + HashMap * mProviders; + + void init(); + }; +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMessageBuilder.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMessageBuilder.h new file mode 100644 index 0000000000000000000000000000000000000000..3d26ac5908b56077a27ece7028d866a274042019 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMessageBuilder.h @@ -0,0 +1,83 @@ +#ifndef MAILCORE_MCMESSAGEBUILDER_H + +#define MAILCORE_MCMESSAGEBUILDER_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCAbstractMessage.h> + +#ifdef __cplusplus + +namespace mailcore { + + class Attachment; + class HTMLRendererTemplateCallback; + + class MAILCORE_EXPORT MessageBuilder : public AbstractMessage { + public: + MessageBuilder(); + virtual ~MessageBuilder(); + + virtual void setHTMLBody(String * htmlBody); + virtual String * htmlBody(); + + virtual void setTextBody(String * textBody); + virtual String * textBody(); + + virtual void setAttachments(Array * /* Attachment */ attachments); + virtual Array * /* Attachment */ attachments(); + virtual void addAttachment(Attachment * attachment); + + // attachments (usually images) that are included in HTML. + // a Content-ID should be assigned to these part to be able to reference + // them in the HTML using a cid: URL. + virtual void setRelatedAttachments(Array * /* Attachment */ attachments); + virtual Array * /* Attachment */ relatedAttachments(); + virtual void addRelatedAttachment(Attachment * attachment); + + // When boundary needs to be prefixed (to go through spam filters). + virtual void setBoundaryPrefix(String * boundaryPrefix); + virtual String * boundaryPrefix(); + + virtual Data * data(); + virtual Data * dataForEncryption(); + + // Store builded message to file. + virtual ErrorCode writeToFile(String * filename); + + virtual String * htmlRendering(HTMLRendererTemplateCallback * htmlCallback = NULL); + virtual String * htmlBodyRendering(); + + virtual String * plainTextRendering(); + virtual String * plainTextBodyRendering(bool stripWhitespace); + + virtual Data * openPGPSignedMessageDataWithSignatureData(Data * signature); + virtual Data * openPGPEncryptedMessageDataWithEncryptedData(Data * encryptedData); + + public: // subclass behavior + MessageBuilder(MessageBuilder * other); + virtual String * description(); + virtual Object * copy(); + + public: // private + virtual String * nextBoundary(); + virtual void resetBoundaries(); + virtual void setBoundaries(Array * boundaries); + + private: + String * mHTMLBody; + String * mTextBody; + Array * /* Attachment */ mAttachments; + Array * /* Attachment */ mRelatedAttachments; + String * mBoundaryPrefix; + void init(); + Data * dataAndFilterBccAndForEncryption(bool filterBcc, bool forEncryption); + struct mailmime * mimeAndFilterBccAndForEncryption(bool filterBcc, bool forEncryption); + Array * mBoundaries; + unsigned int mCurrentBoundaryIndex; + }; + +}; + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMessageConstants.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMessageConstants.h new file mode 100644 index 0000000000000000000000000000000000000000..58822df9bc22ee4c89a8fd4983746a6d2801156e --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMessageConstants.h @@ -0,0 +1,286 @@ +#ifndef MAILCORE_MCMESSAGECONSTANTS_H + +#define MAILCORE_MCMESSAGECONSTANTS_H + +#ifdef __cplusplus + +namespace mailcore { + + enum ConnectionType { + ConnectionTypeClear = 1 << 0, + ConnectionTypeStartTLS = 1 << 1, + ConnectionTypeTLS = 1 << 2, + }; + + enum AuthType { + AuthTypeSASLNone = 0, + AuthTypeSASLCRAMMD5 = 1 << 0, + AuthTypeSASLPlain = 1 << 1, + AuthTypeSASLGSSAPI = 1 << 2, + AuthTypeSASLDIGESTMD5 = 1 << 3, + AuthTypeSASLLogin = 1 << 4, + AuthTypeSASLSRP = 1 << 5, + AuthTypeSASLNTLM = 1 << 6, + AuthTypeSASLKerberosV4 = 1 << 7, + AuthTypeXOAuth2 = 1 << 8, + AuthTypeXOAuth2Outlook = 1 << 9, + }; + + enum IMAPFolderFlag { + IMAPFolderFlagNone = 0, + IMAPFolderFlagMarked = 1 << 0, + IMAPFolderFlagUnmarked = 1 << 1, + IMAPFolderFlagNoSelect = 1 << 2, + IMAPFolderFlagNoInferiors = 1 << 3, + IMAPFolderFlagInbox = 1 << 4, + IMAPFolderFlagSentMail = 1 << 5, + IMAPFolderFlagStarred = 1 << 6, + IMAPFolderFlagAllMail = 1 << 7, + IMAPFolderFlagTrash = 1 << 8, + IMAPFolderFlagDrafts = 1 << 9, + IMAPFolderFlagSpam = 1 << 10, + IMAPFolderFlagImportant = 1 << 11, + IMAPFolderFlagArchive = 1 << 12, + IMAPFolderFlagAll = IMAPFolderFlagAllMail, + IMAPFolderFlagJunk = IMAPFolderFlagSpam, + IMAPFolderFlagFlagged = IMAPFolderFlagStarred, + IMAPFolderFlagFolderTypeMask = IMAPFolderFlagInbox | IMAPFolderFlagSentMail | IMAPFolderFlagStarred | IMAPFolderFlagAllMail | + IMAPFolderFlagTrash| IMAPFolderFlagDrafts | IMAPFolderFlagSpam | IMAPFolderFlagImportant | IMAPFolderFlagArchive, + }; + + enum MessageFlag { + MessageFlagNone = 0, + MessageFlagSeen = 1 << 0, + MessageFlagAnswered = 1 << 1, + MessageFlagFlagged = 1 << 2, + MessageFlagDeleted = 1 << 3, + MessageFlagDraft = 1 << 4, + MessageFlagMDNSent = 1 << 5, + MessageFlagForwarded = 1 << 6, + MessageFlagSubmitPending = 1 << 7, + MessageFlagSubmitted = 1 << 8, + MessageFlagMaskAll = MessageFlagSeen | MessageFlagAnswered | MessageFlagFlagged | + MessageFlagDeleted | MessageFlagDraft | MessageFlagMDNSent | MessageFlagForwarded | + MessageFlagSubmitPending | MessageFlagSubmitted, + } ; + + enum IMAPMessagesRequestKind { + IMAPMessagesRequestKindUid = 0, // This is the default and it's always fetched + IMAPMessagesRequestKindFlags = 1 << 0, + IMAPMessagesRequestKindHeaders = 1 << 1, + IMAPMessagesRequestKindStructure = 1 << 2, + IMAPMessagesRequestKindInternalDate = 1 << 3, + IMAPMessagesRequestKindFullHeaders = 1 << 4, + IMAPMessagesRequestKindHeaderSubject = 1 << 5, + IMAPMessagesRequestKindGmailLabels = 1 << 6, + IMAPMessagesRequestKindGmailMessageID = 1 << 7, + IMAPMessagesRequestKindGmailThreadID = 1 << 8, + IMAPMessagesRequestKindExtraHeaders = 1 << 9, + IMAPMessagesRequestKindSize = 1 << 10, + }; + + enum IMAPFetchRequestType { + IMAPFetchRequestTypeUID = 0, + IMAPFetchRequestTypeSequence = 1 + }; + + enum IMAPStoreFlagsRequestKind { + IMAPStoreFlagsRequestKindAdd, + IMAPStoreFlagsRequestKindRemove, + IMAPStoreFlagsRequestKindSet, + }; + + enum IMAPWorkaround { + IMAPWorkaroundGmail = 1 << 0, + IMAPWorkaroundYahoo = 1 << 1, + IMAPWorkaroundExchange2003 = 1 << 2, + }; + + enum IMAPCapability { + IMAPCapabilityACL, + IMAPCapabilityBinary, + IMAPCapabilityCatenate, + IMAPCapabilityChildren, + IMAPCapabilityCompressDeflate, + IMAPCapabilityCondstore, + IMAPCapabilityEnable, + IMAPCapabilityIdle, + IMAPCapabilityId, + IMAPCapabilityLiteralPlus, + IMAPCapabilityMove, + IMAPCapabilityMultiAppend, + IMAPCapabilityNamespace, + IMAPCapabilityQResync, + IMAPCapabilityQuota, + IMAPCapabilitySort, + IMAPCapabilityStartTLS, + IMAPCapabilityThreadOrderedSubject, + IMAPCapabilityThreadReferences, + IMAPCapabilityUIDPlus, + IMAPCapabilityUnselect, + IMAPCapabilityXList, + IMAPCapabilityAuthAnonymous, + IMAPCapabilityAuthCRAMMD5, + IMAPCapabilityAuthDigestMD5, + IMAPCapabilityAuthExternal, + IMAPCapabilityAuthGSSAPI, + IMAPCapabilityAuthKerberosV4, + IMAPCapabilityAuthLogin, + IMAPCapabilityAuthNTLM, + IMAPCapabilityAuthOTP, + IMAPCapabilityAuthPlain, + IMAPCapabilityAuthSKey, + IMAPCapabilityAuthSRP, + IMAPCapabilityXOAuth2, + IMAPCapabilityXYMHighestModseq, + IMAPCapabilityGmail, + }; + + enum POPCapability { + POPCapabilityNone, + POPCapabilityStartTLS, + POPCapabilityTop, + POPCapabilityUser, + POPCapabilityRespCodes, + POPCapabilityPipelining, + POPCapabilityUIDL, + POPCapabilitySASL, + POPCapabilityAuthAnonymous, + POPCapabilityAuthCRAMMD5, + POPCapabilityAuthDigestMD5, + POPCapabilityAuthExternal, + POPCapabilityAuthGSSAPI, + POPCapabilityAuthKerberosV4, + POPCapabilityAuthLogin, + POPCapabilityAuthNTLM, + POPCapabilityAuthOTP, + POPCapabilityAuthPlain, + POPCapabilityAuthSKey, + POPCapabilityAuthSRP, + }; + + enum Encoding { + Encoding7Bit = 0, // should match MAILIMAP_BODY_FLD_ENC_7BIT + Encoding8Bit = 1, // should match MAILIMAP_BODY_FLD_ENC_8BIT + EncodingBinary = 2, // should match MAILIMAP_BODY_FLD_ENC_BINARY + EncodingBase64 = 3, // should match MAILIMAP_BODY_FLD_ENC_BASE64 + EncodingQuotedPrintable = 4, // should match MAILIMAP_BODY_FLD_ENC_QUOTED_PRINTABLE + EncodingOther = 5, // should match MAILIMAP_BODY_FLD_ENC_OTHER + // negative values should be used for other encoding + EncodingUUEncode = -1 + }; + + enum IMAPSearchKind { + IMAPSearchKindAll, + IMAPSearchKindNone, + IMAPSearchKindFrom, + IMAPSearchKindTo, + IMAPSearchKindCc, + IMAPSearchKindBcc, + IMAPSearchKindRecipient, // Recipient is the combination of To, Cc and Bcc + IMAPSearchKindSubject, + IMAPSearchKindContent, + IMAPSearchKindBody, + IMAPSearchKindUIDs, + IMAPSearchKindNumbers, + IMAPSearchKindHeader, + IMAPSearchKindRead, + IMAPSearchKindUnread, + IMAPSearchKindFlagged, + IMAPSearchKindUnflagged, + IMAPSearchKindAnswered, + IMAPSearchKindUnanswered, + IMAPSearchKindDraft, + IMAPSearchKindUndraft, + IMAPSearchKindDeleted, + IMAPSearchKindSpam, + IMAPSearchKindBeforeDate, + IMAPSearchKindOnDate, + IMAPSearchKindSinceDate, + IMAPSearchKindBeforeReceivedDate, + IMAPSearchKindOnReceivedDate, + IMAPSearchKindSinceReceivedDate, + IMAPSearchKindSizeLarger, + IMAPSearchKindSizeSmaller, + IMAPSearchKindGmailThreadID, + IMAPSearchKindGmailMessageID, + IMAPSearchKindGmailRaw, + IMAPSearchKindOr, + IMAPSearchKindAnd, + IMAPSearchKindNot, + }; + + enum ErrorCode { + ErrorNone, // 0 + ErrorConnection, + ErrorTLSNotAvailable, + ErrorParse, + ErrorCertificate, + ErrorAuthentication, + ErrorGmailIMAPNotEnabled, + ErrorGmailExceededBandwidthLimit, + ErrorGmailTooManySimultaneousConnections, + ErrorMobileMeMoved, + ErrorYahooUnavailable, // 10 + ErrorNonExistantFolder, + ErrorRename, + ErrorDelete, + ErrorCreate, + ErrorSubscribe, + ErrorAppend, + ErrorCopy, + ErrorExpunge, + ErrorFetch, + ErrorIdle, // 20 + ErrorIdentity, + ErrorNamespace, + ErrorStore, + ErrorCapability, + ErrorStartTLSNotAvailable, + ErrorSendMessageIllegalAttachment, + ErrorStorageLimit, + ErrorSendMessageNotAllowed, + ErrorNeedsConnectToWebmail, + ErrorSendMessage, // 30 + ErrorAuthenticationRequired, + ErrorFetchMessageList, + ErrorDeleteMessage, + ErrorInvalidAccount, + ErrorFile, + ErrorCompression, + ErrorNoSender, + ErrorNoRecipient, + ErrorNoop, + ErrorGmailApplicationSpecificPasswordRequired, // 40 + ErrorServerDate, + ErrorNoValidServerFound, + ErrorCustomCommand, + ErrorYahooSendMessageSpamSuspected, + ErrorYahooSendMessageDailyLimitExceeded, + ErrorOutlookLoginViaWebBrowser, + ErrorTiscaliSimplePassword, + }; + + enum PartType { + PartTypeSingle, + PartTypeMessage, + PartTypeMultipartMixed, + PartTypeMultipartRelated, + PartTypeMultipartAlternative, + PartTypeMultipartSigned, + }; + + // Private type - It should not be used directly. + enum IMAPMessageRenderingType { + IMAPMessageRenderingTypeHTML, + IMAPMessageRenderingTypeHTMLBody, + IMAPMessageRenderingTypePlainText, + IMAPMessageRenderingTypePlainTextBody, + IMAPMessageRenderingTypePlainTextBodyAndStripWhitespace, + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMessageHeader.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMessageHeader.h new file mode 100644 index 0000000000000000000000000000000000000000..439e0d44164fe0a140ee1af7308ac4e51ce50366 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMessageHeader.h @@ -0,0 +1,111 @@ +#ifndef MAILCORE_MCMESSAGEHEADER_H + +#define MAILCORE_MCMESSAGEHEADER_H + +#include <MailCore/MCBaseTypes.h> +#include <time.h> + +#ifdef __cplusplus + +namespace mailcore { + + class Address; + + class MAILCORE_EXPORT MessageHeader : public Object { + public: + MessageHeader(); + virtual ~MessageHeader(); + + virtual void setMessageID(String * messageID); + virtual String * messageID(); + + virtual bool isMessageIDAutoGenerated(); + + virtual void setReferences(Array * /* String */ references); + virtual Array * /* String */ references(); + + virtual void setInReplyTo(Array * /* String */ inReplyTo); + virtual Array * /* String */ inReplyTo(); + + virtual void setDate(time_t date); + virtual time_t date(); + + virtual void setReceivedDate(time_t date); + virtual time_t receivedDate(); + + virtual void setSender(Address * sender); + virtual Address * sender(); + + virtual void setFrom(Address * from); + virtual Address * from(); + + virtual void setTo(Array * /* Address */ to); + virtual Array * /* Address */ to(); + + virtual void setCc(Array * /* Address */ cc); + virtual Array * /* Address */ cc(); + + virtual void setBcc(Array * /* Address */ bcc); + virtual Array * /* Address */ bcc(); + + virtual void setReplyTo(Array * /* Address */ replyTo); + virtual Array * /* Address */ replyTo(); + + virtual void setSubject(String * subject); + virtual String * subject(); + + virtual void setUserAgent(String * userAgent); + virtual String * userAgent(); + + virtual void setExtraHeader(String *name, String * value); + virtual void removeExtraHeader(String *name); + virtual String * extraHeaderValueForName(String *name); + virtual Array * allExtraHeadersNames(); + + String * extractedSubject(); + virtual String * partialExtractedSubject(); + virtual void importHeadersData(Data * data); + + virtual MessageHeader * replyHeader(bool replyAll, Array * addressesExcludedFromRecipient); + virtual MessageHeader * forwardHeader(); + + public: // subclass behavior + MessageHeader(MessageHeader * other); + virtual String * description(); + virtual Object * copy(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + + public: // private + virtual void importIMAPEnvelope(struct mailimap_envelope * env); + virtual void importIMAPReferences(Data * data); + virtual void importIMAPInternalDate(struct mailimap_date_time * date); + + virtual struct mailimf_fields * createIMFFieldsAndFilterBcc(bool filterBcc); + virtual void importIMFFields(struct mailimf_fields * fields); + + private: + String * mMessageID; + bool mMessageIDAutoGenerated; + Array * /* String */ mReferences; + Array * /* String */ mInReplyTo; + Address * mSender; + Address * mFrom; + Array * /* Address */ mTo; + Array * /* Address */ mCc; + Array * /* Address */ mBcc; + Array * /* Address */ mReplyTo; + String * mSubject; + time_t mDate; + time_t mReceivedDate; + HashMap * mExtraHeaders; + void init(bool generateDate, bool generateMessageID); + void setExtraHeaders(HashMap *headers); + Array * recipientWithReplyAll(bool replyAll, bool includeTo, bool includeCc, Array * senderEmails); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMessageParser.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMessageParser.h new file mode 100644 index 0000000000000000000000000000000000000000..4541b41c27f70bd637e2e0949aa7596dc53b9e40 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMessageParser.h @@ -0,0 +1,85 @@ +#ifndef MAILCORE_MCPARSEDMESSAGE_H + +#define MAILCORE_MCPARSEDMESSAGE_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCAbstractMessage.h> +#include <MailCore/MCAbstractPart.h> +#ifdef __APPLE__ +#import <CoreFoundation/CoreFoundation.h> +#endif + +#ifdef __cplusplus + +namespace mailcore { + + class HTMLRendererTemplateCallback; + class HTMLRendererRFC822Callback; + class Multipart; + class MessagePart; + class Attachment; + + class MAILCORE_EXPORT MessageParser : public AbstractMessage { + public: + static MessageParser * messageParserWithData(Data * data); + static MessageParser * messageParserWithContentsOfFile(String * filename); + + MessageParser(); + MessageParser(Data * data); + virtual ~MessageParser(); + + virtual AbstractPart * mainPart(); + virtual Data * data(); + + virtual String * htmlRendering(HTMLRendererTemplateCallback * htmlCallback = NULL); + virtual String * htmlRenderingWithDataCallback(HTMLRendererTemplateCallback * htmlCallback, + HTMLRendererRFC822Callback * dataCallback); + virtual String * htmlBodyRendering(); + + virtual String * plainTextRendering(); + virtual String * plainTextBodyRendering(bool stripWhitespace); + + public: // subclass behavior + MessageParser(MessageParser * other); + virtual String * description(); + virtual Object * copy(); + + virtual AbstractPart * partForContentID(String * contentID); + virtual AbstractPart * partForUniqueID(String * uniqueID); + + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + +#ifdef __APPLE__ + public: + static MessageParser * messageParserWithData(CFDataRef data); + MessageParser(CFDataRef data); +#endif + + private: + Data * mData; + AbstractPart * mMainPart; + void init(); +#if __APPLE__ + void * mNSData; +#endif + + private: + void setBytes(char * bytes, unsigned int length); + Data * dataFromNSData(); + void setupPartID(); + void recursiveSetupPartIDWithPart(mailcore::AbstractPart * part, + mailcore::String * partIDPrefix); + void recursiveSetupPartIDWithSinglePart(mailcore::Attachment * part, + mailcore::String * partIDPrefix); + void recursiveSetupPartIDWithMessagePart(mailcore::MessagePart * part, + mailcore::String * partIDPrefix); + void recursiveSetupPartIDWithMultipart(mailcore::Multipart * part, + mailcore::String * partIDPrefix); + }; + +}; + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMessagePart.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMessagePart.h new file mode 100644 index 0000000000000000000000000000000000000000..04879ba36ad513d933b790d49e034a1cb4f72fea --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMessagePart.h @@ -0,0 +1,34 @@ +#ifndef MAILCORE_MCMESSAGEPART_H + +#define MAILCORE_MCMESSAGEPART_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCAbstractMessagePart.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT MessagePart : public AbstractMessagePart { + public: + MessagePart(); + virtual ~MessagePart(); + + virtual void setPartID(String * partID); + virtual String * partID(); + + public: // subclass behavior + MessagePart(MessagePart * other); + virtual Object * copy(); + + private: + String * mPartID; + + void init(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMultipart.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMultipart.h new file mode 100644 index 0000000000000000000000000000000000000000..d389f522c19f14a974e38c69f253ee5b220354b8 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCMultipart.h @@ -0,0 +1,34 @@ +#ifndef MAILCORE_MCMULTIPART_H + +#define MAILCORE_MCMULTIPART_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCAbstractMultipart.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT Multipart : public AbstractMultipart { + public: + Multipart(); + virtual ~Multipart(); + + virtual void setPartID(String * partID); + virtual String * partID(); + + public: // subclass behavior + Multipart(Multipart * other); + virtual Object * copy(); + + private: + String * mPartID; + + void init(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTP.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTP.h new file mode 100644 index 0000000000000000000000000000000000000000..c2da3a66936615d6bf2e9cc4b56c6f921ba05d35 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTP.h @@ -0,0 +1,9 @@ +#ifndef MAILCORE_MCNNTP_H + +#define MAILCORE_MCNNTP_H + +#include <MailCore/MCNNTPGroupInfo.h> +#include <MailCore/MCNNTPProgressCallback.h> +#include <MailCore/MCNNTPSession.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPAsyncSession.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPAsyncSession.h new file mode 100644 index 0000000000000000000000000000000000000000..eb2531a45414c1718fe963a54b26402afe9b6414 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPAsyncSession.h @@ -0,0 +1,102 @@ +#ifndef MAILCORE_MCNNTPASYNCSESSION_H + +#define MAILCORE_MCNNTPASYNCSESSION_H + +#include <MailCore/MCBaseTypes.h> + +#ifdef __cplusplus + +namespace mailcore { + + class NNTPOperation; + class NNTPSession; + class NNTPFetchHeaderOperation; + class NNTPFetchArticleOperation; + class NNTPFetchAllArticlesOperation; + class NNTPFetchOverviewOperation; + class NNTPListNewsgroupsOperation; + class NNTPFetchServerTimeOperation; + class NNTPPostOperation; + class NNTPOperationQueueCallback; + class NNTPConnectionLogger; + + class MAILCORE_EXPORT NNTPAsyncSession : public Object { + public: + NNTPAsyncSession(); + virtual ~NNTPAsyncSession(); + + virtual void setHostname(String * hostname); + virtual String * hostname(); + + virtual void setPort(unsigned int port); + virtual unsigned int port(); + + virtual void setUsername(String * login); + virtual String * username(); + + virtual void setPassword(String * password); + virtual String * password(); + + virtual void setConnectionType(ConnectionType connectionType); + virtual ConnectionType connectionType(); + + virtual void setTimeout(time_t timeout); + virtual time_t timeout(); + + virtual void setCheckCertificateEnabled(bool enabled); + virtual bool isCheckCertificateEnabled(); + + virtual void setConnectionLogger(ConnectionLogger * logger); + virtual ConnectionLogger * connectionLogger(); + +#ifdef __APPLE__ + virtual void setDispatchQueue(dispatch_queue_t dispatchQueue); + virtual dispatch_queue_t dispatchQueue(); +#endif + + virtual void setOperationQueueCallback(OperationQueueCallback * callback); + virtual OperationQueueCallback * operationQueueCallback(); + virtual bool isOperationQueueRunning(); + virtual void cancelAllOperations(); + + virtual NNTPFetchAllArticlesOperation * fetchAllArticlesOperation(String * group); + + virtual NNTPFetchHeaderOperation * fetchHeaderOperation(String * groupName, unsigned int index); + + virtual NNTPFetchArticleOperation * fetchArticleOperation(String *groupName, unsigned int index); + virtual NNTPFetchArticleOperation * fetchArticleByMessageIDOperation(String * messageID); + + virtual NNTPFetchOverviewOperation * fetchOverviewOperationWithIndexes(String * groupName, IndexSet * indexes); + + virtual NNTPFetchServerTimeOperation * fetchServerDateOperation(); + + virtual NNTPListNewsgroupsOperation * listAllNewsgroupsOperation(); + virtual NNTPListNewsgroupsOperation * listDefaultNewsgroupsOperation(); + + virtual NNTPPostOperation * postMessageOperation(Data * messageData); + virtual NNTPPostOperation * postMessageOperation(String * filename); + + virtual NNTPOperation * disconnectOperation(); + + virtual NNTPOperation * checkAccountOperation(); + + private: + NNTPSession * mSession; + OperationQueue * mQueue; + NNTPOperationQueueCallback * mQueueCallback; + ConnectionLogger * mConnectionLogger; + pthread_mutex_t mConnectionLoggerLock; + NNTPConnectionLogger * mInternalLogger; + OperationQueueCallback * mOperationQueueCallback; + + public: // private + virtual void runOperation(NNTPOperation * operation); + virtual NNTPSession * session(); + virtual void logConnection(ConnectionLogType logType, Data * buffer); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPFetchAllArticlesOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPFetchAllArticlesOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..0fa532c8e6d4fba46ce1043e116556aba0b36349 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPFetchAllArticlesOperation.h @@ -0,0 +1,41 @@ +// +// MCNNTPFetchAllArticlesOperation.h +// mailcore2 +// +// Created by Robert Widmann on 8/13/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCNNTPFETCHARTICLESOPERATION_H + +#define MAILCORE_MCNNTPFETCHARTICLESOPERATION_H + +#include <MailCore/MCNNTPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT NNTPFetchAllArticlesOperation : public NNTPOperation { + public: + NNTPFetchAllArticlesOperation(); + virtual ~NNTPFetchAllArticlesOperation(); + + virtual void setGroupName(String * groupName); + virtual String * groupName(); + + virtual IndexSet * articles(); + + public: // subclass behavior + virtual void main(); + + private: + String * mGroupName; + IndexSet * mArticles; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPFetchArticleOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPFetchArticleOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..3e066b7badfdb808871a8b2272d246eeae3fe8c5 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPFetchArticleOperation.h @@ -0,0 +1,49 @@ +// +// MCNNTPFetchArticleOperation.h +// mailcore2 +// +// Created by Robert Widmann on 8/13/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCNNTPFETCHARTICLEOPERATION_H + +#define MAILCORE_MCNNTPFETCHARTICLEOPERATION_H + +#include <MailCore/MCNNTPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + class MAILCORE_EXPORT NNTPFetchArticleOperation : public NNTPOperation { + public: + NNTPFetchArticleOperation(); + virtual ~NNTPFetchArticleOperation(); + + virtual void setGroupName(String * groupName); + virtual String * groupName(); + + virtual void setMessageID(String * groupName); + virtual String * messageID(); + + virtual void setMessageIndex(unsigned int messageIndex); + virtual unsigned int messageIndex(); + + virtual Data * data(); + + public: // subclass behavior + virtual void main(); + + private: + String * mGroupName; + String * mMessageID; + unsigned int mMessageIndex; + Data * mData; + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPFetchHeaderOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPFetchHeaderOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..93b9d380f8d0b6baf4ddb95800c8add800a50e51 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPFetchHeaderOperation.h @@ -0,0 +1,48 @@ +// +// MCNNTPFetchHeaderOperation.h +// mailcore2 +// +// Created by Robert Widmann on 8/13/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCNNTPFETCHHEADEROPERATION_H + +#define MAILCORE_MCNNTPFETCHHEADEROPERATION_H + +#include <MailCore/MCNNTPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MessageHeader; + + class MAILCORE_EXPORT NNTPFetchHeaderOperation : public NNTPOperation { + public: + NNTPFetchHeaderOperation(); + virtual ~NNTPFetchHeaderOperation(); + + virtual void setGroupName(String * groupName); + virtual String * groupName(); + + virtual void setMessageIndex(unsigned int messageIndex); + virtual unsigned int messageIndex(); + + virtual MessageHeader * header(); + + public: // subclass behavior + virtual void main(); + + private: + String * mGroupName; + unsigned int mMessageIndex; + MessageHeader * mHeader; + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPFetchOverviewOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPFetchOverviewOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..bf8db26feb599afdd4fa0c9d2a3783f242fa2afe --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPFetchOverviewOperation.h @@ -0,0 +1,45 @@ +// +// NNTPFetchOverviewOperation.h +// mailcore2 +// +// Created by Robert Widmann on 10/21/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCNNTPFETCHOVERVIEWOPERATION_H + +#define MAILCORE_MCNNTPFETCHOVERVIEWOPERATION_H + +#include <MailCore/MCNNTPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT NNTPFetchOverviewOperation : public NNTPOperation { + public: + NNTPFetchOverviewOperation(); + virtual ~NNTPFetchOverviewOperation(); + + virtual void setIndexes(IndexSet * indexes); + virtual IndexSet * indexes(); + + virtual void setGroupName(String * groupName); + virtual String * groupName(); + + virtual Array * articles(); + + public: // subclass behavior + virtual void main(); + + private: + IndexSet * mIndexes; + String * mGroupName; + Array * /* MessageHeader */ mArticles; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPFetchServerTimeOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPFetchServerTimeOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..b01a1599c718ff4eb03d8f849df20a30814b366e --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPFetchServerTimeOperation.h @@ -0,0 +1,37 @@ +// +// MCNNTPFetchServerTimeOperation.h +// mailcore2 +// +// Created by Robert Widmann on 10/21/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCNNTPFETCHSERVERTIMEOPERATION_H + +#define MAILCORE_MCNNTPFETCHSERVERTIMEOPERATION_H + +#include <MailCore/MCNNTPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT NNTPFetchServerTimeOperation : public NNTPOperation { + public: + NNTPFetchServerTimeOperation(); + virtual ~NNTPFetchServerTimeOperation(); + + virtual time_t time(); + + public: // subclass behavior + virtual void main(); + + private: + time_t mTime; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPGroupInfo.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPGroupInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..75a6675c3da5902e0f19127bd6246dcbf26b50b0 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPGroupInfo.h @@ -0,0 +1,38 @@ +#ifndef MAILCORE_MCNNTPGROUPINFO_H + +#define MAILCORE_MCNNTPGROUPINFO_H + +#include <MailCore/MCBaseTypes.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT NNTPGroupInfo : public Object { + public: + NNTPGroupInfo(); + virtual ~NNTPGroupInfo(); + + virtual void setName(String * uid); + virtual String * name(); + + virtual void setMessageCount(uint32_t messages); + virtual uint32_t messageCount(); + + public: // subclass behavior + NNTPGroupInfo(NNTPGroupInfo * other); + virtual String * description(); + virtual Object * copy(); + + private: + String * mName; + uint32_t mMessageCount; + + void init(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPListNewsgroupsOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPListNewsgroupsOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..d2c68038f006c16e899f368928bf6cdece247269 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPListNewsgroupsOperation.h @@ -0,0 +1,41 @@ +// +// MCNNTPListNewsgroupsMessagesOperation.h +// mailcore2 +// +// Created by Robert Widmann on 8/13/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCNNTPLISTNEWSGROUPSOPERATION_H + +#define MAILCORE_MCNNTPLISTNEWSGROUPSOPERATION_H + +#include <MailCore/MCNNTPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT NNTPListNewsgroupsOperation : public NNTPOperation { + public: + NNTPListNewsgroupsOperation(); + virtual ~NNTPListNewsgroupsOperation(); + + virtual void setListsSubscribed(bool listsSubscribed); + virtual bool listsSubscribed(); + + virtual Array * groups(); + + public: // subclass behavior + virtual void main(); + + private: + bool mListsSuscribed; + Array * /* NNTPGroupInfo */ mGroups; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..52205e9f9dc638092abfce0217f1c32d83874441 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPOperation.h @@ -0,0 +1,53 @@ +// +// MCNNTPOperation.h +// mailcore2 +// +// Created by Robert Widmann on 8/13/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCNNTPOPERATION_H + +#define MAILCORE_MCNNTPOPERATION_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCNNTPProgressCallback.h> + +#ifdef __cplusplus + +namespace mailcore { + + class NNTPAsyncSession; + class NNTPOperationCallback; + + class MAILCORE_EXPORT NNTPOperation : public Operation, public NNTPProgressCallback { + public: + NNTPOperation(); + virtual ~NNTPOperation(); + + virtual void setSession(NNTPAsyncSession * session); + virtual NNTPAsyncSession * session(); + + virtual void setNNTPCallback(NNTPOperationCallback * callback); + virtual NNTPOperationCallback * nntpCallback(); + + virtual void setError(ErrorCode error); + virtual ErrorCode error(); + + virtual void start(); + + private: + NNTPAsyncSession * mSession; + NNTPOperationCallback * mPopCallback; + ErrorCode mError; + private: + virtual void bodyProgress(NNTPSession * session, unsigned int current, unsigned int maximum); + virtual void bodyProgressOnMainThread(void * context); + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPOperationCallback.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPOperationCallback.h new file mode 100644 index 0000000000000000000000000000000000000000..e12a1b7579f3788c1378cb721126f755c01e0ee4 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPOperationCallback.h @@ -0,0 +1,30 @@ +// +// MCNNTPOperationCallback.h +// mailcore2 +// +// Created by Robert Widmann on 8/13/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCNNTPOPERATIONCALLBACK_H + +#define MAILCORE_MCNNTPOPERATIONCALLBACK_H + +#include <MailCore/MCUtils.h> + +#ifdef __cplusplus + +namespace mailcore { + + class NNTPOperation; + + class MAILCORE_EXPORT NNTPOperationCallback { + public: + virtual void bodyProgress(NNTPOperation * session, unsigned int current, unsigned int maximum) {}; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPPostOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPPostOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..9255dafd61c04b8c8c64c48286f785dbbea1e390 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPPostOperation.h @@ -0,0 +1,44 @@ +// +// MCNNTPPostOperation.h +// mailcore2 +// +// Created by Daryle Walker on 2/21/16. +// Copyright © 2016 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCNNTPPOSTOPERATION_H + +#define MAILCORE_MCNNTPPOSTOPERATION_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCAbstract.h> +#include <MailCore/MCNNTPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT NNTPPostOperation : public NNTPOperation { + public: + NNTPPostOperation(); + virtual ~NNTPPostOperation(); + + virtual void setMessageData(Data * data); + virtual Data * messageData(); + + virtual void setMessageFilepath(String * path); + virtual String * messageFilepath(); + + public: // subclass behavior + virtual void main(); + + private: + Data * mMessageData; + String * mMessageFilepath; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPProgressCallback.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPProgressCallback.h new file mode 100644 index 0000000000000000000000000000000000000000..dd615d04f425222db3c99b20ea7c956b395ca124 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPProgressCallback.h @@ -0,0 +1,22 @@ +#ifndef MAILCORE_MCNNTPPROGRESSCALLBACK_H + +#define MAILCORE_MCNNTPPROGRESSCALLBACK_H + +#ifdef __cplusplus + +#include <MailCore/MCUtils.h> + +namespace mailcore { + + class NNTPSession; + + class MAILCORE_EXPORT NNTPProgressCallback { + public: + virtual void bodyProgress(NNTPSession * session, unsigned int current, unsigned int maximum) {}; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPSession.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPSession.h new file mode 100644 index 0000000000000000000000000000000000000000..5e371eead4e640d13ba9c5dc12082fa9253ca761 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNNTPSession.h @@ -0,0 +1,105 @@ +#ifndef MAILCORE_MCNNTPSESSION_H +#define MAILCORE_MCNNTPSESSION_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCMessageConstants.h> + +#ifdef __cplusplus + +namespace mailcore { + + class NNTPProgressCallback; + class MessageHeader; + + class MAILCORE_EXPORT NNTPSession : public Object { + public: + NNTPSession(); + virtual ~NNTPSession(); + + virtual void setHostname(String * hostname); + virtual String * hostname(); + + virtual void setPort(unsigned int port); + virtual unsigned int port(); + + virtual void setUsername(String * username); + virtual String * username(); + + virtual void setPassword(String * password); + virtual String * password(); + + virtual void setConnectionType(ConnectionType connectionType); + virtual ConnectionType connectionType(); + + virtual void setTimeout(time_t timeout); + virtual time_t timeout(); + + virtual void setCheckCertificateEnabled(bool enabled); + virtual bool isCheckCertificateEnabled(); + + virtual void connect(ErrorCode * pError); + virtual void disconnect(); + + virtual void login(ErrorCode * pError); + + virtual void checkAccount(ErrorCode * pError); + + virtual Array * /* NNTPGroupInfo */ listAllNewsgroups(ErrorCode * pError); + virtual Array * /* NNTPGroupInfo */ listDefaultNewsgroups(ErrorCode * pError); + + virtual MessageHeader * fetchHeader(String * groupName, unsigned int index, ErrorCode * pError); + virtual Array /*MessageHeader*/ * fetchOverArticlesInRange(Range range, String * groupname, ErrorCode * pError); + + virtual IndexSet * fetchAllArticles(String * groupname, ErrorCode * pError); + + virtual Data * fetchArticle(String *groupName, unsigned int index, NNTPProgressCallback * callback, ErrorCode * pError); + virtual Data * fetchArticleByMessageID(String * messageID, ErrorCode * pError); + + virtual time_t fetchServerDate(ErrorCode * pError); + + virtual void postMessage(Data * messageData, NNTPProgressCallback * callback, ErrorCode * pError); + virtual void postMessage(String * messagePath, NNTPProgressCallback * callback, ErrorCode * pError); + + virtual void setConnectionLogger(ConnectionLogger * logger); + virtual ConnectionLogger * connectionLogger(); + + public: // private + virtual void lockConnectionLogger(); + virtual void unlockConnectionLogger(); + virtual ConnectionLogger * connectionLoggerNoLock(); + + private: + String * mHostname; + unsigned int mPort; + String * mUsername; + String * mPassword; + ConnectionType mConnectionType; + bool mCheckCertificateEnabled; + time_t mTimeout; + + newsnntp * mNNTP; + NNTPProgressCallback * mProgressCallback; + int mState; + + ConnectionLogger * mConnectionLogger; + pthread_mutex_t mConnectionLoggerLock; + + void init(); + Data * dataWithFilteredBcc(Data * data); + static void body_progress(size_t current, size_t maximum, void * context); + void bodyProgress(unsigned int current, unsigned int maximum); + bool checkCertificate(); + void setup(); + void unsetup(); + void connectIfNeeded(ErrorCode * pError); + void loginIfNeeded(ErrorCode * pError); + void readerIfNeeded(ErrorCode * pError); + void listIfNeeded(ErrorCode * pError); + void selectGroup(String * folder, ErrorCode * pError); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNetService.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNetService.h new file mode 100644 index 0000000000000000000000000000000000000000..00a618add1d25f613232ed9225084c3e6d5ed8b5 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNetService.h @@ -0,0 +1,59 @@ +// +// MCNetService.h +// mailcore2 +// +// Created by Robert Widmann on 4/28/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCNETSERVICE_H + +#define MAILCORE_MCNETSERVICE_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCMessageConstants.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT NetService : public Object { + + public: + NetService(); + virtual ~NetService(); + + virtual void setHostname(String * hostname); + virtual String * hostname(); + + virtual void setPort(unsigned int port); + virtual unsigned int port(); + + virtual void setConnectionType(ConnectionType connectionType); + virtual ConnectionType connectionType(); + + virtual String * normalizedHostnameWithEmail(String * email); + + public: // serialization + static NetService * serviceWithInfo(HashMap * info); + virtual HashMap * info(); + + public: //subclass behavior + NetService(NetService * other); + virtual String * description(); + virtual Object * copy(); + + private: + String * mHostname; + unsigned int mPort; + ConnectionType mConnectionType; + + void init(); + void fillWithInfo(HashMap * info); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNull.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNull.h new file mode 100644 index 0000000000000000000000000000000000000000..dc271e0472b844772497ea39e89ef4abf190da6f --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCNull.h @@ -0,0 +1,28 @@ +// +// MCNull.h +// hermes +// +// Created by DINH Viêt Hoà on 4/9/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCNULL_H + +#define MAILCORE_MCNULL_H + +#include <MailCore/MCObject.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT Null : public Object { + public: + static Null * null(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAbstract.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAbstract.h new file mode 100644 index 0000000000000000000000000000000000000000..e174b818fd65a63aaa2b778775361220eea17e2f --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAbstract.h @@ -0,0 +1,23 @@ +// +// MCOAbstract.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/10/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOABSTRACT_H + +#define MAILCORE_MCOABSTRACT_H + +#import <MailCore/MCOAbstractMessage.h> +#import <MailCore/MCOAbstractMessagePart.h> +#import <MailCore/MCOAbstractMultipart.h> +#import <MailCore/MCOAbstractPart.h> +#import <MailCore/MCOAddress.h> +#import <MailCore/MCOConstants.h> +#import <MailCore/MCOMessageHeader.h> +#import <MailCore/MCOHTMLRendererDelegate.h> +#import <MailCore/MCOHTMLRendererIMAPDelegate.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAbstractMessage.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAbstractMessage.h new file mode 100644 index 0000000000000000000000000000000000000000..ed858808275c05249a76b5adf7e17eead7dff43d --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAbstractMessage.h @@ -0,0 +1,59 @@ +// +// MCOAbstractMessage.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/10/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOABSTRACTMESSAGE_H + +#define MAILCORE_MCOABSTRACTMESSAGE_H + +#import <Foundation/Foundation.h> + +@class MCOMessageHeader; +@class MCOAbstractPart; + +#ifdef __cplusplus +namespace mailcore { + class AbstractMessage; +} +#endif + +@interface MCOAbstractMessage : NSObject <NSCopying> + +#ifdef __cplusplus +- (instancetype) initWithMCMessage:(mailcore::AbstractMessage *)message NS_DESIGNATED_INITIALIZER; +#endif + +/** Header of the message. */ +@property (nonatomic, strong) MCOMessageHeader * header; + +/** Returns the part with the given Content-ID.*/ +- (MCOAbstractPart *) partForContentID:(NSString *)contentID; + +/** Returns the part with the given unique identifier.*/ +- (MCOAbstractPart *) partForUniqueID:(NSString *)uniqueID; + +/** All attachments in the message. + It will return an array of MCOIMAPPart for MCOIMAPMessage. + It will return an array of MCOAttachment for MCOMessageParser. + It will return an array of MCOAttachment for MCOMessageBuilder. */ +- (NSArray * /* MCOAbstractPart */) attachments; + +/** All image attachments included inline in the message through cid: URLs. + It will return an array of MCOIMAPPart for MCOIMAPMessage. + It will return an array of MCOAttachment for MCOMessageParser. + It will return an array of MCOAttachment for MCOMessageBuilder. */ +- (NSArray * /* MCOAbstractPart */) htmlInlineAttachments; + +/** + Returns parts required to render the message as plain text or html. + This does not include inline images and attachments, but only the text content + */ +- (NSArray *) requiredPartsForRendering; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAbstractMessagePart.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAbstractMessagePart.h new file mode 100644 index 0000000000000000000000000000000000000000..b5117481dad82960c5f36446ef4f78415df54d89 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAbstractMessagePart.h @@ -0,0 +1,30 @@ +// +// MCOAbstractMessagePart.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/10/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOABSTRACTMESSAGEPART_H + +#define MAILCORE_MCOABSTRACTMESSAGEPART_H + +#import <Foundation/Foundation.h> +#import <MailCore/MCOAbstractPart.h> + +@class MCOMessageHeader; + +@interface MCOAbstractMessagePart : MCOAbstractPart + +// Returns the header of the embedded message. +@property (nonatomic, strong) MCOMessageHeader * header; + +// Returns the main part of the embedded message. It can be MCOAbstractPart, MCOAbstractMultipart +// or a MCOAbstractMessagePart. +@property (nonatomic, strong) MCOAbstractPart * mainPart; + +@end + +#endif + diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAbstractMultipart.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAbstractMultipart.h new file mode 100644 index 0000000000000000000000000000000000000000..4502319b582b967c77308f4bba3a2e73d0331967 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAbstractMultipart.h @@ -0,0 +1,23 @@ +// +// MCOAbstractMultipart.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/10/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOABSTRACTMULTIPART_H + +#define MAILCORE_MCOABSTRACTMULTIPART_H + +#import <Foundation/Foundation.h> +#import <MailCore/MCOAbstractPart.h> + +@interface MCOAbstractMultipart : MCOAbstractPart + +/** Returns the subparts of that multipart.*/ +@property (nonatomic, copy) NSArray * /* MCOAbstractPart */ parts; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAbstractPart.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAbstractPart.h new file mode 100644 index 0000000000000000000000000000000000000000..8bff41dd5fa8d848092b62ad912ac619900b4de8 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAbstractPart.h @@ -0,0 +1,121 @@ +// +// MCOAbstractPart.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/10/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOABSTRACTPART_H + +#define MAILCORE_MCOABSTRACTPART_H + +#import <Foundation/Foundation.h> + +@class MCOAbstractMessage; + +typedef NS_ENUM(NSInteger, MCOPartType) { + // Used for a single part. + // The part will be a MCOAbstractPart. + MCOPartTypeSingle, + + // Used for a message part (MIME type: message/rfc822). + // The part will be a MCOAbstractMessagePart. + // It's when a message is sent as attachment of an other message. + MCOPartTypeMessage, + + // Used for a multipart, multipart/mixed. + // The part will be a MCOAbstractMultipart. + MCOPartTypeMultipartMixed, + + // Used for a multipart, multipart/related. + // The part will be a MCOAbstractMultipart. + MCOPartTypeMultipartRelated, + + // Used for a multipart, multipart/alternative. + // The part will be a MCOAbstractMultipart. + MCOPartTypeMultipartAlternative, + + // Used for a signed message, multipart/signed. + // The part will be a MCOAbstractMultipart. + MCOPartTypeMultipartSigned, +}; + +#ifdef __cplusplus +namespace mailcore { + class AbstractPart; +} +#endif + +@interface MCOAbstractPart : NSObject <NSCopying> + +#ifdef __cplusplus +- (instancetype) initWithMCPart:(mailcore::AbstractPart *)part NS_DESIGNATED_INITIALIZER; +#endif + +/** Returns type of the part (single / message part / multipart/mixed, + multipart/related, multipart/alternative). See MCOPartType.*/ +@property (nonatomic, assign) MCOPartType partType; + +/** Returns filename of the part.*/ +@property (nonatomic, copy) NSString * filename; + +/** Returns MIME type of the part. For example application/data.*/ +@property (nonatomic, copy) NSString * mimeType; + +/** Returns charset of the part in case it's a text single part.*/ +@property (nonatomic, copy) NSString * charset; + +/** Returns the unique ID generated for this part. + It's a unique identifier that's created when the object is created manually + or created by the parser.*/ +@property (nonatomic, copy) NSString * uniqueID; + +/** Returns the value of the Content-ID field of the part.*/ +@property (nonatomic, copy) NSString * contentID; + +/** Returns the value of the Content-Location field of the part.*/ +@property (nonatomic, copy) NSString * contentLocation; + +/** Returns the value of the Content-Description field of the part.*/ +@property (nonatomic, copy) NSString * contentDescription; + +/** Returns whether the part is an explicit inline attachment.*/ +@property (nonatomic, assign, getter=isInlineAttachment) BOOL inlineAttachment; + +/** Returns whether the part is an explicit attachment.*/ +@property (nonatomic, assign, getter=isAttachment) BOOL attachment; + +/** Returns the part with the given Content-ID among this part and its subparts.*/ +- (MCOAbstractPart *) partForContentID:(NSString *)contentID; + +/** Returns the part with the given unique identifier among this part and its subparts.*/ +- (MCOAbstractPart *) partForUniqueID:(NSString *)uniqueID; + +/** Returns a string representation of the data according to charset.*/ +- (NSString *) decodedStringForData:(NSData *)data; + +/** Adds a content type parameter.*/ +- (void) setContentTypeParameterValue:(NSString *)value forName:(NSString *)name; + +/** Remove a given content type parameter.*/ +- (void) removeContentTypeParameterForName:(NSString *)name; + +/** Returns the value of a given content type parameter.*/ +- (NSString *) contentTypeParameterValueForName:(NSString *)name; + +/** Returns an array with the names of all content type parameters.*/ +- (NSArray * /* NSString */) allContentTypeParametersNames; + +@end + +@interface MCOAbstractPart (MCOUnavailable) + +/** Do not invoke this directly. */ +- (instancetype) init NS_UNAVAILABLE; +/** Do not invoke this directly. */ ++ (instancetype) new NS_UNAVAILABLE; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAccountValidator.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAccountValidator.h new file mode 100644 index 0000000000000000000000000000000000000000..1d1d42318a393b7e1ec674cb3f4bae03fe601644 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAccountValidator.h @@ -0,0 +1,57 @@ +// +// MCOAccountValidator.h +// mailcore2 +// +// Created by Christopher Hockley on 20/01/15. +// Copyright (c) 2015 MailCore. All rights reserved. +// + +#import <Foundation/Foundation.h> +#import <MailCore/MCOOperation.h> +#import <MailCore/MCOConstants.h> + +/** + This class is used to validate an email provider and it's associated + metadata and credentials. + + An app might want to use this during setup to limit the number of settings + a user has to input. + */ + +@class MCONetService; + +@interface MCOAccountValidator : MCOOperation + +@property (nonatomic, copy) NSString * email; /* for SMTP */ +@property (nonatomic, copy) NSString * username; +@property (nonatomic, copy) NSString * password; +@property (nonatomic, copy) NSString * OAuth2Token; + +@property (nonatomic, retain) NSArray * /* MCONetService */ imapServices; +@property (nonatomic, retain) NSArray * /* MCONetService */ popServices; +@property (nonatomic, retain) NSArray * /* MCONetService */ smtpServices; + +@property (nonatomic, assign, getter=isImapEnabled) BOOL imapEnabled; +@property (nonatomic, assign, getter=isPopEnabled) BOOL popEnabled; +@property (nonatomic, assign, getter=isSmtpEnabled) BOOL smtpEnabled; + +@property (nonatomic, copy) MCOConnectionLogger connectionLogger; + +// result +@property (nonatomic, retain, readonly) NSString * identifier; +@property (nonatomic, retain, readonly) MCONetService * imapServer; +@property (nonatomic, retain, readonly) MCONetService * popServer; +@property (nonatomic, retain, readonly) MCONetService * smtpServer; +@property (nonatomic, retain, readonly) NSError * imapError; +@property (nonatomic, retain, readonly) NSError * popError; +@property (nonatomic, retain, readonly) NSError * smtpError; + +/** + Starts the asynchronous account validation operation. + + @param completionBlock Called when the operation is finished. + */ +- (void) start:(void (^)(void))completionBlock; + + +@end diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAddress.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAddress.h new file mode 100644 index 0000000000000000000000000000000000000000..6c3284e82d557afa72748cb6c19ded287523667d --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAddress.h @@ -0,0 +1,81 @@ +// +// MCOAddress.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/10/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOADDRESS_H + +#define MAILCORE_MCOADDRESS_H + +#import <Foundation/Foundation.h> + +@interface MCOAddress : NSObject <NSCopying, NSCoding> + +/** Creates an address with a display name and a mailbox. + + Example: [MCOAddress addressWithDisplayName:@"DINH Viêt Hoà" mailbox:@"hoa@etpan.org"] */ ++ (MCOAddress *) addressWithDisplayName:(NSString *)displayName + mailbox:(NSString *)mailbox; + +/** Creates an address with only a mailbox. + + Example: [MCOAddress addressWithMailbox:@"hoa@etpan.org"]*/ ++ (MCOAddress *) addressWithMailbox:(NSString *)mailbox; + +/** Creates an address with a RFC822 string. + + Example: [MCOAddress addressWithRFC822String:@"DINH Vi=C3=AAt Ho=C3=A0 <hoa@etpan.org>"]*/ ++ (MCOAddress *) addressWithRFC822String:(NSString *)RFC822String; + +/** Creates an address with a non-MIME-encoded RFC822 string. + + Example: [MCOAddress addressWithNonEncodedRFC822String:@"DINH Viêt Hoà <hoa@etpan.org>"]*/ ++ (MCOAddress *) addressWithNonEncodedRFC822String:(NSString *)nonEncodedRFC822String; + +/** + Returns an NSArray of MCOAddress objects that contain the parsed + forms of the RFC822 encoded addresses. + + For example: @[ @"DINH Vi=C3=AAt Ho=C3=A0 <hoa@etpan.org>" ]*/ ++ (NSArray *) addressesWithRFC822String:(NSString *)string; + +/** + Returns an NSArray of MCOAddress objects that contain the parsed + forms of non-encoded RFC822 addresses. + + For example: @[ "DINH Viêt Hoà <hoa@etpan.org>" ]*/ ++ (NSArray *) addressesWithNonEncodedRFC822String:(NSString *)string; + + +/** Returns the display name of the address.*/ +@property (nonatomic, copy) NSString * displayName; + +/** Returns the mailbox of the address.*/ +@property (nonatomic, copy) NSString * mailbox; + +/** Returns the RFC822 encoding of the address. + + For example: "DINH Vi=C3=AAt Ho=C3=A0 <hoa@etpan.org>"*/ +- (NSString *) RFC822String; + +/** Returns the non-MIME-encoded RFC822 encoding of the address. + + For example: "DINH Viêt Hoà <hoa@etpan.org>"*/ +- (NSString *) nonEncodedRFC822String; + +@end + +@interface NSArray (MCOAddress) + +/** Returns the RFC822 encoding of the addresses.*/ +- (NSString *) mco_RFC822StringForAddresses; + +/** Returns the non-MIME-encoded RFC822 of the addresses.*/ +- (NSString *) mco_nonEncodedRFC822StringForAddresses; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAttachment.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAttachment.h new file mode 100644 index 0000000000000000000000000000000000000000..eec1bd198436e954484b1d1ddb4a7e526a8b53a6 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOAttachment.h @@ -0,0 +1,47 @@ +// +// MCOAttachment.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/22/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOATTACHMENT_H + +#define MAILCORE_MCOATTACHMENT_H + +#import <MailCore/MCOAbstractPart.h> + +/** This is a single part. + + It can either parsed from RFC 822 message data or created to build a message.*/ + +@interface MCOAttachment : MCOAbstractPart + +/** Returns a MIME type for a filename.*/ ++ (NSString *) mimeTypeForFilename:(NSString *)filename; + +/** Returns a file attachment with the content of the given file.*/ ++ (MCOAttachment *) attachmentWithContentsOfFile:(NSString *)filename; + +/** Returns a file attachment with the given data and filename.*/ ++ (MCOAttachment *) attachmentWithData:(NSData *)data filename:(NSString *)filename; + +/** Returns a part with an HTML content.*/ ++ (MCOAttachment *) attachmentWithHTMLString:(NSString *)htmlString; + +/** Returns a part with a RFC 822 messsage attachment.*/ ++ (MCOAttachment *) attachmentWithRFC822Message:(NSData *)messageData; + +/** Returns a part with an plain text content.*/ ++ (MCOAttachment *) attachmentWithText:(NSString *)text; + +/** Decoded data of the part.*/ +@property (nonatomic, strong) NSData * data; + +/** Returns string representation according to charset*/ +- (NSString *) decodedString; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOConstants.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOConstants.h new file mode 100644 index 0000000000000000000000000000000000000000..ad3cb6e4276d3b18d2dcfe9381d0b35e61cbe53f --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOConstants.h @@ -0,0 +1,471 @@ +#ifndef MAILCORE_MCOCONSTANTS_H + +#define MAILCORE_MCOCONSTANTS_H + +/** It's the connection type.*/ +typedef NS_OPTIONS(NSInteger, MCOConnectionType) { + /** Clear-text connection for the protocol.*/ + MCOConnectionTypeClear = 1 << 0, + /** Clear-text connection at the beginning, then switch to encrypted connection using TLS/SSL*/ + /** on the same TCP connection.*/ + MCOConnectionTypeStartTLS = 1 << 1, + /** Encrypted connection using TLS/SSL.*/ + MCOConnectionTypeTLS = 1 << 2, +}; + +/** It's the authentication type.*/ +typedef NS_OPTIONS(NSInteger, MCOAuthType) { + /** Default authentication scheme of the protocol.*/ + MCOAuthTypeSASLNone = 0, + /** CRAM-MD5 authentication RFC 2195.*/ + MCOAuthTypeSASLCRAMMD5 = 1 << 0, + /** PLAIN authentication RFC 4616.*/ + MCOAuthTypeSASLPlain = 1 << 1, + /** GSSAPI authentication.*/ + MCOAuthTypeSASLGSSAPI = 1 << 2, + /** DIGEST-MD5 authentication RFC 2831.*/ + MCOAuthTypeSASLDIGESTMD5 = 1 << 3, + /** LOGIN authentication http://tools.ietf.org/id/draft-murchison-sasl-login-00.txt*/ + MCOAuthTypeSASLLogin = 1 << 4, + /** Secure Remote Password Authentication http://tools.ietf.org/html/draft-burdis-cat-srp-sasl-08*/ + MCOAuthTypeSASLSRP = 1 << 5, + /** NTLM authentication.*/ + MCOAuthTypeSASLNTLM = 1 << 6, + /** Kerberos 4 authentication.*/ + MCOAuthTypeSASLKerberosV4 = 1 << 7, + /** OAuth2 authentication.*/ + MCOAuthTypeXOAuth2 = 1 << 8, + /** OAuth2 authentication on outlook.com.*/ + MCOAuthTypeXOAuth2Outlook = 1 << 9, +}; + +/** It's the IMAP flags of the folder.*/ +typedef NS_OPTIONS(NSInteger, MCOIMAPFolderFlag) { + MCOIMAPFolderFlagNone = 0, + /** \Marked*/ + MCOIMAPFolderFlagMarked = 1 << 0, + /** \Unmarked*/ + MCOIMAPFolderFlagUnmarked = 1 << 1, + /** \NoSelect: When a folder can't be selected.*/ + MCOIMAPFolderFlagNoSelect = 1 << 2, + /** \NoInferiors: When the folder has no children.*/ + MCOIMAPFolderFlagNoInferiors = 1 << 3, + /** \Inbox: When the folder is the inbox.*/ + MCOIMAPFolderFlagInbox = 1 << 4, + /** \Sent: When the folder is the sent folder.*/ + MCOIMAPFolderFlagSentMail = 1 << 5, + /** \Starred: When the folder is the starred folder*/ + MCOIMAPFolderFlagStarred = 1 << 6, + /** \AllMail: When the folder is all mail.*/ + MCOIMAPFolderFlagAllMail = 1 << 7, + /** \Trash: When the folder is the trash.*/ + MCOIMAPFolderFlagTrash = 1 << 8, + /** \Drafts: When the folder is the drafts folder.*/ + MCOIMAPFolderFlagDrafts = 1 << 9, + /** \Spam: When the folder is the spam folder.*/ + MCOIMAPFolderFlagSpam = 1 << 10, + /** \Important: When the folder is the important folder.*/ + MCOIMAPFolderFlagImportant = 1 << 11, + /** \Archive: When the folder is archive.*/ + MCOIMAPFolderFlagArchive = 1 << 12, + /** \All: When the folder contains all mails, similar to \AllMail.*/ + MCOIMAPFolderFlagAll = MCOIMAPFolderFlagAllMail, + /** \Junk: When the folder is the spam folder.*/ + MCOIMAPFolderFlagJunk = MCOIMAPFolderFlagSpam, + /** \Flagged: When the folder contains all the flagged emails.*/ + MCOIMAPFolderFlagFlagged = MCOIMAPFolderFlagStarred, + /** Mask to identify the folder */ + MCOIMAPFolderFlagFolderTypeMask = MCOIMAPFolderFlagInbox | MCOIMAPFolderFlagSentMail | MCOIMAPFolderFlagStarred | MCOIMAPFolderFlagAllMail | + MCOIMAPFolderFlagTrash| MCOIMAPFolderFlagDrafts | MCOIMAPFolderFlagSpam | MCOIMAPFolderFlagImportant | MCOIMAPFolderFlagArchive, +}; + +/** It's the flags of a message.*/ +typedef NS_OPTIONS(NSInteger, MCOMessageFlag) { + MCOMessageFlagNone = 0, + /** Seen/Read flag.*/ + MCOMessageFlagSeen = 1 << 0, + /** Replied/Answered flag.*/ + MCOMessageFlagAnswered = 1 << 1, + /** Flagged/Starred flag.*/ + MCOMessageFlagFlagged = 1 << 2, + /** Deleted flag.*/ + MCOMessageFlagDeleted = 1 << 3, + /** Draft flag.*/ + MCOMessageFlagDraft = 1 << 4, + /** $MDNSent flag.*/ + MCOMessageFlagMDNSent = 1 << 5, + /** $Forwarded flag.*/ + MCOMessageFlagForwarded = 1 << 6, + /** $SubmitPending flag.*/ + MCOMessageFlagSubmitPending = 1 << 7, + /** $Submitted flag.*/ + MCOMessageFlagSubmitted = 1 << 8, +}; + +/** It's the encoding of a part.*/ +typedef NS_ENUM(NSInteger, MCOEncoding) { + /** 7bit encoding.*/ + MCOEncoding7Bit = 0, /** should match MAILIMAP_BODY_FLD_ENC_7BIT*/ + /** 8bit encoding.*/ + MCOEncoding8Bit = 1, /** should match MAILIMAP_BODY_FLD_ENC_8BIT*/ + /** binary encoding.*/ + MCOEncodingBinary = 2, /** should match MAILIMAP_BODY_FLD_ENC_BINARY*/ + /** base64 encoding.*/ + MCOEncodingBase64 = 3, /** should match MAILIMAP_BODY_FLD_ENC_BASE64*/ + /** quoted-printable encoding.*/ + MCOEncodingQuotedPrintable = 4, /** should match MAILIMAP_BODY_FLD_ENC_QUOTED_PRINTABLE*/ + /** other encoding.*/ + MCOEncodingOther = 5, /** should match MAILIMAP_BODY_FLD_ENC_OTHER*/ + + /** Negative values should be used for encoding not supported by libetpan.*/ + + /** UUEncode encoding.*/ + MCOEncodingUUEncode = -1 +}; + +/** It's the information to fetch for a given message in the IMAP FETCH request.*/ +typedef NS_OPTIONS(NSInteger, MCOIMAPMessagesRequestKind) { + /** UID of the message.*/ + MCOIMAPMessagesRequestKindUid = 0, /** This is the default and it's always fetched*/ + /** Flags of the message.*/ + MCOIMAPMessagesRequestKindFlags = 1 << 0, + /** Headers of the message (parsed by the server).*/ + MCOIMAPMessagesRequestKindHeaders = 1 << 1, + /** MIME structure of the message.*/ + MCOIMAPMessagesRequestKindStructure = 1 << 2, + /** Received date.*/ + MCOIMAPMessagesRequestKindInternalDate = 1 << 3, + /** Headers through headers data.*/ + MCOIMAPMessagesRequestKindFullHeaders = 1 << 4, + /** Subject of the message.*/ + MCOIMAPMessagesRequestKindHeaderSubject = 1 << 5, + /** Gmail Labels.*/ + MCOIMAPMessagesRequestKindGmailLabels = 1 << 6, + /** Gmail Message ID.*/ + MCOIMAPMessagesRequestKindGmailMessageID = 1 << 7, + /** Gmail Thread ID.*/ + MCOIMAPMessagesRequestKindGmailThreadID = 1 << 8, + /** Extra Headers.*/ + MCOIMAPMessagesRequestKindExtraHeaders = 1 << 9, + /* Request size of message */ + MCOIMAPMessagesRequestKindSize = 1 << 10, + +}; + +/** It defines the behavior of the STORE flags request.*/ +typedef NS_ENUM(NSInteger, MCOIMAPStoreFlagsRequestKind) { + /** Add the given flags.*/ + MCOIMAPStoreFlagsRequestKindAdd, + /** Remove the given flags.*/ + MCOIMAPStoreFlagsRequestKindRemove, + /** Set the given flags.*/ + MCOIMAPStoreFlagsRequestKindSet, +}; + +/** It's the search type.*/ +typedef NS_ENUM(NSInteger, MCOIMAPSearchKind) { + /** Search All */ + MCOIMAPSearchKindAll, + /** No search.*/ + MCOIMAPSearchKindNone, + /** Match sender.*/ + MCOIMAPSearchKindFrom, + /** Match to */ + MCOIMAPSearchKindTo, + /** Match CC: */ + MCOIMAPSearchKindCc, + /** Match BCC: */ + MCOIMAPSearchKindBcc, + /** Match recipient.*/ + MCOIMAPSearchKindRecipient, + /** Match subject.*/ + MCOIMAPSearchKindSubject, + /** Match content of the message, including the headers.*/ + MCOIMAPSearchKindContent, + /** Match content of the message, excluding the headers.*/ + MCOIMAPSearchKindBody, + /** Match uids */ + MCOIMAPSearchKindUids, + /** Match numbers */ + MCOIMAPSearchKindNumbers, + /** Match headers of the message.*/ + MCOIMAPSearchKindHeader, + /** Match messages that are read.*/ + MCOIMAPSearchKindRead, + /** Match messages that are not read.*/ + MCOIMAPSearchKindUnread, + /** Match messages that are flagged.*/ + MCOIMAPSearchKindFlagged, + /** Match messages that are not flagged.*/ + MCOIMAPSearchKindUnflagged, + /** Match messages that are answered.*/ + MCOIMAPSearchKindAnswered, + /** Match messages that are not answered.*/ + MCOIMAPSearchKindUnanswered, + /** Match messages that are a drafts.*/ + MCOIMAPSearchKindDraft, + /** Match messages that are not drafts.*/ + MCOIMAPSearchKindUndraft, + /** Match messages that are deleted.*/ + MCOIMAPSearchKindDeleted, + /** Match messages that are spam.*/ + MCOIMAPSearchKindSpam, + /** Match messages before the given date.*/ + MCOIMAPSearchKindBeforeDate, + /** Match messages on the given date.*/ + MCOIMAPSearchKindOnDate, + /** Match messages after the given date.*/ + MCOIMAPSearchKindSinceDate, + /** Match messages before the given received date.*/ + MCOIMAPSearchKindBeforeReceivedDate, + /** Match messages on the given received date.*/ + MCOIMAPSearchKindOnReceivedDate, + /** Match messages after the given received date.*/ + MCOIMAPSearchKindSinceReceivedDate, + /** Match messages that are larger than the given size in bytes.*/ + MCOIMAPSearchKindSizeLarger, + /** Match messages that are smaller than the given size in bytes.*/ + MCOIMAPSearchKindSizeSmaller, + /** Match X-GM-THRID.*/ + MCOIMAPSearchGmailThreadID, + /** Match X-GM-MSGID.*/ + MCOIMAPSearchGmailMessageID, + /** Match X-GM-RAW.*/ + MCOIMAPSearchGmailRaw, + /** Or expresssion.*/ + MCOIMAPSearchKindOr, + /** And expression.*/ + MCOIMAPSearchKindAnd, + /** Not expression.*/ + MCOIMAPSearchKindNot, +}; + +/** Keys for the namespace dictionary.*/ +#define MCOIMAPNamespacePersonal @"IMAPNamespacePersonal" +#define MCOIMAPNamespaceOther @"IMAPNamespaceOther" +#define MCOIMAPNamespaceShared @"IMAPNamespaceShared" + +/** This is the constants for the IMAP capabilities.*/ +/** See corresponding RFC for more information.*/ +typedef NS_ENUM(NSInteger, MCOIMAPCapability) { + /** ACL Capability.*/ + MCOIMAPCapabilityACL, + /** BINARY Capability.*/ + MCOIMAPCapabilityBinary, + /** CATENATE Capability.*/ + MCOIMAPCapabilityCatenate, + /** CHILDREN Capability.*/ + MCOIMAPCapabilityChildren, + /** COMPRESS Capability.*/ + MCOIMAPCapabilityCompressDeflate, + /** CONDSTORE Capability.*/ + MCOIMAPCapabilityCondstore, + /** ENABLE Capability.*/ + MCOIMAPCapabilityEnable, + /** IDLE Capability.*/ + MCOIMAPCapabilityIdle, + /** ID Capability.*/ + MCOIMAPCapabilityId, + /** LITERAL+ Capability.*/ + MCOIMAPCapabilityLiteralPlus, + /** MOVE Capability */ + MCOIMAPCapabilityMove, + /** MULTIAPPEND Capability.*/ + MCOIMAPCapabilityMultiAppend, + /** NAMESPACE Capability.*/ + MCOIMAPCapabilityNamespace, + /** QRESYNC Capability.*/ + MCOIMAPCapabilityQResync, + /** QUOTE Capability.*/ + MCOIMAPCapabilityQuota, + /** SORT Capability.*/ + MCOIMAPCapabilitySort, + /** STARTTLS Capability.*/ + MCOIMAPCapabilityStartTLS, + /** THREAD=ORDEREDSUBJECT Capability.*/ + MCOIMAPCapabilityThreadOrderedSubject, + /** THREAD=REFERENCES Capability.*/ + MCOIMAPCapabilityThreadReferences, + /** UIDPLUS Capability.*/ + MCOIMAPCapabilityUIDPlus, + /** UNSELECT Capability.*/ + MCOIMAPCapabilityUnselect, + /** XLIST Capability.*/ + MCOIMAPCapabilityXList, + /** AUTH=ANONYMOUS Capability.*/ + MCOIMAPCapabilityAuthAnonymous, + /** AUTH=CRAM-MD5 Capability.*/ + MCOIMAPCapabilityAuthCRAMMD5, + /** AUTH=DIGEST-MD5 Capability.*/ + MCOIMAPCapabilityAuthDigestMD5, + /** AUTH=EXTERNAL Capability.*/ + MCOIMAPCapabilityAuthExternal, + /** AUTH=GSSAPI Capability.*/ + MCOIMAPCapabilityAuthGSSAPI, + /** AUTH=KERBEROSV4 Capability.*/ + MCOIMAPCapabilityAuthKerberosV4, + /** AUTH=LOGIN Capability.*/ + MCOIMAPCapabilityAuthLogin, + /** AUTH=NTML Capability.*/ + MCOIMAPCapabilityAuthNTLM, + /** AUTH=OTP Capability.*/ + MCOIMAPCapabilityAuthOTP, + /** AUTH=PLAIN Capability.*/ + MCOIMAPCapabilityAuthPlain, + /** AUTH=SKEY Capability.*/ + MCOIMAPCapabilityAuthSKey, + /** AUTH=SRP Capability.*/ + MCOIMAPCapabilityAuthSRP, + /** AUTH=XOAUTH2 Capability.*/ + MCOIMAPCapabilityXOAuth2, + /** X-GM-EXT-1 Capability.*/ + MCOIMAPCapabilityGmail +}; + +/** Error domain for mailcore.*/ +#define MCOErrorDomain @"MCOErrorDomain" + +/** Here's the list of errors.*/ +typedef NS_ENUM(NSInteger, MCOErrorCode) { + /** No error occurred.*/ + MCOErrorNone, // 0 + /** An error related to the connection occurred.*/ + /** It could not connect or it's been disconnected.*/ + MCOErrorConnection, + /** TLS/SSL connection was not available.*/ + MCOErrorTLSNotAvailable, + /** The protocol could not be parsed.*/ + MCOErrorParse, + /** Certificate was not valid.*/ + MCOErrorCertificate, + /** An authentication error occurred.*/ + MCOErrorAuthentication, + /** Specific to Gmail: IMAP not enabled.*/ + MCOErrorGmailIMAPNotEnabled, + /** Specific to Gmail: Exceeded bandwidth limit.*/ + MCOErrorGmailExceededBandwidthLimit, + /** Specific to Gmail: Too many simultaneous connections.*/ + MCOErrorGmailTooManySimultaneousConnections, + /** Specific to Mobile Me: Moved to iCloud.*/ + MCOErrorMobileMeMoved, + /** Specific to Yahoo: not available.*/ + MCOErrorYahooUnavailable, // 10 + /** Non existant folder, select failed.*/ + MCOErrorNonExistantFolder, + /** IMAP: Error occurred while renaming a folder.*/ + MCOErrorRename, + /** IMAP: Error occurred while deleting a folder.*/ + MCOErrorDelete, + /** IMAP: Error occurred while creating a folder.*/ + MCOErrorCreate, + /** IMAP: Error occurred while subscribing/unsubcribing to a folder.*/ + MCOErrorSubscribe, + /** IMAP: Error occurred while adding a message to a folder.*/ + MCOErrorAppend, + /** IMAP: Error occurred while copying a message.*/ + MCOErrorCopy, + /** IMAP: Error occurred while expunging.*/ + MCOErrorExpunge, + /** IMAP: Error occurred while fetching messages.*/ + MCOErrorFetch, + /** IMAP: Error occurred while IDLing.*/ + MCOErrorIdle, // 20 + /** IMAP: Error occurred while sending/getting identity.*/ + MCOErrorIdentity, + /** IMAP: Error occurred while getting namespace.*/ + MCOErrorNamespace, + /** IMAP: Error occurred while storing flags.*/ + MCOErrorStore, + /** IMAP: Error wile getting capabilities.*/ + MCOErrorCapability, + /** STARTTLS is not available.*/ + MCOErrorStartTLSNotAvailable, + /** SMTP: Illegal attachment: certain kind of attachment cannot be sent.*/ + MCOErrorSendMessageIllegalAttachment, + /** SMTP: Storage limit: message is probably too big.*/ + MCOErrorStorageLimit, + /** SMTP: Sending message is not allowed.*/ + MCOErrorSendMessageNotAllowed, + /** SMTP: Specific to hotmail. Needs to connect to webmail.*/ + MCOErrorNeedsConnectToWebmail, + /** SMTP: Error while sending message.*/ + MCOErrorSendMessage, // 30 + /** SMTP: Authentication required.*/ + MCOErrorAuthenticationRequired, + /** POP: Error occurred while fetching message list.*/ + MCOErrorFetchMessageList, + /** POP: Error occurred while deleting message.*/ + MCOErrorDeleteMessage, + /** SMTP: Error while checking account.*/ + MCOErrorInvalidAccount, + /** Error when accessing/reading/writing file.*/ + MCOErrorFile, + /** IMAP: Error when trying to enable compression.*/ + MCOErrorCompression, + /** SMTP: Error when no sender has been specified.*/ + MCOErrorNoSender, + /** SMTP: Error when no recipient has been specified.*/ + MCOErrorNoRecipient, + /** IMAP: Error when a noop operation fails.*/ + MCOErrorNoop, + /** IMAP: Error when the password has been entered but second factor + authentication is enabled: an application specific password is required. */ + MCOErrorGmailApplicationSpecificPasswordRequired, // 40 + /** NNTP: error when requesting date */ + MCOErrorServerDate, + /** No valid server found */ + MCOErrorNoValidServerFound, + /** Error while running custom command */ + MCOErrorCustomCommand, + /** Spam was suspected by server */ + MCOErrorYahooSendMessageSpamSuspected, + /** Daily limit of sent messages was hit */ + MCOErrorYahooSendMessageDailyLimitExceeded, + /** You need to login via the web browser first */ + MCOErrorOutlookLoginViaWebBrowser, + /** Tiscali Simple Mail Error */ + MCOErrorTiscaliSimplePassword, + /** The count of all errors */ + MCOErrorCodeCount, +}; + +/** Error userInfo key for SMTP operations response string */ +#define MCOSMTPResponseKey @"MCOSMTPResponseKey" +/** Error userInfo key for SMTP operations response code */ +#define MCOSMTPResponseCodeKey @"MCOSMTPResponseCodeKey" + +/** Here's the list of connection log types.*/ +typedef NS_ENUM(NSInteger, MCOConnectionLogType) { + /** Received data.*/ + MCOConnectionLogTypeReceived, + /** Sent data.*/ + MCOConnectionLogTypeSent, + /** Sent private data. It can be a password.*/ + MCOConnectionLogTypeSentPrivate, + /** Parse error.*/ + MCOConnectionLogTypeErrorParse, + /** Error while receiving data. The data passed to the log will be nil.*/ + MCOConnectionLogTypeErrorReceived, + /** Error while sending dataThe data passed to the log will be nil.*/ + MCOConnectionLogTypeErrorSent, +}; + +/** + It's a network traffic logger. + @param connectionID is the identifier of the underlaying network socket. + @param type is the type of the log. + @param data is the data related to the log. + */ +typedef void (^MCOConnectionLogger)(void * connectionID, MCOConnectionLogType type, NSData * data); + +/** + It's called when asynchronous operations stop/start running. + */ +typedef void (^MCOOperationQueueRunningChangeBlock)(void); + +/** MCOIMAPResponseKey is a key for NSError userInfo dictionary, the value is string with the server response. */ +#define MCOIMAPResponseKey @"MCOIMAPResponseKey" +/** MCOIMAPUnparsedResponseDataKey is a key for NSError userInfo dictionary, the value is data with the unparsed server response in case of ParseError. */ +#define MCOIMAPUnparsedResponseDataKey @"MCOIMAPUnparsedResponseDataKey" + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOHTMLRendererDelegate.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOHTMLRendererDelegate.h new file mode 100644 index 0000000000000000000000000000000000000000..007aaf06c77343afc7b07d3d23c2bc6e34581c25 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOHTMLRendererDelegate.h @@ -0,0 +1,125 @@ +// +// MCOHTMLRendererDelegate.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/23/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOHTMLRENDERERDELEGATE_H + +#define MAILCORE_MCOHTMLRENDERERDELEGATE_H + +#import <Foundation/Foundation.h> + +/** This delegate protocol is used to help rendering of the message. + + It will be used for the following methods. + + [MCOMessageParser htmlRenderingWithDelegate:], + + [MCOMessageBuilder htmlRenderingWithDelegate:] + + -[MCOIMAPMessage htmlRenderingWithFolder:delegate:] +*/ + +@class MCOAbstractPart; +@class MCOAbstractMessage; +@class MCOMessageHeader; +@class MCOAbstractMessagePart; + +@protocol MCOHTMLRendererDelegate <NSObject> + +/** All methods are optional.*/ +@optional + + + + + + + + + +- (BOOL) abstractMessage:(MCOAbstractMessage *)msg canPreviewPart:(MCOAbstractPart *)part; + +/** This delegate method should return YES if the part should be rendered.*/ +- (BOOL) abstractMessage:(MCOAbstractMessage *)msg shouldShowPart:(MCOAbstractPart *)part; + +/** This delegate method returns the values to be applied to the template for the given header. + See the content of MCHTMLRendererCallback.cpp for the default values of the header.*/ +- (NSDictionary *) abstractMessage:(MCOAbstractMessage *)msg templateValuesForHeader:(MCOMessageHeader *)header; + +/** This delegate method returns the values to be applied to the template for the given attachment. + See the content of MCHTMLRendererCallback.cpp for the default values of the attachment.*/ +- (NSDictionary *) abstractMessage:(MCOAbstractMessage *)msg templateValuesForPart:(MCOAbstractPart *)part; + +/** @name Template Methods + The following methods returns templates. They will match the syntax of ctemplate. + See https://code.google.com/p/ctemplate/ */ + +/** This delegate method returns the template for the main header of the message. + See the content of MCHTMLRendererCallback.cpp for the default values of the template.*/ +- (NSString *) abstractMessage:(MCOAbstractMessage *)msg templateForMainHeader:(MCOMessageHeader *)header; + +/** This delegate method returns the template an image attachment.*/ +- (NSString *) abstractMessage:(MCOAbstractMessage *)msg templateForImage:(MCOAbstractPart *)header; + +/** This delegate method returns the template attachment other than images. + See the content of MCHTMLRendererCallback.cpp for the default values of the template.*/ +- (NSString *) abstractMessage:(MCOAbstractMessage *)msg templateForAttachment:(MCOAbstractPart *)part; + +/** This delegate method returns the template of the main message. + It should include HEADER and a BODY values. + See the content of MCHTMLRendererCallback.cpp for the default values of the template.*/ +- (NSString *) abstractMessage_templateForMessage:(MCOAbstractMessage *)msg; + +/** This delegate method returns the template of an embedded message (included as attachment). + It should include HEADER and a BODY values. + See the content of MCHTMLRendererCallback.cpp for the default values of the template.*/ +- (NSString *) abstractMessage:(MCOAbstractMessage *)msg templateForEmbeddedMessage:(MCOAbstractMessagePart *)part; + +/** This delegate method returns the template for the header of an embedded message. + See the content of MCHTMLRendererCallback.cpp for the default values of the template.*/ +- (NSString *) abstractMessage:(MCOAbstractMessage *)msg templateForEmbeddedMessageHeader:(MCOMessageHeader *)header; + +/** This delegate method returns the separator between the text of the message and the attachments.*/ +- (NSString *) abstractMessage_templateForAttachmentSeparator:(MCOAbstractMessage *)msg; + +/** This delegate method cleans HTML content. + For example, it could fix broken tags, add missing <html>, <body> tags. + Default implementation uses HTMLCleaner::cleanHTML to clean HTML content. */ +- (NSString *) abstractMessage:(MCOAbstractMessage *)msg cleanHTMLForPart:(NSString *)html; + +/** @name Filters + + The following methods will filter the HTML content and may apply some filters to + change how to display the message.*/ + +/** This delegate method will apply the filter to HTML rendered content of a given text part. + For example, it could filter the CSS content.*/ +- (NSString *) abstractMessage:(MCOAbstractMessage *)msg filterHTMLForPart:(NSString *)html; + +/** This delegate method will apply a filter to the whole HTML content. + For example, it could collapse the quoted messages.*/ +- (NSString *) abstractMessage:(MCOAbstractMessage *)msg filterHTMLForMessage:(NSString *)html; + +// deprecated versions of the delegate methods. +- (BOOL) MCOAbstractMessage:(MCOAbstractMessage *)msg canPreviewPart:(MCOAbstractPart *)part; +- (BOOL) MCOAbstractMessage:(MCOAbstractMessage *)msg shouldShowPart:(MCOAbstractPart *)part; +- (NSDictionary *) MCOAbstractMessage:(MCOAbstractMessage *)msg templateValuesForHeader:(MCOMessageHeader *)header; +- (NSDictionary *) MCOAbstractMessage:(MCOAbstractMessage *)msg templateValuesForPart:(MCOAbstractPart *)part; +- (NSString *) MCOAbstractMessage:(MCOAbstractMessage *)msg templateForMainHeader:(MCOMessageHeader *)header; +- (NSString *) MCOAbstractMessage:(MCOAbstractMessage *)msg templateForImage:(MCOAbstractPart *)header; +- (NSString *) MCOAbstractMessage:(MCOAbstractMessage *)msg templateForAttachment:(MCOAbstractPart *)part; +- (NSString *) MCOAbstractMessage_templateForMessage:(MCOAbstractMessage *)msg; +- (NSString *) MCOAbstractMessage:(MCOAbstractMessage *)msg templateForEmbeddedMessage:(MCOAbstractMessagePart *)part; +- (NSString *) MCOAbstractMessage:(MCOAbstractMessage *)msg templateForEmbeddedMessageHeader:(MCOMessageHeader *)header; +- (NSString *) MCOAbstractMessage_templateForAttachmentSeparator:(MCOAbstractMessage *)msg; +- (NSString *) MCOAbstractMessage:(MCOAbstractMessage *)msg cleanHTMLForPart:(NSString *)html; +- (NSString *) MCOAbstractMessage:(MCOAbstractMessage *)msg filterHTMLForPart:(NSString *)html; +- (NSString *) MCOAbstractMessage:(MCOAbstractMessage *)msg filterHTMLForMessage:(NSString *)html; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOHTMLRendererIMAPDelegate.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOHTMLRendererIMAPDelegate.h new file mode 100644 index 0000000000000000000000000000000000000000..9ec665dabd20edf09aaf2dc37eb34d99f657d7a9 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOHTMLRendererIMAPDelegate.h @@ -0,0 +1,57 @@ +// +// MCOHTMLRendererIMAPDelegate.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/23/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOHTMLRENDERERIMAPDELEGATE_H + +#define MAILCORE_MCOHTMLRENDERERIMAPDELEGATE_H + +#import <MailCore/MCOHTMLRendererDelegate.h> + +/** + This delegate protocol is used to fetch the content of the part of the message when the HTML render needs them. + It will help fetch the minimal amount of information from the message required to render the HTML. + + It will be used for the following method. + + [MCOIMAPMessage htmlRenderingWithFolder:delegate:] +*/ + +@class MCOIMAPPart; + +@protocol MCOHTMLRendererIMAPDelegate <MCOHTMLRendererDelegate> + +/** All methods are optional.*/ +@optional + +/** + The delegate method returns NULL if the delegate have not fetch the part yet. The opportunity can also be used to + start fetching the attachment. + It will return the data synchronously if it has already fetched it. +*/ +- (NSData *) abstractMessage:(MCOAbstractMessage *)msg dataForIMAPPart:(MCOIMAPPart *)part folder:(NSString *)folder; + +/** + The delegate method will notify the delegate to start fetching the given part. + It will be used to render an attachment that cannot be previewed. +*/ +- (void) abstractMessage:(MCOAbstractMessage *)msg prefetchAttachmentIMAPPart:(MCOIMAPPart *)part folder:(NSString *)folder; + +/** + The delegate method will notify the delegate to start fetching the given part. + It will be used to render an attachment that can be previewed. +*/ +- (void) abstractMessage:(MCOAbstractMessage *)msg prefetchImageIMAPPart:(MCOIMAPPart *)part folder:(NSString *)folder; + +// deprecated versions of the delegate methods. +- (NSData *) MCOAbstractMessage:(MCOAbstractMessage *)msg dataForIMAPPart:(MCOIMAPPart *)part folder:(NSString *)folder; +- (void) MCOAbstractMessage:(MCOAbstractMessage *)msg prefetchAttachmentIMAPPart:(MCOIMAPPart *)part folder:(NSString *)folder; +- (void) MCOAbstractMessage:(MCOAbstractMessage *)msg prefetchImageIMAPPart:(MCOIMAPPart *)part folder:(NSString *)folder; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAP.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAP.h new file mode 100644 index 0000000000000000000000000000000000000000..4de8f18efa2a730c45613bd02604dd33d4024e1b --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAP.h @@ -0,0 +1,48 @@ +// +// MCOIMAP.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/22/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAP_H + +#define MAILCORE_MCOIMAP_H + +#import <MailCore/MCOIMAPSession.h> +#import <MailCore/MCOIMAPOperation.h> +#import <MailCore/MCOIMAPFetchFoldersOperation.h> +#import <MailCore/MCOIMAPFolder.h> +#import <MailCore/MCOIMAPMessage.h> +#import <MailCore/MCOIMAPMessagePart.h> +#import <MailCore/MCOIMAPMultipart.h> +#import <MailCore/MCOIMAPNamespace.h> +#import <MailCore/MCOIMAPNamespaceItem.h> +#import <MailCore/MCOIMAPIdentity.h> +#import <MailCore/MCOIMAPPart.h> +#import <MailCore/MCOIMAPFolderInfoOperation.h> +#import <MailCore/MCOIMAPFolderInfo.h> +#import <MailCore/MCOIMAPFolderStatusOperation.h> +#import <MailCore/MCOIMAPFolderStatus.h> +#import <MailCore/MCOIMAPAppendMessageOperation.h> +#import <MailCore/MCOIMAPCopyMessagesOperation.h> +#import <MailCore/MCOIMAPMoveMessagesOperation.h> +#import <MailCore/MCOIMAPFetchMessagesOperation.h> +#import <MailCore/MCOIMAPFetchContentOperation.h> +#import <MailCore/MCOIMAPFetchContentToFileOperation.h> +#import <MailCore/MCOIMAPFetchParsedContentOperation.h> +#import <MailCore/MCOIMAPSearchOperation.h> +#import <MailCore/MCOIMAPIdleOperation.h> +#import <MailCore/MCOIMAPFetchNamespaceOperation.h> +#import <MailCore/MCOIMAPSearchOperation.h> +#import <MailCore/MCOIMAPIdleOperation.h> +#import <MailCore/MCOIMAPFetchNamespaceOperation.h> +#import <MailCore/MCOIMAPIdentityOperation.h> +#import <MailCore/MCOIMAPCapabilityOperation.h> +#import <MailCore/MCOIMAPQuotaOperation.h> +#import <MailCore/MCOIMAPSearchExpression.h> +#import <MailCore/MCOIMAPMessageRenderingOperation.h> +#import <MailCore/MCOIMAPCustomCommandOperation.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPAppendMessageOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPAppendMessageOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..ec1602a3bb5e93a17b2626fe2dcdd428f3e47351 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPAppendMessageOperation.h @@ -0,0 +1,44 @@ +// +// MCOIMAPAppendMessageOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/25/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPAPPENDMESSAGEOPERATION_H + +#define MAILCORE_MCOIMAPAPPENDMESSAGEOPERATION_H + +/** This class implements an operation that adds a message to a folder. */ + +#import <MailCore/MCOIMAPBaseOperation.h> +#import <MailCore/MCOConstants.h> + +NS_ASSUME_NONNULL_BEGIN +@interface MCOIMAPAppendMessageOperation : MCOIMAPBaseOperation + +@property (nonatomic, assign) time_t date; + +/** + This block will be called as bytes are sent +*/ +@property (nonatomic, copy) MCOIMAPBaseOperationProgressBlock progress; + +/** + Starts the asynchronous append operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `createdUID` will be the value of the + UID of the created message if the server supports UIDPLUS or zero if not. + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in MCOConstants.h, `createdUID` will be zero. +*/ +- (void) start:(void (^)(NSError * __nullable error, uint32_t createdUID))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPBaseOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPBaseOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..82a343786ddaab6aa4f2a4b8a9302b5602f20766 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPBaseOperation.h @@ -0,0 +1,42 @@ +// +// MCOIMAPBaseOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/26/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPBASEOPERATION_H + +#define MAILCORE_MCOIMAPBASEOPERATION_H + +/** Represents a generic IMAP operation with methods that are called with progress updates */ + +#import <MailCore/MCOOperation.h> + +typedef void (^MCOIMAPBaseOperationProgressBlock)(unsigned int current, unsigned int maximum); +typedef void (^MCOIMAPBaseOperationItemProgressBlock)(unsigned int current); + +@interface MCOIMAPBaseOperation : MCOOperation + +@property (nonatomic, assign, getter=isUrgent) BOOL urgent; + +/* Can be overriden by subclasses */ + +/* + Will be called when a sending or receiving the contents of a message + @param current The number of bytes sent or received + @param maximum The total number of bytes expected +*/ +- (void)bodyProgress:(unsigned int)current maximum:(unsigned int)maximum; + +/* + Will be called when a new item is received in a list of items, like for example a message list + @param current The number of items downloaded + @param maximum The total number of items expected +*/ +- (void)itemProgress:(unsigned int)current maximum:(unsigned int)maximum; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPCapabilityOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPCapabilityOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..ab788cee7056323499ebc9db707f476c2f535d2e --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPCapabilityOperation.h @@ -0,0 +1,42 @@ +// +// MCOIMAPCapabilityOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/25/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPCAPABILITYOPERATION_H + +#define MAILCORE_MCOIMAPCAPABILITYOPERATION_H + +/** + This class implements an operation to query for IMAP capabilities, + like for example the extensions UIDPLUS, IDLE, NAMESPACE, ... etc +*/ + +#import <MailCore/MCOIMAPBaseOperation.h> + +@class MCOIndexSet; + +NS_ASSUME_NONNULL_BEGIN +@interface MCOIMAPCapabilityOperation : MCOIMAPBaseOperation + + +/** + Starts the asynchronous capabilities operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `capabilities` will contain a set of IMAP capabilities. + See `MCOConstants.h` under `MCOIMAPCapability` for a list of possible values. + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in MCOConstants.h, `capabilities` will be nil +*/ +- (void) start:(void (^)(NSError * __nullable error, MCOIndexSet * __nullable capabilities))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPCopyMessagesOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPCopyMessagesOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..4edee9bc73f5e483532425bfd2e8cdfee0a0a4e7 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPCopyMessagesOperation.h @@ -0,0 +1,39 @@ +// +// MCOIMAPCopyMessagesOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/25/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#import <MailCore/MCOIMAPBaseOperation.h> + +#ifndef MAILCORE_MCOCOPYMESSAGESOPERATION_H + +#define MAILCORE_MCOCOPYMESSAGESOPERATION_H + +/** Implements an operation for copying messages between folders */ + +@class MCOIndexSet; + +NS_ASSUME_NONNULL_BEGIN +@interface MCOIMAPCopyMessagesOperation : MCOIMAPBaseOperation + +/** + Starts the asynchronous copy operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `destUids` will contain the UIDs of the messages created + in the destination folder. If the server doesn't support UIDPLUS then `destUids` will be nil. + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in `MCOConstants.h`, `destUids` will be nil +*/ + +- (void) start:(void (^)(NSError * __nullable error, NSDictionary * __nullable uidMapping))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPCustomCommandOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPCustomCommandOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..e23d29e7fad69002b51120e7f1aba631ad9370d5 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPCustomCommandOperation.h @@ -0,0 +1,24 @@ +// +// MCOIMAPCustomCommandOperation.h +// mailcore2 +// +// Created by Libor Huspenina on 29/10/2015. +// Copyright © 2015 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPCUSTOMCOMMANDOPERATION_H + +#define MAILCORE_MCOIMAPCUSTOMCOMMANDOPERATION_H + +#import <MailCore/MCOIMAPBaseOperation.h> +#import <MailCore/MCOConstants.h> + +NS_ASSUME_NONNULL_BEGIN +@interface MCOIMAPCustomCommandOperation : MCOIMAPBaseOperation + +- (void)start:(void(^)(NSString * __nullable response, NSError * __nullable error))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFetchContentOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFetchContentOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..d9492eab864c5a46d44544b6b2cb44ed95996bd6 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFetchContentOperation.h @@ -0,0 +1,45 @@ +// +// MCOIMAPFetchContentOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/25/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPFETCHCONTENTOPERATION_H + +#define MAILCORE_MCOIMAPFETCHCONTENTOPERATION_H + +/** + This class implements an operation to fetch the content of a message. + It can be a part or a full message. +*/ + +#import <MailCore/MCOIMAPBaseOperation.h> +#import <MailCore/MCOConstants.h> + +NS_ASSUME_NONNULL_BEGIN +@interface MCOIMAPFetchContentOperation : MCOIMAPBaseOperation + +/** + This block will be called as bytes are received from the network +*/ +@property (nonatomic, copy) MCOIMAPBaseOperationProgressBlock progress; + +/** + Starts the asynchronous fetch operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `data` will contain the requested data + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in `MCOConstants.h`, `data` will be nil +*/ + +- (void) start:(void (^)(NSError * __nullable error, NSData * __nullable data))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFetchContentToFileOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFetchContentToFileOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..4d06e94d41378baccdb15f50e609fbd4717ba7af --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFetchContentToFileOperation.h @@ -0,0 +1,51 @@ +// +// MCOIMAPFetchContentToFileOperation.h +// mailcore2 +// +// Created by Dmitry Isaikin on 2/08/16. +// Copyright (c) 2016 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPFETCHCONTENTTOFILEOPERATION_H + +#define MAILCORE_MCOIMAPFETCHCONTENTTOFILEOPERATION_H + +/** + This class implements an operation to fetch the content of a message to the file. + It can be a part or a full message. +*/ + +#import <MailCore/MCOIMAPBaseOperation.h> +#import <MailCore/MCOConstants.h> + +NS_ASSUME_NONNULL_BEGIN + +@interface MCOIMAPFetchContentToFileOperation : MCOIMAPBaseOperation + +/** + This block will be called as bytes are received from the network +*/ +@property (nonatomic, copy, nullable) MCOIMAPBaseOperationProgressBlock progress; + +@property (nonatomic, assign, getter=isLoadingByChunksEnabled) BOOL loadingByChunksEnabled; +@property (nonatomic, assign) uint32_t chunksSize; +@property (nonatomic, assign) uint32_t estimatedSize; + +/** + Starts the asynchronous fetch operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in `MCOConstants.h` +*/ + +- (void) start:(void (^)(NSError * __nullable error))completionBlock; + +@end + +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFetchFoldersOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFetchFoldersOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..a2954d29ef09c5402ad104f7cf3c6619fe1544de --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFetchFoldersOperation.h @@ -0,0 +1,35 @@ +// +// MCOIMAPFetchFoldersOperation.h +// mailcore2 +// +// Created by Matt Ronge on 1/31/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPFETCHFOLDERSOPERATION_H + +#define MAILCORE_MCOIMAPFETCHFOLDERSOPERATION_H + +/** This class implements an operation to fetch a list of folders. */ + +#import <MailCore/MCOIMAPBaseOperation.h> + +NS_ASSUME_NONNULL_BEGIN +@interface MCOIMAPFetchFoldersOperation : MCOIMAPBaseOperation + +/** + Starts the asynchronous fetch operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `folders` will contain an array of MCOIMAPFolder + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in `MCOConstants.h`, `folders` will be nil +*/ +- (void) start:(void (^)(NSError * __nullable error, NSArray * /* MCOIMAPFolder */ __nullable folders))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFetchMessagesOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFetchMessagesOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..ac1506c0ffeca848141b51d76547d5185e0418d9 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFetchMessagesOperation.h @@ -0,0 +1,47 @@ +// +// MCOIMAPFetchMessagesOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/25/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPFETCHMESSAGESOPERATION_H + +#define MAILCORE_MCOIMAPFETCHMESSAGESOPERATION_H + +#import <MailCore/MCOIMAPBaseOperation.h> +#import <MailCore/MCOConstants.h> + +/** This class implements an operation to fetch a list of messages from a folder */ + +@class MCOIndexSet; + +NS_ASSUME_NONNULL_BEGIN +@interface MCOIMAPFetchMessagesOperation : MCOIMAPBaseOperation + +/** This block will be called each time a new message is downloaded. */ +@property (nonatomic, copy) MCOIMAPBaseOperationItemProgressBlock progress; + +/** Extra headers to request. Must set requestKind | IMAPMessagesRequestKindExtraHeaders */ +@property (nonatomic, copy) NSArray * extraHeaders; + +/** + Starts the asynchronous fetch operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `messages` will be an array of MCOIMAPMessage. + `vanishedMessages` will contain the messages removed on the server if the server supports QRESYNC and if it was a sync request + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in `MCOConstants.h`, `messages` and `vanishedMessages` will be nil + + If you are not supporting QRESYNC you can safely ignore `vanishedMessages`. +*/ +- (void) start:(void (^)(NSError * __nullable error, NSArray * /* MCOIMAPMessage */ __nullable messages, MCOIndexSet * __nullable vanishedMessages))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFetchNamespaceOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFetchNamespaceOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..ea9e4fc28f9513f911ceb24a16e89dc2956eb0f0 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFetchNamespaceOperation.h @@ -0,0 +1,41 @@ +// +// MCOIMAPFetchNamespaceOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/25/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPFETCHNAMESPACEOPERATION_H + +#define MAILCORE_MCOIMAPFETCHNAMESPACEOPERATION_H + +/** This class implements an operation to fetch any IMAP namespaces. */ + +#import <MailCore/MCOIMAPBaseOperation.h> + +NS_ASSUME_NONNULL_BEGIN +@interface MCOIMAPFetchNamespaceOperation : MCOIMAPBaseOperation + +/** + Starts the asynchronous namespace fetch operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `namespaces` will contain these keys: + + - `MCOIMAPNamespacePersonal` for personal namespaces, + - `MCOIMAPNamespaceOther` for other namespaces, + - `MCOIMAPNamespaceShared` for shared namespaces. + + Values of the dictionary are MCOIMAPNamespace + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in `MCOConstants.h`, `namespaces` will be nil +*/ +- (void) start:(void (^)(NSError * __nullable error, NSDictionary * __nullable namespaces))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFetchParsedContentOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFetchParsedContentOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..5ab800582eddd289700610d6be9666551004c760 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFetchParsedContentOperation.h @@ -0,0 +1,46 @@ +// +// MCOIMAPFetchParsedContentOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/25/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPFETCHPARSEDCONTENTOPERATION_H + +#define MAILCORE_MCOIMAPFETCHPARSEDCONTENTOPERATION_H + +/** + This class implements an operation to fetch the parsed content of a message. +*/ + +#import <MailCore/MCOIMAPBaseOperation.h> +#import <MailCore/MCOConstants.h> + +@class MCOMessageParser; + +NS_ASSUME_NONNULL_BEGIN +@interface MCOIMAPFetchParsedContentOperation : MCOIMAPBaseOperation + +/** + This block will be called as bytes are received from the network +*/ +@property (nonatomic, copy) MCOIMAPBaseOperationProgressBlock progress; + +/** + Starts the asynchronous fetch operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `parser` will contain the requested message + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in `MCOConstants.h`, `parser` will be nil +*/ + +- (void) start:(void (^)(NSError * __nullable error, MCOMessageParser * __nullable parser))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFolder.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFolder.h new file mode 100644 index 0000000000000000000000000000000000000000..048dfb55df233cb69b342c662335c4d2288c1bd3 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFolder.h @@ -0,0 +1,34 @@ +// +// MCOIMAPFolder.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/23/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPFOLDER_H + +#define MAILCORE_MCOIMAPFOLDER_H + +/** This class represents an IMAP folder */ + +#import <Foundation/Foundation.h> +#import <MailCore/MCOConstants.h> + +@interface MCOIMAPFolder : NSObject <NSCopying> + +/** The folder's path, like for example INBOX.Archive */ +@property (nonatomic, copy) NSString * path; + +/** It's the delimiter for each component of the path. Commonly . or / */ +@property (nonatomic, assign) char delimiter; + +/** + Any flags the folder may have, like if the folder is for Drafts, Spam, Junk, etc. Or + it could be marked with metadata like that it has no children. +*/ +@property (nonatomic, assign) MCOIMAPFolderFlag flags; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFolderInfo.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFolderInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..1397e8418234052fa9007e811bc7f137b9500c6c --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFolderInfo.h @@ -0,0 +1,39 @@ +// +// MCOIMAPFolderInfo.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/25/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPFOLDERINFO_H + +#define MAILCORE_MCOIMAPFOLDERINFO_H + +#import <Foundation/Foundation.h> + +/* This class holds IMAP folder metadata */ + +@interface MCOIMAPFolderInfo : NSObject <NSCopying> + +/** The folder's IMAP UIDNEXT value. Used to determine the uid for the next received message. */ +@property (nonatomic, assign) uint32_t uidNext; + +/** The folders IMAP UIDVALIDITY value. Must be used to determine if the server has changed assigned UIDs */ +@property (nonatomic, assign) uint32_t uidValidity; + +/** An advanced value used for doing quick flag syncs if the server supports it. The MODSEQ value. */ +@property (nonatomic, assign) uint64_t modSequenceValue; + +/** Total number of messages in the folder */ +@property (nonatomic, assign) int messageCount; + +// first uid of the unseen messages. +@property (nonatomic, assign) uint32_t firstUnseenUid; + +/** An boolean indicates that this folder or IMAP server allows to add a new permanent flags */ +@property (nonatomic, assign) BOOL allowsNewPermanentFlags; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFolderInfoOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFolderInfoOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..20abd2067eb47d5249fe11eb9eb46f2f37a582d2 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFolderInfoOperation.h @@ -0,0 +1,41 @@ +// +// MCOIMAPFolderInfoOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/25/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPFOLDERINFOOPERATION_H + +#define MAILCORE_MCOIMAPFOLDERINFOOPERATION_H + +#import <MailCore/MCOIMAPBaseOperation.h> + +/** + The class is used to get folder metadata (like UIDVALIDITY, UIDNEXT, etc). + @see MCOIMAPFolderInfo +*/ + +@class MCOIMAPFolderInfo; + +NS_ASSUME_NONNULL_BEGIN +@interface MCOIMAPFolderInfoOperation : MCOIMAPBaseOperation + +/** + Starts the asynchronous operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `info` will contain the folder metadata + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in `MCOConstants.h`, `info` will be nil +*/ + +- (void) start:(void (^)(NSError * __nullable error, MCOIMAPFolderInfo * __nullable info))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFolderStatus.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFolderStatus.h new file mode 100644 index 0000000000000000000000000000000000000000..bd1ddef3ca84da7f3ed97d0a5df10712a215f483 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFolderStatus.h @@ -0,0 +1,39 @@ +// +// MCOIMAPFolderStatus.h +// mailcore2 +// +// Created by Sebastian on 6/5/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPFOLDERSTATUS_H + +#define MAILCORE_MCOIMAPFOLDERSTATUS_H + +#import <Foundation/Foundation.h> + +/* This class holds IMAP folder metadata */ + +@interface MCOIMAPFolderStatus : NSObject <NSCopying> + +/** The folder's IMAP UIDNEXT value. Used to determine the uid for the next received message. */ +@property (nonatomic, assign) uint32_t uidNext; + +/** The folders IMAP UIDVALIDITY value. Must be used to determine if the server has changed assigned UIDs */ +@property (nonatomic, assign) uint32_t uidValidity; + +/** Number of recent messages received in the folder */ +@property (nonatomic, assign) uint32_t recentCount; + +/** Number of unseen messages in the folder */ +@property (nonatomic, assign) uint32_t unseenCount; + +/** Number of messages in the folder */ +@property (nonatomic, assign) uint32_t messageCount; + +/** Highest modification sequence value for this folder. See CONDSTORE RFC 4551. */ +@property (nonatomic, assign) uint64_t highestModSeqValue; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFolderStatusOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFolderStatusOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..68259b100c5caefd30bfa90a723539f52eabea8c --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPFolderStatusOperation.h @@ -0,0 +1,41 @@ +// +// MCOIMAPFolderStatusOperation.h +// mailcore2 +// +// Created by Sebastian on 6/5/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPFOLDERSTATUSOPERATION_H + +#define MAILCORE_MCOIMAPFOLDERSTATUSOPERATION_H + +#import <MailCore/MCOIMAPBaseOperation.h> + +/** + The class is used to get folder metadata (like UIDVALIDITY, UIDNEXT, etc). + @see MCOIMAPFolderStatus + */ + +@class MCOIMAPFolderStatus; + +NS_ASSUME_NONNULL_BEGIN +@interface MCOIMAPFolderStatusOperation : MCOIMAPBaseOperation + +/** + Starts the asynchronous operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `status` will contain the status metadata + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in `MCOConstants.h`, `status` will be nil + */ + +- (void) start:(void (^)(NSError * __nullable error, MCOIMAPFolderStatus * __nullable status))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPIdentity.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPIdentity.h new file mode 100644 index 0000000000000000000000000000000000000000..69f18c968d87a5db5efd0bd98cf86b14ef138145 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPIdentity.h @@ -0,0 +1,45 @@ +// +// MCOIMAPIdentity.h +// mailcore2 +// +// Created by Hoa V. DINH on 8/24/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPIDENTITY_H + +#define MAILCORE_MCOIMAPIDENTITY_H + +#import <Foundation/Foundation.h> + +@interface MCOIMAPIdentity : NSObject <NSCopying> + +/** Returns a simple identity */ ++ (MCOIMAPIdentity *) identityWithVendor:(NSString *)vendor + name:(NSString *)name + version:(NSString *)version; + +/** Vendor of the IMAP client */ +@property (nonatomic, copy) NSString * vendor; + +/** Name of the IMAP client */ +@property (nonatomic, copy) NSString * name; + +/** Version of the IMAP client */ +@property (nonatomic, copy) NSString * version; + +/** All fields names of the identity of the client */ +- (NSArray *) allInfoKeys; + +/** Set a custom field in the identity */ +- (NSString *) infoForKey:(NSString *)key; + +/** Retrieve a custom field in the identity */ +- (void) setInfo:(NSString *)value forKey:(NSString *)key; + +/** Remove all info keys including vendor, name and version */ +- (void) removeAllInfos; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPIdentityOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPIdentityOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..2fa6968f186356e07ccf04fc27a3996de1e7af28 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPIdentityOperation.h @@ -0,0 +1,41 @@ +// +// MCOIMAPIdentityOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/25/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPIDENTITYOPERATION_H + +#define MAILCORE_MCOIMAPIDENTITYOPERATION_H + +/** + This class implements an operation to get the servers identification info or + to send the clients identification info. Useful for bug reports and usage + statistics. + @warn Not all servers support this. +*/ + +#import <MailCore/MCOIMAPBaseOperation.h> + +NS_ASSUME_NONNULL_BEGIN +@interface MCOIMAPIdentityOperation : MCOIMAPBaseOperation + +/** + Starts the asynchronous identity operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `serverIdentity` will contain identifying server information. + See [RFC2971](http://tools.ietf.org/html/rfc2971) for commons dictionary keys. + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in `MCOConstants.h`, `serverIdentity` will be nil +*/ +- (void) start:(void (^)(NSError * __nullable error, NSDictionary * __nullable serverIdentity))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPIdleOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPIdleOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..fb83b283038bbe070539c330bacc9f0a8f7b129c --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPIdleOperation.h @@ -0,0 +1,42 @@ +// +// MCOIMAPIdleOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/25/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPIDLEOPERATION_H + +#define MAILCORE_MCOIMAPIDLEOPERATION_H + +/** + This class implements an IMAP IDLE. IDLE is used to keep a connection + open with the server so that new messages can be pushed to the client. + See [RFC2177](http://tools.ietf.org/html/rfc2177) +*/ + +#import <MailCore/MCOIMAPBaseOperation.h> + +NS_ASSUME_NONNULL_BEGIN +@interface MCOIMAPIdleOperation : MCOIMAPBaseOperation + +/** Stop the current IDLE session */ +- (void) interruptIdle; + +/** + Starts IDLE + + @param completionBlock Called when the IDLE times out, errors out or detects a change + + - On success `error` will be nil + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in `MCOConstants.h` +*/ +- (void) start:(void (^)(NSError * __nullable error))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPMessage.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPMessage.h new file mode 100644 index 0000000000000000000000000000000000000000..8e2e1c270a3a98b8077d6a4063967147363e65d7 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPMessage.h @@ -0,0 +1,85 @@ +// +// MCOIMAPMessage.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/23/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPMESSAGE_H + +#define MAILCORE_MCOIMAPMESSAGE_H + +/** + This represents an IMAP message. + + If you fetched the MIME structure of the message, you can fetch + efficiently the content of the message by fetching only the parts + that you need to show it. + + For example, you could fetch only the text parts to show the summary + of the message, using [MCOIMAPSession fetchMessageAttachmentByUIDOperationWithFolder:uid:partID:encoding:] + + You can also decide to fetch entirely the message using + [MCOIMAPSession fetchMessageByUIDOperationWithFolder:uid:] +*/ + +#import <MailCore/MCOAbstractMessage.h> +#import <MailCore/MCOConstants.h> + +@protocol MCOHTMLRendererIMAPDelegate; + +@interface MCOIMAPMessage : MCOAbstractMessage <NSCoding> + +/** IMAP UID of the message. */ +@property (nonatomic, assign) uint32_t uid; + +/** IMAP sequence number of the message. + @warning *Important*: This property won't be serialized. */ +@property (nonatomic, assign) uint32_t sequenceNumber; + +/* Size of the entire message */ +@property (nonatomic, assign) uint32_t size; + +/** Flags of the message, like if it is deleted, read, starred etc */ +@property (nonatomic, assign) MCOMessageFlag flags; + +/** The contents of the message flags when it was fetched from the server */ +@property (nonatomic, assign) MCOMessageFlag originalFlags; + +/** Flag keywords of the message, mostly custom flags */ +@property (nonatomic, copy) NSArray * /* NSString */ customFlags; + +/** It's the last modification sequence value of the message synced from the server. See RFC4551 */ +@property (nonatomic, assign) uint64_t modSeqValue; + +/** Main MIME part of the message */ +@property (nonatomic, retain) MCOAbstractPart * mainPart; + +/** All Gmail labels of the message */ +@property (nonatomic, copy) NSArray * /* NSString */ gmailLabels; + +/** Gmail message ID of the message */ +@property (nonatomic, assign) uint64_t gmailMessageID; + +/** Gmail thread ID of the message */ +@property (nonatomic, assign) uint64_t gmailThreadID; + +/** + Returns the part with the given part identifier. + @param partID A part identifier looks like 1.2.1 +*/ +- (MCOAbstractPart *) partForPartID:(NSString *)partID; + +/** + HTML rendering of the message to be displayed in a web view. + The delegate should implement at least + [MCOAbstractMessage:dataForIMAPPart:folder:] + so that the complete HTML rendering can take place. +*/ +- (NSString *) htmlRenderingWithFolder:(NSString *)folder + delegate:(id <MCOHTMLRendererIMAPDelegate>)delegate; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPMessagePart.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPMessagePart.h new file mode 100644 index 0000000000000000000000000000000000000000..c455d336a72a00cf93c53b5a0df2de9661aadb75 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPMessagePart.h @@ -0,0 +1,24 @@ +// +// MCOIMAPMessagePart.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/23/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPMESSAGEPART_H + +#define MAILCORE_MCOIMAPMESSAGEPART_H + +/** Represents a message part. */ + +#import <MailCore/MCOAbstractMessagePart.h> + +@interface MCOIMAPMessagePart : MCOAbstractMessagePart <NSCoding> + +/** A part identifier is of the form 1.2.1*/ +@property (nonatomic, copy) NSString * partID; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPMessageRenderingOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPMessageRenderingOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..8a2924c8c4c2b107f4299a28a135acc4d07aee10 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPMessageRenderingOperation.h @@ -0,0 +1,37 @@ +// +// MCOIMAPMessageRenderingOperation.h +// mailcore2 +// +// Created by Paul Young on 07/07/2013. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPMESSAGERENDERINGOPERATION_H + +#define MAILCORE_MCOIMAPMESSAGERENDERINGOPERATION_H + +#import <MailCore/MCOIMAPBaseOperation.h> + +/** + The class is used to get the HTML string of a message. + */ + +NS_ASSUME_NONNULL_BEGIN +@interface MCOIMAPMessageRenderingOperation : MCOIMAPBaseOperation + +/** + Starts the asynchronous operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `htmlString` will contain the message + + - On failure, `error` will be set and `htmlString` will be nil + */ + +- (void) start:(void (^)(NSString * __nullable htmlString, NSError * __nullable error))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPMoveMessagesOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPMoveMessagesOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..7746087883a4669d497cbc0a47b9234ae69e9669 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPMoveMessagesOperation.h @@ -0,0 +1,39 @@ +// +// MCOIMAPMoveMessagesOperation.h +// mailcore2 +// +// Created by Nikolay Morev on 02/02/16. +// Copyright © 2016 MailCore. All rights reserved. +// + +#import <MailCore/MCOIMAPBaseOperation.h> + +#ifndef MAILCORE_MCOMOVEMESSAGESOPERATION_H + +#define MAILCORE_MCOMOVEMESSAGESOPERATION_H + +/** Implements an operation for moving messages between folders */ + +@class MCOIndexSet; + +NS_ASSUME_NONNULL_BEGIN +@interface MCOIMAPMoveMessagesOperation : MCOIMAPBaseOperation + +/** + Starts the asynchronous move operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `destUids` will contain the UIDs of the messages created + in the destination folder. If the server doesn't support UIDPLUS then `destUids` will be nil. + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in `MCOConstants.h`, `destUids` will be nil + */ + +- (void) start:(void (^)(NSError * __nullable error, NSDictionary * __nullable uidMapping))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPMultipart.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPMultipart.h new file mode 100644 index 0000000000000000000000000000000000000000..c083f4256112f101005e815f4a4a5c646b9c9e6f --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPMultipart.h @@ -0,0 +1,24 @@ +// +// MCOIMAPMultipart.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/23/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPMULTIPART_H + +#define MAILCORE_MCOIMAPMULTIPART_H + +/** Represents the a multipart retrieved from IMAP */ + +#import <MailCore/MCOAbstractMultipart.h> + +@interface MCOIMAPMultipart : MCOAbstractMultipart <NSCoding> + +/** A part identifier looks like 1.2.1 */ +@property (nonatomic, copy) NSString * partID; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPNamespace.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPNamespace.h new file mode 100644 index 0000000000000000000000000000000000000000..3e842aaddf00aa71d5217f9131122fac0b00175a --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPNamespace.h @@ -0,0 +1,55 @@ +// +// MCOIMAPNamespace.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/23/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPNAMESPACE_H + +#define MAILCORE_MCOIMAPNAMESPACE_H + +/** Represents an IMAP namespace */ + +#import <Foundation/Foundation.h> + +@class MCOIMAPNamespace; + +@interface MCOIMAPNamespace : NSObject <NSCopying> + +/** + Returns a simple namespace with only one item. +*/ ++ (MCOIMAPNamespace *) namespaceWithPrefix:(NSString *)prefix delimiter:(char)delimiter; + +/** Returns the prefix of the main item of this namespace. */ +- (NSString *) mainPrefix; + +/** Returns the path delimiter of the main item of this namespace */ +- (char) mainDelimiter; + +/** Returns the list of prefixes of this namespace. */ +- (NSArray * /* NSString */) prefixes; + +/** + Returns the folder path for the given list of path components in the context + of the main item of the namespace. +*/ +- (NSString *) pathForComponents:(NSArray *)components; + +/** + Returns the folder path for the given list of path components and a prefix. + It will use the best item matching the prefix to compute the path. +*/ +- (NSString *) pathForComponents:(NSArray *)components prefix:(NSString *)prefix; + +/** Returns the components given a folder path. */ +- (NSArray * /* NSString */) componentsFromPath:(NSString *)path; + +/** Returns YES if the namespace contains the given folder path. */ +- (BOOL) containsFolderPath:(NSString *)path; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPNamespaceItem.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPNamespaceItem.h new file mode 100644 index 0000000000000000000000000000000000000000..64ae3c5fa9888a94897949d1b7f576c60cf5bb8d --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPNamespaceItem.h @@ -0,0 +1,36 @@ +// +// MCOIMAPNamespaceItem.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/23/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPNAMESPACEITEM_H + +#define MAILCORE_MCOIMAPNAMESPACEITEM_H + +/** Represents a namespace item */ + +#import <Foundation/Foundation.h> + +@interface MCOIMAPNamespaceItem : NSObject <NSCopying> + +/** This is the prefix for this namespace item */ +@property (nonatomic, copy) NSString * prefix; + +/** This is the delimiter of the path for this namespace item */ +@property (nonatomic, assign) char delimiter; + +/** Returns folder path for given path components in the context of this namespace item */ +- (NSString *) pathForComponents:(NSArray *)components; + +/** Returns components for the given path in the context of this namespace */ +- (NSArray * /* NSString */) componentsForPath:(NSString *)path; + +/** Returns YES if the namespace contains this folder path */ +- (BOOL) containsFolder:(NSString *)folder; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..9d399df3ebab7be355872a407146b7ac4635f542 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPOperation.h @@ -0,0 +1,36 @@ +// +// MCOIMAPOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/23/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPOPERATION_H + +#define MAILCORE_MCOIMAPOPERATION_H + +/** This class implements a generic IMAP operation */ + +#import <MailCore/MCOIMAPBaseOperation.h> + + +NS_ASSUME_NONNULL_BEGIN +@interface MCOIMAPOperation : MCOIMAPBaseOperation + +/** + Starts the asynchronous append operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in MCOConstants.h, +*/ +- (void) start:(void (^)(NSError * __nullable error))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPPart.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPPart.h new file mode 100644 index 0000000000000000000000000000000000000000..660113b5697a3e5b163e5c342c978c6dab9004ee --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPPart.h @@ -0,0 +1,38 @@ +// +// MCOIMAPPart.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/23/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPABSTRACTPART_H + +#define MAILCORE_MCOIMAPABSTRACTPART_H + +#import <MailCore/MCOAbstractPart.h> + +#import <MailCore/MCOConstants.h> + +/** Represents a single IMAP message part */ + +@interface MCOIMAPPart : MCOAbstractPart <NSCoding> + +/** A part identifier looks like 1.2.1 */ +@property (nonatomic, copy) NSString * partID; + +/** The size of the single part in bytes */ +@property (nonatomic, nonatomic) unsigned int size; + +/** It's the encoding of the single part */ +@property (nonatomic, nonatomic) MCOEncoding encoding; + +/** + Returns the decoded size of the part. + For example, for a part that's encoded with base64, it will return actual_size * 3/4. +*/ +- (unsigned int) decodedSize; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPQuotaOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPQuotaOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..d3368d49a5b85460d885f59d42177b584a262ad3 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPQuotaOperation.h @@ -0,0 +1,17 @@ +// +// MCOIMAPQuotaOperation.h +// mailcore2 +// +// Created by Petro Korenev on 8/2/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#import "MCOIMAPBaseOperation.h" + +NS_ASSUME_NONNULL_BEGIN +@interface MCOIMAPQuotaOperation : MCOIMAPBaseOperation + +- (void) start:(void (^)(NSError * __nullable error, NSUInteger usage, NSUInteger limit))completionBlock; + +@end +NS_ASSUME_NONNULL_END diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPSearchExpression.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPSearchExpression.h new file mode 100644 index 0000000000000000000000000000000000000000..225b3a5ef2ce6bd313fd447d249a2a7a82867308 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPSearchExpression.h @@ -0,0 +1,365 @@ +// +// MCOIMAPSearchExpression.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/25/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPSEARCHEXPRESSION_H + +#define MAILCORE_MCOIMAPSEARCHEXPRESSION_H + +/** Used to construct an IMAP search query */ + +#import <Foundation/Foundation.h> +#import <MailCore/MCOConstants.h> +#import <MailCore/MCOIndexSet.h> + +@interface MCOIMAPSearchExpression : NSObject + +/** + Creates a search expression that returns all UIDS for the mailbox + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchAll] +*/ ++ (MCOIMAPSearchExpression *) searchAll; + +/** + Creates a search expression that matches the sender of an email. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchFrom:@"laura@etpan.org"] +*/ ++ (MCOIMAPSearchExpression *) searchFrom:(NSString *)value; + +/** + Creates a search expression that matches any recipient of an email. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchRecipient:@"ngan@etpan.org"] + **/ ++ (MCOIMAPSearchExpression *) searchRecipient:(NSString *)value; + +/** + Creates a search expression that matches on the receiver (to) of an email. Useful to check whether the mail is directly addressed to the receiver. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchTo:@"ngan@etpan.org"] +**/ ++ (MCOIMAPSearchExpression *) searchTo:(NSString *)value; + +/** + Creates a search expression that matches on the cc of an email. Useful to check whether the mail is addressed to the receiver as cc. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchCc:@"ngan@etpan.org"] + **/ ++ (MCOIMAPSearchExpression *) searchCc:(NSString *)value; + +/** + Creates a search expression that matches on the bcc field of an email. Useful to check whether the mail is addressed to the receiver as bcc. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchBcc:@"ngan@etpan.org"] + **/ ++ (MCOIMAPSearchExpression *) searchBcc:(NSString *)value; + +/* + Creates a search expression that matches the subject of an email. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchSubject:@"airline"] +**/ ++ (MCOIMAPSearchExpression *) searchSubject:(NSString *)value; + +/** + Creates a search expression that matches the content of an email, including the headers. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchContent:@"meeting"] +*/ ++ (MCOIMAPSearchExpression *) searchContent:(NSString *)value; + +/** + Creates a search expression that matches the content of an email, excluding the headers. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchBody:@"building"] + */ ++ (MCOIMAPSearchExpression *) searchBody:(NSString *)value; + +/** + Creates a search expression that matches the uids specified. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchUids:uids] + **/ ++ (MCOIMAPSearchExpression *) searchUIDs:(MCOIndexSet *) uids; + +/** + Creates a search expression that matches the message numbers specified. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchNumbers:numbers] + **/ ++ (MCOIMAPSearchExpression *) searchNumbers:(MCOIndexSet *) numbers; + +/** + Creates a search expression that matches the content of a specific header. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchHeader:@"List-Id" value:@"shoes"] +**/ ++ (MCOIMAPSearchExpression *) searchHeader:(NSString *)header value:(NSString *)value; + +/** + Creates a search expression that matches messages with the Read flag. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchRead] + **/ ++ (MCOIMAPSearchExpression *) searchRead; + +/** + Creates a search expression that matches messages without the Read flag. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchUnread] + **/ ++ (MCOIMAPSearchExpression *) searchUnread; + +/** + Creates a search expression that matches messages that have been flagged. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchFlagged] + **/ ++ (MCOIMAPSearchExpression *) searchFlagged; + +/** + Creates a search expression that matches messages that haven't been flagged. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchUnflagged] + **/ ++ (MCOIMAPSearchExpression *) searchUnflagged; + +/** + Creates a search expression that matches messages that have the answered flag set. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchAnswered] + **/ ++ (MCOIMAPSearchExpression *) searchAnswered; + +/** + Creates a search expression that matches messages that don't have the answered flag set.. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchUnanswered] + **/ ++ (MCOIMAPSearchExpression *) searchUnanswered; + +/** + Creates a search expression that matches draft messages. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchDraft] + **/ ++ (MCOIMAPSearchExpression *) searchDraft; + +/** + Creates a search expression that matches messages that aren't drafts. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchUndraft] + **/ ++ (MCOIMAPSearchExpression *) searchUndraft; + +/** + Creates a search expression that matches messages that are deleted. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchDeleted] + **/ ++ (MCOIMAPSearchExpression *) searchDeleted; + +/** + Creates a search expression that matches messages that are spam. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchSpam] + **/ ++ (MCOIMAPSearchExpression *) searchSpam; + +/** + Creates a search expression that matches messages sent before a date. + + Example: + + NSDate *yesterday = [NSDate dateWithTimeIntervalSinceNow:-(60.0 * 60.0 * 24.0)]; + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchBeforeDate:yesterday] + **/ ++ (MCOIMAPSearchExpression *) searchBeforeDate:(NSDate *)date; + +/** + Creates a search expression that matches messages sent on a date. + + Example: + + NSDate *now = [NSDate date]; + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchOnDate:now] + **/ ++ (MCOIMAPSearchExpression *) searchOnDate:(NSDate *)date; + +/** + Creates a search expression that matches messages sent since a date. + + Example: + + NSDate *now = [NSDate date]; + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchSinceDate:now] + **/ ++ (MCOIMAPSearchExpression *) searchSinceDate:(NSDate *)date; + +/** + Creates a search expression that matches messages received before a date. + + Example: + + NSDate *yesterday = [NSDate dateWithTimeIntervalSinceNow:-(60.0 * 60.0 * 24.0)]; + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchBeforeReceivedDate:yesterday] + **/ ++ (MCOIMAPSearchExpression *) searchBeforeReceivedDate:(NSDate *)date; + +/** + Creates a search expression that matches messages received on a date. + + Example: + + NSDate *now = [NSDate date]; + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchOnReceivedDate:now] + **/ ++ (MCOIMAPSearchExpression *) searchOnReceivedDate:(NSDate *)date; + +/** + Creates a search expression that matches messages received since a date. + + Example: + + NSDate *yesterday = [NSDate dateWithTimeIntervalSinceNow:-(60.0 * 60.0 * 24.0)]; + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchSinceReceivedDate:yesterday] + **/ ++ (MCOIMAPSearchExpression *) searchSinceReceivedDate:(NSDate *)date; + +/** + Creates a search expression that matches messages larger than a given size in bytes. + + Example: + + uint32_t minSize = 1024 * 10; // 10 KB + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchSizeLargerThan:minSize] + **/ ++ (MCOIMAPSearchExpression *) searchSizeLargerThan:(uint32_t)size; + +/** + Creates a search expression that matches messages smaller than a given size in bytes. + + Example: + + uint32_t maxSize = 1024 * 10; // 10 KB + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchSizeSmallerThan:maxSize] + **/ ++ (MCOIMAPSearchExpression *) searchSizeSmallerThan:(uint32_t)size; + +/** + Creates a search expression that matches emails with the given gmail thread id + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchGmailThreadID:aThreadID] + */ ++ (MCOIMAPSearchExpression *) searchGmailThreadID:(uint64_t)number; + + +/** + Creates a search expression that matches emails with the given gmail message id + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchGmailMessageID:aMessageID] + */ ++ (MCOIMAPSearchExpression *) searchGmailMessageID:(uint64_t)number; + +/** + Creates a search expression that gets emails that match a gmail raw search + expression. + + Example: + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchGmailRaw:@"from:bill has:attachment filename:cal meeting schedule"] + */ ++ (MCOIMAPSearchExpression *) searchGmailRaw:(NSString *)expr; + + +/** + Creates a search expression that's a disjunction of two search expressions. + + Example: + + MCOIMAPSearchExpression * exprFrom = [MCOIMAPSearchExpression searchFrom:@"laura@etpan.org"] + MCOIMAPSearchExpression * exprSubject = [MCOIMAPSearchExpression searchContent:@"meeting"] + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchAnd:exprFrom other:exprSubject]; +**/ + ++ (MCOIMAPSearchExpression *) searchAnd:(MCOIMAPSearchExpression *)expression other:(MCOIMAPSearchExpression *)other; +/** + Creates a search expression that's a conjunction of two search expressions. + + Example: + + MCOIMAPSearchExpression * exprFrom = [MCOIMAPSearchExpression searchFrom:@"laura@etpan.org"] + MCOIMAPSearchExpression * exprOtherFrom = [MCOIMAPSearchExpression searchRecipient:@"ngan@etpan.org"] + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchOr:exprFrom exprOtherFrom]; +*/ ++ (MCOIMAPSearchExpression *) searchOr:(MCOIMAPSearchExpression *)expression other:(MCOIMAPSearchExpression *)other; + +/** + Creates a search expression that matches when the argument is not matched. + + Example: + + MCOIMAPSearchExpression * exprSubject = [MCOIMAPSearchExpression searchSubject:@"airline"] + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchNot:exprSubject]; + The expression will match when the subject does not contain the word airline + + */ ++ (MCOIMAPSearchExpression *) searchNot:(MCOIMAPSearchExpression *)expression; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPSearchOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPSearchOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..a594730d45fa4f284d4defd8e39831e9db8df41e --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPSearchOperation.h @@ -0,0 +1,38 @@ +// +// MCOIMAPSearchOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/25/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOSEARCHOPERATION_H + +#define MAILCORE_MCOSEARCHOPERATION_H + +/** This class runs an IMAP search operation */ + +#import <MailCore/MCOIMAPBaseOperation.h> + +@class MCOIndexSet; + +NS_ASSUME_NONNULL_BEGIN +@interface MCOIMAPSearchOperation : MCOIMAPBaseOperation + +/** + Starts the asynchronous search operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `searchResults` will contain the UIDs of any matching messages + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in MCOConstants.h, `searchResult` will be nil +*/ + +- (void) start:(void (^)(NSError * __nullable error, MCOIndexSet * __nullable searchResult))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPSession.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPSession.h new file mode 100644 index 0000000000000000000000000000000000000000..2e2d55a94c46005dd89ed4bb1df6692a77b4423e --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIMAPSession.h @@ -0,0 +1,1091 @@ +// +// MCOIMAPSession.h +// mailcore2 +// +// Created by Matt Ronge on 1/31/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPSESSION_H + +#define MAILCORE_MCOIMAPSESSION_H + +#import <Foundation/Foundation.h> +#import <MailCore/MCOConstants.h> + +@class MCOIMAPFetchFoldersOperation; +@class MCOIMAPOperation; +@class MCOIMAPNamespace; +@class MCOIMAPFolderInfoOperation; +@class MCOIMAPFolderStatusOperation; +@class MCOIMAPAppendMessageOperation; +@class MCOIMAPCopyMessagesOperation; +@class MCOIMAPMoveMessagesOperation; +@class MCOIndexSet; +@class MCOIMAPFetchMessagesOperation; +@class MCOIMAPFetchContentOperation; +@class MCOIMAPFetchContentToFileOperation; +@class MCOIMAPFetchParsedContentOperation; +@class MCOIMAPSearchOperation; +@class MCOIMAPIdleOperation; +@class MCOIMAPFetchNamespaceOperation; +@class MCOIMAPSearchExpression; +@class MCOIMAPIdentityOperation; +@class MCOIMAPCapabilityOperation; +@class MCOIMAPQuotaOperation; +@class MCOIMAPMessageRenderingOperation; +@class MCOIMAPMessage; +@class MCOIMAPIdentity; +@class MCOIMAPCustomCommandOperation; + +/** + This is the main IMAP class from which all operations are created + + After calling a method that returns an operation you must call start: on the instance + to begin the operation. +*/ + +@interface MCOIMAPSession : NSObject + +/** This is the hostname of the IMAP server to connect to. */ +@property (nonatomic, copy) NSString *hostname; + +/** This is the port of the IMAP server to connect to. */ +@property (nonatomic, assign) unsigned int port; + +/** This is the username of the account. */ +@property (nonatomic, copy) NSString *username; + +/** This is the password of the account. */ +@property (nonatomic, copy) NSString *password; + +/** This is the OAuth2 token. */ +@property (nonatomic, copy) NSString *OAuth2Token; + +/** + This is the authentication type to use to connect. + `MCOAuthTypeSASLNone` means that it uses the clear-text is used (and is the default). + @warning *Important*: Over an encrypted connection like TLS, the password will still be secure +*/ +@property (nonatomic, assign) MCOAuthType authType; + +/** + This is the encryption type to use. + See MCOConnectionType for more information. +*/ +@property (nonatomic, assign) MCOConnectionType connectionType; + +/** This is the timeout of the connection. */ +@property (nonatomic, assign) NSTimeInterval timeout; + +/** When set to YES, the connection will fail if the certificate is incorrect. */ +@property (nonatomic, assign, getter=isCheckCertificateEnabled) BOOL checkCertificateEnabled; + +/** When set to YES, VoIP capability will be enabled on the IMAP connection on iOS */ +@property (nonatomic, assign, getter=isVoIPEnabled) BOOL voIPEnabled; + +/** The default namespace. */ +@property (nonatomic, strong) MCOIMAPNamespace * defaultNamespace; + +/** The identity of the IMAP client. */ +@property (nonatomic, copy) MCOIMAPIdentity * clientIdentity; + +/** The identity of the IMAP server. */ +@property (nonatomic, strong, readonly) MCOIMAPIdentity * serverIdentity; + +/** + Display name of the Gmail user. It will be nil if it's not a Gmail server. + + ** DEPRECATED ** + This attribute has been broken by Gmail IMAP server. It's not longer available + as a correct display name. +*/ +@property (nonatomic, copy, readonly) NSString * gmailUserDisplayName DEPRECATED_ATTRIBUTE; + +@property (nonatomic, assign, readonly, getter=isIdleEnabled) BOOL idleEnabled; + +/** + When set to YES, the session is allowed open to open several connections to the same folder. + @warning Some older IMAP servers don't like this +*/ +@property (nonatomic, assign) BOOL allowsFolderConcurrentAccessEnabled; + +/** + Maximum number of connections to the server allowed. +*/ +@property (nonatomic, assign) unsigned int maximumConnections; + +/** + Sets logger callback. The network traffic will be sent to this block. + + [session setConnectionLogger:^(void * connectionID, MCOConnectionLogType type, NSData * data) { + NSLog(@"%@", [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease]); + // ... + }]; +*/ +@property (nonatomic, copy) MCOConnectionLogger connectionLogger; + +/** This property provides some hints to MCOIMAPSession about where it's called from. + It will make MCOIMAPSession safe. It will also set all the callbacks of operations to run on this given queue. + Defaults to the main queue. + This property should be used only if there's performance issue using MCOIMAPSession in the main thread. */ +#if OS_OBJECT_USE_OBJC +@property (nonatomic, retain) dispatch_queue_t dispatchQueue; +#else +@property (nonatomic, assign) dispatch_queue_t dispatchQueue; +#endif + +/** + The value will be YES when asynchronous operations are running, else it will return NO. +*/ +@property (nonatomic, assign, readonly, getter=isOperationQueueRunning) BOOL operationQueueRunning; + +/** + Sets operation running callback. It will be called when operations start or stop running. + + [session setOperationQueueRunningChangeBlock:^{ + if ([session isOperationQueueRunning]) { + ... + } + else { + ... + } + }]; +*/ +@property (nonatomic, copy) MCOOperationQueueRunningChangeBlock operationQueueRunningChangeBlock; + +/** + Cancel all operations + */ +- (void) cancelAllOperations; + +/** @name Folder Operations */ + +/** + Returns an operation that retrieves folder metadata (like UIDNext) + + MCOIMAPFolderInfoOperation * op = [session folderInfoOperation:@"INBOX"]; + [op start:^(NSError *error, MCOIMAPFolderInfo * info) { + NSLog(@"UIDNEXT: %lu", (unsigned long) [info uidNext]); + NSLog(@"UIDVALIDITY: %lu", (unsigned long) [info uidValidity]); + NSLog(@"HIGHESTMODSEQ: %llu", (unsigned long long) [info modSequenceValue]); + NSLog(@"messages count: %lu", [info messageCount]); + }]; +*/ + +- (MCOIMAPFolderInfoOperation *) folderInfoOperation:(NSString *)folder; + +/** + Returns an operation that retrieves folder status (like UIDNext - Unseen -) + + MCOIMAPFolderStatusOperation * op = [session folderStatusOperation:@"INBOX"]; + [op start:^(NSError *error, MCOIMAPFolderStatus * info) { + NSLog(@"UIDNEXT: %lu", (unsigned long) [info uidNext]); + NSLog(@"UIDVALIDITY: %lu", (unsigned long) [info uidValidity]); + NSLog(@"messages count: %lu", [info totalMessages]); + }]; + */ + +- (MCOIMAPFolderStatusOperation *) folderStatusOperation:(NSString *)folder; + +/** + Returns an operation that gets the list of subscribed folders. + + MCOIMAPFetchFoldersOperation * op = [session fetchSubscribedFoldersOperation]; + [op start:^(NSError * __nullable error, NSArray * folders) { + ... + }]; + */ + +- (MCOIMAPFetchFoldersOperation *) fetchSubscribedFoldersOperation; + +/** + Returns an operation that gets all folders + + MCOIMAPFetchFoldersOperation * op = [session fetchAllFoldersOperation]; + [op start:^(NSError * __nullable error, NSArray *folders) { + ... + }]; +*/ +- (MCOIMAPFetchFoldersOperation *) fetchAllFoldersOperation; + +/** + Creates an operation for renaming a folder + + MCOIMAPOperation * op = [session renameFolderOperation:@"my documents" otherName:@"Documents"]; + [op start:^(NSError * __nullable error) { + ... + }]; + +*/ +- (MCOIMAPOperation *) renameFolderOperation:(NSString *)folder otherName:(NSString *)otherName; + +/** + Create an operation for deleting a folder + + MCOIMAPOperation * op = [session deleteFolderOperation:@"holidays 2009"]; + [op start:^(NSError * __nullable error) { + ... + }]]; +*/ +- (MCOIMAPOperation *) deleteFolderOperation:(NSString *)folder; + +/** + Returns an operation that creates a new folder + + MCOIMAPOperation * op = [session createFolderOperation:@"holidays 2013"]; + [op start:^(NSError * __nullable error) { + ... + }]; +*/ +- (MCOIMAPOperation *) createFolderOperation:(NSString *)folder; + +/** + Returns an operation to subscribe to a folder. + + MCOIMAPOperation * op = [session createFolderOperation:@"holidays 2013"]; + [op start:^(NSError * __nullable error) { + if (error != nil) + return; + MCOIMAPOperation * op = [session subscribeFolderOperation:@"holidays 2013"]; + ... + }]; +*/ +- (MCOIMAPOperation *) subscribeFolderOperation:(NSString *)folder; + +/** + Returns an operation to unsubscribe from a folder. + + MCOIMAPOperation * op = [session unsubscribeFolderOperation:@"holidays 2009"]; + [op start:^(NSError * __nullable error) { + if (error != nil) + return; + MCOIMAPOperation * op = [session deleteFolderOperation:@"holidays 2009"] + ... + }]; +*/ +- (MCOIMAPOperation *) unsubscribeFolderOperation:(NSString *)folder; + +/** + Returns an operation to expunge a folder. + + MCOIMAPOperation * op = [session expungeOperation:@"INBOX"]; + [op start:^(NSError * __nullable error) { + ... + }]; +*/ +- (MCOIMAPOperation *) expungeOperation:(NSString *)folder; + +/** @name Message Actions */ + +/** + Returns an operation to add a message to a folder. + + MCOIMAPOperation * op = [session appendMessageOperationWithFolder:@"Sent Mail" messageData:rfc822Data flags:MCOMessageFlagNone]; + [op start:^(NSError * __nullable error, uint32_t createdUID) { + if (error == nil) { + NSLog(@"created message with UID %lu", (unsigned long) createdUID); + } + }]; +*/ +- (MCOIMAPAppendMessageOperation *)appendMessageOperationWithFolder:(NSString *)folder + messageData:(NSData *)messageData + flags:(MCOMessageFlag)flags; + +/** + Returns an operation to add a message with custom flags to a folder. + + MCOIMAPOperation * op = [session appendMessageOperationWithFolder:@"Sent Mail" messageData:rfc822Data flags:MCOMessageFlagNone customFlags:@[@"$CNS-Greeting-On"]]; + [op start:^(NSError * __nullable error, uint32_t createdUID) { + if (error == nil) { + NSLog(@"created message with UID %lu", (unsigned long) createdUID); + } + }]; + */ +- (MCOIMAPAppendMessageOperation *)appendMessageOperationWithFolder:(NSString *)folder + messageData:(NSData *)messageData + flags:(MCOMessageFlag)flags + customFlags:(NSArray *)customFlags; + +/** + Returns an operation to add a message with custom flags to a folder. + + MCOIMAPOperation * op = [session appendMessageOperationWithFolder:@"Sent Mail" + contentsAtPath:rfc822DataFilename + flags:MCOMessageFlagNone + customFlags:@[@"$CNS-Greeting-On"]]; + [op start:^(NSError * __nullable error, uint32_t createdUID) { + if (error == nil) { + NSLog(@"created message with UID %lu", (unsigned long) createdUID); + } + }]; + */ +- (MCOIMAPAppendMessageOperation *)appendMessageOperationWithFolder:(NSString *)folder + contentsAtPath:(NSString *)path + flags:(MCOMessageFlag)flags + customFlags:(NSArray *)customFlags; + +/** + Returns an operation to copy messages to a folder. + + MCOIMAPCopyMessagesOperation * op = [session copyMessagesOperationWithFolder:@"INBOX" + uids:[MCIndexSet indexSetWithIndex:456] + destFolder:@"Cocoa"]; + [op start:^(NSError * __nullable error, NSDictionary * uidMapping) { + NSLog(@"copied to folder with UID mapping %@", uidMapping); + }]; +*/ +- (MCOIMAPCopyMessagesOperation *)copyMessagesOperationWithFolder:(NSString *)folder + uids:(MCOIndexSet *)uids + destFolder:(NSString *)destFolder NS_RETURNS_NOT_RETAINED; + +/** + Returns an operation to move messages to a folder. + + MCOIMAPMoveMessagesOperation * op = [session moveMessagesOperationWithFolder:@"INBOX" + uids:[MCIndexSet indexSetWithIndex:456] + destFolder:@"Cocoa"]; + [op start:^(NSError * __nullable error, NSDictionary * uidMapping) { + NSLog(@"moved to folder with UID mapping %@", uidMapping); + }]; +*/ +- (MCOIMAPMoveMessagesOperation *)moveMessagesOperationWithFolder:(NSString *)folder + uids:(MCOIndexSet *)uids + destFolder:(NSString *)destFolder NS_RETURNS_NOT_RETAINED; + +/** + Returns an operation to change flags of messages. + + For example: Adds the seen flag to the message with UID 456. + + MCOIMAPOperation * op = [session storeFlagsOperationWithFolder:@"INBOX" + uids:[MCOIndexSet indexSetWithIndex:456] + kind:MCOIMAPStoreFlagsRequestKindAdd + flags:MCOMessageFlagSeen]; + [op start:^(NSError * __nullable error) { + ... + }]; +*/ +- (MCOIMAPOperation *) storeFlagsOperationWithFolder:(NSString *)folder + uids:(MCOIndexSet *)uids + kind:(MCOIMAPStoreFlagsRequestKind)kind + flags:(MCOMessageFlag)flags; + +/** + Returns an operation to change flags of messages, using IMAP sequence number. + + For example: Adds the seen flag to the message with the sequence number number 42. + + MCOIMAPOperation * op = [session storeFlagsOperationWithFolder:@"INBOX" + numbers:[MCOIndexSet indexSetWithIndex:42] + kind:MCOIMAPStoreFlagsRequestKindAdd + flags:MCOMessageFlagSeen]; + [op start:^(NSError * __nullable error) { + ... + }]; + */ +- (MCOIMAPOperation *) storeFlagsOperationWithFolder:(NSString *)folder + numbers:(MCOIndexSet *)numbers + kind:(MCOIMAPStoreFlagsRequestKind)kind + flags:(MCOMessageFlag)flags; + +/** + Returns an operation to change flags and custom flags of messages. + + For example: Adds the seen flag and $CNS-Greeting-On flag to the message with UID 456. + + MCOIMAPOperation * op = [session storeFlagsOperationWithFolder:@"INBOX" + uids:[MCOIndexSet indexSetWithIndex:456] + kind:MCOIMAPStoreFlagsRequestKindAdd + flags:MCOMessageFlagSeen + customFlags:@["$CNS-Greeting-On"]]; + [op start:^(NSError * __nullable error) { + ... + }]; + */ +- (MCOIMAPOperation *) storeFlagsOperationWithFolder:(NSString *)folder + uids:(MCOIndexSet *)uids + kind:(MCOIMAPStoreFlagsRequestKind)kind + flags:(MCOMessageFlag)flags + customFlags:(NSArray *)customFlags; + + +/** + Returns an operation to change flags and custom flags of messages, using IMAP sequence number. + + For example: Adds the seen flag and $CNS-Greeting-On flag to the message with the sequence number 42. + + MCOIMAPOperation * op = [session storeFlagsOperationWithFolder:@"INBOX" + numbers:[MCOIndexSet indexSetWithIndex:42] + kind:MCOIMAPStoreFlagsRequestKindAdd + flags:MCOMessageFlagSeen + customFlags:@["$CNS-Greeting-On"]]; + [op start:^(NSError * __nullable error) { + ... + }]; + */ +- (MCOIMAPOperation *) storeFlagsOperationWithFolder:(NSString *)folder + numbers:(MCOIndexSet *)numbers + kind:(MCOIMAPStoreFlagsRequestKind)kind + flags:(MCOMessageFlag)flags + customFlags:(NSArray *)customFlags; + +/** + Returns an operation to change labels of messages. Intended for Gmail + + For example: Adds the label "Home" flag to the message with UID 42. + + MCOIMAPOperation * op = [session storeLabelsOperationWithFolder:@"INBOX" + numbers:[MCOIndexSet indexSetWithIndex:42] + kind:MCOIMAPStoreFlagsRequestKindAdd + labels:[NSArray arrayWithObject:@"Home"]]; + [op start:^(NSError * __nullable error) { + ... + }]; +*/ +- (MCOIMAPOperation *) storeLabelsOperationWithFolder:(NSString *)folder + numbers:(MCOIndexSet *)numbers + kind:(MCOIMAPStoreFlagsRequestKind)kind + labels:(NSArray *)labels; + +/** + Returns an operation to change labels of messages. Intended for Gmail + + For example: Adds the label "Home" flag to the message with UID 456. + + MCOIMAPOperation * op = [session storeLabelsOperationWithFolder:@"INBOX" + uids:[MCOIndexSet indexSetWithIndex:456] + kind:MCOIMAPStoreFlagsRequestKindAdd + labels:[NSArray arrayWithObject:@"Home"]]; + [op start:^(NSError * __nullable error) { + ... + }]; +*/ +- (MCOIMAPOperation *) storeLabelsOperationWithFolder:(NSString *)folder + uids:(MCOIndexSet *)uids + kind:(MCOIMAPStoreFlagsRequestKind)kind + labels:(NSArray *)labels; + +/** @name Fetching Messages */ + +/** + Returns an operation to fetch messages by UID. + + MCOIMAPFetchMessagesOperation * op = [session fetchMessagesByUIDOperationWithFolder:@"INBOX" + requestKind:MCOIMAPMessagesRequestKindHeaders | MCOIMAPMessagesRequestKindStructure + uids:MCORangeMake(1, UINT64_MAX)]; + [op start:^(NSError * __nullable error, NSArray * messages, MCOIndexSet * vanishedMessages) { + for(MCOIMAPMessage * msg in messages) { + NSLog(@"%lu: %@", [msg uid], [msg header]); + } + }]; +*/ +- (MCOIMAPFetchMessagesOperation *) fetchMessagesByUIDOperationWithFolder:(NSString *)folder + requestKind:(MCOIMAPMessagesRequestKind)requestKind + uids:(MCOIndexSet *)uids DEPRECATED_ATTRIBUTE; + +/** + Returns an operation to fetch messages by UID. + + MCOIMAPFetchMessagesOperation * op = [session fetchMessagesOperationWithFolder:@"INBOX" + requestKind:MCOIMAPMessagesRequestKindHeaders | MCOIMAPMessagesRequestKindStructure + uids:MCORangeMake(1, UINT64_MAX)]; + [op start:^(NSError * __nullable error, NSArray * messages, MCOIndexSet * vanishedMessages) { + for(MCOIMAPMessage * msg in messages) { + NSLog(@"%lu: %@", [msg uid], [msg header]); + } + }]; +*/ +- (MCOIMAPFetchMessagesOperation *) fetchMessagesOperationWithFolder:(NSString *)folder + requestKind:(MCOIMAPMessagesRequestKind)requestKind + uids:(MCOIndexSet *)uids; + +/** + Returns an operation to fetch messages by (sequence) number. + For example: show 50 most recent uids. + NSString *folder = @"INBOX"; + MCOIMAPFolderInfoOperation *folderInfo = [session folderInfoOperation:folder]; + + [folderInfo start:^(NSError *error, MCOIMAPFolderInfo *info) { + int numberOfMessages = 50; + numberOfMessages -= 1; + MCOIndexSet *numbers = [MCOIndexSet indexSetWithRange:MCORangeMake([info messageCount] - numberOfMessages, numberOfMessages)]; + + MCOIMAPFetchMessagesOperation *fetchOperation = [session fetchMessagesByNumberOperationWithFolder:folder + requestKind:MCOIMAPMessagesRequestKindUid + numbers:numbers]; + + [fetchOperation start:^(NSError *error, NSArray *messages, MCOIndexSet *vanishedMessages) { + for (MCOIMAPMessage * message in messages) { + NSLog(@"%u", [message uid]); + } + }]; + }]; +*/ +- (MCOIMAPFetchMessagesOperation *) fetchMessagesByNumberOperationWithFolder:(NSString *)folder + requestKind:(MCOIMAPMessagesRequestKind)requestKind + numbers:(MCOIndexSet *)numbers; + +/** + Returns an operation to sync the last changes related to the given message list given a modSeq. + + MCOIMAPFetchMessagesOperation * op = [session syncMessagesByUIDWithFolder:@"INBOX" + requestKind:MCOIMAPMessagesRequestKindUID + uids:MCORangeMake(1, UINT64_MAX) + modSeq:lastModSeq]; + [op start:^(NSError * __nullable error, NSArray * messages, MCOIndexSet * vanishedMessages) { + NSLog(@"added or modified messages: %@", messages); + NSLog(@"deleted messages: %@", vanishedMessages); + }]; + +@warn *Important*: This is only for servers that support Conditional Store. See [RFC4551](http://tools.ietf.org/html/rfc4551) +vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162](http://tools.ietf.org/html/rfc5162) +*/ +- (MCOIMAPFetchMessagesOperation *) syncMessagesByUIDWithFolder:(NSString *)folder + requestKind:(MCOIMAPMessagesRequestKind)requestKind + uids:(MCOIndexSet *)uids + modSeq:(uint64_t)modSeq DEPRECATED_ATTRIBUTE; + +/** + Returns an operation to sync the last changes related to the given message list given a modSeq. + + MCOIMAPFetchMessagesOperation * op = [session syncMessagesWithFolder:@"INBOX" + requestKind:MCOIMAPMessagesRequestKindUID + uids:MCORangeMake(1, UINT64_MAX) + modSeq:lastModSeq]; + [op start:^(NSError * __nullable error, NSArray * messages, MCOIndexSet * vanishedMessages) { + NSLog(@"added or modified messages: %@", messages); + NSLog(@"deleted messages: %@", vanishedMessages); + }]; + +@warn *Important*: This is only for servers that support Conditional Store. See [RFC4551](http://tools.ietf.org/html/rfc4551) +vanishedMessages will be set only for servers that support QRESYNC. See [RFC5162](http://tools.ietf.org/html/rfc5162) +*/ +- (MCOIMAPFetchMessagesOperation *) syncMessagesWithFolder:(NSString *)folder + requestKind:(MCOIMAPMessagesRequestKind)requestKind + uids:(MCOIndexSet *)uids + modSeq:(uint64_t)modSeq; + +/** + Returns an operation to fetch the content of a message. + @param urgent is set to YES, an additional connection to the same folder might be opened to fetch the content. + + MCOIMAPFetchContentOperation * op = [session fetchMessageByUIDOperationWithFolder:@"INBOX" uid:456 urgent:NO]; + [op start:^(NSError * __nullable error, NSData * messageData) { + MCOMessageParser * parser = [MCOMessageParser messageParserWithData:messageData] + ... + }]; +*/ +- (MCOIMAPFetchContentOperation *) fetchMessageByUIDOperationWithFolder:(NSString *)folder + uid:(uint32_t)uid + urgent:(BOOL)urgent DEPRECATED_ATTRIBUTE; + +/** + Returns an operation to fetch the content of a message. + + MCOIMAPFetchContentOperation * op = [session fetchMessageByUIDOperationWithFolder:@"INBOX" uid:456]; + [op start:^(NSError * __nullable error, NSData * messageData) { + MCOMessageParser * parser = [MCOMessageParser messageParserWithData:messageData] + ... + }]; +*/ +- (MCOIMAPFetchContentOperation *) fetchMessageByUIDOperationWithFolder:(NSString *)folder + uid:(uint32_t)uid DEPRECATED_ATTRIBUTE; + +/** + Returns an operation to fetch the content of a message. + @param urgent is set to YES, an additional connection to the same folder might be opened to fetch the content. + + MCOIMAPFetchContentOperation * op = [session fetchMessageOperationWithFolder:@"INBOX" uid:456 urgent:NO]; + [op start:^(NSError * __nullable error, NSData * messageData) { + MCOMessageParser * parser = [MCOMessageParser messageParserWithData:messageData] + ... + }]; + */ +- (MCOIMAPFetchContentOperation *) fetchMessageOperationWithFolder:(NSString *)folder + uid:(uint32_t)uid + urgent:(BOOL)urgent; + +/** + Returns an operation to fetch the content of a message. + + MCOIMAPFetchContentOperation * op = [session fetchMessageOperationWithFolder:@"INBOX" uid:456]; + [op start:^(NSError * __nullable error, NSData * messageData) { + MCOMessageParser * parser = [MCOMessageParser messageParserWithData:messageData] + ... + }]; + */ +- (MCOIMAPFetchContentOperation *) fetchMessageOperationWithFolder:(NSString *)folder + uid:(uint32_t)uid; + +/** + Returns an operation to fetch the content of a message, using IMAP sequence number. + @param urgent is set to YES, an additional connection to the same folder might be opened to fetch the content. + + MCOIMAPFetchContentOperation * op = [session fetchMessageOperationWithFolder:@"INBOX" number:42 urgent:NO]; + [op start:^(NSError * __nullable error, NSData * messageData) { + MCOMessageParser * parser = [MCOMessageParser messageParserWithData:messageData] + ... + }]; +*/ +- (MCOIMAPFetchContentOperation *) fetchMessageOperationWithFolder:(NSString *)folder + number:(uint32_t)number + urgent:(BOOL)urgent; + +/** + Returns an operation to fetch the content of a message, using IMAP sequence number. + + MCOIMAPFetchContentOperation * op = [session fetchMessageOperationWithFolder:@"INBOX" number:42]; + [op start:^(NSError * __nullable error, NSData * messageData) { + MCOMessageParser * parser = [MCOMessageParser messageParserWithData:messageData] + ... + }]; +*/ +- (MCOIMAPFetchContentOperation *) fetchMessageOperationWithFolder:(NSString *)folder + number:(uint32_t)number; + +/** + Returns an operation to fetch the parsed content of a message. + @param urgent is set to YES, an additional connection to the same folder might be opened to fetch the content. + + MCOIMAPFetchParsedContentOperation * op = [session fetchParsedMessageOperationWithFolder:@"INBOX" uid:456 urgent:NO]; + [op start:^(NSError * __nullable error, MCOMessageParser * parser) { + + ... + }]; + */ +- (MCOIMAPFetchParsedContentOperation *) fetchParsedMessageOperationWithFolder:(NSString *)folder + uid:(uint32_t)uid + urgent:(BOOL)urgent; + +/** + Returns an operation to fetch the parsed content of a message. + + MCOIMAPFetchParsedContentOperation * op = [session fetchParsedMessageOperationWithFolder:@"INBOX" uid:456]; + [op start:^(NSError * __nullable error, MCOMessageParser * parser) { + + ... + }]; + */ +- (MCOIMAPFetchParsedContentOperation *) fetchParsedMessageOperationWithFolder:(NSString *)folder + uid:(uint32_t)uid; + +/** + Returns an operation to fetch the parsed content of a message, using IMAP sequence number. + @param urgent is set to YES, an additional connection to the same folder might be opened to fetch the content. + + MCOIMAPFetchParsedContentOperation * op = [session fetchParsedMessageOperationWithFolder:@"INBOX" number:42 urgent:NO]; + [op start:^(NSError * __nullable error, MCOMessageParser * parser) { + + ... + }]; + */ +- (MCOIMAPFetchParsedContentOperation *) fetchParsedMessageOperationWithFolder:(NSString *)folder + number:(uint32_t)number + urgent:(BOOL)urgent; + +/** + Returns an operation to fetch the parsed content of a message, using IMAP sequence number. + + MCOIMAPFetchParsedContentOperation * op = [session fetchParsedMessageOperationWithFolder:@"INBOX" number:42]; + [op start:^(NSError * __nullable error, MCOMessageParser * parser) { + + ... + }]; + */ +- (MCOIMAPFetchParsedContentOperation *) fetchParsedMessageOperationWithFolder:(NSString *)folder + number:(uint32_t)number; + +/** @name Fetching Attachment Operations */ + +/** + Returns an operation to fetch an attachment. + @param urgent is set to YES, an additional connection to the same folder might be opened to fetch the content. + + MCOIMAPFetchContentOperation * op = [session fetchMessageAttachmentByUIDOperationWithFolder:@"INBOX" + uid:456 + partID:@"1.2" + encoding:MCOEncodingBase64 + urgent:YES]; + [op start:^(NSError * __nullable error, NSData * partData) { + ... + }]; +*/ +- (MCOIMAPFetchContentOperation *) fetchMessageAttachmentByUIDOperationWithFolder:(NSString *)folder + uid:(uint32_t)uid + partID:(NSString *)partID + encoding:(MCOEncoding)encoding + urgent:(BOOL)urgent DEPRECATED_ATTRIBUTE; + +/** + Returns an operation for custom command. + @param command is the text representation of the command to be send. + + + MCOIMAPCustomCommandOperation * op = [session customCommandOperation:@"ACTIVATE SERVICE"]; + [op start: ^(NSString * __nullable response, NSError * __nullable error) { + ... + }]; + */ +- (MCOIMAPCustomCommandOperation *) customCommandOperation:(NSString *)command; + +/** + Returns an operation to fetch an attachment. + + Example 1: + + MCOIMAPFetchContentOperation * op = [session fetchMessageAttachmentByUIDOperationWithFolder:@"INBOX" + uid:456 + partID:@"1.2" + encoding:MCOEncodingBase64]; + [op start:^(NSError * __nullable error, NSData * partData) { + ... + }]; + + Example 2: + + MCOIMAPFetchContentOperation * op = [session fetchMessageAttachmentByUIDOperationWithFolder:@"INBOX" + uid:[message uid] + partID:[part partID] + encoding:[part encoding]]; + [op start:^(NSError * __nullable error, NSData * partData) { + ... + }]; +*/ +- (MCOIMAPFetchContentOperation *) fetchMessageAttachmentByUIDOperationWithFolder:(NSString *)folder + uid:(uint32_t)uid + partID:(NSString *)partID + encoding:(MCOEncoding)encoding DEPRECATED_ATTRIBUTE; + +/** + Returns an operation to fetch an attachment. + @param urgent is set to YES, an additional connection to the same folder might be opened to fetch the content. + + MCOIMAPFetchContentOperation * op = [session fetchMessageAttachmentOperationWithFolder:@"INBOX" + uid:456 + partID:@"1.2" + encoding:MCOEncodingBase64 + urgent:YES]; + [op start:^(NSError * __nullable error, NSData * partData) { + ... + }]; +*/ +- (MCOIMAPFetchContentOperation *) fetchMessageAttachmentOperationWithFolder:(NSString *)folder + uid:(uint32_t)uid + partID:(NSString *)partID + encoding:(MCOEncoding)encoding + urgent:(BOOL)urgent; + +/** + Returns an operation to fetch an attachment. + + Example 1: + + MCOIMAPFetchContentOperation * op = [session fetchMessageAttachmentOperationWithFolder:@"INBOX" + uid:456 + partID:@"1.2" + encoding:MCOEncodingBase64]; + [op start:^(NSError * __nullable error, NSData * partData) { + ... + }]; + + Example 2: + + MCOIMAPFetchContentOperation * op = [session fetchMessageAttachmentOperationWithFolder:@"INBOX" + uid:[message uid] + partID:[part partID] + encoding:[part encoding]]; + [op start:^(NSError * __nullable error, NSData * partData) { + ... + }]; +*/ +- (MCOIMAPFetchContentOperation *) fetchMessageAttachmentOperationWithFolder:(NSString *)folder + uid:(uint32_t)uid + partID:(NSString *)partID + encoding:(MCOEncoding)encoding; + +/** + Returns an operation to fetch an attachment. + @param urgent is set to YES, an additional connection to the same folder might be opened to fetch the content. + + MCOIMAPFetchContentOperation * op = [session fetchMessageAttachmentOperationWithFolder:@"INBOX" + uid:456 + partID:@"1.2" + encoding:MCOEncodingBase64 + urgent:YES]; + [op start:^(NSError * __nullable error, NSData * partData) { + ... + }]; +*/ +- (MCOIMAPFetchContentOperation *) fetchMessageAttachmentOperationWithFolder:(NSString *)folder + number:(uint32_t)number + partID:(NSString *)partID + encoding:(MCOEncoding)encoding + urgent:(BOOL)urgent; + +/** + Returns an operation to fetch an attachment. + + Example 1: + + MCOIMAPFetchContentOperation * op = [session fetchMessageAttachmentOperationWithFolder:@"INBOX" + number:42 + partID:@"1.2" + encoding:MCOEncodingBase64]; + [op start:^(NSError * __nullable error, NSData * partData) { + ... + }]; + + Example 2: + + MCOIMAPFetchContentOperation * op = [session fetchMessageAttachmentOperationWithFolder:@"INBOX" + number:[message sequenceNumber] + partID:[part partID] + encoding:[part encoding]]; + [op start:^(NSError * __nullable error, NSData * partData) { + ... + }]; +*/ +- (MCOIMAPFetchContentOperation *) fetchMessageAttachmentOperationWithFolder:(NSString *)folder + number:(uint32_t)number + partID:(NSString *)partID + encoding:(MCOEncoding)encoding; + +/** + Returns an operation to fetch an attachment to a file. + @param urgent is set to YES, an additional connection to the same folder might be opened to fetch the content. + Operation will be perform in a memory efficient manner. + + MCOIMAPFetchContentToFileOperation * op = [session fetchMessageAttachmentToFileOperationWithFolder:@"INBOX" + uid:456 + partID:@"1.2" + encoding:MCOEncodingBase64 + filename:filename + urgent:YES]; + + // Optionally, explicitly enable chunked mode + [op setLoadingByChunksEnabled:YES]; + [op setChunksSize:1024*1024]; + // need in chunked mode for correct progress indication + [op setEstimatedSize:sizeOfAttachFromBodystructure]; + + [op start:^(NSError * __nullable error) { + ... + }]; + + */ +- (MCOIMAPFetchContentToFileOperation *) fetchMessageAttachmentToFileOperationWithFolder:(NSString *)folder + uid:(uint32_t)uid + partID:(NSString *)partID + encoding:(MCOEncoding)encoding + filename:(NSString *)filename + urgent:(BOOL)urgent; + + +/** @name General IMAP Actions */ + +/** + Returns an operation to wait for something to happen in the folder. + See [RFC2177](http://tools.ietf.org/html/rfc2177) for me info. + + MCOIMAPIdleOperation * op = [session idleOperationWithFolder:@"INBOX" + lastKnownUID:0]; + [op start:^(NSError * __nullable error) { + ... + }]; +*/ +- (MCOIMAPIdleOperation *) idleOperationWithFolder:(NSString *)folder + lastKnownUID:(uint32_t)lastKnownUID; + +/** + Returns an operation to fetch the list of namespaces. + + MCOIMAPFetchNamespaceOperation * op = [session fetchNamespaceOperation]; + [op start:^(NSError * __nullable error, NSDictionary * namespaces) { + if (error != nil) + return; + MCOIMAPNamespace * ns = [namespace objectForKey:MCOIMAPNamespacePersonal]; + NSString * path = [ns pathForComponents:[NSArray arrayWithObject:]]; + MCOIMAPOperation * createOp = [session createFolderOperation:foobar]; + [createOp start:^(NSError * __nullable error) { + ... + }]; + }]; +*/ +- (MCOIMAPFetchNamespaceOperation *) fetchNamespaceOperation; + +/** + Returns an operation to send the client or get the server identity. + + MCOIMAPIdentity * identity = [MCOIMAPIdentity identityWithVendor:@"Mozilla" name:@"Thunderbird" version:@"17.0.5"]; + MCOIMAPIdentityOperation * op = [session identityOperationWithClientIdentity:identity]; + [op start:^(NSError * __nullable error, NSDictionary * serverIdentity) { + ... + }]; +*/ +- (MCOIMAPIdentityOperation *) identityOperationWithClientIdentity:(MCOIMAPIdentity *)identity; + +/** + Returns an operation that will connect to the given IMAP server without authenticating. + Useful for checking initial server capabilities. + + MCOIMAPOperation * op = [session connectOperation]; + [op start:^(NSError * __nullable error) { + ... + }]; + */ +- (MCOIMAPOperation *)connectOperation; + +/** + Returns an operation that will perform a No-Op operation on the given IMAP server. + + MCOIMAPOperation * op = [session noopOperation]; + [op start:^(NSError * __nullable error) { + ... + }]; + */ +- (MCOIMAPOperation *) noopOperation; + +/** + Returns an operation that will check whether the IMAP account is valid. + + MCOIMAPOperation * op = [session checkAccountOperation]; + [op start:^(NSError * __nullable error) { + ... + }]; +*/ + +- (MCOIMAPOperation *) checkAccountOperation; + +/** + Returns an operation to request capabilities of the server. + See MCOIMAPCapability for the list of capabilities. + + canIdle = NO; + MCOIMAPCapabilityOperation * op = [session capabilityOperation]; + [op start:^(NSError * __nullable error, MCOIndexSet * capabilities) { + if ([capabilities containsIndex:MCOIMAPCapabilityIdle]) { + canIdle = YES; + } + }]; +*/ +- (MCOIMAPCapabilityOperation *) capabilityOperation; + +- (MCOIMAPQuotaOperation *) quotaOperation; + +/** @name Search Operations */ + +/** + Returns an operation to search for messages with a simple match. + + MCOIMAPSearchOperation * op = [session searchOperationWithFolder:@"INBOX" + kind:MCOIMAPSearchKindFrom + searchString:@"laura"]; + [op start:^(NSError * __nullable error, MCOIndexSet * searchResult) { + ... + }]; +*/ +- (MCOIMAPSearchOperation *) searchOperationWithFolder:(NSString *)folder + kind:(MCOIMAPSearchKind)kind + searchString:(NSString *)searchString; + +/** + Returns an operation to search for messages. + + MCOIMAPSearchExpression * expr = [MCOIMAPSearchExpression searchFrom:@"laura@etpan.org"] + MCOIMAPSearchOperation * op = [session searchExpressionOperationWithFolder:@"INBOX" + expression:expr]; + [op start:^(NSError * __nullable error, MCOIndexSet * searchResult) { + ... + }]; +*/ +- (MCOIMAPSearchOperation *) searchExpressionOperationWithFolder:(NSString *)folder + expression:(MCOIMAPSearchExpression *)expression; + +/** @name Rendering Operations */ + +/** + Returns an operation to render the HTML version of a message to be displayed in a web view. + + MCOIMAPMessageRenderingOperation * op = [session htmlRenderingOperationWithMessage:msg + folder:@"INBOX"]; + + [op start:^(NSString * htmlString, NSError * error) { + ... + }]; +*/ +- (MCOIMAPMessageRenderingOperation *) htmlRenderingOperationWithMessage:(MCOIMAPMessage *)message + folder:(NSString *)folder; + +/** + Returns an operation to render the HTML body of a message to be displayed in a web view. + + MCOIMAPMessageRenderingOperation * op = [session htmlBodyRenderingOperationWithMessage:msg + folder:@"INBOX"]; + + [op start:^(NSString * htmlString, NSError * error) { + ... + }]; + */ +- (MCOIMAPMessageRenderingOperation *) htmlBodyRenderingOperationWithMessage:(MCOIMAPMessage *)message + folder:(NSString *)folder; + +/** + Returns an operation to render the plain text version of a message. + + MCOIMAPMessageRenderingOperation * op = [session plainTextRenderingOperationWithMessage:msg + folder:@"INBOX"]; + + [op start:^(NSString * htmlString, NSError * error) { + ... + }]; + */ +- (MCOIMAPMessageRenderingOperation *) plainTextRenderingOperationWithMessage:(MCOIMAPMessage *)message + folder:(NSString *)folder; + +/** + Returns an operation to render the plain text body of a message. + All end of line will be removed and white spaces cleaned up if requested. + This method can be used to generate the summary of the message. + + MCOIMAPMessageRenderingOperation * op = [session plainTextBodyRenderingOperationWithMessage:msg + folder:@"INBOX" + stripWhitespace:YES]; + + [op start:^(NSString * htmlString, NSError * error) { + ... + }]; + */ +- (MCOIMAPMessageRenderingOperation *) plainTextBodyRenderingOperationWithMessage:(MCOIMAPMessage *)message + folder:(NSString *)folder + stripWhitespace:(BOOL)stripWhitespace; + +/** + Returns an operation to render the plain text body of a message. + All end of line will be removed and white spaces cleaned up. + This method can be used to generate the summary of the message. + + MCOIMAPMessageRenderingOperation * op = [session plainTextBodyRenderingOperationWithMessage:msg + folder:@"INBOX"]; + + [op start:^(NSString * htmlString, NSError * error) { + ... + }]; + */ +- (MCOIMAPMessageRenderingOperation *) plainTextBodyRenderingOperationWithMessage:(MCOIMAPMessage *)message + folder:(NSString *)folder; + +/** + Returns an operation to disconnect the session. + It will disconnect all the sockets created by the session. + + MCOIMAPOperation * op = [session disconnectOperation]; + [op start:^(NSError * __nullable error) { + ... + }]; + */ +- (MCOIMAPOperation *) disconnectOperation; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIndexSet.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIndexSet.h new file mode 100644 index 0000000000000000000000000000000000000000..3705fa3a3eb2aabd58c795ce07eba1c83bdac313 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOIndexSet.h @@ -0,0 +1,74 @@ +// +// MCOIndexSet.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/23/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOINDEXSET_H + +#define MAILCORE_MCOINDEXSET_H + +#import <Foundation/Foundation.h> + +#import <MailCore/MCORange.h> + +/** similar to NSMutableIndexSet but supports int64_t. MCORange has a location (uint64_t) and length (uint64_t). */ + +@interface MCOIndexSet : NSObject <NSCopying, NSCoding> + +/** Creates an empty index set.*/ ++ (MCOIndexSet *) indexSet; + +/** Creates an index set that contains a range of integers.*/ ++ (MCOIndexSet *) indexSetWithRange:(MCORange)range; + +/** Creates an index set with a single integer.*/ ++ (MCOIndexSet *) indexSetWithIndex:(uint64_t)idx; + +/** Returns the number of integers in that index set.*/ +- (unsigned int) count; + +/** Adds an integer to the index set.*/ +- (void) addIndex:(uint64_t)idx; + +/** Removes an integer from the index set.*/ +- (void) removeIndex:(uint64_t)idx; + +/** Returns YES if the index set contains the given integer.*/ +- (BOOL) containsIndex:(uint64_t)idx; + +/** Adds a range of integers to the index set.*/ +- (void) addRange:(MCORange)range; + +/** Removes a range of integers from the index set.*/ +- (void) removeRange:(MCORange)range; + +/** Removes all integers that are not in the given range.*/ +- (void) intersectsRange:(MCORange)range; + +/** Adds all indexes from an other index set to the index set.*/ +- (void) addIndexSet:(MCOIndexSet *)indexSet; + +/** Remove all indexes from an other index set from the index set.*/ +- (void) removeIndexSet:(MCOIndexSet *)indexSet; + +/** Removes all integers that are not in the given index set.*/ +- (void) intersectsIndexSet:(MCOIndexSet *)indexSet; + +/** Returns all the ranges of ths index set.*/ +- (MCORange *) allRanges; + +/** Returns the number of ranges in this index set.*/ +- (unsigned int) rangesCount; + +/** Enumerates all the indexes of the index set.*/ +- (void) enumerateIndexes:(void (^)(uint64_t idx))block; + +/** Returns an NSIndexSet from a MCOIndexSet */ +- (NSIndexSet *) nsIndexSet; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMailProvider.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMailProvider.h new file mode 100644 index 0000000000000000000000000000000000000000..513d568ee34c92ea2b7732cadf2501fa029408c5 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMailProvider.h @@ -0,0 +1,95 @@ +// +// MCOMailProvider.h +// mailcore2 +// +// Created by Robert Widmann on 4/28/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#import <Foundation/Foundation.h> + +/** + Represents a email service provider, like for example Gmail, Yahoo, Fastmail.fm etc. +*/ + +@interface MCOMailProvider : NSObject + +@property (nonatomic, copy) NSString * identifier; + +- (instancetype) initWithInfo:(NSDictionary *)info; + +/** + A list of ways that you can connect to the IMAP server + @return An array of MCONetService +*/ +- (NSArray * /* MCONetService */) imapServices; + +/** + A list of ways that you can connect to the SMTP server + @return An array of MCONetService +*/ +- (NSArray * /* MCONetService */) smtpServices; + +/** + A list of ways that you can connect to the POP3 server + @return An array of MCONetService +*/ +- (NSArray * /* MCONetService */) popServices; + +- (BOOL) matchEmail:(NSString *)email; +- (BOOL) matchMX:(NSString *)hostname; + +/** + Where sent mail is stored on the IMAP server + @return Returns nil if it is unknown +*/ +- (NSString *) sentMailFolderPath; + +/** + Where starred mail is stored on the IMAP server. + This only applies to some servers like Gmail + @return Returns nil if it is unknown +*/ +- (NSString *) starredFolderPath; + +/** + Where all mail or the archive folder is stored on the IMAP server + @return Returns nil if it is unknown +*/ +- (NSString *) allMailFolderPath; + +/** + Where trash is stored on the IMAP server + @return Returns nil if it is unknown +*/ +- (NSString *) trashFolderPath; + +/** + Where draft messages are stored on the IMAP server + @return Returns nil if it is unknown +*/ +- (NSString *) draftsFolderPath; + +/** + Where spam messages are stored on the IMAP server + @return Returns nil if it is unknown +*/ +- (NSString *) spamFolderPath; + +/** + Where important messages are stored on the IMAP server + This only applies to some servers, like Gmail + @return Returns nil if it is unknown +*/ +- (NSString *) importantFolderPath; + +@end + +@interface MCOMailProvider (MCOUnavailable) + +/** Do not invoke this directly. */ +- (instancetype) init NS_UNAVAILABLE; +/** Do not invoke this directly. */ ++ (instancetype) new NS_UNAVAILABLE; + +@end diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMailProvidersManager.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMailProvidersManager.h new file mode 100644 index 0000000000000000000000000000000000000000..09df25ad9ee4b42766c8b34dc137139c18f2fd8a --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMailProvidersManager.h @@ -0,0 +1,51 @@ +// +// MCOMailProvidersManager.h +// mailcore2 +// +// Created by Robert Widmann on 4/28/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#import <Foundation/Foundation.h> + +/** + This class is used to detect an email provider and it's associated + metadata either by MX record or by the email addresss. + + An app might want to use this during setup to limit the number of settings + a user has to input. +*/ + +@class MCOMailProvider; + +@interface MCOMailProvidersManager : NSObject + +/** The shared manager that is used for all lookups */ ++ (MCOMailProvidersManager *) sharedManager; + +/** + Given an email address will try to determine the provider + @return The email provider info or nil if it can't be determined. +*/ +- (MCOMailProvider *) providerForEmail:(NSString *)email; + +/** + Given the DNS MX record will try to determine the provider + @return The email provider info or nil if it can't be determined. +*/ +- (MCOMailProvider *) providerForMX:(NSString *)hostname; + +/** + Will return information about a provider. Useful if you already know the + provider (like if it has been determined previously) + @return The email provider info or nil if none matches +*/ +- (MCOMailProvider *) providerForIdentifier:(NSString *)identifier; + +/** + Registers the providers in the JSON file at the file path so they + can be used with MCOMailProvidersManager. + */ +- (void) registerProvidersWithFilename:(NSString *)filename; + +@end diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMessageBuilder.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMessageBuilder.h new file mode 100644 index 0000000000000000000000000000000000000000..fbebb7f62974215a1e4fe75f1bad509dc9f037f1 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMessageBuilder.h @@ -0,0 +1,101 @@ +// +// MCOMessageBuilder.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/22/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOMESSAGEBUILDER_H + +#define MAILCORE_MCOMESSAGEBUILDER_H + +#import <MailCore/MCOAbstractMessage.h> + +/** + This class will allow you to build a RFC 822 formatted message. + For example when you need to send a message using SMTP, + you need to generate first a RFC 822 formatted message. + This class will help you do that. + + MCOMessageBuilder * builder = [[MCOMessageBuilder alloc] init]; + [[builder header] setFrom:[MCOAddress addressWithDisplayName:@"Hoa V. DINH" mailbox:@"hoa@etpan.org"]; + NSArray * to = [NSArray arrayWithObject:[MCOAddress addressWithDisplayName:@"Gael Roualland" mailbox:@"gael@etpan.org"]]; + [[builder header] setTo:to]; + [[builder header] setSubject:@"A nice picture!"]; + [builder setHTMLBody:@"<div>Here's the message I need to send.</div>"]; + [builder addAttachment:[MCOAttachment attachmentWithContentsOfFile:@"/Users/foo/Pictures/image.jpg"]]; + NSData * rfc822Data = [builder data]; + +*/ + +@class MCOAttachment; +@protocol MCOHTMLRendererDelegate; + +@interface MCOMessageBuilder : MCOAbstractMessage <NSCopying> + +/** Main HTML content of the message.*/ +@property (nonatomic, copy, setter=setHTMLBody:) NSString * htmlBody; + +/** Plain text content of the message.*/ +@property (nonatomic, copy) NSString * textBody; + +/** List of file attachments.*/ +@property (nonatomic, copy) NSArray * /* MCOAttachment */ attachments; + +/** List of related file attachments (included as cid: link in the HTML part).*/ +@property (nonatomic, copy) NSArray * /* MCOAttachment */ relatedAttachments; + +/** Prefix for the boundary identifier. Default value is nil.*/ +@property (nonatomic, copy) NSString * boundaryPrefix; + +/** Add an attachment.*/ +- (void) addAttachment:(MCOAttachment *)attachment; + +/** Add a related attachment.*/ +- (void) addRelatedAttachment:(MCOAttachment *)attachment; + +/** RFC 822 formatted message.*/ +- (NSData *) data; + +/** RFC 822 formatted message for encryption.*/ +- (NSData *) dataForEncryption; + +/** Store RFC 822 formatted message to file. */ +- (BOOL) writeToFile:(NSString *)filename error:(NSError **)error; + +/** + Returns an OpenPGP signed message with a given signature. + The signature needs to be computed on the data returned by -dataForEncryption + before calling this method. + You could use http://www.netpgp.com to generate it. + */ +- (NSData *) openPGPSignedMessageDataWithSignatureData:(NSData *)signature; + +/** + Returns an OpenPGP encrypted message with a given encrypted data. + The encrypted data needs to be computed before calling this method. + You could use http://www.netpgp.com to generate it. + */ +- (NSData *) openPGPEncryptedMessageDataWithEncryptedData:(NSData *)encryptedData; + +/** HTML rendering of the message to be displayed in a web view. The delegate can be nil.*/ +- (NSString *) htmlRenderingWithDelegate:(id <MCOHTMLRendererDelegate>)delegate; + +/** HTML rendering of the body of the message to be displayed in a web view.*/ +- (NSString *) htmlBodyRendering; + +/** Text rendering of the message.*/ +- (NSString *) plainTextRendering; + +/** Text rendering of the body of the message. All end of line will be removed and white spaces cleaned up. + This method can be used to generate the summary of the message.*/ +- (NSString *) plainTextBodyRendering; + +/** Text rendering of the body of the message. All end of line will be removed and white spaces cleaned up if requested. + This method can be used to generate the summary of the message.*/ +- (NSString *) plainTextBodyRenderingAndStripWhitespace:(BOOL)stripWhitespace; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMessageHeader.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMessageHeader.h new file mode 100644 index 0000000000000000000000000000000000000000..e68cf33c85196399428310aff3f16e0f29d5ef4a --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMessageHeader.h @@ -0,0 +1,101 @@ +// +// MCOMessageHeader.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/10/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOMESSAGEHEADER_H + +#define MAILCORE_MCOMESSAGEHEADER_H + +#import <Foundation/Foundation.h> + +/** This class implements common fields of a message header.*/ + +@class MCOAddress; + +@interface MCOMessageHeader : NSObject <NSCopying, NSCoding> + +/** Message-ID field.*/ +@property (nonatomic, copy) NSString * messageID; + +/** Message-ID auto-generated flag.*/ +@property (nonatomic, readonly, getter=isMessageIDAutoGenerated) BOOL messageIDAutoGenerated; + +/** References field. It's an array of message-ids.*/ +@property (nonatomic, copy) NSArray * /* NSString */ references; + +/** In-Reply-To field. It's an array of message-ids.*/ +@property (nonatomic, copy) NSArray * /* NSString */ inReplyTo; + +/** Date field: sent date of the message.*/ +@property (nonatomic, strong) NSDate * date; + +/** Received date: received date of the message.*/ +@property (nonatomic, strong) NSDate * receivedDate; + +/** Sender field.*/ +@property (nonatomic, copy) MCOAddress * sender; + +/** From field: address of the sender of the message.*/ +@property (nonatomic, copy) MCOAddress * from; + +/** To field: recipient of the message. It's an array of MCOAddress.*/ +@property (nonatomic, copy) NSArray * /* MCOAddress */ to; + +/** Cc field: cc recipient of the message. It's an array of MCOAddress.*/ +@property (nonatomic, copy) NSArray * /* MCOAddress */ cc; + +/** Bcc field: bcc recipient of the message. It's an array of MCOAddress.*/ +@property (nonatomic, copy) NSArray * /* MCOAddress */ bcc; + +/** Reply-To field. It's an array of MCOAddress.*/ +@property (nonatomic, copy) NSArray * /* MCOAddress */ replyTo; + +/** Subject of the message.*/ +@property (nonatomic, copy) NSString * subject; + +/** Email user agent name: X-Mailer header.*/ +@property (nonatomic, copy) NSString * userAgent; + +/** Returns a header created from RFC 822 data.*/ ++ (MCOMessageHeader *) headerWithData:(NSData *)data; + +/** Initialize a header with RFC 822 data.*/ +- (instancetype) initWithData:(NSData *)data; + +/** Adds a custom header.*/ +- (void) setExtraHeaderValue:(NSString *)value forName:(NSString *)name; + +/** Remove a given custom header.*/ +- (void) removeExtraHeaderForName:(NSString *)name; + +/** Returns the value of a given custom header.*/ +- (NSString *) extraHeaderValueForName:(NSString *)name; + +/** Returns an array with the names of all custom headers.*/ +- (NSArray * /* NSString */) allExtraHeadersNames; + +/** Extracted subject (also remove square brackets).*/ +- (NSString *) extractedSubject; + +/** Extracted subject (don't remove square brackets).*/ +- (NSString *) partialExtractedSubject; + +/** Fill the header using the given RFC 822 data.*/ +- (void) importHeadersData:(NSData *)data; + +/** Returns a header that can be used as a base for a reply message.*/ +- (MCOMessageHeader *) replyHeaderWithExcludedRecipients:(NSArray * /* MCOAddress */)excludedRecipients; + +/** Returns a header that can be used as a base for a reply all message.*/ +- (MCOMessageHeader *) replyAllHeaderWithExcludedRecipients:(NSArray * /* MCOAddress */)excludedRecipients; + +/** Returns a header that can be used as a base for a forward message.*/ +- (MCOMessageHeader *) forwardHeader; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMessageParser.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMessageParser.h new file mode 100644 index 0000000000000000000000000000000000000000..c0e3f37c594456a71573826efe769a1406c44540 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMessageParser.h @@ -0,0 +1,57 @@ +// +// MCOMessageParser.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/22/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOMESSAGEPARSER_H + +#define MAILCORE_MCOMESSAGEPARSER_H + +/** + This class implements a parsed message. + When the full content of a message has been fetched using POP or IMAP, + you need to parse it. +*/ + +#import <MailCore/MCOAbstractMessage.h> + +@protocol MCOHTMLRendererDelegate; + +@interface MCOMessageParser : MCOAbstractMessage + +/** returns a parsed message from the given RFC 822 data.*/ ++ (MCOMessageParser *) messageParserWithData:(NSData *)data; + +/** data is the RFC 822 formatted message.*/ +- (instancetype) initWithData:(NSData *)data; +- (void) dealloc; + +/** It's the main part of the message. It can be MCOMessagePart, MCOMultipart or MCOAttachment.*/ +- (MCOAbstractPart *) mainPart; + +/** data of the RFC 822 formatted message. It's the input of the parser.*/ +- (NSData *) data; + +/** HTML rendering of the message to be displayed in a web view. delegate can be nil.*/ +- (NSString *) htmlRenderingWithDelegate:(id <MCOHTMLRendererDelegate>)delegate; + +/** HTML rendering of the body of the message to be displayed in a web view.*/ +- (NSString *) htmlBodyRendering; + +/** Text rendering of the message.*/ +- (NSString *) plainTextRendering; + +/** Text rendering of the body of the message. All end of line will be removed and white spaces cleaned up. + This method can be used to generate the summary of the message.*/ +- (NSString *) plainTextBodyRendering; + +/** Text rendering of the body of the message. All end of line will be removed and white spaces cleaned up if requested. + This method can be used to generate the summary of the message.*/ +- (NSString *) plainTextBodyRenderingAndStripWhitespace:(BOOL)stripWhitespace; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMessagePart.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMessagePart.h new file mode 100644 index 0000000000000000000000000000000000000000..5098e35f02ede1002af74ecb6ef67cf386a6e16d --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMessagePart.h @@ -0,0 +1,21 @@ +// +// MessagePart.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/22/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOMESSAGEPART_H + +#define MAILCORE_MCOMESSAGEPART_H + +#import <MailCore/MCOAbstractMessagePart.h> + +/** Message part parsed from RFC 822 message data. */ + +@interface MCOMessagePart : MCOAbstractMessagePart <NSCopying> + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMultipart.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMultipart.h new file mode 100644 index 0000000000000000000000000000000000000000..1b97a13f27a6784232c350013d44664ca3b9f3ba --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOMultipart.h @@ -0,0 +1,21 @@ +// +// MCOMultipart.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/22/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOMULTIPART_H + +#define MAILCORE_MCOMULTIPART_H + +#import <MailCore/MCOAbstractMultipart.h> + +/** Multipart parsed from RFC 822 message data. */ + +@interface MCOMultipart : MCOAbstractMultipart + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTP.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTP.h new file mode 100644 index 0000000000000000000000000000000000000000..62442c2a2852f84850aac9feeed9c5fe87a30b1e --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTP.h @@ -0,0 +1,24 @@ +// +// MCONNTP.h +// mailcore2 +// +// Created by Robert Widmann on 8/13/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCONNTP_H + +#define MAILCORE_MCONNTP_H + +#include <MailCore/MCONNTPSession.h> +#include <MailCore/MCONNTPOperation.h> +#include <MailCore/MCONNTPFetchHeaderOperation.h> +#include <MailCore/MCONNTPFetchArticleOperation.h> +#include <MailCore/MCONNTPFetchAllArticlesOperation.h> +#include <MailCore/MCONNTPListNewsgroupsOperation.h> +#include <MailCore/MCONNTPFetchOverviewOperation.h> +#include <MailCore/MCONNTPFetchServerTimeOperation.h> +#include <MailCore/MCONNTPPostOperation.h> +#include <MailCore/MCONNTPGroupInfo.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPFetchAllArticlesOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPFetchAllArticlesOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..022ce0592611bf5abacc43246a0f655eaac38fec --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPFetchAllArticlesOperation.h @@ -0,0 +1,37 @@ +// +// MCONNTPFetchAllArticlesOperation.h +// mailcore2 +// +// Created by Robert Widmann on 8/13/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCONNTPFETCHARTICLESOPERATION_H + +#define MAILCORE_MCONNTPFETCHARTICLESOPERATION_H + +#import <Foundation/Foundation.h> +#import <MailCore/MCONNTPOperation.h> + +@class MCOIndexSet; + +NS_ASSUME_NONNULL_BEGIN +/** This is an asynchronous operation that will fetch the list of a messages on the NNTP server. */ +@interface MCONNTPFetchAllArticlesOperation : MCONNTPOperation + +/** + Starts the asynchronous fetch operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `articles` will be an index set of article numbers. + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in MCOConstants.h, `articles` will be null + */ +- (void) start:(void (^)(NSError * __nullable error, MCOIndexSet * __nullable articles))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPFetchArticleOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPFetchArticleOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..78a974f451d4386e51f08737af63e5f76bc0f2ce --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPFetchArticleOperation.h @@ -0,0 +1,37 @@ +// +// MCONNTPFetchArticleOperation.h +// mailcore2 +// +// Created by Robert Widmann on 8/13/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCONNTPFETCHARTICLEOPERATION_H + +#define MAILCORE_MCONNTPFETCHARTICLEOPERATION_H + +#import <Foundation/Foundation.h> +#import <MailCore/MCONNTPOperation.h> + +NS_ASSUME_NONNULL_BEGIN +@interface MCONNTPFetchArticleOperation : MCONNTPOperation + +/** This block will be called as data is downloaded from the network */ +@property (nonatomic, copy) MCONNTPOperationProgressBlock progress; + +/** + Starts the asynchronous fetch operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `data` will contain the message data + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in MCOConstants.h, `data` will be nil + */ +- (void) start:(void (^)(NSError * __nullable error, NSData * __nullable messageData))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPFetchHeaderOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPFetchHeaderOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..d23c278c503a8bed179277b5e993138b3270e1f3 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPFetchHeaderOperation.h @@ -0,0 +1,41 @@ +// +// MCONNTPFetchHeaderOperation.h +// mailcore2 +// +// Created by Robert Widmann on 8/13/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCONNTPFETCHHEADEROPERATION_H + +#define MAILCORE_MCONNTPFETCHHEADEROPERATION_H + +#import <Foundation/Foundation.h> +#import <MailCore/MCONNTPOperation.h> + +/** + This is an asynchronous operation that will fetch the header of a message. + @See MCONNTPSession + */ + +@class MCOMessageHeader; + +NS_ASSUME_NONNULL_BEGIN +@interface MCONNTPFetchHeaderOperation : MCONNTPOperation + +/** + Starts the asynchronous fetch operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `header` will contain the message header + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in MCOConstants.h, `header` will be nil + */ +- (void) start:(void (^)(NSError * __nullable error, MCOMessageHeader * __nullable header))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPFetchOverviewOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPFetchOverviewOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..93a0b31f0191fa1329735e84793222c5e6bc1bd3 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPFetchOverviewOperation.h @@ -0,0 +1,35 @@ +// +// MCONNTPFetchOverviewOperation.h +// mailcore2 +// +// Created by Robert Widmann on 10/21/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCONNTPFETCHOVERVIEWOPERATION_H + +#define MAILCORE_MCONNTPFETCHOVERVIEWOPERATION_H + +#import <Foundation/Foundation.h> +#import <MailCore/MCONNTPOperation.h> + + +NS_ASSUME_NONNULL_BEGIN +@interface MCONNTPFetchOverviewOperation : MCONNTPOperation + +/** + Starts the asynchronous fetch operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `messages` will be an array of MCOMessageHeaders + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in MCOConstants.h, `messages` will be null + */ +- (void) start:(void (^)(NSError * __nullable error, NSArray * /* MCOMessageHeader */__nullable messages))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPFetchServerTimeOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPFetchServerTimeOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..38801810ea8bd3b6460cd87d49588cf7b6024f5f --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPFetchServerTimeOperation.h @@ -0,0 +1,37 @@ +// +// MCONNTPFetchServerTimeOperation.h +// mailcore2 +// +// Created by Robert Widmann on 10/21/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCONNTPFETCHSERVERTIMEOPERATION_H + +#define MAILCORE_MCONNTPFETCHSERVERTIMEOPERATION_H + +#import <Foundation/Foundation.h> +#import <MailCore/MCONNTPOperation.h> + +@class MCOIndexSet; + +NS_ASSUME_NONNULL_BEGIN +/** This is an asynchronous operation that will fetch the list of a messages on the NNTP server. */ +@interface MCONNTPFetchServerTimeOperation : MCONNTPOperation + +/** + Starts the asynchronous fetch operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `date` will be the server's date and time as an NSDate. + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in MCOConstants.h, `date` will be null + */ +- (void) start:(void (^)(NSError * __nullable error, NSDate * __nullable date))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPGroupInfo.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPGroupInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..e34445a9e0184815fdf6f92b341a39bb0472aa39 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPGroupInfo.h @@ -0,0 +1,27 @@ +// +// MCONNTPGroupInfo.h +// mailcore2 +// +// Created by Robert Widmann on 8/13/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCONNTPGROUPINFO_H + +#define MAILCORE_MCONNTPGROUPINFO_H + +#import <Foundation/Foundation.h> + +/** This is information of a message fetched by MCONNTPListNewsgroupsOperation.*/ + +@interface MCONNTPGroupInfo : NSObject <NSCopying> + +/** The name of the news group. */ +@property (nonatomic, copy) NSString *name; + +/** The number of messages in the news group. */ +@property (nonatomic, assign) unsigned int messageCount; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPListNewsgroupsOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPListNewsgroupsOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..9cba21d6fe07c031c5dcc71ccb6183091261d16f --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPListNewsgroupsOperation.h @@ -0,0 +1,34 @@ +// +// MCONNTPListNewsgroupsOperation.h +// mailcore2 +// +// Created by Robert Widmann on 8/13/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCONNTPLISTNEWSGROUPSOPERATION_H + +#define MAILCORE_MCONNTPLISTNEWSGROUPSOPERATION_H + +#import <Foundation/Foundation.h> +#import <MailCore/MCONNTPOperation.h> + +NS_ASSUME_NONNULL_BEGIN +@interface MCONNTPListNewsgroupsOperation : MCONNTPOperation + +/** + Starts the asynchronous fetch operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `messages` will be an array of MCONNTPGroupInfo + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in MCOConstants.h, `messages` will be null + */ +- (void) start:(void (^)(NSError * __nullable error, NSArray * /* MCONNTPGroupInfo */__nullable messages))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..0c35970fd8b2d6ac17790eecf6d00f81b22c70aa --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPOperation.h @@ -0,0 +1,43 @@ +// +// MCONNTPOperation.h +// mailcore2 +// +// Created by Robert Widmann on 8/13/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCONNTPOPERATION_H + +#define MAILCORE_MCONNTPOPERATION_H + +#import <Foundation/Foundation.h> +#import <MailCore/MCOOperation.h> + +/** Transmit a message using NNTP3 */ + +typedef void (^MCONNTPOperationProgressBlock)(unsigned int current, unsigned int maximum); + +/** + This is a generic asynchronous NNTP3 operation. + @see MCONNTPSession + */ + +NS_ASSUME_NONNULL_BEGIN +@interface MCONNTPOperation : MCOOperation + +/** + Starts the asynchronous operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in MCOConstants.h, + */ +- (void) start:(void (^)(NSError * __nullable error))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPPostOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPPostOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..a2447e70bfb87181959e47f7a5469d7161d35c8d --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPPostOperation.h @@ -0,0 +1,37 @@ +// +// MCONNTPPostOperation.h +// mailcore2 +// +// Created by Daryle Walker on 2/21/16. +// Copyright © 2016 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCONNTPPOSTOPERATION_H + +#define MAILCORE_MCONNTPPOSTOPERATION_H + +#import <Foundation/Foundation.h> +#import <MailCore/MCONNTPOperation.h> + +NS_ASSUME_NONNULL_BEGIN +@interface MCONNTPPostOperation : MCONNTPOperation + +/** This block will be called as data is downloaded from the network */ +@property (nonatomic, copy) MCONNTPOperationProgressBlock progress; + +/** + Starts the asynchronous send operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in MCOConstants.h + */ +- (void) start:(void (^)(NSError * __nullable error))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPSession.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPSession.h new file mode 100644 index 0000000000000000000000000000000000000000..19fe5ff466cc8914eccebc8ecfff5084bde51bad --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONNTPSession.h @@ -0,0 +1,234 @@ +// +// MCONNTPSession.h +// mailcore2 +// +// Created by Robert Widmann on 8/13/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCONNTPSESSION_H + +#define MAILCORE_MCONNTPSESSION_H + +#import <Foundation/Foundation.h> + +#import <MailCore/MCOConstants.h> + +@class MCONNTPFetchAllArticlesOperation; +@class MCONNTPFetchHeaderOperation; +@class MCONNTPFetchArticleOperation; +@class MCONNTPListNewsgroupsOperation; +@class MCONNTPFetchOverviewOperation; +@class MCONNTPFetchServerTimeOperation; +@class MCONNTPPostOperation; +@class MCONNTPOperation; +@class MCOIndexSet; + +/** This class implements asynchronous access to the NNTP protocol.*/ + +NS_ASSUME_NONNULL_BEGIN +@interface MCONNTPSession : NSObject + +/** This is the hostname of the NNTP server to connect to.*/ +@property (nonatomic, copy) NSString * hostname; + +/** This is the port of the NNTP server to connect to.*/ +@property (nonatomic, assign) unsigned int port; + +/** This is the username of the account.*/ +@property (nonatomic, copy) NSString * username; + +/** This is the password of the account.*/ +@property (nonatomic, copy) NSString * password; + +/** This is the encryption type to use. + See MCOConnectionType for more information.*/ +@property (nonatomic, assign) MCOConnectionType connectionType; + +/** This is the timeout of the connection.*/ +@property (nonatomic, assign) NSTimeInterval timeout; + +/** When set to YES, the connection will fail if the certificate is incorrect.*/ +@property (nonatomic, assign, getter=isCheckCertificateEnabled) BOOL checkCertificateEnabled; + +/** + Sets logger callback. The network traffic will be sent to this block. + + [session setConnectionLogger:^(void * connectionID, MCOConnectionLogType type, NSData * data) { + ... + }]; + */ +@property (nonatomic, copy) MCOConnectionLogger connectionLogger; + +/** This property provides some hints to MCONNTPSession about where it's called from. + It will make MCONNTPSession safe. It will also set all the callbacks of operations to run on this given queue. + Defaults to the main queue. + This property should be used only if there's performance issue using MCONNTPSession in the main thread. */ +#if OS_OBJECT_USE_OBJC +@property (nonatomic, retain) dispatch_queue_t dispatchQueue; +#else +@property (nonatomic, assign) dispatch_queue_t dispatchQueue; +#endif + +/** + The value will be YES when asynchronous operations are running, else it will return NO. + */ +@property (nonatomic, assign, readonly, getter=isOperationQueueRunning) BOOL operationQueueRunning; + +/** + Sets operation running callback. It will be called when operations start or stop running. + + [session setOperationQueueRunningChangeBlock:^{ + if ([session isOperationQueueRunning]) { + ... + } + else { + ... + } + }]; + */ +@property (nonatomic, copy) MCOOperationQueueRunningChangeBlock operationQueueRunningChangeBlock; + +/** + Cancel all operations + */ +- (void) cancelAllOperations; + +/** @name Operations */ + +/** + Returns an operation that will fetch the list of article numbers. + + MCONNTPFetchAllArticlesOperation * op = [session fetchAllArticlesOperation:@"comp.lang.c"]; + [op start:^(NSError * __nullable error, MCOIndexSet * articles) { + }]; + */ +- (MCONNTPFetchAllArticlesOperation *) fetchAllArticlesOperation:(NSString *)group; + +/** + Returns an operation that will fetch the header of the given message. + + MCONNTPFetchHeaderOperation * op = [session fetchHeaderOperationWithIndex:idx inGroup:@"comp.lang.c"]; + [op start:^(NSError * __nullable error, MCOMessageHeader * header) { + // header is the parsed header of the message. + }]; + */ +- (MCONNTPFetchHeaderOperation *) fetchHeaderOperationWithIndex:(unsigned int)index inGroup:(NSString *)group; + +/** + Returns an operation that will fetch an overview (headers) for a set of messages. + + MCONNTPFetchHeaderOperation * op = [session fetchOverviewOperationWithIndexes:indexes inGroup:@"comp.lang.c"]; + [op start:^(NSError * __nullable error, NSArray * headers) { + // headers are the parsed headers of each part of the overview. + }]; + */ +- (MCONNTPFetchOverviewOperation *)fetchOverviewOperationWithIndexes:(MCOIndexSet *)indexes inGroup:(NSString *)group; + +/** + Returns an operation that will fetch the content of the given message. + + MCONNTPFetchArticleOperation * op = [session fetchArticleOperationWithIndex:idx inGroup:@"comp.lang.c"]; + [op start:^(NSError * __nullable error, NSData * messageData) { + // messageData is the RFC 822 formatted message data. + }]; + */ +- (MCONNTPFetchArticleOperation *) fetchArticleOperationWithIndex:(unsigned int)index inGroup:(NSString *)group; + +/** + Returns an operation that will fetch the content of a message with the given messageID. + + MCONNTPFetchArticleOperation * op = [session fetchArticleOperationWithMessageID:@"<MessageID123@mail.google.com>"]; + [op start:^(NSError * __nullable error, NSData * messageData) { + // messageData is the RFC 822 formatted message data. + }]; + */ +- (MCONNTPFetchArticleOperation *) fetchArticleOperationWithMessageID:(NSString *)messageID; + +/** + Obsolete. Use -fetchArticleOperationWithMessageID: instead. + + MCONNTPFetchArticleOperation * op = [session fetchArticleOperationWithMessageID:@"<MessageID123@mail.google.com>" inGroup:@"comp.lang.c"]; + [op start:^(NSError * __nullable error, NSData * messageData) { + // messageData is the RFC 822 formatted message data. + }]; + */ +- (MCONNTPFetchArticleOperation *) fetchArticleOperationWithMessageID:(NSString *)messageID inGroup:(NSString * __nullable)group DEPRECATED_ATTRIBUTE; + +/** + Returns an operation that will fetch the server's date and time. + + MCONNTPFetchArticleOperation * op = [session fetchServerDateOperation]; + [op start:^(NSError * __nullable error, NSDate * serverDate) { + }]; + */ +- (MCONNTPFetchServerTimeOperation *) fetchServerDateOperation; + +/** + Returns an operation that will list all available newsgroups. + + MCONNTPListNewsgroupsOperation * op = [session listAllNewsgroupsOperation]; + [op start:^(NSError * __nullable error, NSArray * subscribedGroups) { + }]; + */ +- (MCONNTPListNewsgroupsOperation *) listAllNewsgroupsOperation; + +/** + Returns an operation that will list server-suggested default newsgroups. + + MCONNTPListNewsgroupsOperation * op = [session listDefaultNewsgroupsOperation]; + [op start:^(NSError * __nullable error, NSArray * defaultGroups) { + }]; + */ +- (MCONNTPListNewsgroupsOperation *) listDefaultNewsgroupsOperation; + +/** + Returns an operation that will post the given message through NNTP. + It will use the newsgroups set in the message data. + It will also filter out Bcc from the content of the message. + + Generate RFC 822 data using MCOMessageBuilder + + MCONNTPOperation * op = [session postOperationWithData:rfc822Data]; + [op start:^(NSError * __nullable error) { + ... + }]; + */ +- (MCONNTPPostOperation *) postOperationWithData:(NSData *)messageData; + +/** + Returns an operation that will post the message from the given file through NNTP. + It will use the newsgroups set in the message data. + It will also filter out Bcc from the content of the message. + + MCONNTPOperation * op = [session postOperationWithContentsOfFile:rfc822DataFilename]; + [op start:^(NSError * __nullable error) { + ... + }]; + */ +- (MCONNTPPostOperation *) postOperationWithContentsOfFile:(NSString *)path; + +/** + Returns an operation that will disconnect the session. + + MCONNTPOperation * op = [session disconnectOperation]; + [op start:^(NSError * __nullable error) { + ... + }]; + */ +- (MCONNTPOperation *) disconnectOperation; + +/** + Returns an operation that will check whether the NNTP account is valid. + + MCONNTPOperation * op = [session checkAccountOperation]; + [op start:^(NSError * __nullable error) { + ... + }]; + */ +- (MCONNTPOperation *) checkAccountOperation; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONetService.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONetService.h new file mode 100644 index 0000000000000000000000000000000000000000..0d70715227b17081e6476724ebe50874c6c8a377 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCONetService.h @@ -0,0 +1,50 @@ +// +// MCONetService.h +// mailcore2 +// +// Created by Robert Widmann on 4/28/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#import <Foundation/Foundation.h> +#import <MailCore/MCOConstants.h> + +/** + This class provides a specific way to access a given service +*/ + +@interface MCONetService : NSObject <NSCopying> + +/** + The hostname of the server. [MCONetService hostnameWithEmail:] is recommended + instead as it can handle services with custom domains +*/ +@property (nonatomic, copy) NSString * hostname; + +/** The port number of the service */ +@property (nonatomic, assign) unsigned int port; + +/** What kind of connection type is supported, like SSL, Start TLS, Plain etc. */ +@property (nonatomic, assign) MCOConnectionType connectionType; + ++ (MCONetService *) serviceWithInfo:(NSDictionary *)info; + +- (instancetype) initWithInfo:(NSDictionary *)info; +- (NSDictionary *) info; + +/** + If the service uses a custom domain this will return the proper hostname based + off the email address +*/ +- (NSString *) hostnameWithEmail:(NSString *)email; + +@end + +@interface MCONetService (MCOUnavailable) + +/** Do not invoke this directly. */ +- (instancetype) init NS_UNAVAILABLE; +/** Do not invoke this directly. */ ++ (instancetype) new NS_UNAVAILABLE; + +@end diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOObjectWrapper.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOObjectWrapper.h new file mode 100644 index 0000000000000000000000000000000000000000..67cb45e17fd186af5a95f6999fd3f3bb89892379 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOObjectWrapper.h @@ -0,0 +1,31 @@ +// +// MCOObjectWrapper.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/25/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOOBJECTWRAPPER_H + +#define MAILCORE_MCOOBJECTWRAPPER_H + +#import <Foundation/Foundation.h> + +#ifdef __cplusplus +namespace mailcore { + class Object; +} +#endif + +@interface MCOObjectWrapper : NSObject + +#ifdef __cplusplus +@property (nonatomic, assign) mailcore::Object * object; + ++ (MCOObjectWrapper *) objectWrapperWithObject:(mailcore::Object *)object; +#endif + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..65f776814dfdbbc7eb36d2da54ba2da0f04baa97 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOOperation.h @@ -0,0 +1,50 @@ +// +// MCOOperation.h +// mailcore2 +// +// Created by Matt Ronge on 01/31/13. +// Copyright (c) 2013 __MyCompanyName__. All rights reserved. +// + +#ifndef MAILCORE_MCOOPERATION_H + +#define MAILCORE_MCOOPERATION_H + +#import <Foundation/Foundation.h> + +@interface MCOOperation : NSObject + +/** Returns whether the operation is cancelled.*/ +@property (readonly) BOOL isCancelled; + +/** Returns whether the operation should run even if it's cancelled.*/ +@property (nonatomic, assign) BOOL shouldRunWhenCancelled; + +/** The queue this operation dispatches the callback on. Defaults to the main queue. + This property should be used only if there's performance issue creating or calling the callback + in the main thread. */ +#if OS_OBJECT_USE_OBJC +@property (nonatomic, retain) dispatch_queue_t callbackDispatchQueue; +#else +@property (nonatomic, assign) dispatch_queue_t callbackDispatchQueue; +#endif + +/** This methods is called on the main thread when the asynchronous operation is finished. + Needs to be overriden by subclasses.*/ +- (void) operationCompleted; + +/** Cancel the operation.*/ +- (void) cancel; + +@end + +@interface MCOOperation (MCOUnavailable) + +/** Do not invoke this directly. */ +- (instancetype) init NS_UNAVAILABLE; +/** Do not invoke this directly. */ ++ (instancetype) new NS_UNAVAILABLE; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOP.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOP.h new file mode 100644 index 0000000000000000000000000000000000000000..5a75ff4ffdaf5deeaa4e19820d6575189445dc35 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOP.h @@ -0,0 +1,20 @@ +// +// MCOPOP.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/30/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOPOP_H + +#define MAILCORE_MCOPOP_H + +#import <MailCore/MCOPOPSession.h> +#import <MailCore/MCOPOPOperation.h> +#import <MailCore/MCOPOPFetchHeaderOperation.h> +#import <MailCore/MCOPOPFetchMessageOperation.h> +#import <MailCore/MCOPOPFetchMessagesOperation.h> +#import <MailCore/MCOPOPMessageInfo.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOPFetchHeaderOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOPFetchHeaderOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..6df92232354c26d3b86ceea5f3516cf643477e0d --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOPFetchHeaderOperation.h @@ -0,0 +1,41 @@ +// +// MCOFetchHeaderOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/29/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOPOPFETCHHEADEROPERATION_H + +#define MAILCORE_MCOPOPFETCHHEADEROPERATION_H + +#import <Foundation/Foundation.h> +#import <MailCore/MCOPOPOperation.h> + +/** + This is an asynchronous operation that will fetch the header of a message. + @See MCOPOPSession +*/ + +@class MCOMessageHeader; + +NS_ASSUME_NONNULL_BEGIN +@interface MCOPOPFetchHeaderOperation : MCOPOPOperation + +/** + Starts the asynchronous fetch operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `header` will contain the message header + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in MCOConstants.h, `header` will be nil +*/ +- (void) start:(void (^)(NSError * __nullable error, MCOMessageHeader * __nullable header))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOPFetchMessageOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOPFetchMessageOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..a20469d47a93d43fe0c177f2e1f56fb3fd0e38cd --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOPFetchMessageOperation.h @@ -0,0 +1,41 @@ +// +// MCOFetchMessageOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/29/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOPOPFETCHMESSAGEOPERATION_H + +#define MAILCORE_MCOPOPFETCHMESSAGEOPERATION_H + +#import <Foundation/Foundation.h> +#import <MailCore/MCOPOPOperation.h> + +/** Fetch a message from POP3 */ + +typedef void (^MCOPOPOperationProgressBlock)(unsigned int current, unsigned int maximum); + +NS_ASSUME_NONNULL_BEGIN +@interface MCOPOPFetchMessageOperation : MCOPOPOperation + +/** This block will be called as data is downloaded from the network */ +@property (nonatomic, copy) MCOPOPOperationProgressBlock progress; + +/** + Starts the asynchronous fetch operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `data` will contain the message data + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in MCOConstants.h, `data` will be nil +*/ +- (void) start:(void (^)(NSError * __nullable error, NSData * __nullable messageData))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOPFetchMessagesOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOPFetchMessagesOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..b38f0f08eda47b1286ebdf8c6f5e3a41b4282561 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOPFetchMessagesOperation.h @@ -0,0 +1,36 @@ +// +// MCOPOPFetchMessagesOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/29/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOPOPFETCHMESSAGESOPERATION_H + +#define MAILCORE_MCOPOPFETCHMESSAGESOPERATION_H + +#import <Foundation/Foundation.h> +#import <MailCore/MCOPOPOperation.h> + +/** This is an asynchronous operation that will fetch the list of a messages on the POP3 account. */ + +NS_ASSUME_NONNULL_BEGIN +@interface MCOPOPFetchMessagesOperation : MCOPOPOperation + +/** + Starts the asynchronous fetch operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `messages` will be an array of MCOPOPMessageInfo + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in MCOConstants.h, `messages` will be nil +*/ +- (void) start:(void (^)(NSError * __nullable error, NSArray * /* MCOPOPMessageInfo */__nullable messages))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOPMessageInfo.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOPMessageInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..416747f3839cde82f80c07ffbb8ea500da82afd6 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOPMessageInfo.h @@ -0,0 +1,31 @@ +// +// MCOPOPMessageInfo.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/30/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOPOPMESSAGEINFO_H + +#define MAILCORE_MCOPOPMESSAGEINFO_H + +#import <Foundation/Foundation.h> + +/** This is information of a message fetched by MCOPOPFetchMessagesOperation.*/ + +@interface MCOPOPMessageInfo : NSObject <NSCopying> + +/** This is the index of a given message.*/ +@property (nonatomic, assign) unsigned int index; + +/** This is the size of the given message.*/ +@property (nonatomic, assign) unsigned int size; + +/** This is the unique identifier of the message. + It can be used as a cache identifier.*/ +@property (nonatomic, copy) NSString * uid; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOPOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOPOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..0937db76599dd62502b43a24f517cc22eaf606e7 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOPOperation.h @@ -0,0 +1,39 @@ +// +// MCODeleteMessagesOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/29/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOPOPOPERATION_H + +#define MAILCORE_MCOPOPOPERATION_H + +#import <Foundation/Foundation.h> +#import <MailCore/MCOOperation.h> + +/** + This is a generic asynchronous POP3 operation. + @see MCOPOPSession +*/ + +NS_ASSUME_NONNULL_BEGIN +@interface MCOPOPOperation : MCOOperation + +/** + Starts the asynchronous operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in MCOConstants.h, +*/ +- (void) start:(void (^)(NSError * __nullable error))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOPSession.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOPSession.h new file mode 100644 index 0000000000000000000000000000000000000000..6daa2379d2aa8fa07af236ee17626e9e2c2449c9 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOPOPSession.h @@ -0,0 +1,179 @@ +// +// MCOPOPSession.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/29/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOPOPSESSION_H + +#define MAILCORE_MCOPOPSESSION_H + +#import <Foundation/Foundation.h> + +#import <MailCore/MCOConstants.h> + +@class MCOPOPFetchMessagesOperation; +@class MCOPOPFetchHeaderOperation; +@class MCOPOPFetchMessageOperation; +@class MCOPOPOperation; +@class MCOIndexSet; + +/** This class implements asynchronous access to the POP3 protocol.*/ + +@interface MCOPOPSession : NSObject + +/** This is the hostname of the POP3 server to connect to.*/ +@property (nonatomic, copy) NSString * hostname; + +/** This is the port of the POP3 server to connect to.*/ +@property (nonatomic, assign) unsigned int port; + +/** This is the username of the account.*/ +@property (nonatomic, copy) NSString * username; + +/** This is the password of the account.*/ +@property (nonatomic, copy) NSString * password; + +/** + This is the authentication type to use to connect. + `MCOAuthTypeSASLNone` means that it uses the clear-text is used (and is the default). + @warning *Important*: Over an encrypted connection like TLS, the password will still be secure +*/ +@property (nonatomic, assign) MCOAuthType authType; + +/** This is the encryption type to use. +See MCOConnectionType for more information.*/ +@property (nonatomic, assign) MCOConnectionType connectionType; + +/** This is the timeout of the connection.*/ +@property (nonatomic, assign) NSTimeInterval timeout; + +/** When set to YES, the connection will fail if the certificate is incorrect.*/ +@property (nonatomic, assign, getter=isCheckCertificateEnabled) BOOL checkCertificateEnabled; + +/** + Sets logger callback. The network traffic will be sent to this block. + + [session setConnectionLogger:^(void * connectionID, MCOConnectionLogType type, NSData * data) { + ... + }]; + */ +@property (nonatomic, copy) MCOConnectionLogger connectionLogger; + +/** This property provides some hints to MCOPOPSession about where it's called from. + It will make MCOPOPSession safe. It will also set all the callbacks of operations to run on this given queue. + Defaults to the main queue. + This property should be used only if there's performance issue using MCOPOPSession in the main thread. */ +#if OS_OBJECT_USE_OBJC +@property (nonatomic, retain) dispatch_queue_t dispatchQueue; +#else +@property (nonatomic, assign) dispatch_queue_t dispatchQueue; +#endif + +/** + The value will be YES when asynchronous operations are running, else it will return NO. + */ +@property (nonatomic, assign, readonly, getter=isOperationQueueRunning) BOOL operationQueueRunning; + +/** + Sets operation running callback. It will be called when operations start or stop running. + + [session setOperationQueueRunningChangeBlock:^{ + if ([session isOperationQueueRunning]) { + ... + } + else { + ... + } + }]; + */ +@property (nonatomic, copy) MCOOperationQueueRunningChangeBlock operationQueueRunningChangeBlock; + +/** + Cancel all operations + */ +- (void) cancelAllOperations; + +/** @name Operations */ + +/** + Returns an operation that will fetch the list of messages. + + MCOPOPFetchMessagesOperation * op = [session fetchMessagesOperation]; + [op start:^(NSError * __nullable error, NSArray * messages) { + // messages is an array of MCOPOPMessageInfo + // [info index] can be used as reference for a given message in the other operations. + }]; +*/ +- (MCOPOPFetchMessagesOperation *) fetchMessagesOperation; + +/** + Returns an operation that will fetch the header of the given message. + + MCOPOPFetchHeaderOperation * op = [session fetchHeaderOperationWithIndex:idx]; + [op start:^(NSError * __nullable error, MCOMessageHeader * header) { + // header is the parsed header of the message. + }]; +*/ +- (MCOPOPFetchHeaderOperation *) fetchHeaderOperationWithIndex:(unsigned int)index; + +/** + Returns an operation that will fetch the content of the given message. + + MCOPOPFetchMessageOperation * op = [session fetchMessageOperationWithIndex:idx]; + [op start:^(NSError * __nullable error, NSData * messageData) { + // messageData is the RFC 822 formatted message data. + }]; +*/ +- (MCOPOPFetchMessageOperation *) fetchMessageOperationWithIndex:(unsigned int)index; + +/** + Returns an operation that will delete the given messages. + Will disconnect when finished. + + MCOIndexSet * indexes = [MCOIndexSet indexSet]; + [indexes addIndex:1]; + [indexes addIndex:2]; + [indexes addIndex:3]; + MCOPOPOperation * op = [session deleteMessagesOperationWithIndexes:indexes]; + [op start:^(NSError * __nullable error) { + ... + }]; +*/ +- (MCOPOPOperation *) deleteMessagesOperationWithIndexes:(MCOIndexSet *)indexes; + +/** + Returns an operation that will disconnect the session. + + MCOPOPOperation * op = [session disconnectOperation]; + [op start:^(NSError * __nullable error) { + ... + }]; + */ +- (MCOPOPOperation *) disconnectOperation; + +/** + Returns an operation that will check whether the POP account is valid. + + MCOPOPOperation * op = [session checkAccountOperation]; + [op start:^(NSError * __nullable error) { + ... + }]; +*/ +- (MCOPOPOperation *) checkAccountOperation; + +/** + Returns an operation that will perform a No-Op operation. + + MCOPOPOperation * op = [session noopOperation]; + [op start:^(NSError * __nullable error) { + ... + }]; + */ +- (MCOPOPOperation *) noopOperation; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOProvider.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOProvider.h new file mode 100644 index 0000000000000000000000000000000000000000..3c7bf7cedb1d4f22f7667f6a0752e3a7e91b2608 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOProvider.h @@ -0,0 +1,17 @@ +// +// MCOPROVIDER.h +// mailcore2 +// +// Created by Pushkar Singh on 5/24/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef _MAILCORE__MCOPROVIDER_h +#define _MAILCORE__MCOPROVIDER_h + +#import <MailCore/MCONetService.h> +#import <MailCore/MCOMailProvider.h> +#import <MailCore/MCOMailProvidersManager.h> +#import <MailCore/MCOAccountValidator.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCORFC822.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCORFC822.h new file mode 100644 index 0000000000000000000000000000000000000000..ce894aa840b1e0744f303f58f2608eeb1287aa0b --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCORFC822.h @@ -0,0 +1,19 @@ +// +// MCORFC822.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/22/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCORFC822_H + +#define MAILCORE_MCORFC822_H + +#import <MailCore/MCOAttachment.h> +#import <MailCore/MCOMessageBuilder.h> +#import <MailCore/MCOMessageParser.h> +#import <MailCore/MCOMessagePart.h> +#import <MailCore/MCOMultipart.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCORange.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCORange.h new file mode 100644 index 0000000000000000000000000000000000000000..fa6d4ae9c3afc4976098018e3664d6b37c4325c0 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCORange.h @@ -0,0 +1,77 @@ +// +// MCORange.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/24/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCORANGE_H + +#define MAILCORE_MCORANGE_H + +#import <Foundation/Foundation.h> + +#ifdef __cplusplus +#include <MailCore/MCBaseTypes.h> +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +@class MCOIndexSet; + +typedef struct { + /** first integer of the range.*/ + uint64_t location; + + /** length of the range.*/ + uint64_t length; +} MCORange; + +/** Constants for an emtpy range.*/ +extern MCORange MCORangeEmpty; + +/** Returns a new range given a location and length.*/ +MCORange MCORangeMake(uint64_t location, uint64_t length); + +/** Returns an index set that is the result of sustracting a range from a range.*/ +MCOIndexSet * MCORangeRemoveRange(MCORange range1, MCORange range2); + +/** Returns an index set that is the result of the union a range from a range.*/ +MCOIndexSet * MCORangeUnion(MCORange range1, MCORange range2); + +#ifdef __cplusplus + +/** Returns a C++ range from an Objective-C range.*/ +mailcore::Range MCORangeToMCRange(MCORange range); + +/** Returns an Objective-C range from a C++ range.*/ +MCORange MCORangeWithMCRange(mailcore::Range range); + +#endif + +/** Returns the intersection of two ranges.*/ +MCORange MCORangeIntersection(MCORange range1, MCORange range2); + +/** Returns YES if two given ranges have an intersection.*/ +BOOL MCORangeHasIntersection(MCORange range1, MCORange range2); + +/** Returns left bound of a range.*/ +uint64_t MCORangeLeftBound(MCORange range); + +/** Returns right bound of a range.*/ +uint64_t MCORangeRightBound(MCORange range); + +/** Returns a serializable form (NSString) of a range */ +NSString * MCORangeToString(MCORange range); + +/** Create a range from a serializable form (NSString). */ +MCORange MCORangeFromString(NSString * rangeString); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOSMTP.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOSMTP.h new file mode 100644 index 0000000000000000000000000000000000000000..49d01de3160a82bde7434e85e6b7ea118f63776d --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOSMTP.h @@ -0,0 +1,17 @@ +// +// MCOSMTP.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/29/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOSMTP_H + +#define MAILCORE_MCOSMTP_H + +#import <MailCore/MCOSMTPSession.h> +#import <MailCore/MCOSMTPSendOperation.h> +#import <MailCore/MCOSMTPOperation.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOSMTPOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOSMTPOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..111f386ba7beef134d601938f870b404019d39b3 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOSMTPOperation.h @@ -0,0 +1,35 @@ +// +// MCOSMTPCheckAccountOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/29/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOSMTPOPERATION_H + +#define MAILCORE_MCOSMTPOPERATION_H + +#import <MailCore/MCOOperation.h> + +/** This is an asynchronous SMTP operation, used for sending messages. */ + +NS_ASSUME_NONNULL_BEGIN +@interface MCOSMTPOperation : MCOOperation + +/** + Starts the asynchronous operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in MCOConstants.h, +*/ +- (void) start:(void (^)(NSError * __nullable error))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOSMTPSendOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOSMTPSendOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..9474c0efa599793d116880541990ab1fd4c4bbe7 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOSMTPSendOperation.h @@ -0,0 +1,40 @@ +// +// MCOSMTPSendOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/29/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOSMTPSENDOPERATION_H + +#define MAILCORE_MCOSMTPSENDOPERATION_H + +#import <MailCore/MCOSMTPOperation.h> + +/** This is an asynchronous operation that will send a message through SMTP. */ + +typedef void (^MCOSMTPOperationProgressBlock)(unsigned int current, unsigned int maximum); + +NS_ASSUME_NONNULL_BEGIN +@interface MCOSMTPSendOperation : MCOSMTPOperation + +/** This block will be called as the message is sent */ +@property (nonatomic, copy) MCOSMTPOperationProgressBlock progress; + +/* + Starts the asynchronous operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in MCOConstants.h, +*/ +- (void) start:(void (^)(NSError * __nullable error))completionBlock; + +@end +NS_ASSUME_NONNULL_END + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOSMTPSession.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOSMTPSession.h new file mode 100644 index 0000000000000000000000000000000000000000..84d6949da694094f6087318ad17d23717dfc355b --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOSMTPSession.h @@ -0,0 +1,197 @@ +// +// MCOSMTPSession.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/29/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOSMTPSESSION_H + +#define MAILCORE_MCOSMTPSESSION_H + +#import <Foundation/Foundation.h> + +#import <MailCore/MCOConstants.h> + +/** + This class is used to create an SMTP connection and send messages + + After calling a method that returns an operation you must call start: on the instance + to begin the operation. +*/ + +@class MCOSMTPSendOperation; +@class MCOSMTPOperation; +@class MCOAddress; + +@interface MCOSMTPSession : NSObject + +/** This is the hostname of the SMTP server to connect to. */ +@property (nonatomic, copy) NSString * hostname; + +/** This is the port of the SMTP server to connect to. */ +@property (nonatomic, assign) unsigned int port; + +/** This is the username of the account. */ +@property (nonatomic, copy) NSString * username; + +/** This is the password of the account. */ +@property (nonatomic, copy) NSString * password; + +/** This is the OAuth2 token. */ +@property (nonatomic, copy) NSString *OAuth2Token; + +/** + This is the authentication type to use to connect. + `MCOAuthTypeSASLNone` means that it uses the clear-text is used (and is the default). + @warning *Important*: Over an encrypted connection like TLS, the password will still be secure +*/ +@property (nonatomic, assign) MCOAuthType authType; + +/** + This is the encryption type to use. + See MCOConnectionType for more information. +*/ +@property (nonatomic, assign) MCOConnectionType connectionType; + +/** This is the timeout of the connection. */ +@property (nonatomic, assign) NSTimeInterval timeout; + +/** When set to YES, the connection will fail if the certificate is incorrect. */ +@property (nonatomic, assign, getter=isCheckCertificateEnabled) BOOL checkCertificateEnabled; + +/** + If set to YES, when sending the EHLO or HELO command, use IP address instead of hostname. + Default is NO. +*/ +@property (nonatomic, assign, getter=isUseHeloIPEnabled) BOOL useHeloIPEnabled; + +/** + Sets logger callback. The network traffic will be sent to this block. + + [session setConnectionLogger:^(void * connectionID, MCOConnectionLogType type, NSData * data) { + ... + }]; + */ +@property (nonatomic, copy) MCOConnectionLogger connectionLogger; + +/** This property provides some hints to MCOSMTPSession about where it's called from. + It will make MCOSMTPSession safe. It will also set all the callbacks of operations to run on this given queue. + Defaults to the main queue. + This property should be used only if there's performance issue using MCOSMTPSession in the main thread. */ +#if OS_OBJECT_USE_OBJC +@property (nonatomic, retain) dispatch_queue_t dispatchQueue; +#else +@property (nonatomic, assign) dispatch_queue_t dispatchQueue; +#endif + +/** + The value will be YES when asynchronous operations are running, else it will return NO. + */ +@property (nonatomic, assign, readonly, getter=isOperationQueueRunning) BOOL operationQueueRunning; + +/** + Sets operation running callback. It will be called when operations start or stop running. + + [session setOperationQueueRunningChangeBlock:^{ + if ([session isOperationQueueRunning]) { + ... + } + else { + ... + } + }]; + */ +@property (nonatomic, copy) MCOOperationQueueRunningChangeBlock operationQueueRunningChangeBlock; + +/** + Cancel all operations + */ +- (void) cancelAllOperations; + +/** @name Operations */ + +/** + Returns an operation that will perform a login. + + MCOSMTPOperation * op = [session loginOperation]; + [op start:^(NSError * __nullable error) { + ... + }]; + */ +- (MCOSMTPOperation *) loginOperation; + +/** + Returns an operation that will send the given message through SMTP. + It will use the recipient set in the message data (To, Cc and Bcc). + It will also filter out Bcc from the content of the message. + + Generate RFC 822 data using MCOMessageBuilder + + MCOSMTPOperation * op = [session sendOperationWithData:rfc822Data]; + [op start:^(NSError * __nullable error) { + ... + }]; +*/ +- (MCOSMTPSendOperation *) sendOperationWithData:(NSData *)messageData; + +/** + Returns an operation that will send the given message through SMTP. + It will use the sender and recipient set from the parameters. + It will also filter out Bcc from the content of the message. + + Generate RFC 822 data using MCOMessageBuilder + + MCOSMTPOperation * op = [session sendOperationWithData:rfc822Data + from:[MCOAddress addressWithMailbox:@"hoa@etpan.org"] + recipients:[NSArray arrayWithObject:[MCOAddress addressWithMailbox:@"laura@etpan.org"]]]; + [op start:^(NSError * __nullable error) { + ... + }]; + */ +- (MCOSMTPSendOperation *) sendOperationWithData:(NSData *)messageData + from:(MCOAddress *)from + recipients:(NSArray *)recipients; + + +/** + Returns an operation that will send the message from the given file through SMTP. + It will use the sender and recipient set from the parameters. + It will also filter out Bcc from the content of the message. + + MCOSMTPOperation * op = [session sendOperationWithContentsOfFile:rfc822DataFilename + from:[MCOAddress addressWithMailbox:@"hoa@etpan.org"] + recipients:[NSArray arrayWithObject: + [MCOAddress addressWithMailbox:@"laura@etpan.org"]]]; + [op start:^(NSError * __nullable error) { + ... + }]; + */ +- (MCOSMTPSendOperation *) sendOperationWithContentsOfFile:(NSString *)path + from:(MCOAddress *)from + recipients:(NSArray *)recipients; + +/** + Returns an operation that will check whether the SMTP account is valid. + + MCOSMTPOperation * op = [session checkAccountOperationWithFrom:[MCOAddress addressWithMailbox:@"hoa@etpan.org"]]; + [op start:^(NSError * __nullable error) { + ... + }]; +*/ +- (MCOSMTPOperation *) checkAccountOperationWithFrom:(MCOAddress *)from; + +/** + Returns an operation that will perform a No-Op. + + MCOSMTPOperation * op = [session noopOperation]; + [op start:^(NSError * __nullable error) { + ... + }]; + */ +- (MCOSMTPOperation *) noopOperation; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOUtils.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOUtils.h new file mode 100644 index 0000000000000000000000000000000000000000..3c36a6abbbdb77cdd5f1ce684ec6ed7b18056f2e --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOUtils.h @@ -0,0 +1,27 @@ +// +// MCOUtils.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/22/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOUTILS_H + +#define MAILCORE_MCOUTILS_H + +#import <MailCore/MCOObjectWrapper.h> +#import <MailCore/NSData+MCO.h> +#import <MailCore/NSString+MCO.h> +#import <MailCore/NSDictionary+MCO.h> +#import <MailCore/NSArray+MCO.h> +#import <MailCore/NSObject+MCO.h> +#import <MailCore/NSError+MCO.h> +#import <MailCore/NSValue+MCO.h> +#import <MailCore/MCOOperation.h> +#import <MailCore/MCOConstants.h> +#import <MailCore/MCOIndexSet.h> +#import <MailCore/MCORange.h> +#import <MailCore/NSIndexSet+MCO.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCObjC.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCObjC.h new file mode 100644 index 0000000000000000000000000000000000000000..68d35f1e67d57e6c7dfb18de588508c7eb627d1f --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCObjC.h @@ -0,0 +1,26 @@ +// +// MCObjC.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/27/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOBJC_H + +#define MAILCORE_MCOBJC_H + +#ifdef __OBJC__ + +#import <MailCore/MCOUtils.h> +#import <MailCore/MCOAbstract.h> +#import <MailCore/MCOIMAP.h> +#import <MailCore/MCORFC822.h> +#import <MailCore/MCOPOP.h> +#import <MailCore/MCOSMTP.h> +#import <MailCore/MCONNTP.h> +#import <MailCore/MCOProvider.h> + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCObject.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCObject.h new file mode 100644 index 0000000000000000000000000000000000000000..83d6c1a7cd73f5e0625a94e9760f1f8c9ed74948 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCObject.h @@ -0,0 +1,74 @@ +#ifndef MAILCORE_MCOBJECT_H + +#define MAILCORE_MCOBJECT_H + +#include <pthread.h> +#if __APPLE__ +#include <dispatch/dispatch.h> +#include <libkern/OSAtomic.h> +#endif + +#include <MailCore/MCUtils.h> + +#ifdef __cplusplus + +namespace mailcore { + + extern bool zombieEnabled; + + class String; + class HashMap; + + class MAILCORE_EXPORT Object { + public: + Object(); + virtual ~Object(); + + virtual int retainCount(); + virtual Object * retain(); + virtual void release(); + virtual Object * autorelease(); + virtual String * description(); + virtual String * className(); + + virtual bool isEqual(Object * otherObject); + virtual unsigned int hash(); + + // optional + virtual Object * copy(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + + typedef void (Object::*Method) (void *); + virtual void performMethod(Method method, void * context); + virtual void performMethodOnMainThread(Method method, void * context, bool waitUntilDone = false); + virtual void performMethodAfterDelay(Method method, void * context, double delay); +#if __APPLE__ + virtual void performMethodOnDispatchQueue(Method method, void * context, void * targetDispatchQueue, bool waitUntilDone = false); + virtual void performMethodOnDispatchQueueAfterDelay(Method method, void * context, void * targetDispatchQueue, double delay); + virtual void cancelDelayedPerformMethodOnDispatchQueue(Method method, void * context, void * targetDispatchQueue); +#endif + virtual void cancelDelayedPerformMethod(Method method, void * context); + + // serialization utils + static void registerObjectConstructor(const char * className, void * (* objectConstructor)(void)); + static Object * objectWithSerializable(HashMap * serializable); + + public: // private + + private: +#if __APPLE__ + OSSpinLock mLock; +#else + pthread_mutex_t mLock; +#endif + int mCounter; + void init(); + static void initObjectConstructors(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..5ee8b2f4c81b1fa27094ca979bb83c1509a44bd1 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOperation.h @@ -0,0 +1,59 @@ +#ifndef MAILCORE_MCOPERATION_H + +#define MAILCORE_MCOPERATION_H + +#include <pthread.h> +#include <MailCore/MCObject.h> + +#ifdef __cplusplus + +namespace mailcore { + + class OperationCallback; + + class MAILCORE_EXPORT Operation : public Object { + public: + Operation(); + virtual ~Operation(); + + virtual void setCallback(OperationCallback * callback); + virtual OperationCallback * callback(); + + virtual void cancel(); + virtual bool isCancelled(); + + // Will be called on main thread. + virtual void beforeMain(); + + virtual void main(); + + // Will be called on main thread. + virtual void afterMain(); + + virtual void start(); + +#ifdef __APPLE__ + virtual void setCallbackDispatchQueue(dispatch_queue_t callbackDispatchQueue); + virtual dispatch_queue_t callbackDispatchQueue(); +#endif + void performMethodOnCallbackThread(Method method, void * context, bool waitUntilDone = false); + + virtual bool shouldRunWhenCancelled(); + virtual void setShouldRunWhenCancelled(bool shouldRunWhenCancelled); + + private: + OperationCallback * mCallback; + bool mCancelled; + bool mShouldRunWhenCancelled; + pthread_mutex_t mLock; +#ifdef __APPLE__ + dispatch_queue_t mCallbackDispatchQueue; +#endif + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOperationCallback.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOperationCallback.h new file mode 100644 index 0000000000000000000000000000000000000000..425b1e9959c1f18c3a3c28d1fb19dc9467ac649a --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOperationCallback.h @@ -0,0 +1,22 @@ +#ifndef MAILCORE_MCOPERATIONCALLBACK_H + +#define MAILCORE_MCOPERATIONCALLBACK_H + +#include <MailCore/MCUtils.h> + +#ifdef __cplusplus + +namespace mailcore { + + class Operation; + + class MAILCORE_EXPORT OperationCallback { + public: + virtual void operationFinished(Operation * op) {} + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOperationQueue.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOperationQueue.h new file mode 100644 index 0000000000000000000000000000000000000000..1e8e48445d3c6a8ef7fa6aafa1a91222d3eaf296 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCOperationQueue.h @@ -0,0 +1,68 @@ +#ifndef MAILCORE_MCOPERATIONQUEUE_H + +#define MAILCORE_MCOPERATIONQUEUE_H + +#include <pthread.h> +#include <semaphore.h> +#include <MailCore/MCObject.h> +#include <MailCore/MCLibetpanTypes.h> + +#ifdef __cplusplus + +namespace mailcore { + + class Operation; + class OperationQueueCallback; + class Array; + + class MAILCORE_EXPORT OperationQueue : public Object { + public: + OperationQueue(); + virtual ~OperationQueue(); + + virtual void addOperation(Operation * op); + virtual void cancelAllOperations(); + + virtual unsigned int count(); + + virtual void setCallback(OperationQueueCallback * callback); + virtual OperationQueueCallback * callback(); + +#ifdef __APPLE__ + virtual void setDispatchQueue(dispatch_queue_t dispatchQueue); + virtual dispatch_queue_t dispatchQueue(); +#endif + + private: + Array * mOperations; + pthread_t mThreadID; + bool mStarted; + struct mailsem * mOperationSem; + struct mailsem * mStartSem; + struct mailsem * mStopSem; + pthread_mutex_t mLock; + bool mWaiting; + struct mailsem * mWaitingFinishedSem; + bool mQuitting; + OperationQueueCallback * mCallback; +#if __APPLE__ + dispatch_queue_t mDispatchQueue; +#endif + bool _pendingCheckRunning; + + void startThread(); + static void runOperationsOnThread(OperationQueue * queue); + void runOperations(); + void beforeMain(Operation * op); + void callbackOnMainThread(Operation * op); + void checkRunningOnMainThread(void * context); + void checkRunningAfterDelay(void * context); + void stoppedOnMainThread(void * context); + void performOnCallbackThread(Operation * op, Method method, void * context, bool waitUntilDone); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOP.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOP.h new file mode 100644 index 0000000000000000000000000000000000000000..db17430acb50c3737aae02c96e3680269fee9b86 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOP.h @@ -0,0 +1,9 @@ +#ifndef MAILCORE_MCPOP_H + +#define MAILCORE_MCPOP_H + +#include <MailCore/MCPOPMessageInfo.h> +#include <MailCore/MCPOPProgressCallback.h> +#include <MailCore/MCPOPSession.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPAsyncSession.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPAsyncSession.h new file mode 100644 index 0000000000000000000000000000000000000000..7dfe79316a01aabc3162036cf71eace16c2d82a6 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPAsyncSession.h @@ -0,0 +1,104 @@ +// +// MCPopAsyncSession.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/16/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCPOPASYNCSESSION_H + +#define MAILCORE_MCPOPASYNCSESSION_H + +#include <MailCore/MCBaseTypes.h> + +#ifdef __cplusplus + +namespace mailcore { + + class POPOperation; + class POPSession; + class POPFetchHeaderOperation; + class POPFetchMessageOperation; + class POPDeleteMessagesOperation; + class POPFetchMessagesOperation; + class POPOperationQueueCallback; + class POPConnectionLogger; + + class MAILCORE_EXPORT POPAsyncSession : public Object { + public: + POPAsyncSession(); + virtual ~POPAsyncSession(); + + virtual void setHostname(String * hostname); + virtual String * hostname(); + + virtual void setPort(unsigned int port); + virtual unsigned int port(); + + virtual void setUsername(String * login); + virtual String * username(); + + virtual void setPassword(String * password); + virtual String * password(); + + virtual void setAuthType(AuthType authType); + virtual AuthType authType(); + + virtual void setConnectionType(ConnectionType connectionType); + virtual ConnectionType connectionType(); + + virtual void setTimeout(time_t timeout); + virtual time_t timeout(); + + virtual void setCheckCertificateEnabled(bool enabled); + virtual bool isCheckCertificateEnabled(); + + virtual void setConnectionLogger(ConnectionLogger * logger); + virtual ConnectionLogger * connectionLogger(); + +#ifdef __APPLE__ + virtual void setDispatchQueue(dispatch_queue_t dispatchQueue); + virtual dispatch_queue_t dispatchQueue(); +#endif + + virtual void setOperationQueueCallback(OperationQueueCallback * callback); + virtual OperationQueueCallback * operationQueueCallback(); + virtual bool isOperationQueueRunning(); + virtual void cancelAllOperations(); + + virtual POPFetchMessagesOperation * fetchMessagesOperation(); + + virtual POPFetchHeaderOperation * fetchHeaderOperation(unsigned int index); + + virtual POPFetchMessageOperation * fetchMessageOperation(unsigned int index); + + // Will disconnect. + virtual POPOperation * deleteMessagesOperation(IndexSet * indexes); + + virtual POPOperation * disconnectOperation(); + + virtual POPOperation * checkAccountOperation(); + + virtual POPOperation * noopOperation(); + + private: + POPSession * mSession; + OperationQueue * mQueue; + POPOperationQueueCallback * mQueueCallback; + ConnectionLogger * mConnectionLogger; + pthread_mutex_t mConnectionLoggerLock; + POPConnectionLogger * mInternalLogger; + OperationQueueCallback * mOperationQueueCallback; + + public: // private + virtual void runOperation(POPOperation * operation); + virtual POPSession * session(); + virtual void logConnection(ConnectionLogType logType, Data * buffer); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPFetchHeaderOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPFetchHeaderOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..c2c3dee80b5206c56caa244b86fc6c3a2ffb4f37 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPFetchHeaderOperation.h @@ -0,0 +1,44 @@ +// +// MCPOPFetchHeaderOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/16/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCPOPFETCHHEADEROPERATION_H + +#define MAILCORE_MCPOPFETCHHEADEROPERATION_H + +#include <MailCore/MCPOPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MessageHeader; + + class MAILCORE_EXPORT POPFetchHeaderOperation : public POPOperation { + public: + POPFetchHeaderOperation(); + virtual ~POPFetchHeaderOperation(); + + virtual void setMessageIndex(unsigned int messageIndex); + virtual unsigned int messageIndex(); + + virtual MessageHeader * header(); + + public: // subclass behavior + virtual void main(); + + private: + unsigned int mMessageIndex; + MessageHeader * mHeader; + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPFetchMessageOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPFetchMessageOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..23fa1e8955b4f84ca7f462bc4ab606c6029a9ba9 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPFetchMessageOperation.h @@ -0,0 +1,41 @@ +// +// MCPOPFetchMessageOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/16/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCPOPFETCHMESSAGEOPERATION_H + +#define MAILCORE_MCPOPFETCHMESSAGEOPERATION_H + +#include <MailCore/MCPOPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + class MAILCORE_EXPORT POPFetchMessageOperation : public POPOperation { + public: + POPFetchMessageOperation(); + virtual ~POPFetchMessageOperation(); + + virtual void setMessageIndex(unsigned int messageIndex); + virtual unsigned int messageIndex(); + + virtual Data * data(); + + public: // subclass behavior + virtual void main(); + + private: + unsigned int mMessageIndex; + Data * mData; + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPFetchMessagesOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPFetchMessagesOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..7eb797b039719d57afe59d1db45a54539b59ed98 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPFetchMessagesOperation.h @@ -0,0 +1,37 @@ +// +// MCPOPFetchMessagesOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/16/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCPOPFETCHMESSAGESOPERATION_H + +#define MAILCORE_MCPOPFETCHMESSAGESOPERATION_H + +#include <MailCore/MCPOPOperation.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT POPFetchMessagesOperation : public POPOperation { + public: + POPFetchMessagesOperation(); + virtual ~POPFetchMessagesOperation(); + + virtual Array * /* POPMessageInfo */ messages(); + + public: // subclass behavior + virtual void main(); + + private: + Array * /* POPMessageInfo */ mMessages; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPMessageInfo.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPMessageInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..6d70fe301ad52925a1ed09f87801513a47c05fd7 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPMessageInfo.h @@ -0,0 +1,42 @@ +#ifndef MAILCORE_MCPOPMESSAGEINFO_H + +#define MAILCORE_MCPOPMESSAGEINFO_H + +#include <MailCore/MCBaseTypes.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MAILCORE_EXPORT POPMessageInfo : public Object { + public: + POPMessageInfo(); + virtual ~POPMessageInfo(); + + virtual void setIndex(unsigned int index); + virtual unsigned int index(); + + virtual void setSize(unsigned int size); + virtual unsigned int size(); + + virtual void setUid(String * uid); + virtual String * uid(); + + public: // subclass behavior + POPMessageInfo(POPMessageInfo * other); + virtual String * description(); + virtual Object * copy(); + + private: + unsigned int mIndex; + unsigned int mSize; + String * mUid; + + void init(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..652e4a4bf121292b0117688ac8234397d8786919 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPOperation.h @@ -0,0 +1,53 @@ +// +// MCPOPOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/16/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCPOPOPERATION_H + +#define MAILCORE_MCPOPOPERATION_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCPOPProgressCallback.h> + +#ifdef __cplusplus + +namespace mailcore { + + class POPAsyncSession; + class POPOperationCallback; + + class MAILCORE_EXPORT POPOperation : public Operation, public POPProgressCallback { + public: + POPOperation(); + virtual ~POPOperation(); + + virtual void setSession(POPAsyncSession * session); + virtual POPAsyncSession * session(); + + virtual void setPopCallback(POPOperationCallback * callback); + virtual POPOperationCallback * popCallback(); + + virtual void setError(ErrorCode error); + virtual ErrorCode error(); + + virtual void start(); + + private: + POPAsyncSession * mSession; + POPOperationCallback * mPopCallback; + ErrorCode mError; + private: + virtual void bodyProgress(POPSession * session, unsigned int current, unsigned int maximum); + virtual void bodyProgressOnMainThread(void * context); + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPOperationCallback.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPOperationCallback.h new file mode 100644 index 0000000000000000000000000000000000000000..60714b883714a9fb4e07da522358c29032f4833b --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPOperationCallback.h @@ -0,0 +1,30 @@ +// +// MCPOPOperationCallback.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/16/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCPOPOPERATIONCALLBACK_H + +#define MAILCORE_MCPOPOPERATIONCALLBACK_H + +#include <MailCore/MCUtils.h> + +#ifdef __cplusplus + +namespace mailcore { + + class POPOperation; + + class MAILCORE_EXPORT POPOperationCallback { + public: + virtual void bodyProgress(POPOperation * session, unsigned int current, unsigned int maximum) {}; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPProgressCallback.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPProgressCallback.h new file mode 100644 index 0000000000000000000000000000000000000000..cdee93325ea4de47aa3f2dfbe313a71f60fd0331 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPProgressCallback.h @@ -0,0 +1,22 @@ +#ifndef MAILCORE_MCPOPPROGRESSCALLBACK_H + +#define MAILCORE_MCPOPPROGRESSCALLBACK_H + +#ifdef __cplusplus + +#include <MailCore/MCUtils.h> + +namespace mailcore { + + class POPSession; + + class MAILCORE_EXPORT POPProgressCallback { + public: + virtual void bodyProgress(POPSession * session, unsigned int current, unsigned int maximum) {}; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPSession.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPSession.h new file mode 100644 index 0000000000000000000000000000000000000000..f32f9b185331ff2f27792a9bec3218484b6099b4 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCPOPSession.h @@ -0,0 +1,106 @@ +#ifndef MAILCORE_MCPOPSESSION_H + +#define MAILCORE_MCPOPSESSION_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCMessageConstants.h> + +#ifdef __cplusplus + +namespace mailcore { + + class POPMessageInfo; + class POPProgressCallback; + class MessageHeader; + + class MAILCORE_EXPORT POPSession : public Object { + public: + POPSession(); + virtual ~POPSession(); + + virtual void setHostname(String * hostname); + virtual String * hostname(); + + virtual void setPort(unsigned int port); + virtual unsigned int port(); + + virtual void setUsername(String * username); + virtual String * username(); + + virtual void setPassword(String * password); + virtual String * password(); + + virtual void setAuthType(AuthType authType); + virtual AuthType authType(); + + virtual void setConnectionType(ConnectionType connectionType); + virtual ConnectionType connectionType(); + + virtual void setTimeout(time_t timeout); + virtual time_t timeout(); + + virtual void setCheckCertificateEnabled(bool enabled); + virtual bool isCheckCertificateEnabled(); + + virtual void connect(ErrorCode * pError); + virtual void disconnect(); + + virtual void login(ErrorCode * pError); + + virtual void checkAccount(ErrorCode * pError); + + virtual void noop(ErrorCode * pError); + + Array * /* POPMessageInfo */ fetchMessages(ErrorCode * pError); + + MessageHeader * fetchHeader(unsigned int index, ErrorCode * pError); + MessageHeader * fetchHeader(POPMessageInfo * msg, ErrorCode * pError); + + Data * fetchMessage(unsigned int index, POPProgressCallback * callback, ErrorCode * pError); + Data * fetchMessage(POPMessageInfo * msg, POPProgressCallback * callback, ErrorCode * pError); + + void deleteMessage(unsigned int index, ErrorCode * pError); + void deleteMessage(POPMessageInfo * msg, ErrorCode * pError); + + virtual void setConnectionLogger(ConnectionLogger * logger); + virtual ConnectionLogger * connectionLogger(); + + public: // private + virtual void lockConnectionLogger(); + virtual void unlockConnectionLogger(); + virtual ConnectionLogger * connectionLoggerNoLock(); + + private: + String * mHostname; + unsigned int mPort; + String * mUsername; + String * mPassword; + AuthType mAuthType; + ConnectionType mConnectionType; + bool mCheckCertificateEnabled; + time_t mTimeout; + + mailpop3 * mPop; + POPCapability mCapabilities; + POPProgressCallback * mProgressCallback; + int mState; + + ConnectionLogger * mConnectionLogger; + pthread_mutex_t mConnectionLoggerLock; + + void init(); + void bodyProgress(unsigned int current, unsigned int maximum); + bool checkCertificate(); + static void body_progress(size_t current, size_t maximum, void * context); + void setup(); + void unsetup(); + void connectIfNeeded(ErrorCode * pError); + void loginIfNeeded(ErrorCode * pError); + void listIfNeeded(ErrorCode * pError); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCProvider.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCProvider.h new file mode 100644 index 0000000000000000000000000000000000000000..ad8189b25b5ef045aeee6a6e2b3d60f6f3af250a --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCProvider.h @@ -0,0 +1,18 @@ +// +// MCProvider.h +// mailcore2 +// +// Created by Robert Widmann on 4/28/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCPROVIDER_H + +#define MAILCORE_MCPROVIDER_H + +#include <MailCore/MCMailProvidersManager.h> +#include <MailCore/MCMailProvider.h> +#include <MailCore/MCNetService.h> +#include <MailCore/MCAccountValidator.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCRFC822.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCRFC822.h new file mode 100644 index 0000000000000000000000000000000000000000..66c4d40830b2ab7e559736baacc8ffeb114d0477 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCRFC822.h @@ -0,0 +1,11 @@ +#ifndef MAILCORE_MCRFC822_H + +#define MAILCORE_MCRFC822_H + +#include <MailCore/MCAttachment.h> +#include <MailCore/MCMessageBuilder.h> +#include <MailCore/MCMessageParser.h> +#include <MailCore/MCMessagePart.h> +#include <MailCore/MCMultipart.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCRange.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCRange.h new file mode 100644 index 0000000000000000000000000000000000000000..9ec4f56809f6d1f179be788bd50058280849821e --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCRange.h @@ -0,0 +1,60 @@ +#ifndef MAILCORE_MCRANGE_H + +#define MAILCORE_MCRANGE_H + +#ifdef __cplusplus + +#include <inttypes.h> + +#include <MailCore/MCUtils.h> + +#ifndef UINT64_MAX +# define UINT64_MAX 18446744073709551615ULL +#endif + +namespace mailcore { + + class IndexSet; + class String; + + // infinite length : UINT64_MAX + // empty range : location = UINT64_MAX + struct Range { + uint64_t location; + uint64_t length; + }; + + MAILCORE_EXPORT + extern Range RangeEmpty; + + MAILCORE_EXPORT + Range RangeMake(uint64_t location, uint64_t length); + + MAILCORE_EXPORT + IndexSet * RangeRemoveRange(Range range1, Range range2); + + MAILCORE_EXPORT + IndexSet * RangeUnion(Range range1, Range range2); + + MAILCORE_EXPORT + Range RangeIntersection(Range range1, Range range2); + + MAILCORE_EXPORT + bool RangeHasIntersection(Range range1, Range range2); + + MAILCORE_EXPORT + uint64_t RangeLeftBound(Range range); + + MAILCORE_EXPORT + uint64_t RangeRightBound(Range range); + + MAILCORE_EXPORT + String * RangeToString(Range range); + + MAILCORE_EXPORT + Range RangeFromString(String * rangeString); +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCRenderer.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCRenderer.h new file mode 100644 index 0000000000000000000000000000000000000000..441b63b4d39e023b794bdea82b0f8fc637aaf438 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCRenderer.h @@ -0,0 +1,17 @@ +// +// MCRenderer.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 2/2/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCRENDERER_H + +#define MAILCORE_MCRENDERER_H + +#include <MailCore/MCHTMLRendererCallback.h> +#include <MailCore/MCDateFormatter.h> +#include <MailCore/MCAddressDisplay.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSMTP.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSMTP.h new file mode 100644 index 0000000000000000000000000000000000000000..452e024ff5e2ed58b9158ab6fd4916d9df9d2347 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSMTP.h @@ -0,0 +1,8 @@ +#ifndef MAILCORE_MCSMTP_H + +#define MAILCORE_MCSMTP_H + +#include <MailCore/MCSMTPProgressCallback.h> +#include <MailCore/MCSMTPSession.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSMTPAsyncSession.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSMTPAsyncSession.h new file mode 100644 index 0000000000000000000000000000000000000000..961df6eff2c134a114c27558a4ecb72d9610d571 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSMTPAsyncSession.h @@ -0,0 +1,101 @@ +#ifndef MAILCORE_MCSMTPASYNCSESSION_H + +#define MAILCORE_MCSMTPASYNCSESSION_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCMessageConstants.h> + +#ifdef __cplusplus + +namespace mailcore { + + class MessageBuilder; + class SMTPOperation; + class SMTPSession; + class Address; + class SMTPOperationQueueCallback; + class SMTPConnectionLogger; + + class MAILCORE_EXPORT SMTPAsyncSession : public Object { + public: + SMTPAsyncSession(); + virtual ~SMTPAsyncSession(); + + virtual void setHostname(String * hostname); + virtual String * hostname(); + + virtual void setPort(unsigned int port); + virtual unsigned int port(); + + virtual void setUsername(String * username); + virtual String * username(); + + virtual void setPassword(String * password); + virtual String * password(); + + virtual void setOAuth2Token(String * token); + virtual String * OAuth2Token(); + + virtual void setAuthType(AuthType authType); + virtual AuthType authType(); + + virtual void setConnectionType(ConnectionType connectionType); + virtual ConnectionType connectionType(); + + virtual void setTimeout(time_t timeout); + virtual time_t timeout(); + + virtual void setCheckCertificateEnabled(bool enabled); + virtual bool isCheckCertificateEnabled(); + + virtual void setUseHeloIPEnabled(bool enabled); + virtual bool useHeloIPEnabled(); + + virtual void setConnectionLogger(ConnectionLogger * logger); + virtual ConnectionLogger * connectionLogger(); + +#ifdef __APPLE__ + virtual void setDispatchQueue(dispatch_queue_t dispatchQueue); + virtual dispatch_queue_t dispatchQueue(); +#endif + + virtual void setOperationQueueCallback(OperationQueueCallback * callback); + virtual OperationQueueCallback * operationQueueCallback(); + virtual bool isOperationQueueRunning(); + virtual void cancelAllOperations(); + + virtual SMTPOperation * loginOperation(); + virtual SMTPOperation * sendMessageOperation(Data * messageData); + virtual SMTPOperation * sendMessageOperation(Address * from, Array * recipients, + Data * messageData); + virtual SMTPOperation * sendMessageOperation(Address * from, Array * recipients, + String * filename); + virtual SMTPOperation * checkAccountOperation(Address * from); + + virtual SMTPOperation * noopOperation(); + + virtual SMTPOperation * disconnectOperation(); + + public: // private + virtual void runOperation(SMTPOperation * operation); + virtual SMTPSession * session(); + virtual void tryAutomaticDisconnect(); + virtual void logConnection(ConnectionLogType logType, Data * buffer); + + private: + SMTPSession * mSession; + OperationQueue * mQueue; + SMTPOperationQueueCallback * mQueueCallback; + ConnectionLogger * mConnectionLogger; + pthread_mutex_t mConnectionLoggerLock; + SMTPConnectionLogger * mInternalLogger; + OperationQueueCallback * mOperationQueueCallback; + + virtual void tryAutomaticDisconnectAfterDelay(void * context); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSMTPOperation.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSMTPOperation.h new file mode 100644 index 0000000000000000000000000000000000000000..d1c4182b5e067277c37f934d62e4363ebceea362 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSMTPOperation.h @@ -0,0 +1,56 @@ +// +// MCSMTPOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/11/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCSMTPOPERATION_H + +#define MAILCORE_MCSMTPOPERATION_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCSMTPProgressCallback.h> + +#ifdef __cplusplus + +namespace mailcore { + + class SMTPAsyncSession; + class SMTPOperationCallback; + + class MAILCORE_EXPORT SMTPOperation : public Operation, public SMTPProgressCallback { + public: + SMTPOperation(); + virtual ~SMTPOperation(); + + virtual void setSession(SMTPAsyncSession * session); + virtual SMTPAsyncSession * session(); + + virtual void setSmtpCallback(SMTPOperationCallback * callback); + virtual SMTPOperationCallback * smtpCallback(); + + virtual void setError(ErrorCode error); + virtual ErrorCode error(); + + virtual String * lastSMTPResponse(); + + virtual int lastSMTPResponseCode(); + + virtual void start(); + + private: + SMTPAsyncSession * mSession; + SMTPOperationCallback * mSmtpCallback; + ErrorCode mError; + private: + virtual void bodyProgress(SMTPSession * session, unsigned int current, unsigned int maximum); + virtual void bodyProgressOnMainThread(void * context); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSMTPOperationCallback.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSMTPOperationCallback.h new file mode 100644 index 0000000000000000000000000000000000000000..a5cfdd84c4323c461569252c66515458ef6e0573 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSMTPOperationCallback.h @@ -0,0 +1,30 @@ +// +// MCSMTPOperationCallback.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/11/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCSMTPOPERATIONCALLBACK_H + +#define MAILCORE_MCSMTPOPERATIONCALLBACK_H + +#include <MailCore/MCUtils.h> + +#ifdef __cplusplus + +namespace mailcore { + + class SMTPOperation; + + class MAILCORE_EXPORT SMTPOperationCallback { + public: + virtual void bodyProgress(SMTPOperation * session, unsigned int current, unsigned int maximum) {}; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSMTPProgressCallback.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSMTPProgressCallback.h new file mode 100644 index 0000000000000000000000000000000000000000..7cc524a26a5eae14c116c4231b4cfc42fb271ddf --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSMTPProgressCallback.h @@ -0,0 +1,22 @@ +#ifndef MAILCORE_MCSMTPPROGRESSCALLBACK_H + +#define MAILCORE_MCSMTPPROGRESSCALLBACK_H + +#ifdef __cplusplus + +#include <MailCore/MCUtils.h> + +namespace mailcore { + + class SMTPSession; + + class MAILCORE_EXPORT SMTPProgressCallback { + public: + virtual void bodyProgress(SMTPSession * session, unsigned int current, unsigned int maximum) {}; + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSMTPSession.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSMTPSession.h new file mode 100644 index 0000000000000000000000000000000000000000..1330c79773e7ea52e3dce299e24b04055609dd7f --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSMTPSession.h @@ -0,0 +1,135 @@ +#ifndef MAILCORE_MCSMTPSESSION_H + +#define MAILCORE_MCSMTPSESSION_H + +#include <MailCore/MCBaseTypes.h> +#include <MailCore/MCMessageConstants.h> + +#ifdef __cplusplus + +namespace mailcore { + + class Address; + class SMTPProgressCallback; + class MessageBuilder; + + class MAILCORE_EXPORT SMTPSession : public Object { + public: + SMTPSession(); + virtual ~SMTPSession(); + + virtual void setHostname(String * hostname); + virtual String * hostname(); + + virtual void setPort(unsigned int port); + virtual unsigned int port(); + + virtual void setUsername(String * username); + virtual String * username(); + + virtual void setPassword(String * password); + virtual String * password(); + + // To authenticate using OAuth2, username and oauth2token should be set. + // auth type to use is AuthTypeOAuth2. + virtual void setOAuth2Token(String * token); + virtual String * OAuth2Token(); + + virtual void setAuthType(AuthType authType); + virtual AuthType authType(); + + virtual void setConnectionType(ConnectionType connectionType); + virtual ConnectionType connectionType(); + + virtual void setTimeout(time_t timeout); + virtual time_t timeout(); + + virtual void setCheckCertificateEnabled(bool enabled); + virtual bool isCheckCertificateEnabled(); + + virtual void setUseHeloIPEnabled(bool enabled); + virtual bool useHeloIPEnabled(); + + virtual String * lastSMTPResponse(); + + virtual int lastSMTPResponseCode(); + + virtual void connect(ErrorCode * pError); + virtual void disconnect(); + + virtual void login(ErrorCode * pError); + + virtual void checkAccount(Address * from, ErrorCode * pError); + + virtual void sendMessage(Data * messageData, SMTPProgressCallback * callback, ErrorCode * pError); + virtual void sendMessage(Address * from, Array * /* Address */ recipients, Data * messageData, + SMTPProgressCallback * callback, ErrorCode * pError); + virtual void sendMessage(Address * from, Array * /* Address */ recipients, String * messagePath, + SMTPProgressCallback * callback, ErrorCode * pError); + + virtual void cancelMessageSending(); + + virtual void setConnectionLogger(ConnectionLogger * logger); + virtual ConnectionLogger * connectionLogger(); + + virtual void noop(ErrorCode * pError); + + public: // private + virtual void lockConnectionLogger(); + virtual void unlockConnectionLogger(); + virtual ConnectionLogger * connectionLoggerNoLock(); + + private: + String * mHostname; + unsigned int mPort; + String * mUsername; + String * mPassword; + String * mOAuth2Token; + AuthType mAuthType; + ConnectionType mConnectionType; + time_t mTimeout; + bool mCheckCertificateEnabled; + bool mUseHeloIPEnabled; + bool mShouldDisconnect; + bool mSendingCancelled; + bool mCanCancel; + + mailsmtp * mSmtp; + SMTPProgressCallback * mProgressCallback; + int mState; + String * mLastSMTPResponse; + int mLastLibetpanError; + int mLastSMTPResponseCode; + pthread_mutex_t mCancelLock; + pthread_mutex_t mCanCancelLock; + + ConnectionLogger * mConnectionLogger; + pthread_mutex_t mConnectionLoggerLock; + + bool mOutlookServer; + + void init(); + Data * dataWithFilteredBcc(Data * data); + static void body_progress(size_t current, size_t maximum, void * context); + void bodyProgress(unsigned int current, unsigned int maximum); + void setup(); + void unsetup(); + void connectIfNeeded(ErrorCode * pError); + bool checkCertificate(); + void setSendingCancelled(bool isCancelled); + + void sendMessage(MessageBuilder * msg, SMTPProgressCallback * callback, ErrorCode * pError); + void internalSendMessage(Address * from, Array * /* Address */ recipients, Data * messageData, + SMTPProgressCallback * callback, ErrorCode * pError); + + public: // private + virtual bool isDisconnected(); + virtual void loginIfNeeded(ErrorCode * pError); + virtual void saveLastResponse(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSet.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSet.h new file mode 100644 index 0000000000000000000000000000000000000000..8b477cc1142f39e39907219abeb0a407536407b9 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCSet.h @@ -0,0 +1,49 @@ +#ifndef MAILCORE_CSET_H + +#define MAILCORE_CSET_H + +#include <MailCore/MCObject.h> + +#ifdef __cplusplus + +namespace mailcore { + + class String; + class Array; + class HashMap; + + class MAILCORE_EXPORT Set : public Object { + public: + Set(); + Set(Set * o); + + static Set * set(); + static Set * setWithArray(Array * objects); + + virtual unsigned int count(); + virtual void addObject(Object * obj); + virtual void removeObject(Object * obj); + virtual bool containsObject(Object * obj); + virtual Object * member(Object * obj); + + virtual Array * allObjects(); + virtual void removeAllObjects(); + virtual void addObjectsFromArray(Array * objects); + + public: // subclass behavior + virtual ~Set(); + virtual String * description(); + virtual Object * copy(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + + private: + HashMap * mHash; + void init(); + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCString.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCString.h new file mode 100644 index 0000000000000000000000000000000000000000..5ee2ad65150921940f5821ec3845ea06e0ed76cb --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCString.h @@ -0,0 +1,152 @@ +#ifndef MAILCORE_MCSTR_H + +#define MAILCORE_MCSTR_H + +#include <MailCore/MCObject.h> +#include <MailCore/MCRange.h> +#include <MailCore/MCICUTypes.h> + +#include <stdlib.h> +#include <stdarg.h> + +#ifdef __cplusplus + +namespace mailcore { + + class Data; + class Array; + + class MAILCORE_EXPORT String : public Object { + public: + String(const UChar * unicodeChars = NULL); + String(const UChar * unicodeChars, unsigned int length); + String(const char * UTF8Characters); + String(Data * data, const char * charset); + String(const char * bytes, unsigned int length, const char * charset = NULL); + virtual ~String(); + + static String * string(); + static String * stringWithUTF8Format(const char * format, ...); + static String * stringWithVUTF8Format(const char * format, va_list ap); + static String * stringWithUTF8Characters(const char * UTF8Characters); + static String * stringWithCharacters(const UChar * characters); + static String * stringWithCharacters(const UChar * characters, unsigned int length); + static String * stringWithData(Data * data, const char * charset = NULL); + + virtual const UChar * unicodeCharacters(); + virtual const char * UTF8Characters(); + virtual unsigned int length(); + + virtual void appendString(String * otherString); + virtual void appendUTF8Format(const char * format, ...); + virtual void appendCharacters(const UChar * unicodeCharacters); + virtual void appendCharactersLength(const UChar * unicodeCharacters, unsigned int length); + virtual void appendUTF8Characters(const char * UTF8Characters); + virtual void setString(String * otherString); + virtual void setUTF8Characters(const char * UTF8Characters); + virtual void setCharacters(const UChar * unicodeCharacters); + + virtual String * stringByAppendingString(String * otherString); + virtual String * stringByAppendingUTF8Format(const char * format, ...); + virtual String * stringByAppendingUTF8Characters(const char * UTF8Characters); + virtual String * stringByAppendingCharacters(const UChar * unicodeCharacters); + virtual String * stringByAppendingPathComponent(String * component); + virtual String * stringByDeletingLastPathComponent(); + virtual String * stringByDeletingPathExtension(); + + virtual int compare(String * otherString); + virtual int caseInsensitiveCompare(String * otherString); + virtual String * lowercaseString(); + virtual String * uppercaseString(); + + virtual UChar characterAtIndex(unsigned int idx); + virtual void deleteCharactersInRange(Range range); + virtual unsigned int replaceOccurrencesOfString(String * occurrence, String * replacement); + virtual int locationOfString(String * occurrence); + virtual int lastLocationOfString(String * occurrence); + + virtual Array * componentsSeparatedByString(String * separator); + + virtual bool isEqualCaseInsensitive(String * otherString); + + // Additions + static String * stringByDecodingMIMEHeaderValue(const char * phrase); + virtual Data * encodedAddressDisplayNameValue(); + virtual Data * encodedMIMEHeaderValue(); + virtual Data * encodedMIMEHeaderValueForSubject(); + virtual String * extractedSubject(); + virtual String * extractedSubjectAndKeepBracket(bool keepBracket); + static String * uuidString(); + + virtual bool hasSuffix(String * suffix); + virtual bool hasPrefix(String * prefix); + + virtual String * substringFromIndex(unsigned int idx); + virtual String * substringToIndex(unsigned int idx); + virtual String * substringWithRange(Range range); + + virtual String * flattenHTML(); + virtual String * flattenHTMLAndShowBlockquote(bool showBlockquote); + virtual String * flattenHTMLAndShowBlockquoteAndLink(bool showBlockquote, bool showLink); + + virtual String * stripWhitespace(); + + virtual String * lastPathComponent(); + virtual String * pathExtension(); + virtual Data * dataUsingEncoding(const char * charset = NULL); + + virtual const char * fileSystemRepresentation(); + static String * stringWithFileSystemRepresentation(const char * filename); + + int intValue(); + unsigned int unsignedIntValue(); + long longValue(); + unsigned long unsignedLongValue(); + long long longLongValue(); + unsigned long long unsignedLongLongValue(); + double doubleValue(); + + virtual Data * mUTF7EncodedData(); + static String * stringWithMUTF7Data(Data * data); + virtual String * mUTF7EncodedString(); + virtual String * mUTF7DecodedString(); + + virtual String * htmlEncodedString(); + virtual String * cleanedHTMLString(); + virtual String * htmlMessageContent(); + + virtual Data * decodedBase64Data(); + + virtual String * urlDecodedString(); + virtual String * urlEncodedString(); + + public: // private + static String * uniquedStringWithUTF8Characters(const char * UTF8Characters); + + public: // subclass behavior + String(String * otherString); + virtual String * description(); + virtual Object * copy(); + virtual bool isEqual(Object * otherObject); + virtual unsigned int hash(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + + private: + UChar * mUnicodeChars; + unsigned int mLength; + unsigned int mAllocated; + void allocate(unsigned int length, bool force = false); + void reset(); + int compareWithCaseSensitive(String * otherString, bool caseSensitive); + void appendBytes(const char * bytes, unsigned int length, const char * charset); + void appendUTF8CharactersLength(const char * UTF8Characters, unsigned int length); + }; + + MAILCORE_EXPORT + void setICUDataDirectory(String * directory); +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCUtils.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCUtils.h new file mode 100644 index 0000000000000000000000000000000000000000..ef8f3cd3791c6a2b52084f796c574b066e59dff0 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCUtils.h @@ -0,0 +1,86 @@ +#ifndef MAILCORE_MCUTILS_H + +#define MAILCORE_MCUTILS_H + +#ifdef __cplusplus + +#define MC_SAFE_RETAIN(o) ((o) != NULL ? (o)->retain() : NULL) +#define MC_SAFE_COPY(o) ((o) != NULL ? (o)->copy() : NULL) + +#define MC_SAFE_RELEASE(o) \ + do { \ + if ((o) != NULL) { \ + (o)->release(); \ + (o) = NULL; \ + } \ + } while (0) + +#define MC_SAFE_REPLACE_RETAIN(type, mField, value) \ + do { \ + MC_SAFE_RELEASE(mField); \ + mField = (type *) MC_SAFE_RETAIN(value); \ + } while (0) + +#define MC_SAFE_REPLACE_COPY(type, mField, value) \ + do { \ + MC_SAFE_RELEASE(mField); \ + mField = (type *) MC_SAFE_COPY(value); \ + } while (0) + +#define MCSTR(str) mailcore::String::uniquedStringWithUTF8Characters("" str "") + +#define MCUTF8(str) MCUTF8DESC(str) +#define MCUTF8DESC(obj) ((obj) != NULL ? (obj)->description()->UTF8Characters() : NULL ) + +#define MCLOCALIZEDSTRING(key) key + +#define MCISKINDOFCLASS(instance, class) (dynamic_cast<class *>(instance) != NULL) + +#endif + +#ifdef _MSC_VER +# ifdef MAILCORE_DLL +# define MAILCORE_EXPORT __declspec(dllexport) +# else +# define MAILCORE_EXPORT __declspec(dllimport) +# endif +#else +# define MAILCORE_EXPORT +#endif + +#ifdef __ANDROID_API__ +#if __ANDROID_API__ < 21 +#include <wchar.h> +extern int iswblank(wint_t); +extern int vfwscanf(FILE*, const wchar_t*, va_list); +extern int vswscanf(const wchar_t*, const wchar_t*, va_list); +extern int vwscanf(const wchar_t*, va_list); +extern float wcstof(const wchar_t*, wchar_t**); +extern long double wcstold(const wchar_t*, wchar_t**); +extern long long wcstoll(const wchar_t*, wchar_t**, int); +extern unsigned long long wcstoull(const wchar_t*, wchar_t**, int); +#endif +#endif + +#ifdef __clang__ + +#if __has_feature(attribute_analyzer_noreturn) +#define CLANG_ANALYZER_NORETURN __attribute__((analyzer_noreturn)) +#else +#define CLANG_ANALYZER_NORETURN +#endif + +#define ATTRIBUTE_RETURNS_NONNULL __attribute__((returns_nonnull)) + +#else + +#define CLANG_ANALYZER_NORETURN +#define ATTRIBUTE_RETURNS_NONNULL + +#endif + +#ifndef DEPRECATED_ATTRIBUTE +#define DEPRECATED_ATTRIBUTE __attribute__((deprecated)) +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCValue.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCValue.h new file mode 100644 index 0000000000000000000000000000000000000000..835cf6b6a45a6245eb41dfd1a3b60e198fe0721f --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MCValue.h @@ -0,0 +1,113 @@ +#ifndef MAILCORE_MCVALUE_H + +#define MAILCORE_MCVALUE_H + +#include <MailCore/MCObject.h> + +#ifdef __cplusplus + +namespace mailcore { + + class String; + + enum { + ValueTypeNone, + ValueTypeBool, + ValueTypeChar, + ValueTypeUnsignedChar, + ValueTypeShort, + ValueTypeUnsignedShort, + ValueTypeInt, + ValueTypeUnsignedInt, + ValueTypeLong, + ValueTypeUnsignedLong, + ValueTypeLongLong, + ValueTypeUnsignedLongLong, + ValueTypeFloat, + ValueTypeDouble, + ValueTypePointer, + ValueTypeData, + }; + + class MAILCORE_EXPORT Value : public Object { + public: + virtual ~Value(); + + static Value * valueWithBoolValue(bool value); + static Value * valueWithCharValue(char value); + static Value * valueWithUnsignedCharValue(unsigned char value); + static Value * valueWithShortValue(short value); + static Value * valueWithUnsignedShortValue(unsigned short value); + static Value * valueWithIntValue(int value); + static Value * valueWithUnsignedIntValue(unsigned int value); + static Value * valueWithLongValue(long value); + static Value * valueWithUnsignedLongValue(unsigned long value); + static Value * valueWithLongLongValue(long long value); + static Value * valueWithUnsignedLongLongValue(unsigned long long value); + static Value * valueWithFloatValue(float value); + static Value * valueWithDoubleValue(double value); + static Value * valueWithPointerValue(void * value); + static Value * valueWithData(const char * value, int length); + + virtual bool boolValue(); + virtual char charValue(); + virtual unsigned char unsignedCharValue(); + virtual short shortValue(); + virtual unsigned short unsignedShortValue(); + virtual int intValue(); + virtual unsigned int unsignedIntValue(); + virtual long longValue(); + virtual unsigned long unsignedLongValue(); + virtual long long longLongValue(); + virtual unsigned long long unsignedLongLongValue(); + virtual float floatValue(); + virtual double doubleValue(); + virtual void * pointerValue(); + virtual void dataValue(const char ** p_value, int * p_length); + + public: // subclass behavior + Value(Value * other); + virtual String * description(); + virtual bool isEqual(Object * otherObject); + virtual unsigned int hash(); + Object * copy(); + virtual HashMap * serializable(); + virtual void importSerializable(HashMap * serializable); + + public: // private + static void * createObject(); + + private: + int mType; + union { + bool boolValue; + char charValue; + unsigned char unsignedCharValue; + short shortValue; + unsigned short unsignedShortValue; + int intValue; + unsigned int unsignedIntValue; + long longValue; + unsigned long unsignedLongValue; + long long longLongValue; + unsigned long long unsignedLongLongValue; + float floatValue; + double doubleValue; + void * pointerValue; + struct { + char * data; + int length; + } dataValue; + } mValue; + Value(); + + public: // private + virtual int type(); + + }; + +} + +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MailCore.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MailCore.h new file mode 100644 index 0000000000000000000000000000000000000000..8b0897f0148145818d001d6d1167082435e02467 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/MailCore.h @@ -0,0 +1,17 @@ +// +// mailcore.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/10/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MAILCORE_H + +#define MAILCORE_MAILCORE_H + +#include <MailCore/MCCore.h> +#include <MailCore/MCAsync.h> +#include <MailCore/MCObjC.h> + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSArray+MCO.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSArray+MCO.h new file mode 100644 index 0000000000000000000000000000000000000000..fd0cc6ad2d87b488b1f09d73c7497ef8a93bb45f --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSArray+MCO.h @@ -0,0 +1,31 @@ +// +// NSArray+MCO.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/29/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_NSARRAY_MCO_H + +#define MAILCORE_NSARRAY_MCO_H + +#import <Foundation/Foundation.h> + +#ifdef __cplusplus +namespace mailcore { + class Array; +} +#endif + +@interface NSArray (MCO) + +#ifdef __cplusplus ++ (NSArray *) mco_arrayWithMCArray:(mailcore::Array *)array; + +- (mailcore::Array *) mco_mcArray; +#endif + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSData+MCO.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSData+MCO.h new file mode 100644 index 0000000000000000000000000000000000000000..ddb09595d48242bcce8e5be562b118fbd895d158 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSData+MCO.h @@ -0,0 +1,31 @@ +// +// NSData+MCO.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/21/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_NSDATA_MCO_H + +#define MAILCORE_NSDATA_MCO_H + +#import <Foundation/Foundation.h> + +#ifdef __cplusplus +namespace mailcore { + class Data; +} +#endif + +@interface NSData (MCO) + +#ifdef __cplusplus ++ (NSData *) mco_dataWithMCData:(mailcore::Data *)cppData; + +- (mailcore::Data *) mco_mcData; +#endif + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSDictionary+MCO.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSDictionary+MCO.h new file mode 100644 index 0000000000000000000000000000000000000000..e91fd21b4e5bb6ab3201c6668c0e509234b633ea --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSDictionary+MCO.h @@ -0,0 +1,31 @@ +// +// NSDictionary+MCO.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/29/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_NSDICTIONARY_MCO_H + +#define MAILCORE_NSDICTIONARY_MCO_H + +#import <Foundation/Foundation.h> + +#ifdef __cplusplus +namespace mailcore { + class HashMap; +} +#endif + +@interface NSDictionary (MCO) + +#ifdef __cplusplus ++ (NSDictionary *) mco_dictionaryWithMCHashMap:(mailcore::HashMap *)hashmap; + +- (mailcore::HashMap *) mco_mcHashMap; +#endif + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSError+MCO.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSError+MCO.h new file mode 100644 index 0000000000000000000000000000000000000000..027796ea821a1b6a135fa2e674efacb8da92b104 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSError+MCO.h @@ -0,0 +1,19 @@ +// +// Created by mronge on 1/31/13. +// + +#ifndef MAILCORE_NSERROR_MCO_H + +#define MAILCORE_NSERROR_MCO_H + +#import <Foundation/Foundation.h> + +#import <MailCore/MCMessageConstants.h> + +@interface NSError (MCO) +#ifdef __cplusplus ++ (NSError *) mco_errorWithErrorCode:(mailcore::ErrorCode)code; +#endif +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSIndexSet+MCO.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSIndexSet+MCO.h new file mode 100644 index 0000000000000000000000000000000000000000..66aa5229c3013b12eb1822138aacbf7c30b03595 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSIndexSet+MCO.h @@ -0,0 +1,18 @@ +// +// NSIndexSet+MCO.h +// mailcore2 +// +// Created by Hoa V. DINH on 9/10/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#import <Foundation/Foundation.h> + +@class MCOIndexSet; + +@interface NSIndexSet (MCO) + +/** Returns a MCOIndexSet from an NSIndexSet */ +- (MCOIndexSet *) mcoIndexSet; + +@end diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSObject+MCO.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSObject+MCO.h new file mode 100644 index 0000000000000000000000000000000000000000..e879a39f56cbd448b28688eab2bdad5518318569 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSObject+MCO.h @@ -0,0 +1,109 @@ +// +// NSObject+MCO.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/29/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_NSOBJECT_MCO_H + +#define MAILCORE_NSOBJECT_MCO_H + +#import <Foundation/Foundation.h> + +#ifdef __cplusplus +#include <typeinfo> +#endif + +#ifdef __cplusplus +namespace mailcore { + class Object; +} +#endif + +#define MCO_NATIVE_INSTANCE ((nativeType *) [self mco_mcObject]) + +#define MCO_TO_OBJC(mcValue) \ + [NSObject mco_objectWithMCObject:((mailcore::Object *) (mcValue))] + +#define MCO_FROM_OBJC(type, objcValue) \ + ((type *) [(objcValue) mco_mcObject]) + +#define MCO_OBJC_BRIDGE_SET(setter, mcValueType, objcValue) \ + MCO_NATIVE_INSTANCE->setter((mcValueType *) [(objcValue) mco_mcObject]) + +#define MCO_OBJC_BRIDGE_GET(getter) \ + [NSObject mco_objectWithMCObject:MCO_NATIVE_INSTANCE->getter()] + +#define MCO_OBJC_SYNTHESIZE_TYPE(objcType, mcType, setter, getter) \ +- (objcType *) getter \ +{ \ +return MCO_OBJC_BRIDGE_GET(getter); \ +} \ +\ +- (void) setter:(objcType *)getter \ +{ \ +MCO_OBJC_BRIDGE_SET(setter, mcType, getter); \ +} + +#define MCO_OBJC_SYNTHESIZE(type, setter, getter) \ + MCO_OBJC_SYNTHESIZE_TYPE(MCO ## type, mailcore::type, setter, getter) + +#define MCO_OBJC_SYNTHESIZE_SCALAR(objcType, mcType, setter, getter) \ +- (objcType) getter \ +{ \ +return (objcType) MCO_NATIVE_INSTANCE->getter(); \ +} \ +\ +- (void) setter:(objcType)getter \ +{ \ +MCO_NATIVE_INSTANCE->setter((mcType) getter); \ +} + +#define MCO_OBJC_SYNTHESIZE_STRING(setter, getter) MCO_OBJC_SYNTHESIZE_TYPE(NSString, mailcore::String, setter, getter) +#define MCO_OBJC_SYNTHESIZE_ARRAY(setter, getter) MCO_OBJC_SYNTHESIZE_TYPE(NSArray, mailcore::Array, setter, getter) +#define MCO_OBJC_SYNTHESIZE_DATA(setter, getter) MCO_OBJC_SYNTHESIZE_TYPE(NSData, mailcore::Data, setter, getter) +#define MCO_OBJC_SYNTHESIZE_HASHMAP(setter, getter) MCO_OBJC_SYNTHESIZE_TYPE(NSDictionary, mailcore::HashMap, setter, getter) +#define MCO_OBJC_SYNTHESIZE_BOOL(setter, getter) MCO_OBJC_SYNTHESIZE_SCALAR(BOOL, bool, setter, getter) + +#define MCO_OBJC_SYNTHESIZE_DATE(setter, getter) \ +- (NSDate *) getter \ +{ \ + return [NSDate dateWithTimeIntervalSince1970:MCO_NATIVE_INSTANCE->getter()]; \ +} \ +\ +- (void) setter:(NSDate *)getter \ +{ \ + MCO_NATIVE_INSTANCE->setter([getter timeIntervalSince1970]); \ +} + +#define MCO_SYNTHESIZE_NSCODING \ +- (instancetype) initWithCoder:(NSCoder *)coder \ +{ \ + mailcore::HashMap * serializable = MCO_FROM_OBJC(mailcore::HashMap, [coder decodeObjectForKey:@"info"]); \ + self = MCO_TO_OBJC(mailcore::Object::objectWithSerializable(serializable)); \ + [self retain]; \ + return self; \ +} \ +\ +- (void) encodeWithCoder:(NSCoder *)coder \ +{ \ + [coder encodeObject:MCO_TO_OBJC(MCO_FROM_OBJC(nativeType, self)->serializable()) forKey:@"info"]; \ +} + +@interface NSObject (MCO) + +#ifdef __cplusplus ++ (id) mco_objectWithMCObject:(mailcore::Object *)object; + +- (mailcore::Object *) mco_mcObject; +#endif + +@end + +#ifdef __cplusplus +extern void MCORegisterClass(Class aClass, const std::type_info * info); +#endif + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSString+MCO.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSString+MCO.h new file mode 100644 index 0000000000000000000000000000000000000000..71e99a440b631046f036b4ce1f80513a522a832f --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSString+MCO.h @@ -0,0 +1,41 @@ +// +// NSString+MCO.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 1/21/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_NSSTRING_MCO_H + +#define MAILCORE_NSSTRING_MCO_H + +#import <Foundation/Foundation.h> + +#ifdef __cplusplus +namespace mailcore { + class String; + class Object; +} +#endif + +@interface NSString (MCO) + +#ifdef __cplusplus ++ (NSString *) mco_stringWithMCString:(mailcore::String *)cppString; ++ (NSString *) mco_stringWithMCObject:(mailcore::Object *)object; + +- (mailcore::String *) mco_mcString; +#endif + +- (NSString *) mco_flattenHTML; +- (NSString *) mco_flattenHTMLAndShowBlockquote:(BOOL)showBlockquote; +- (NSString *) mco_flattenHTMLAndShowBlockquote:(BOOL)showBlockquote showLink:(BOOL)showLink; + +- (NSString *) mco_htmlEncodedString; +- (NSString *) mco_cleanedHTMLString; +- (NSString *) mco_strippedWhitespace; + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSValue+MCO.h b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSValue+MCO.h new file mode 100644 index 0000000000000000000000000000000000000000..007662b7b11f572cf460c9494f156dd664419881 --- /dev/null +++ b/Pods/mailcore2-ios/cocoapods-build/include/MailCore/NSValue+MCO.h @@ -0,0 +1,31 @@ +// +// NSValue+MCO.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/21/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_NSVALUE_MCO_H + +#define MAILCORE_NSVALUE_MCO_H + +#import <Foundation/Foundation.h> + +#ifdef __cplusplus +namespace mailcore { + class Value; +} +#endif + +@interface NSValue (MCO) + +#ifdef __cplusplus ++ (NSValue *) mco_valueWithMCValue:(mailcore::Value *)value; + +- (mailcore::Value *) mco_mcValue; +#endif + +@end + +#endif diff --git a/Pods/mailcore2-ios/cocoapods-build/lib/libMailCore-ios.a b/Pods/mailcore2-ios/cocoapods-build/lib/libMailCore-ios.a new file mode 100644 index 0000000000000000000000000000000000000000..566c919d4fe4125f7764b51da906089f7a2f0b95 Binary files /dev/null and b/Pods/mailcore2-ios/cocoapods-build/lib/libMailCore-ios.a differ