Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CSecureRule Class Reference

#include <Security.h>

List of all members.

Public Types

enum  { srAddress, srContent }
enum  { srNull, srAccept, srDeny }
enum  { srIndefinite = 0, srSession = 1 }

Public Member Functions

 CSecureRule (BOOL bCreate=TRUE)
virtual ~CSecureRule ()
void Remove ()
void Reset ()
void MaskFix ()
BOOL IsExpired (DWORD nNow, BOOL bSession=FALSE)
BOOL Match (IN_ADDR *pAddress, LPCTSTR pszContent=NULL)
void SetContentWords (const CString &strContent)
CString GetContentWords ()
void Serialize (CArchive &ar, int nVersion)
CXMLElementToXML ()
BOOL FromXML (CXMLElement *pXML)
CString ToGnucleusString ()
BOOL FromGnucleusString (CString &str)

Public Attributes

int m_nType
BYTE m_nAction
CString m_sComment
GUID m_pGUID
DWORD m_nExpire
DWORD m_nToday
DWORD m_nEver
BYTE m_nIP [4]
BYTE m_nMask [4]
TCHAR * m_pContent


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
srAddress 
srContent 

Definition at line 102 of file Security.h.

anonymous enum
 

Enumeration values:
srNull 
srAccept 
srDeny 

Definition at line 103 of file Security.h.

anonymous enum
 

Enumeration values:
srIndefinite 
srSession 

Definition at line 104 of file Security.h.


Constructor & Destructor Documentation

CSecureRule::CSecureRule BOOL  bCreate = TRUE  ) 
 

Definition at line 573 of file Security.cpp.

References CSecurity::m_bDenyPolicy, m_nAction, m_nEver, m_nExpire, m_nIP, m_nMask, m_nToday, m_nType, m_pContent, m_pGUID, NULL, srAccept, srAddress, srDeny, and srIndefinite.

CSecureRule::~CSecureRule  )  [virtual]
 

Definition at line 588 of file Security.cpp.

References m_pContent.


Member Function Documentation

BOOL CSecureRule::FromGnucleusString CString &  str  ) 
 

Definition at line 984 of file Security.cpp.

References m_nAction, m_nExpire, m_nIP, m_nMask, m_nType, m_sComment, MaskFix(), srAddress, srDeny, and srIndefinite.

Referenced by CSecurity::Import().

BOOL CSecureRule::FromXML CXMLElement pXML  ) 
 

Definition at line 871 of file Security.cpp.

References m_nAction, m_nExpire, m_nIP, m_nMask, m_nType, m_pContent, m_sComment, MaskFix(), NULL, SetContentWords(), srAccept, srAddress, srContent, srDeny, srIndefinite, srNull, and srSession.

Referenced by CSecurity::FromXML().

CString CSecureRule::GetContentWords  ) 
 

Definition at line 713 of file Security.cpp.

References m_pContent, and NULL.

Referenced by CSecureRuleDlg::OnInitDialog(), Serialize(), and ToXML().

BOOL CSecureRule::IsExpired DWORD  nNow,
BOOL  bSession = FALSE
 

Definition at line 609 of file Security.cpp.

References m_nExpire, srIndefinite, and srSession.

Referenced by CSecurity::Expire(), CSecurity::IsDenied(), and CSecurity::Serialize().

void CSecureRule::MaskFix  ) 
 

Definition at line 1031 of file Security.cpp.

References m_nExpire, m_nIP, m_nMask, and srSession.

Referenced by FromGnucleusString(), FromXML(), and Serialize().

BOOL CSecureRule::Match IN_ADDR *  pAddress,
LPCTSTR  pszContent = NULL
 

Definition at line 619 of file Security.cpp.

References _tcsistr(), m_nExpire, m_nIP, m_nMask, m_nType, m_pContent, NULL, srAddress, srContent, and srSession.

Referenced by CSecurity::Ban(), and CSecurity::IsDenied().

void CSecureRule::Remove  ) 
 

Definition at line 596 of file Security.cpp.

References CSecurity::Remove().

void CSecureRule::Reset  ) 
 

Definition at line 601 of file Security.cpp.

References m_nEver, and m_nToday.

