#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); int torrentfile_init(void); #endif /* _TORRENTFILE_H_ */