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

101 lines
2.9 KiB
C#
Raw Normal View History

/// 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;
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 NSOutlookDelegates = Microsoft.Office.Interop.Outlook;
2017-02-08 15:40:48 +01:00
namespace Acacia.Stubs
{
public interface IAddIn
{
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; }
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; }
ISystemWindow Window { get; }
2017-02-10 11:01:19 +01:00
IExplorer GetActiveExplorer();
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
event NSOutlookDelegates.ApplicationEvents_11_ItemLoadEventHandler ItemLoad;
event NSOutlookDelegates.ApplicationEvents_11_ItemSendEventHandler ItemSend;
2017-02-08 15:40:48 +01:00
#endregion
#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>
void SendReceive(IAccount account = null, AcaciaTask after = null);
2017-02-08 15:40:48 +01:00
/// <summary>
/// Restarts the application
/// </summary>
IRestarter Restarter();
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;
IRecipient ResolveRecipient(string name);
/// <summary>
2017-02-14 14:46:24 +01:00
/// Returns the store manager. This is a shared object and must NOT be disposed.
/// </summary>
2017-02-14 14:46:24 +01:00
IStores Stores
{
get;
}
#endregion
ISignatures GetSignatures();
void InUI(Action action, bool synchronous = true);
bool IsOffline { get; }
string ProfileName { get; }
2017-02-08 15:40:48 +01:00
}
}