⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simailplugininterfaces.pas

📁 siMail, siMail, siMail, siMail
💻 PAS
字号:
(*
# (C) Copyright 2003
# Miha Vrhovnik, miha.vrhovnik@cordia.si
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
#
# 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
# The Initial Developer of the Original Code is Miha Vrhovnik (Slovenia).
# Portions created by Miha Vrhovnik are Copyright (c)2003.
# All Rights Reserved.
#==============================================================================
# Contributor(s):
#==============================================================================
# History: see whats new.txt from distribution package
#==============================================================================
*)
unit siMailPluginInterfaces;

interface

uses Classes, ActiveX, BasePlugInInterface;

const cIsiMailMailboxImportPlugin_V1 = '{8774AB3D-B3AB-48F1-B426-01D193C335D4}';
const IIsiMailMailboxImportPlugin_V1 : TGUID = cIsiMailMailboxImportPlugin_V1;
const cIsiMailMailboxExportPlugin_V1 = '{13912CC9-E666-459D-9670-9724A2D84843}';
const IIsiMailMailboxExportPlugin_V1 : TGUID = cIsiMailMailboxExportPlugin_V1;

type
  IsiMailMailboxImportPlugin_V1 = interface (IsiMailBasePlugin)
  [cIsiMailMailboxImportPlugin_V1]
    //how many file formats can this plug-in import
    function GetSupportedFormatCount(): Integer; stdcall;
    //get the supported format name WATCH OUT: FormatNo index starts with 1 NOT 0
    function GetSupportedFormat(FormatNo: Integer; out Format: PChar): HRESULT; stdcall;
    //get the supported format description WATCH OUT: FormatNo index starts with 1 NOT 0
    function GetSupportedFormatDescription(FormatNo: Integer; out Description: PChar): HRESULT; stdcall;
    //called only if GetSupportedFormatCount > 0. Put plugin to correct input format mode
    function SetFormat(const Format: Cardinal): HRESULT; stdcall;
    //this is HWND of control to which you can map plug-in settings
    function SetParentHandle(const ParentHandle: Integer): HRESULT; stdcall;
    //return settings window height
    function GetSettingsHeight(): Integer; stdcall;
    //return -1 if there are errors in settings, 0 if some settings are not set, 1 if everything is OK
    //basicaly validate user input on this call
    function AllSettingsSet(): Integer; stdcall;
    //return number of mailboxes to import
    function GetMailboxCount(): Integer; stdcall;
    //called if GetMailboxCount returned > 0
    //called each time the GetMessage's MoreMessages returns False up to GetMailboxCount Count
    function SetMailbox(MailboxNo: Integer): HRESULT; stdcall;
    //return current mailbox name
    function GetMailboxName(out MailboxName: PChar): HRESULT; stdcall;
    //return number of messages in current mailbox.
    //you can retun -1 if you don't know how many messages is in current mailbox
    function GetMessageCount(): Integer; stdcall;
    //this function is called until MoreMessages is not set to false, msg contains one e-mail message in standard message format
    function GetMessage(var MoreMessages: Boolean; var msg: PChar): HRESULT; stdcall;
    //frees memory allocated with previous message
    function FreeMessage(): HRESULT; stdcall;
end;

type
  IsiMailMailboxExportPlugin_V1 = interface (IsiMailBasePlugin)
  [cIsiMailMailboxExportPlugin_V1]
    //how many file formats can this plug-in export
    function GetSupportedFormatCount(): Integer; stdcall;
    //get the supported format name WATCH OUT: FormatNo index starts with 1 NOT 0
    function GetSupportedFormat(FormatNo: Integer; out Format: PChar): HRESULT; stdcall;
    //get the supported format description WATCH OUT: FormatNo index starts with 1 NOT 0
    function GetSupportedFormatDescription(FormatNo: Integer; out Description: PChar): HRESULT; stdcall;
    //called only if GetSupportedFormatCount > 0. Put plugin to correct input format mode
    function SetFormat(const Format: Cardinal): HRESULT; stdcall;
    //this is HWND of control to which you can map plug-in settings
    function SetParentHandle(const ParentHandle: Integer): HRESULT; stdcall;
    //return settings window height
    function GetSettingsHeight(): Integer; stdcall;
    //return -1 if there are errors in settings, 0 if some settings are not set, 1 if everything is OK
    //basicaly validate user input on this call
    function AllSettingsSet(): Integer; stdcall;
    //sets how many mailboxes is going to be exported
    function SetMailboxCount(const Count: Integer): HRESULT; stdcall;
    //called after the SetMessage's MoreMessages was set to False up to GetMailboxCount Count
    function SetMailbox(MailboxNo: Integer): HRESULT; stdcall;
    //set current mailbox name
    function SetMailboxName(const MailboxName: PChar): HRESULT; stdcall;
    //set's number of messages is in current mailbox
    function SetMessageCount(const Count: Integer): HRESULT; stdcall;
    //this function is called until MoreMessages is not set to false, msg contains one e-mail message in standard message format
    function SetMessage(const MoreMessages: Boolean; const msg: PChar): HRESULT; stdcall;
end;

implementation

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -