17
17
along with this program; if not, write to the Free Software
18
18
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
22
- We hereby ask people using this source NOT to use it in purpose of grabbing
24
23
emails addresses, or collecting any other private information on persons.
25
24
This would disgrace our work, and spoil the many hours we spent on it.
28
26
Please visit our Website: http://www.httrack.com
32
29
/* ------------------------------------------------------------ */
33
30
/* File: htsmodules.h subroutines: */
34
31
/* external modules (parsers) */
69
66
#define HTS_DEF_FWSTRUCT_htsmoduleStruct
70
67
typedef struct htsmoduleStruct htsmoduleStruct;
72
typedef int (* t_htsAddLink)(htsmoduleStruct* str, char* link);
69
typedef int (*t_htsAddLink) (htsmoduleStruct * str, char *link);
74
71
/* Structure passed to the module */
75
72
struct htsmoduleStruct {
76
73
/* Read-only elements */
77
const char* filename; /* filename (C:\My Web Sites\...) */
78
int size; /* size of filename (should be > 0) */
79
const char* mime; /* MIME type of the object */
80
const char* url_host; /* incoming hostname (www.foo.com) */
81
const char* url_file; /* incoming filename (/bar/bar.gny) */
74
const char *filename; /* filename (C:\My Web Sites\...) */
75
int size; /* size of filename (should be > 0) */
76
const char *mime; /* MIME type of the object */
77
const char *url_host; /* incoming hostname (www.foo.com) */
78
const char *url_file; /* incoming filename (/bar/bar.gny) */
84
const char* wrapper_name; /* name of wrapper (static string) */
85
char* err_msg; /* if an error occured, the error message (max. 1KB) */
81
const char *wrapper_name; /* name of wrapper (static string) */
82
char *err_msg; /* if an error occured, the error message (max. 1KB) */
88
int relativeToHtmlLink; /* set this to 1 if all urls you pass to addLink
89
are in fact relative to the html file where your
90
module was originally */
85
int relativeToHtmlLink; /* set this to 1 if all urls you pass to addLink
86
are in fact relative to the html file where your
87
module was originally */
93
t_htsAddLink addLink; /* call this function when links are
94
being detected. it if not your responsability to decide
95
if the engine will keep them, or not. */
90
t_htsAddLink addLink; /* call this function when links are
91
being detected. it if not your responsability to decide
92
if the engine will keep them, or not. */
98
char* localLink; /* if non null, the engine will write there the local
99
relative filename of the link added by addLink(), or
100
the absolute path if the link was refused by the wizard */
101
int localLinkSize; /* size of the optionnal buffer */
95
char *localLink; /* if non null, the engine will write there the local
96
relative filename of the link added by addLink(), or
97
the absolute path if the link was refused by the wizard */
98
int localLinkSize; /* size of the optionnal buffer */
103
100
/* User-defined */
104
void* userdef; /* can be used by callback routines
101
void *userdef; /* can be used by callback routines
107
104
/* The parser httrackp structure (may be used) */
110
107
/* Internal use - please don't touch */
114
hash_struct* hashptr;
111
hash_struct *hashptr;
115
112
int numero_passe;
116
113
int add_tab_alloc;
122
119
const char *page_charset_;
123
120
/* Internal use - please don't touch */
127
124
/* Used to wrap module initialization */
128
125
/* return 1 if init was ok */
129
typedef int (*t_htsWrapperInit)(char *fn, char *args);
130
typedef int (*t_htsWrapperExit)(void);
131
typedef int (*t_htsWrapperPlugInit)(char *args);
126
typedef int (*t_htsWrapperInit) (char *fn, char *args);
127
typedef int (*t_htsWrapperExit) (void);
128
typedef int (*t_htsWrapperPlugInit) (char *args);
133
130
/* Library internal definictions */
134
131
#ifdef HTS_INTERNAL_BYTECODE
135
HTSEXT_API const char* hts_get_version_info(httrackp *opt);
136
HTSEXT_API const char* hts_is_available(void);
132
HTSEXT_API const char *hts_get_version_info(httrackp * opt);
133
HTSEXT_API const char *hts_is_available(void);
137
134
extern void htspe_init(void);
138
135
extern void htspe_uninit(void);
139
extern int hts_parse_externals(htsmoduleStruct* str);
136
extern int hts_parse_externals(htsmoduleStruct * str);
141
138
extern int gz_is_available;
142
140
/*extern int swf_is_available;*/
143
141
extern int SSL_is_available;
144
142
extern int V6_is_available;