2001-01-18 02:30:59 +00:00
|
|
|
#ifndef __DCC_GET_H
|
|
|
|
|
#define __DCC_GET_H
|
|
|
|
|
|
|
|
|
|
#include "dcc.h"
|
|
|
|
|
|
2001-02-10 02:02:26 +00:00
|
|
|
#define DCC_GET(dcc) \
|
|
|
|
|
MODULE_CHECK_CAST_MODULE(dcc, GET_DCC_REC, type, "DCC", "GET")
|
|
|
|
|
|
|
|
|
|
#define IS_DCC_GET(dcc) \
|
|
|
|
|
(DCC_GET(dcc) ? TRUE : FALSE)
|
|
|
|
|
|
2001-01-18 02:30:59 +00:00
|
|
|
enum {
|
|
|
|
|
DCC_GET_DEFAULT,
|
|
|
|
|
|
|
|
|
|
DCC_GET_RENAME,
|
|
|
|
|
DCC_GET_OVERWRITE,
|
|
|
|
|
DCC_GET_RESUME
|
|
|
|
|
};
|
|
|
|
|
|
2001-02-10 02:02:26 +00:00
|
|
|
typedef struct {
|
|
|
|
|
#include "dcc-file-rec.h"
|
|
|
|
|
|
|
|
|
|
int get_type; /* what to do if file exists? */
|
|
|
|
|
char *file; /* file name we're really moving, arg is just the reference */
|
|
|
|
|
|
|
|
|
|
unsigned int file_quoted:1; /* file name was received quoted ("file name") */
|
2003-10-01 16:02:43 +00:00
|
|
|
unsigned int from_dccserver:1; /* get is using dccserver method */
|
2001-02-10 02:02:26 +00:00
|
|
|
} GET_DCC_REC;
|
|
|
|
|
|
|
|
|
|
#define DCC_GET_TYPE module_get_uniq_id_str("DCC", "GET")
|
|
|
|
|
|
|
|
|
|
typedef void (*DCC_GET_FUNC) (GET_DCC_REC *);
|
2001-01-18 02:30:59 +00:00
|
|
|
|
|
|
|
|
/* handle receiving DCC - GET/RESUME. */
|
2001-02-10 02:02:26 +00:00
|
|
|
void cmd_dcc_receive(const char *data, DCC_GET_FUNC accept_func);
|
2001-01-18 02:30:59 +00:00
|
|
|
|
2001-02-10 02:02:26 +00:00
|
|
|
void dcc_get_connect(GET_DCC_REC *dcc);
|
2001-01-18 02:30:59 +00:00
|
|
|
char *dcc_get_download_path(const char *fname);
|
|
|
|
|
|
|
|
|
|
void dcc_get_init(void);
|
|
|
|
|
void dcc_get_deinit(void);
|
|
|
|
|
|
|
|
|
|
#endif
|