/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */

/*
 *  Copyright (C) 2008 OMC Denmark ApS.
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as published by
 *  the Free Software Foundation, either version 3 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 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/>.
 */

#ifndef F2T_IMAPIFOLDER_DEF
#define F2T_IMAPIFOLDER_DEF

#pragma prefix "omc.brutus"

#include "types.idl"
#include "IMAPIContainer.idl"
#include "IMessage.idl"
#include "IMAPIProgress.idl"

module BRUTUS {

        interface IMAPIFolder : IMAPIContainer {
                BRESULT CreateMessage(in GUID lpInterface, 
                                      in BDEFINE ulFlags, 
                                      out IMessage lppMessage); // Bug in MSDN? lppMessage can never point to IMAPIContainer...

                BRESULT CopyMessages(in seq_ENTRYID lpMsgList,
                                     in GUID lpInterface, 
                                     in ENTRYID lpDestFolder, 
                                     in IMAPIProgress lpProgress, 
                                     in BDEFINE ulFlags); 

                BRESULT DeleteMessages(in seq_ENTRYID lpMsgList,
                                       in IMAPIProgress lpProgress,
                                       in BDEFINE ulFlags);

                BRESULT CreateFolder(in unsigned long ulFolderType,
                                     in string lpszFolderName,
                                     in string lpszFolderComment,
                                     in GUID lpInterface,
                                     in BDEFINE ulFlags,
                                     out IMAPIFolder lppFolder);

                BRESULT CopyFolder(in ENTRYID lpEntryID, 
                                   in GUID lpInterface,
                                   in ENTRYID lpDestFolder,
                                   in string lpszNewFolderName,
                                   in IMAPIProgress lpProgress,
                                   in BDEFINE ulFlags);

                BRESULT DeleteFolder(in ENTRYID lpEntryID, 
                                     in IMAPIProgress lpProgress,
                                     in BDEFINE ulFlags);
                    
                BRESULT SetReadFlags(in seq_ENTRYID lpMsgList,
                                     in IMAPIProgress lpProgress,
                                     in BDEFINE ulFlags);

                BRESULT GetMessageStatus(in ENTRYID lpEntryID, 
                                         in BDEFINE ulFlags,
                                         out unsigned long lpulMessageStatus);

                BRESULT SetMessageStatus(in ENTRYID lpEntryID, 
                                         in unsigned long ulNewStatus,
                                         in unsigned long ulNewStatusMask,
                                         out unsigned long lpulOldStatus);
                          
                BRESULT SaveContentsSort(in SSortOrderSet lpSortCriteria,
                                         in BDEFINE ulFlags);

                BRESULT EmptyFolder(in IMAPIProgress lpProgress,
                                    in BDEFINE ulFlags);
        };

}; // End of module BRUTUS


#endif
