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

AddEditDnsbl.h

Go to the documentation of this file.
00001 // AddEditDnsbl.h: interface for the AddEditDnsbl class.
00002 //
00004 
00005 #if !defined(AFX_ADDEDITDNSBL_H__088B8C8A_0172_48C2_B97B_6D60867BBCC4__INCLUDED_)
00006 #define AFX_ADDEDITDNSBL_H__088B8C8A_0172_48C2_B97B_6D60867BBCC4__INCLUDED_
00007 
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011 
00012 #include <abuse/abuse.h>
00013 #include <map>
00014 #include <abuse/Dnsbl.h>
00015 #include <abuse/Url.h>
00016 #include <utility>
00017 #include "Dialog.h"
00018 #include "DnsblManager.h"
00019 
00020 class AddEditDnsbl:public Dialog 
00021 {
00022 public:
00023         //ctors:
00024         //from scratch
00025         AddEditDnsbl(const DnsblManager& manager,HWND hParent,const Init& init=Init());
00026         //based on an existing dnsbl
00027         AddEditDnsbl(const DnsblManager& manager,const std::string& name,HWND hParent,const Init& init=Init());
00028         AddEditDnsbl(const DnsblManager& manager,const Dnsbl& dnsbl,HWND hParent,const Init& init=Init());
00029         //dtor
00030         virtual ~AddEditDnsbl();
00031         /*
00032         If the dnsbl hasn't been modified, just return NULL
00033         */
00034         const Dnsbl* getResult()const;
00035 private:
00036         /*
00037         static dlg proc -> redirect msg onto dialogProc
00038         */
00039         static BOOL staticDialogProc(HWND hDlg,UINT uMsg,WPARAM wP,LPARAM lP);
00040         /*
00041         dlg proc
00042         */
00043         BOOL dlgProc(UINT uMsg,WPARAM wP,LPARAM lP);
00044         Dnsbl* m_pDnsbl;//this is a working (deep) copy
00045         // are we editing or adding?
00046         bool m_bEditing;
00047         // did we modify the dnsbl?
00048         bool m_bDirty;
00049         //const ref to the dnsbl manager
00050         const DnsblManager& m_manager;
00051         //map of results, if the Dnsbl is created from scratch
00052         std::map<Url,Result> m_results;
00053         // invoked if the user cancels the dialog
00054         __inline void cancelIt();
00055         enum ResultNum{SINGLE,MULTIPLE};
00056         // handle the radio buttons state
00057         __inline void setResultType(ResultNum num);
00058         // check the ok button state (enabled/disabled)
00059         __inline void checkOk();
00060         __inline void setResult(Result r);
00061 
00062 };
00063 
00064 #endif // !defined(AFX_ADDEDITDNSBL_H__088B8C8A_0172_48C2_B97B_6D60867BBCC4__INCLUDED_)

Generated on Thu Jun 16 00:13:24 2005 for Abuse! by  doxygen 1.4.3