//  Beta release only.
//
//  Copyright(c) Ivyware Pty Ltd 2013  (all rights reserved)
//               MELBOURNE, VICTORIA, AUSTRALIA, 3130
//
//  Provided no fee is charged (either by the distributer or user)
//  permission to use, copy, modify, and distribute this software and
//  its documentation for any purpose and without fee is hereby granted,
//  provided that the above copyright notice appear in all copies and
//  that both that copyright notice and this permission notice appear
//  in supporting documentation.
//
//  No waranty or suitablity for purpose is implied.
//
//
//  Extented MAPI environment wrapper class
//  NOTES: Manages all subordinate MAPI resources
//      
#pragma  once
#include "MAPISession.h"

///////////////////////////////////////////////////////////////////////////////
//  CMAPIEx environment and resources encasulating class
//

class P2PmsgMAPI_EXT CMAPIEx 
{
    // Constructors and destructor
    public:
	      CMAPIEx ( );
      virtual
	     ~CMAPIEx ( );

    // Attributes
    protected:
        bool           m_bInitialized;
        //CMAPISession  *m_pCMAPISession;

    // Operations
    public:
	    HRESULT
        Initialize ( MAPIINIT_0 *pMAPINIT );
	    void
        Uninitialize ( );
      CMAPISession*
        Query4Session ( );
      //void
      //  DropSession ( );

    // Property exposure
    public:
      bool
        IsInitialized ( );
      //CMAPISession*
      //  GetSession ( );
};
