root | cd43656 | 2025-05-08 14:09:19 +0000 | [diff] [blame] | 1 | package vip; |
root | 0dbc981 | 2025-05-19 04:41:57 +0000 | [diff] [blame] | 2 | import java.io.File; |
| 3 | |
root | cd43656 | 2025-05-08 14:09:19 +0000 | [diff] [blame] | 4 | import org.apache.commons.lang3.tuple.Pair; |
root | ff0769a | 2025-05-18 17:24:41 +0000 | [diff] [blame] | 5 | |
| 6 | import entity.Seed; |
root | cd43656 | 2025-05-08 14:09:19 +0000 | [diff] [blame] | 7 | public interface VipInterface{ |
| 8 | |
root | 0dbc981 | 2025-05-19 04:41:57 +0000 | [diff] [blame] | 9 | public Pair<File,Integer> GetTTorent(String seedid,String userid,String ip);//获取专线下载的文件,并记录用户的下载行为 |
root | cd43656 | 2025-05-08 14:09:19 +0000 | [diff] [blame] | 10 | //如果用户权限足够,文件存在,integer为0,如果用户权限足够,文件不存在,integer为1,file为null 如果用户权限不足,file为null,integer为2; |
| 11 | |
| 12 | public int AddFarmerNumber(int number,String seedid);//种子增加了新的保种人数,返回值:0,写入成功,1写入失败,其他待定 |
| 13 | public int ReduceFarmerNumber(int number,String seedid);//种子降低的保种人数,返回值:0,写入成功,1:写入失败,其他待定 |
root | 0dbc981 | 2025-05-19 04:41:57 +0000 | [diff] [blame] | 14 | public int KeepSeed(String seedid);//将种子加入保种列表 |
root | cd43656 | 2025-05-08 14:09:19 +0000 | [diff] [blame] | 15 | public int RemoveSeed(String seedid);//将种子移除保种列表 |
| 16 | |
| 17 | public void CheckSeed();//由外部触发,调用类内函数更新保种列表 |
| 18 | public Seed[] GetSeedToPlant();//获取当前需要保种的所有种子信息 |
| 19 | } |