/* -*- 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_IMAPIADVISESINK_DEF
#define F2T_IMAPIADVISESINK_DEF

#pragma prefix "omc.brutus"

#include "types.idl"

module BRUTUS {

	// The client, i.e the implementor of this interface, must be 
	// prepared for the MAPI notification data structure to be released 
	// at any time (as stated in MSDN).
        interface IMAPIAdviseSink {

                // Callback. Invoked upon arrival of a notification from MAPI.
                void OnNotify(in seq_NOTIFICATION lpNotifications);
                
                // Callback. Invoked if an error occured so that the OnNotify()
                // callback could not be invoked (e.g. a memory allocation failure 
                // so that the return value could not be allocated). 
                // The client would then know that something happen but that the 
                // server was unable to send the notification due to some internal 
                // error condition (as specified in ErrorCode).
                void InternalError(in BRESULT ErrorCode);
        };

}; // End of module BRUTUS


#endif
