Inherits from NSObject
Declared in AMPlugin.h
AMPlugin.m

Properties

bundle

@property (strong) NSBundle *bundle

myView

@property (strong) AMPView *myView

path

@property (strong) NSString *path

preferences

@property (strong) NSMutableDictionary *preferences

Instance Methods

Accounts

All Accounts of Airmail

- (NSArray *)Accounts

Return Value

an array of AMPAccount

Declared In

AMPlugin.h

Disable

Called when the plugin is disabled

- (void)Disable

Declared In

AMPlugin.h

Enable

Called when the plugin is enabled

- (void)Enable

Declared In

AMPlugin.h

Folders:

All the folders for an account

- (NSArray *)Folders:(AMPAccount *)ampacc

Parameters

ampacc

the account of the requested folders

Return Value

an array of AMPFolder

Declared In

AMPlugin.h

Invalid

Called when the plugin is set to invalid state

- (void)Invalid

Declared In

AMPlugin.h

Load

The Load is called int the plugin init

- (BOOL)Load

Return Value

Boolean if NO the plugin will not be loaded

Declared In

AMPlugin.h

LoadPreferences

- (NSMutableDictionary *)LoadPreferences

LogError:

Log an error

- (void)LogError:(NSString *)desc

Parameters

desc

text for the log

Declared In

AMPlugin.h

LogTrace:

Trace log for debug

- (void)LogTrace:(NSString *)desc

Parameters

desc

text for the log

Declared In

AMPlugin.h

OrderedFoldersWithStandardFirst:

All the folders for an account standard folders(inbox,starred,…) first

- (NSArray *)OrderedFoldersWithStandardFirst:(AMPAccount *)ampacc

Parameters

ampacc

the account of the requested folders

Return Value

an array of AMPFolder

Declared In

AMPlugin.h

Reload

Called when the user decide to reload the plugin

- (void)Reload

Declared In

AMPlugin.h

SavePreferences

A method to save a preference (key,value) in a plist in the suggested path folder

- (BOOL)SavePreferences

Return Value

Yes if successful

Declared In

AMPlugin.h

ampMenuActionItem:

The menu item that AM will add to the message menu

- (NSMenuItem *)ampMenuActionItem:(NSArray *)messages

Parameters

messages

the selected messages when the item is activated

Return Value

the menu item

Declared In

AMPlugin.h

ampMenuComposerItem:

The menu item that AM will add in the composer

- (NSMenuItem *)ampMenuComposerItem:(AMPComposerInfo *)info

Return Value

the menu item

Declared In

AMPlugin.h

ampPileChangedRecipients:

Called on a recipients change in the composer

- (NSNumber *)ampPileChangedRecipients:(AMPComposerInfo *)info

Parameters

info

of the current composer

Return Value

void

Declared In

AMPlugin.h

ampPileComposerView:

Called to add a button on the composer

- (NSArray *)ampPileComposerView:(AMPComposerInfo *)info

Parameters

info

of the current composer

Return Value

the button to show

Declared In

AMPlugin.h

ampPileIsEncrypted:

Called to let AM know if the message is encrypted

- (NSNumber *)ampPileIsEncrypted:(AMPMCOMessageParser *)parser

Parameters

the

parser of the rfc to analyze

Return Value

a Number with the amp_encryption_type

Declared In

AMPlugin.h

ampPileMessageView:

Get the a message and create an array of NSView to render in the bodyview

- (NSArray *)ampPileMessageView:(AMPMessage *)message

Parameters

message

the message to render

Return Value

the array of views to render

Declared In

AMPlugin.h

ampPileVerifySignature:

Called to verify the signature of the message

- (AMPSignatureVerify *)ampPileVerifySignature:(AMPMessage *)message

Parameters

the

message

Return Value

a Number with the amp_verify_signature value

Declared In

AMPlugin.h

ampQueueNotify:

Called after the standard AM notify. Is called for each message that AM will notify in the notification center

- (NSNumber *)ampQueueNotify:(AMPMessage *)message

Parameters

message

the message to notify

Return Value

a number with a boolean YES/NO

Declared In

AMPlugin.h

