101 lines
2.9 KiB
C#
101 lines
2.9 KiB
C#
/// 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<http://www.gnu.org/licenses/>.
|
|
///
|
|
/// 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<Feature> Features { get; }
|
|
IEnumerable<KeyValuePair<string,string>> 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
|
|
|
|
/// <summary>
|
|
/// Sends and receives all accounts, or a specific account.
|
|
/// </summary>
|
|
void SendReceive(IAccount account = null, AcaciaTask after = null);
|
|
|
|
/// <summary>
|
|
/// Restarts the application
|
|
/// </summary>
|
|
IRestarter Restarter();
|
|
|
|
void Quit(bool closeWindows);
|
|
|
|
void InvokeUI(Action action);
|
|
|
|
IFolder GetFolderFromID(string folderId);
|
|
|
|
FeatureType GetFeature<FeatureType>()
|
|
where FeatureType : Feature;
|
|
|
|
IRecipient ResolveRecipient(string name);
|
|
|
|
/// <summary>
|
|
/// Returns the store manager. This is a shared object and must NOT be disposed.
|
|
/// </summary>
|
|
IStores Stores
|
|
{
|
|
get;
|
|
}
|
|
|
|
#endregion
|
|
|
|
ISignatures GetSignatures();
|
|
|
|
void InUI(Action action, bool synchronous = true);
|
|
|
|
bool IsOffline { get; }
|
|
string ProfileName { get; }
|
|
}
|
|
}
|