/* -*- 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_IADDRBOOK_DEF
#define F2T_IADDRBOOK_DEF

#pragma prefix "omc.brutus"

#include "types.idl"
#include "IMAPIProp.idl"
#include "IABContainer.idl"
#include "IMAPIAdviseSink.idl"

module BRUTUS {

        interface IAddrBook : IMAPIProp {
                BRESULT OpenEntry(in ENTRYID lpEntryID,              
                                  in GUID lpInterface,
                                  in BDEFINE ulFlags,                
                                  out BDEFINE lpulObjType,            
                                  out IUnknown lppUnk); 

                BRESULT CompareEntryIDs(in ENTRYID lpEntryID1,           
                                        in ENTRYID lpEntryID2,           
                                        in BDEFINE ulFlags, 
                                        out unsigned long lpulResult);

                BRESULT Advise(in ENTRYID lpEntryID,            
                               in BDEFINE ulEventMask,          
                               in IMAPIAdviseSink lpAdviseSink,         
                               out unsigned long lpulConnection);

                BRESULT Unadvise(in unsigned long ulConnection);

                BRESULT CreateOneOff(in string lpszName,       
                                     in string lpszAdrType,          
                                     in string lpszAddress,          
                                     in BDEFINE ulFlags,              
                                     out ENTRYID lppEntryID);    

                // This method will force the display of a dialog 
		// and is therefore not implemented. Use 
		// IABContainer::CreateEntry() instead.
                BRESULT NewEntry(); 

                BRESULT ResolveName(in BDEFINE ulFlags,  
                                    inout ADRLIST lpAdrList);
 
                // This method is used for displaying a dialog 
		// and is therefore not implemented. Please use
		// an alternative implementation using e.g. the
		// IABContainer:: methods.
                BRESULT Address();    

                // This method is used for displaying a dialog 
		// and is therefore not implemented. Please use
		// an alternative implementation using e.g. the
		// IABContainer:: methods.
                BRESULT Details();       

                // This method will force the display of a dialog 
		// and is therefore not implemented. Use 
		// IAddrBook::QueryDefaultRecipOpt() instead.
                BRESULT RecipOptions();       

                BRESULT QueryDefaultRecipOpt(in string lpszAdrType,
                                             in BDEFINE ulFlags,                  
                                             out seq_SPropValue lppOptions);        

                BRESULT GetPAB(out ENTRYID lppEntryID);

                BRESULT SetPAB(in ENTRYID lpEntryID);         

                BRESULT GetDefaultDir(out ENTRYID lppEntryID);         

                BRESULT SetDefaultDir(in ENTRYID lpEntryID);         

                BRESULT GetSearchPath(in BDEFINE ulFlags,           
                                      out SRowSet lppSearchPath);     

                BRESULT SetSearchPath(in BDEFINE ulFlags,
                                      in SRowSet lpSearchPath);     


                BRESULT PrepareRecips(in BDEFINE ulFlags,
                                      in SPropTagArray lpPropTagArray,           
                                      in ADRLIST lpRecipList);       

		// Hack alert! Needed by e.g. MAPIFunctions_i::BRUTUS_OpenTnefStreamEx()
		// A client should *NEVER* have any use for this method!
                BRESULT GetLocalPointer(out unsigned long long Pointer);

		// Will return a reference to the Personal Address Book (PAB)
		// or NIL.
                BRESULT PAB(out IABContainer lppPAB);

		// Will return a reference to the Global Address List (GAL)
		// or NIL.
                BRESULT GAL(out IABContainer lppGAL);
        };
}; // End of module BRUTUS


#endif
