root | cd43656 | 2025-05-08 14:09:19 +0000 | [diff] [blame] | 1 | package tracker; |
| 2 | import java.io.File; |
| 3 | |
root | ff0769a | 2025-05-18 17:24:41 +0000 | [diff] [blame] | 4 | import entity.TransRecord; |
root | cd43656 | 2025-05-08 14:09:19 +0000 | [diff] [blame] | 5 | public interface TrackerInterface{ |
| 6 | public boolean AddUpLoad(String userid,int upload);//给用户新增上传量,返回0成功,返回1失败; |
| 7 | public boolean ReduceUpLoad(String userid,int upload);//给用户减上传量,返回0成功,返回1失败; |
| 8 | public boolean AddDownload(String userid,int download);//给用户增加下载量,返回0成功,返回1失败; |
| 9 | public boolean ReduceDownload(String userid,int download);//给用户减少下载量,返回0成功,返回1失败; |
| 10 | public boolean AddMagic(String userid,int magic);//给用户增加魔力值,返回0成功,返回1失败; |
| 11 | public boolean ReduceMagic(String userid,int magic);//给用户减少魔力值,返回0成功,返回1失败; |
| 12 | |
root | d4959a8 | 2025-05-27 07:07:37 +0000 | [diff] [blame] | 13 | public int SaveTorrent(String seedid,File TTorent);//保存seedid对应的ttorent信息 |
Raver | aae0612 | 2025-06-05 08:13:35 +0000 | [diff] [blame] | 14 | public File GetTTorent(String seedid,String userid);//根据种子id获得ttorent信息然后构建Ttorent文件并返回,同时记录用户的下载行为 |
root | f35409f | 2025-05-19 04:41:57 +0000 | [diff] [blame] | 15 | |
| 16 | public int AddRecord(TransRecord rd);//新增一个seedid对应的种子的传输任务记录 |
root | cd43656 | 2025-05-08 14:09:19 +0000 | [diff] [blame] | 17 | } |