2017-02-08 15:40:48 +01:00
|
|
|
|
using Acacia.Features;
|
|
|
|
|
using Acacia.UI.Outlook;
|
2017-02-09 16:00:21 +01:00
|
|
|
|
using Acacia.Utils;
|
2017-02-08 15:40:48 +01:00
|
|
|
|
using Acacia.ZPush;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using NSOutlook = Microsoft.Office.Interop.Outlook;
|
|
|
|
|
|
|
|
|
|
namespace Acacia.Stubs
|
|
|
|
|
{
|
|
|
|
|
public interface IAddIn
|
|
|
|
|
{
|
|
|
|
|
NSOutlook.Application RawApp { get; } // TODO: remove
|
|
|
|
|
|
|
|
|
|
ZPushWatcher Watcher { get; }
|
2017-02-09 16:00:21 +01:00
|
|
|
|
MailEvents MailEvents { get; }
|
2017-02-08 15:40:48 +01:00
|
|
|
|
IEnumerable<Feature> Features { get; }
|
|
|
|
|
IEnumerable<KeyValuePair<string,string>> COMAddIns { get; }
|
|
|
|
|
string Version { get; }
|
2017-02-14 10:47:51 +01:00
|
|
|
|
ISyncObject GetSyncObject();
|
2017-02-08 15:40:48 +01:00
|
|
|
|
|
2017-02-10 11:01:19 +01:00
|
|
|
|
#region UI
|
2017-02-08 15:40:48 +01:00
|
|
|
|
|
|
|
|
|
OutlookUI OutlookUI { get; }
|
2017-02-10 11:01:19 +01:00
|
|
|
|
IWin32Window Window { get; }
|
|
|
|
|
IExplorer GetActiveExplorer();
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
2017-02-08 15:40:48 +01:00
|
|
|
|
|
|
|
|
|
#region Event handlers
|
|
|
|
|
|
|
|
|
|
// TODO: custom event types
|
|
|
|
|
event NSOutlook.ApplicationEvents_11_ItemLoadEventHandler ItemLoad;
|
|
|
|
|
event NSOutlook.ApplicationEvents_11_ItemSendEventHandler ItemSend;
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
2017-02-09 16:44:13 +01:00
|
|
|
|
#region Miscellaneous methods
|
|
|
|
|
// TODO: clean this up
|
|
|
|
|
|
2017-02-08 15:40:48 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sends and receives all accounts.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void SendReceive();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Restarts the application
|
|
|
|
|
/// </summary>
|
|
|
|
|
void Restart();
|
2017-02-08 18:05:42 +01:00
|
|
|
|
void Quit();
|
2017-02-08 15:40:48 +01:00
|
|
|
|
|
|
|
|
|
void InvokeUI(Action action);
|
|
|
|
|
|
|
|
|
|
IFolder GetFolderFromID(string folderId);
|
|
|
|
|
|
|
|
|
|
FeatureType GetFeature<FeatureType>()
|
|
|
|
|
where FeatureType : Feature;
|
2017-02-09 16:44:13 +01:00
|
|
|
|
|
|
|
|
|
IRecipient ResolveRecipient(string name);
|
|
|
|
|
|
2017-02-10 10:34:36 +01:00
|
|
|
|
IStore AddFileStore(string path);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns the stores. The caller is responsible for disposing.
|
|
|
|
|
/// </summary>
|
|
|
|
|
IEnumerable<IStore> Stores { get; }
|
|
|
|
|
|
2017-02-09 16:44:13 +01:00
|
|
|
|
#endregion
|
2017-02-08 15:40:48 +01:00
|
|
|
|
}
|
|
|
|
|
}
|