2018-04-13 12:50:04 +02:00
|
|
|
|
/// Copyright 2018 Kopano b.v.
|
2017-02-15 12:01:04 +01:00
|
|
|
|
///
|
|
|
|
|
/// 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<http://www.gnu.org/licenses/>.
|
|
|
|
|
///
|
|
|
|
|
/// Consult LICENSE file for details
|
|
|
|
|
|
|
|
|
|
using Acacia.Features;
|
2017-02-08 15:40:48 +01:00
|
|
|
|
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;
|
2017-02-14 15:16:13 +01:00
|
|
|
|
using NSOutlookDelegates = Microsoft.Office.Interop.Outlook;
|
2017-02-08 15:40:48 +01:00
|
|
|
|
|
|
|
|
|
namespace Acacia.Stubs
|
|
|
|
|
{
|
|
|
|
|
public interface IAddIn
|
|
|
|
|
{
|
|
|
|
|
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-11-30 08:26:12 +01:00
|
|
|
|
string VersionMajor { 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-05-24 15:29:42 +02:00
|
|
|
|
ISystemWindow Window { get; }
|
2017-02-10 11:01:19 +01:00
|
|
|
|
IExplorer GetActiveExplorer();
|
2017-06-07 13:18:40 +02:00
|
|
|
|
IInspectors GetInspectors();
|
2017-02-10 11:01:19 +01:00
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
2017-02-08 15:40:48 +01:00
|
|
|
|
|
|
|
|
|
#region Event handlers
|
|
|
|
|
|
|
|
|
|
// TODO: custom event types
|
2017-02-14 15:16:13 +01:00
|
|
|
|
event NSOutlookDelegates.ApplicationEvents_11_ItemLoadEventHandler ItemLoad;
|
|
|
|
|
event NSOutlookDelegates.ApplicationEvents_11_ItemSendEventHandler ItemSend;
|
2017-02-08 15:40:48 +01:00
|
|
|
|
|
|
|
|
|
#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>
|
2017-02-14 14:46:24 +01:00
|
|
|
|
/// Sends and receives all accounts, or a specific account.
|
2017-02-08 15:40:48 +01:00
|
|
|
|
/// </summary>
|
2018-04-13 12:50:04 +02:00
|
|
|
|
void SendReceive(IAccount account = null, AcaciaTask after = null);
|
2017-02-08 15:40:48 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Restarts the application
|
|
|
|
|
/// </summary>
|
2017-09-06 08:32:09 +02:00
|
|
|
|
IRestarter Restarter();
|
2017-05-17 16:35:05 +02:00
|
|
|
|
|
2017-02-27 16:04:42 +01:00
|
|
|
|
void Quit(bool closeWindows);
|
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
|
|
|
|
/// <summary>
|
2017-02-14 14:46:24 +01:00
|
|
|
|
/// Returns the store manager. This is a shared object and must NOT be disposed.
|
2017-02-10 10:34:36 +01:00
|
|
|
|
/// </summary>
|
2017-02-14 14:46:24 +01:00
|
|
|
|
IStores Stores
|
|
|
|
|
{
|
|
|
|
|
get;
|
|
|
|
|
}
|
2017-02-10 10:34:36 +01:00
|
|
|
|
|
2017-02-09 16:44:13 +01:00
|
|
|
|
#endregion
|
2017-02-23 15:29:53 +01:00
|
|
|
|
|
|
|
|
|
ISignatures GetSignatures();
|
|
|
|
|
|
2017-02-27 16:04:42 +01:00
|
|
|
|
void InUI(Action action, bool synchronous = true);
|
2017-02-23 17:41:54 +01:00
|
|
|
|
|
|
|
|
|
bool IsOffline { get; }
|
2017-03-08 11:18:37 +01:00
|
|
|
|
string ProfileName { get; }
|
2017-02-08 15:40:48 +01:00
|
|
|
|
}
|
|
|
|
|
}
|