// Interface to Page Getter
// Implementation is in Getter.cpp
#ifndef GETTER_DECL
#define GETTER_DECL true
#ifndef GLOBAL_DECL
#include "global.h" // Global data types and variables
#endif
#define MAX_THREADS 3
// Getter class
class getter
{
private:
char last_description[MAXLEN_DESCRIPTION]; // Last stored description
char stored_domain[MAXLEN_DOMAIN]; // Domain of pages to download
char stored_path[MAXLEN_PATH]; // Path of main page within domain
int subpage_no; // Number of subpage (purely cosmetic)
wsock* connection; // Pointer to instance of wsock object
data_item* current_page; // Ptr to info about current/sub pages
statuswnd* status; // Pointer to status window object
config* settings; // Program settings
fileaccess* logfile; // Pointer to log file object
bool url_splitter(char*, char*, char*, bool);
public:
getter(wsock*, config*, fileaccess*, statuswnd*); // Constructor
bool RetrieveURL(char*, char*, data_item*, unsigned int);
void error_page(char*, char*, char*);
// The test stubs require access to private member functions
friend void url_splitter_Test( void );
};
#endif
syntax highlighted by Code2HTML, v. 0.8.11