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

Lart.h

Go to the documentation of this file.
00001 // Lart.h: interface for the Lart class.
00002 //
00004 
00005 #if !defined(AFX_LART_H__7C794BB6_3BDF_40CD_984A_6225DB1F6239__INCLUDED_)
00006 #define AFX_LART_H__7C794BB6_3BDF_40CD_984A_6225DB1F6239__INCLUDED_
00007 
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011 
00012 #include <abuse/analyze.h>
00013 #include <list>
00014 #include <string>
00015 #include <stdexcept>
00016 #include "PropertyBag.h"
00017 
00018 class Lart  
00019 /*
00020 Interface (and partial implemented) lart maker class
00021 - the client use sendLarts, 
00022 - sendLarts:
00023   - calls filterLarts to let the user choose who is to lart
00024   - if a cache exists
00025     - get the "self address" using getSelfMail virtual member
00026         - "purifies" the addies list from that addy
00027         - update the cache
00028   - do a var subst using substituteVariable
00029   - send out the stuff using pure virtual member sendLart 
00030 */
00031 {
00032 public:
00033         Lart(const PropertyBag& pb,HWND hFather);
00034         virtual ~Lart()=0;
00035         bool sendLarts(const std::string& uce,const std::list<AbuseDesks>& lst,const std::string& analysis);
00036 protected:
00037         //build the larts, substituting variables
00038         void buildLart(std::string uce,const AbuseDesks& abuse);
00039         //filter the addies->let the user choose who to lart (in subclasses)
00040         virtual std::list<AbuseDesks> filterLarts(std::list<AbuseDesks>& lst,bool& bCanceled,std::string uce,std::string analysis)throw(std::runtime_error);
00041         //send out the larts -> implemented in subclasses
00042         virtual void sendLart(const std::list<std::string>& dest,const std::string& subj,const std::string& text)const throw(std::runtime_error)=0;
00043         //get the "self address" to send - used for skipping it from the abuse addies cache
00044         virtual std::string getSelfMail()const;
00045         //get the CC address to send - used for skipping it from the abuse addies cache
00046         virtual std::string Lart::getCCMail()const;
00047         //do the vars substitution
00048         std::string substituteVariables(const std::string& onWhat,const AbuseDesks& abuse,const std::string& uce);
00049         const PropertyBag& m_prop;
00050         HWND m_hFather;
00051 };
00052 
00053 #endif // !defined(AFX_LART_H__7C794BB6_3BDF_40CD_984A_6225DB1F6239__INCLUDED_)

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