ACLCLSF.H

// --aclclsf.h--------------------------------------------------------------- 
//
// Header file for the CFolderACLs class and its class factory.
//
// The CFolderACLs class is a controlling class. It controls the
// CIExchangeFolderACLs class (which implements the IExchangeFolderACLs
// programatic interface defined in aclcls.h).
//
// Copyright (C) Microsoft Corp. 1986-1996. All rights reserved.
//
// ---------------------------------------------------------------------------

#if !defined(_ACLCLSF_H)
#define _ACLCLSF_H

// $$--CFolderACLs--------------------------------------------------------
//
// The CFolderACLs class.
//
// ---------------------------------------------------------------------------

class FAR CFolderACLs : public IUnknown
{
friend class CIExchangeFolderACLs;

public:

CFolderACLs();

~CFolderACLs();

// Standard OLE stuff.

STDMETHOD(QueryInterface)(
INREFIIDriid,
OUTVOID FAR * FAR *ppv
);

STDMETHOD_(ULONG, AddRef)(VOID);

STDMETHOD_(ULONG, Release)(VOID);

static
CFolderACLs FAR *
Create();

HRESULT
HrGetTableEntry(
INULONGcbentryid,
INLPENTRYIDlpentryid,
OUTLPSTR FAR *lppszDisplayName,
OUTLPLONGlplRights
);

HRESULT
HrOpen(
IN LPMAPISESSION lpSession,
INLPMDBlpMDB,
INULONGcbentryid,
INLPENTRYIDlpentryid
);

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 ptr to the CIExchangeFolderACLs class, which implements
// the IFolderACLs interface exported to the user.

class FAR CIExchangeFolderACLs FAR *m_prog_interface;

LPMAPISESSION m_lpSession;
};


// $$--CIExchangeFolderACLs---------------------------------------------------
//
// Class CIExchangeFolderACLs. This class implements the IExchangeFolderACLs
// interface which is exposed to the use via the aclcls.h header file.
//
// ---------------------------------------------------------------------------

class FAR CIExchangeFolderACLs : public IExchangeFolderACLs
{
public:

// Standard OLE stuff.

STDMETHOD(QueryInterface)(
THIS_
REFIIDriid,
LPVOID FAR *ppvObj
);

STDMETHOD_(ULONG, AddRef)(
THIS
);

STDMETHOD_(ULONG, Release)(
THIS
);

// Methods unique to the IExchangeFolderACLs interface.

STDMETHOD(HrDelete)(
THIS
);

STDMETHOD(HrGet)(
THIS_
LPLONGlplRights,
LPSTR FAR *lppszDisplayName,
ULONG FAR *lpcbentryid,
LPENTRYID FAR *lppentryid
);

STDMETHOD(HrInsert)(
THIS_
LONGlRights,
LPSTRlpszDisplayName,
ULONGcbentryid,
LPENTRYIDlpentryid,
LPLONGlplRights
);

STDMETHOD(HrModify)(
THIS_
LONGlRights,
LPLONGlplRights
);

STDMETHOD(HrSeek)(
THIS_
LONGlPos
);

STDMETHOD(HrTell)(
THIS_
LPLONGlplPos
);

private:

friend CFolderACLs; // so can access m_pFA

// Ptr to the controlling CFolderACLs object (shouldn't be
// available to the user).

CFolderACLs FAR *m_pFA;
};

#endif