// --srowlst.h-----------------------------------------------------------------
//
// Header file for classes CSROWNODE and CSROWLST.
//
// Copyright (C) Microsoft Corp, 1986-1996. All rights reserved.
//
//-----------------------------------------------------------------------------
#ifndef_SROWLST_H
#define _SROWLST_H
#include "llmacro.h"
// ROWLIST allocation helper macro for IExchangeModifyTable interface.
#defineCbNewROWLIST(_centries)(offsetof(ROWLIST,aEntries) + \
(_centries)*sizeof(ROWENTRY))
// Count of properties supported by rule object.
#defineC_RULEPROPS7
// Indices of rule properties in the SRow associated with a rule object.
#defineI_RULE_SEQUENCE0
#defineI_RULE_STATE1
#defineI_RULE_CONDITION2
#defineI_RULE_ACTIONS3
#defineI_RULE_PROVIDER4
#defineI_RULE_LEVEL5
#defineI_RULE_NAME6
class CSROWNODE// srn
{
friend class CIExchangeFolderRules;
friend class CSROWLST;
public:
// constructor & destructor
CSROWNODE(
INLPSRowlpSRow
);
~CSROWNODE();
protected:
CSROWNODE *m_pNxt;
CSROWNODE *m_pPrv;
SRowm_SRow;
};
class CSROWLST// srl
{
public:
CSROWLST(); // constructor
~CSROWLST(); // destructor
// standard C++ Get and Set member functions
CSROWNODE * GetCurrentNode(VOID);
LONG GetCursor(VOID) const;
LONG GetNodeCount(VOID) const;
LONG GetOtherProvNodeCount(VOID) const;
LONG SetCursor(
INLONGlPos
);
HRESULT HrInitialize(
INLPSTRlpszProvider,
IN OUTLPSRowSetlpRows
);
HRESULT HrDelete(VOID);
HRESULTHrGetProviders(
OUTLPULONGlpcProviders,
OUTLPSTR FAR * FAR *lpppszProviders
);
HRESULT HrInsert(
INLPSRowlpSRow
);
HRESULT HrRemoveFromLst(
OUTCSROWNODE * *ppRemovedNode
);
HRESULT HrWriteToTable(
INLPEXCHANGEMODIFYTABLElpExchTbl
);
private:
VOID ReSequence(VOID);
ULONGm_cNodes;
ULONGm_cOtherProvNodes;
LONGm_lPos;
LPSTRm_lpszProvider;
CSROWNODE *m_pCurNode;
CSROWNODE *m_pLstHd;
CSROWNODE *m_pOtherProvLstHd;
};
// $--CSROWNODE::GetCurrentNode------------------------------------------------
//
// DESCRIPTION:Return a pointer to the current node.
//
// INPUT: None.
//
// RETURNS:A pointer to the current node.
//
//-----------------------------------------------------------------------------
inline CSROWNODE * CSROWLST::GetCurrentNode(VOID)
{
return m_pCurNode;
}
// $--CSROWLST::GetCursor------------------------------------------------------
//
// DESCRIPTION:Return the current cursor position.
//
// INPUT: None.
//
// RETURNS:The current cursor position.
//
//-----------------------------------------------------------------------------
inline LONG CSROWLST::GetCursor(VOID) const
{
return m_lPos;
}
// $--CSROWLST::GetNodeCount---------------------------------------------------
//
// DESCRIPTION:Return the count of nodes in the list.
//
// INPUT: None.
//
// RETURNS:The count of nodes in the list.
//
//-----------------------------------------------------------------------------
inline LONG CSROWLST::GetNodeCount(VOID) const
{
return m_cNodes;
}
// $--CSROWLST::GetOtherProvNodeCount------------------------------------------
//
// DESCRIPTION:Return the count of nodes in the other provider list.
//
// INPUT: None.
//
// RETURNS:The count of nodes in the other provider list.
//
//-----------------------------------------------------------------------------
inline LONG CSROWLST::GetOtherProvNodeCount(VOID) const
{
return m_cOtherProvNodes;
}
#endif // _SROWLSTH_