/// Copyright 2018 Kopano b.v. /// /// This program is free software: you can redistribute it and/or modify /// it under the terms of the GNU Affero General Public License, version 3, /// as published by the Free Software Foundation. /// /// This program is distributed in the hope that it will be useful, /// but WITHOUT ANY WARRANTY; without even the implied warranty of /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the /// GNU Affero General Public License for more details. /// /// You should have received a copy of the GNU Affero General Public License /// along with this program.If not, see. /// /// Consult LICENSE file for details using Acacia.Features; using Acacia.UI.Outlook; using Acacia.Utils; using Acacia.ZPush; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using NSOutlookDelegates = Microsoft.Office.Interop.Outlook; namespace Acacia.Stubs { public interface IAddIn { ZPushWatcher Watcher { get; } MailEvents MailEvents { get; } IEnumerable Features { get; } IEnumerable> COMAddIns { get; } string Version { get; } string VersionMajor { get; } ISyncObject GetSyncObject(); #region UI OutlookUI OutlookUI { get; } ISystemWindow Window { get; } IExplorer GetActiveExplorer(); IInspectors GetInspectors(); #endregion #region Event handlers // TODO: custom event types event NSOutlookDelegates.ApplicationEvents_11_ItemLoadEventHandler ItemLoad; event NSOutlookDelegates.ApplicationEvents_11_ItemSendEventHandler ItemSend; #endregion #region Miscellaneous methods // TODO: clean this up /// /// Sends and receives all accounts, or a specific account. /// void SendReceive(IAccount account = null, AcaciaTask after = null); /// /// Restarts the application /// IRestarter Restarter(); void Quit(bool closeWindows); void InvokeUI(Action action); IFolder GetFolderFromID(string folderId); FeatureType GetFeature() where FeatureType : Feature; IRecipient ResolveRecipient(string name); /// /// Returns the store manager. This is a shared object and must NOT be disposed. /// IStores Stores { get; } #endregion ISignatures GetSignatures(); void InUI(Action action, bool synchronous = true); bool IsOffline { get; } string ProfileName { get; } } }