// --ruleclsf.h---------------------------------------------------------------
//
// Header file for the CFolderRules class and its class factory.
//
// The CFolderRules class is a controlling class. It controls the
// CIExchangeFolderRules class (which implements the IExchangeFolderRules
// programatic interface defined in rulecls.h). When we add automation
// capabilities, it will also control the standard OLE dispatch interface
// for this class.
//
// Copyright (C) Microsoft Corp. 1986-1996. All rights reserved.
//
// ---------------------------------------------------------------------------
#if !defined(_RULECLSF_H)
#define _RULECLSF_H
// $$--CFolderRules-----------------------------------------------------------
//
// The CFolderRules class.
//
// ---------------------------------------------------------------------------
class FAR CFolderRules : public IUnknown
{
friend class CIExchangeFolderRules;
public:
CFolderRules();
~CFolderRules();
// Standard OLE stuff.
STDMETHOD(QueryInterface)(
INREFIIDriid,
OUTVOID FAR * FAR *ppv
);
STDMETHOD_(ULONG, AddRef)(VOID);
STDMETHOD_(ULONG, Release)(VOID);
static
CFolderRules FAR *
Create();
HRESULT
HrGetProviders(
OUTLPULONGlpcProviders,
OUTLPSTR FAR * FAR *lpppszProviders
);
HRESULT
HrOpen(
INLPMDBlpMDB,
INULONGcbentryid,
INLPENTRYIDlpentryid,
INLPSTRlpszProvider
);
protected:
HRESULT m_hr; // constructor "return" code
LPEXCHANGEMODIFYTABLEm_lpExchTbl;
LPMAPIFOLDERm_lpFolder;// Ptr to MAPI folder object.
LPMAPITABLEm_lpMapiTbl;
CSROWLSTm_SRowLst;// Table info stored here.
ULONGm_refs;// Reference count.
// This is a pointer to the CIExchangeFolderRules class, which implements
// the IExchangeFolderRules interface exported to the user.
class FAR CIExchangeFolderRules FAR *m_prog_interface;
};
// $$--CIExchangeFolderRules---------------------------------------------------
//
// Class CIExchangeFolderRules. This class implements the IExchangeFolderRules
// interface which is exposed to the use via the rulecls.h header file.
//
// ----------------------------------------------------------------------------
class FAR CIExchangeFolderRules : public IExchangeFolderRules
{
public:
// Standard OLE stuff.
STDMETHOD(QueryInterface)(
THIS_
REFIIDriid,
LPVOID FAR *ppvObj
);
STDMETHOD_(ULONG, AddRef)(
THIS
);
STDMETHOD_(ULONG, Release)(
THIS
);
// Methods unique to the IExchangeFolderRules interface.
STDMETHOD(HrDelete)(
THIS
);
STDMETHOD(HrDisable)(
THIS
);
STDMETHOD(HrEnable)(
THIS
);
STDMETHOD(HrGet)(
THIS_
LPLONGplState,
LPSRestriction FAR *ppRestriction,
LPACTIONS FAR *ppActions,
LPLONGplLevel,
LPSTR FAR *ppszName
);
STDMETHOD(HrInsert)(
THIS_
LONGlState,
LPSRestrictionpRestriction,
LPACTIONSpActions,
LONGlLevel,
LPSTRpszName
);
STDMETHOD(HrSeek)(
THIS_
LONGlPos
);
STDMETHOD(HrTell)(
THIS_
LPLONGplPos
);
private:
friend CFolderRules; // so can access m_pFR
// Pointer to the controlling CFolderRules object (shouldn't be
// available to the user).
CFolderRules FAR *m_pFR;
};
#endif