ampRuleActionItem:

Called as rule action

- (NSNumber *)ampRuleActionItem:(AMPMessage *)message

Parameters

message

the message filtered by the rule condition

Return Value

the Number for a bool if the rule is applied to the message

Declared In

AMPlugin.h

ampStackComposerRenderHtmlFromHtml:composerInfo:

Get the html for the new created composer

- (NSString *)ampStackComposerRenderHtmlFromHtml:(NSString *)html composerInfo:(AMPComposerInfo *)info

Parameters

info

of the current composer

Return Value

the html to render

Declared In

AMPlugin.h

ampStackDecrypt:

Called to decrypt the message

- (NSData *)ampStackDecrypt:(AMPMessage *)message

Parameters

the

message

Return Value

the decrypted rfc data to render

Declared In

AMPlugin.h

ampStackMessageRenderFromHtml:message:

Get the html from the html that AM create from a message, to render in the bodyview. Stack methods can be queued, so AM will call all the plugins with a stack method in a random order.

- (NSString *)ampStackMessageRenderFromHtml:(NSString *)html message:(AMPMessage *)message

Parameters

html

the html to process

Return Value

the html to render

Declared In

AMPlugin.h

ampStackSendRfc:composer:

Called to before to send a mail

- (AMPSendResult *)ampStackSendRfc:(NSString *)rfc composer:(AMPComposerInfo *)info

Parameters

the

builder of the rfc to change

Return Value

the builder of the rfc to send

Declared In

AMPlugin.h

ampUniqueComposerRenderHtml:

Get the html from a message to render in the composer Unique methods are called only one time from AM, if more than one plugin support Unique methods only one of them (randomly) will be used

- (NSString *)ampUniqueComposerRenderHtml:(AMPComposerInfo *)info

Parameters

info

the message to render

Return Value

the html to render

Declared In

AMPlugin.h

ampUniqueMessageRender:

Get the html from a message to render in the bodyview Unique methods are called only one time from AM, if more than one plugin support Unique methods only one of them (randomly) will be used

- (NSString *)ampUniqueMessageRender:(AMPMessage *)message

Parameters

message

the message to render

Return Value

info of the current composer

Declared In

AMPlugin.h

authortext

The plugin author (must override)

- (NSString *)authortext

Return Value

The author

Declared In

AMPlugin.h

bundlepathContents

A list of the files under the plugin bundle resources

- (NSArray *)bundlepathContents

Return Value

an array of paths

Declared In

AMPlugin.h

descriptiontext

A short description of the plugin (must override)

- (NSString *)descriptiontext

Return Value

the description

Declared In

AMPlugin.h

icon

The plugin icon (must override)

- (NSImage *)icon

Return Value

icon

Declared In

AMPlugin.h

identifier

The plugin bundle identifier

- (NSString *)identifier

Return Value

the identifier

Declared In

AMPlugin.h

init

- (id)init

initWithbundle:parh:

- (id)initWithbundle:(NSBundle *)bundle parh:(NSString *)path

loadImage:

laod an image from the plugin bundle

- (NSImage *)loadImage:(NSString *)imageName

Return Value

the image

Declared In

AMPlugin.h

nametext

The plugin name (must override)

- (NSString *)nametext

Return Value

the name

Declared In

AMPlugin.h

pluginview

The view to show in the AM preference (must override)

- (AMPView *)pluginview

Return Value

the view

Declared In

AMPlugin.h

preferencesPath

The path of the preference plist

- (NSString *)preferencesPath

Return Value

the path

Declared In

AMPlugin.h

suggestedpath

the suggested path for saving data

- (NSString *)suggestedpath

Return Value

the path

Declared In

AMPlugin.h

suggestedpathContents

A list of the files under the plugin data folder (suggested path)

- (NSArray *)suggestedpathContents

Return Value

an array of paths

Declared In

AMPlugin.h

supportlink

The plugin support link (must override)

- (NSString *)supportlink

Return Value

support link

Declared In

AMPlugin.h

versiontext

The plugin version (from bundle)

- (NSString *)versiontext

Return Value

plugin version

Declared In

AMPlugin.h