1 2 /* 3 * xstress - xk0derz SMTP Stress Tester 4 * 5 * (c) Amit Singh amit@xkoder.com 6 * http://xkoder.com 7 * 8 * This software and related files are licensed under GNU GPL version 2 9 * Please visit the following webpage for more details 10 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 11 */ 12 13 #ifndef __CONFIG_H__ 14 #define __CONFIG_H__ 15 16 #include <string> 17 #include <vector> 18 using namespace std; 19 20 /*Config class*/ 21 class Config 22 { 23 public: 24 unsigned int uiServerPort; 25 string sServerIP; 26 string sLogFile; 27 unsigned int uiThreads; 28 unsigned int uiMailsPerThread; 29 unsigned int uiTimeout; 30 unsigned int uiReportAfter; 31 unsigned int uiLogTimeout; 32 unsigned int uiMaxRecipients; 33 string sUsername; 34 string sPassword; 35 string sAuthType; 36 37 private: 38 vector <string> toList; 39 vector <string> fromList; 40 vector <string> subjectList; 41 vector <string> bodyList; 42 vector <string> attachList; 43 44 void addToList(string sFilename, vector <string> &pList); 45 46 int iOkay; 47 48 public: 49 Config(string sConfigFile); 50 int okay(); 51 string getTo(); 52 string getFrom(); 53 string getSubject(); 54 string getBody(); 55 string getAttachment(); 56 }; 57 58 #endif 59