~ubuntu-branches/ubuntu/trusty/httrack/trusty

« back to all changes in this revision

Viewing changes to src/htsmodules.h

  • Committer: Package Import Robot
  • Author(s): Xavier Roche
  • Date: 2013-05-17 21:18:50 UTC
  • mfrom: (5.2.33 sid)
  • Revision ID: package-import@ubuntu.com-20130517211850-604ltzlucy7th6ai
Tags: 3.47.12-1
Updated to 3.47.12 (3.47-12)
closes:#708707

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.
19
19
 
20
 
 
21
20
Important notes:
22
21
 
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.
26
25
 
27
 
 
28
26
Please visit our Website: http://www.httrack.com
29
27
*/
30
28
 
31
 
 
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;
71
68
#endif
72
 
typedef int (* t_htsAddLink)(htsmoduleStruct* str, char* link);
 
69
typedef int (*t_htsAddLink) (htsmoduleStruct * str, char *link);
73
70
 
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) */
82
 
  
 
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) */
 
79
 
83
80
  /* Write-only */
84
 
  const char* wrapper_name;       /* name of wrapper (static string) */
85
 
  char* err_msg;                  /* if an error occured, the error message (max. 1KB) */
86
 
  
 
81
  const char *wrapper_name;     /* name of wrapper (static string) */
 
82
  char *err_msg;                /* if an error occured, the error message (max. 1KB) */
 
83
 
87
84
  /* Read/Write */
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 */
91
 
  
 
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 */
 
88
 
92
89
  /* Callbacks */
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. */
96
93
 
97
94
  /* Optional */
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 */
102
 
  
 
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 */
 
99
 
103
100
  /* User-defined */
104
 
  void* userdef;                  /* can be used by callback routines
105
 
                                  */
 
101
  void *userdef;                /* can be used by callback routines
 
102
                                 */
106
103
 
107
104
  /* The parser httrackp structure (may be used) */
108
 
  httrackp* opt;
 
105
  httrackp *opt;
109
106
 
110
107
  /* Internal use - please don't touch */
111
 
  lien_url** liens;
112
 
  struct_back* sback;
113
 
  cache_back* cache;
114
 
  hash_struct* hashptr;
 
108
  lien_url **liens;
 
109
  struct_back *sback;
 
110
  cache_back *cache;
 
111
  hash_struct *hashptr;
115
112
  int numero_passe;
116
113
  int add_tab_alloc;
117
114
  /* */
118
 
  int* lien_tot_;
119
 
  int* ptr_;
120
 
  size_t* lien_size_;
121
 
  char** lien_buffer_;
 
115
  int *lien_tot_;
 
116
  int *ptr_;
 
117
  size_t *lien_size_;
 
118
  char **lien_buffer_;
122
119
  const char *page_charset_;
123
120
  /* Internal use - please don't touch */
124
121
 
126
123
 
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);
132
129
 
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);
140
137
 
141
138
extern int gz_is_available;
 
139
 
142
140
/*extern int swf_is_available;*/
143
141
extern int SSL_is_available;
144
142
extern int V6_is_available;