kopano-ol-extension/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Stubs/IAddIn.cs

76 lines
1.9 KiB
C#
Raw Normal View History

2017-02-08 15:40:48 +01:00
using Acacia.Features;
using Acacia.UI.Outlook;
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; }
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
#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();
void Quit();
2017-02-08 15:40:48 +01:00
void InvokeUI(Action action);
IFolder GetFolderFromID(string folderId);
FeatureType GetFeature<FeatureType>()
where FeatureType : Feature;
IRecipient ResolveRecipient(string name);
IStore AddFileStore(string path);
/// <summary>
/// Returns the stores. The caller is responsible for disposing.
/// </summary>
IEnumerable<IStore> Stores { get; }
#endregion
2017-02-08 15:40:48 +01:00
}
}