torrent-stats/torrentfile.h

32 lines
624 B
C

#ifndef _TORRENTFILE_H_
#define _TORRENTFILE_H_
#include "list.h"
#include "spawn.h"
extern struct list_head torrent_list;
struct torrent_file {
/* list of torrent files */
struct list_head list;
/* list of clients in this cloud */
struct list_head client_list;
/* name of torrentfile */
char *name;
/* local seeder process */
struct child_process *child;
/* destroy torrent after child-exit */
int destroy;
};
struct torrent_file * find_create_torrent(const char *fullpath);
int destroy_torrent(struct torrent_file *torrent);
int seed_torrent(struct torrent_file *torrent);
#endif /* _TORRENTFILE_H_ */