Back to index

lightning-sunbird  0.9+nobinonly
msgMapi.idl
Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is Mozilla
00015  *
00016  * The Initial Developer of the Original Code is
00017  * Netscape Communications Corp.
00018  * Portions created by the Initial Developer are Copyright (C) 2001
00019  * the Initial Developer. All Rights Reserved.
00020  *
00021  * Contributor(s):
00022  *          Krishna Mohan Khandrika (kkhandrika@netscape.com)
00023  *          Rajiv Dayal (rdayal@netscape.com)
00024  *          David Bienvenu (bienvenu@nventure.com)
00025  *
00026  * Alternatively, the contents of this file may be used under the terms of
00027  * either the GNU General Public License Version 2 or later (the "GPL"), or
00028  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00029  * in which case the provisions of the GPL or the LGPL are applicable instead
00030  * of those above. If you wish to allow use of your version of this file only
00031  * under the terms of either the GPL or the LGPL, and not to allow others to
00032  * use your version of this file under the terms of the MPL, indicate your
00033  * decision by deleting the provisions above and replace them with the notice
00034  * and other provisions required by the GPL or the LGPL. If you do not delete
00035  * the provisions above, a recipient may use your version of this file under
00036  * the terms of any one of the MPL, the GPL or the LGPL.
00037  *
00038  * ***** END LICENSE BLOCK ***** */
00039 
00040 // This idl will be compiled by MIDL.  MS-COM is used 
00041 // as bridge between MAPI clients and the Mozilla.
00042 
00043 import "unknwn.idl";
00044 
00045 typedef wchar_t LOGIN_PW_TYPE[256];
00046 
00047 typedef struct
00048 {
00049     unsigned long     ulReserved;            
00050     unsigned long     flFlags;               /* Flags */
00051     unsigned long     nPosition_NotUsed;     /* character in text to be replaced by attachment */
00052     LPTSTR            lpszPathName;          /* Full path name including file name */
00053     LPTSTR            lpszFileName;          /* Real (original) file name */
00054     unsigned char *   lpFileType_NotUsed ;
00055 } nsMapiFileDesc, * lpnsMapiFileDesc;
00056 
00057 
00058 typedef struct
00059 {
00060     unsigned long      ulReserved;           
00061     unsigned long      ulRecipClass;  /* MAPI_TO, MAPI_CC, MAPI_BCC, MAPI_ORIG    */
00062     LPSTR             lpszName;      /* Recipient name to display */
00063     LPSTR             lpszAddress;   /* Recipient email address */
00064     unsigned long      ulEIDSize_NotUsed;     
00065     unsigned char  *   lpEntryID_NotUsed ;
00066 } nsMapiRecipDesc, * lpnsMapiRecipDesc;
00067 
00068 typedef struct
00069 {
00070     unsigned long    ulReserved;                               
00071     LPSTR           lpszSubject;  /* Message Subject */
00072     LPSTR           lpszNoteText; /* Message Text */
00073     LPSTR           lpszMessageType;             
00074     LPSTR           lpszDateReceived;      /* in YYYY/MM/DD HH:MM format */
00075     LPSTR           lpszConversationID_NotUsed; /* conversation thread ID */
00076     unsigned long    flFlags; /* unread,return receipt */
00077     lpnsMapiRecipDesc  lpOriginator;  /* Originator descriptor  */
00078     unsigned long      nRecipCount;   /* Number of recipients   */
00079     [size_is (nRecipCount)] lpnsMapiRecipDesc lpRecips;/* Recipient descriptors  */
00080     unsigned long      nFileCount;    /* # of file attachments  */
00081     [size_is (nFileCount)]  lpnsMapiFileDesc   lpFiles;       /* Attachment descriptors */
00082 } nsMapiMessage, * lpnsMapiMessage;
00083 
00084 [
00085     object,
00086     uuid(6EDCD38E-8861-11d5-A3DD-00B0D0F3BAA7),
00087     helpstring("nsIMapi Inteface"),
00088     pointer_default(unique)
00089 ]
00090 
00091 interface nsIMapi : IUnknown
00092 {
00093     HRESULT Login(unsigned long aUIArg, LOGIN_PW_TYPE aLogin,
00094                   LOGIN_PW_TYPE aPassWord, unsigned long aFlags,
00095                   [out] unsigned long *aSessionId);
00096 
00097     HRESULT Initialize();
00098     HRESULT IsValid();
00099     HRESULT IsValidSession([in] unsigned long aSession);
00100 
00101     HRESULT SendMail([in] unsigned long aSession, [in] lpnsMapiMessage aMessage,
00102                   [in] short aRecipCount, [in, size_is(aRecipCount)] lpnsMapiRecipDesc aRecips, 
00103                   [in] short aFileCount, [in, size_is(aFileCount)] lpnsMapiFileDesc aFiles, 
00104                   [in] unsigned long aFlags, [in] unsigned long aReserved) ;
00105 
00106     HRESULT SendDocuments( [in] unsigned long aSession, 
00107                   [in] LPTSTR aDelimChar, [in] LPTSTR aFilePaths,
00108                   [in] LPTSTR aFileNames, [in] ULONG aFlags ) ;
00109 
00110     HRESULT FindNext(  [in] unsigned long aSession, [in] ULONG ulUIParam, [in] LPTSTR lpszMessageType,
00111                               [in] LPTSTR lpszSeedMessageID, [in] ULONG flFlags, [in] ULONG ulReserved,
00112                               [in] [out] char lpszMessageID[64] ) ;
00113 
00114     HRESULT ReadMail( [in] unsigned long lhSession, [in] ULONG ulUIParam, [in] LPTSTR lpszMessageID,
00115                               [in] ULONG flFlags, [in] ULONG ulReserved, [out] lpnsMapiMessage *lppMessage);
00116 
00117     HRESULT DeleteMail( [in] unsigned long lhSession, [in] ULONG ulUIParam, [in] LPTSTR lpszMessageID,
00118                               [in] ULONG flFlags, [in] ULONG ulReserved);
00119 
00120     HRESULT SaveMail( [in] unsigned long lhSession, [in] ULONG ulUIParam, [in] lpnsMapiMessage lppMessage,
00121                       [in] ULONG flFlags, [in] ULONG ulReserved, [in] LPTSTR lpszMessageID);
00122 
00123     HRESULT Logoff (unsigned long aSession);
00124     HRESULT CleanUp();
00125 };
00126 
00127 
00128