void CSecureRule::Serialize CArchive &  ar,
int  nVersion
 

Definition at line 733 of file Security.cpp.

References GetContentWords(), m_nAction, m_nEver, m_nExpire, m_nIP, m_nMask, m_nType, m_pGUID, m_sComment, MaskFix(), SetContentWords(), srAddress, and srContent.

Referenced by CSecurity::Serialize().

void CSecureRule::SetContentWords const CString &  strContent  ) 
 

Definition at line 665 of file Security.cpp.

References m_pContent, and NULL.

Referenced by FromXML(), CSecureRuleDlg::OnOK(), and Serialize().

CString CSecureRule::ToGnucleusString  ) 
 

Definition at line 950 of file Security.cpp.

References m_nAction, m_nIP, m_nMask, m_nType, m_sComment, srAddress, and srDeny.

CXMLElement * CSecureRule::ToXML  ) 
 

Definition at line 810 of file Security.cpp.

References CXMLElement::AddAttribute(), GetContentWords(), m_nAction, m_nExpire, m_nIP, m_nMask, m_nType, m_pGUID, m_sComment, NULL, srAccept, srAddress, srContent, srDeny, srNull, and srSession.


Member Data Documentation

BYTE CSecureRule::m_nAction
 

Definition at line 90 of file Security.h.

Referenced by CSecurity::Ban(), CSecureRule(), FromGnucleusString(), FromXML(), CSecurity::IsDenied(), CSecureRuleDlg::OnInitDialog(), CSecureRuleDlg::OnOK(), Serialize(), ToGnucleusString(), and ToXML().

DWORD CSecureRule::m_nEver
 

Definition at line 96 of file Security.h.

Referenced by CSecureRule(), CSecurity::IsDenied(), Reset(), and Serialize().

DWORD CSecureRule::m_nExpire
 

Definition at line 94 of file Security.h.

Referenced by CSecurity::Ban(), CSecureRule(), CSecurity::Expire(), FromGnucleusString(), FromXML(), CSecurity::IsDenied(), IsExpired(), MaskFix(), Match(), CSecureRuleDlg::OnInitDialog(), CSecureRuleDlg::OnOK(), Serialize(), and ToXML().

BYTE CSecureRule::m_nIP[4]
 

Definition at line 98 of file Security.h.

Referenced by CSecurity::Ban(), CSecureRule(), FromGnucleusString(), FromXML(), MaskFix(), Match(), CSecureRuleDlg::OnInitDialog(), CSecureRuleDlg::OnOK(), Serialize(), ToGnucleusString(), and ToXML().

BYTE CSecureRule::m_nMask[4]
 

Definition at line 99 of file Security.h.

Referenced by CSecureRule(), FromGnucleusString(), FromXML(), MaskFix(), Match(), CSecureRuleDlg::OnInitDialog(), CSecureRuleDlg::OnOK(), Serialize(), ToGnucleusString(), and ToXML().

DWORD CSecureRule::m_nToday
 

Definition at line 95 of file Security.h.

Referenced by CSecureRule(), CSecurity::IsDenied(), and Reset().

int CSecureRule::m_nType
 

Definition at line 89 of file Security.h.

Referenced by CSecureRule(), FromGnucleusString(), FromXML(), Match(), CSecureRuleDlg::OnInitDialog(), CSecureRuleDlg::OnOK(), Serialize(), ToGnucleusString(), and ToXML().

TCHAR* CSecureRule::m_pContent
 

Definition at line 100 of file Security.h.

Referenced by CSecureRule(), FromXML(), GetContentWords(), Match(), SetContentWords(), and ~CSecureRule().

GUID CSecureRule::m_pGUID
 

Definition at line 92 of file Security.h.

Referenced by CSecureRule(), CSecurity::FromXML(), CSecurity::GetGUID(), Serialize(), and ToXML().

CString CSecureRule::m_sComment
 

Definition at line 91 of file Security.h.

Referenced by CSecurity::Ban(), FromGnucleusString(), FromXML(), CSecureRuleDlg::OnInitDialog(), CSecureRuleDlg::OnOK(), Serialize(), ToGnucleusString(), and ToXML().


The documentation for this class was generated from the following files:
Generated on Thu Dec 15 10:40:11 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2