mailnews/mapi/mapihook/src/msgMapiHook.h
author Jorg K <jorgk@jorgk.com>
Sat, 19 Jan 2019 08:11:36 +0100
changeset 33952 18b2c9cbcf7c3adc5c1e2c89e401363987c92174
parent 33951 4882e4a21d50cf2a76e2fb9087f3d44c6018ce58
child 33955 c6a688894f61e63f9556cad0870372d469611d60
permissions -rw-r--r--
Bug 1521007 - Follow-up: fix variable name of UTF-8 indicator. r+a=me

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef MSG_MAPI_HOOK_H_
#define MSG_MAPI_HOOK_H_

#include "prtypes.h"

class nsMapiHook
{
    public :

        static bool DisplayLoginDialog(bool aLogin, char16_t **aUsername,
                        char16_t **aPassword);
        static bool VerifyUserName(const nsString& aUsername, nsCString& aIdKey);

        static bool IsBlindSendAllowed () ;
        static nsresult BlindSendMail (unsigned long aSession, nsIMsgCompFields * aCompFields) ;
        static nsresult ShowComposerWindow (unsigned long aSession, nsIMsgCompFields * aCompFields) ;
        static nsresult PopulateCompFieldsWithConversion(lpnsMapiMessage aMessage,
                                        nsIMsgCompFields * aCompFields) ;
        static nsresult PopulateCompFieldsW(lpnsMapiMessageW aMessage, nsIMsgCompFields *aCompFields);
        static nsresult PopulateCompFieldsForSendDocs(nsIMsgCompFields * aCompFields,
                                        ULONG aFlags, LPTSTR aDelimChar, LPTSTR aFilePaths) ;
        static nsresult HandleAttachments(nsIMsgCompFields *aCompFields, int32_t aFileCount,
                                          lpnsMapiFileDesc aFiles, bool aIsUTF8);
        static nsresult HandleAttachmentsW(nsIMsgCompFields *aCompFields, int32_t aFileCount,
                                           lpnsMapiFileDescW aFiles);
        static void CleanUp();

        static bool isMapiService;
};

#endif  // MSG_MAPI_HOOK_H_