forked from SuxueCode/Teemo.CoolQ.PocketPlugins
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathModel.cs
93 lines (84 loc) · 2.8 KB
/
Model.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace Teemo.CoolQ.PocketPlugins
{
public class PocketSetting
{
public static string IMEI { get; set; }
public static int MaxListen { get; set; } = 5;
public static long Interval { get; set; } = 60;
public static int ShortDelay { get; set; }
public static int LongDelay { get; set; }
}
public class UserInfo
{
public string UserName { get; set; }
public string PassWord { get; set; }
public string PocketToken { get; set; }
public DateTime TokenUpdate { get; set; }
}
public class ListenRunTimeConfig
{
public string IdolName { get; set; }
public int RoomId { get; set; }
public int Delay { get; set; }
public int ShortDelay { get; set; }
public int LongDelay { get; set; }
public bool TransmitText { get; set; }
public bool TransmitImage { get; set; }
public bool TransmitAudio { get; set; }
public bool TransmitVideo { get; set; }
public bool TransmitFanpai { get; set; }
public bool TransmitFlip { get; set; }
public bool TransmitLive { get; set; }
public bool TransmitGift { get; set; }
public bool Atall { get; set; }
public DateTime UpdateTime { get; set; }
//public bool Pro { get; set; }
public bool First { get; set; }
public long LastTime { get; set; }
public PocketProxy Proxy { get; set; }
public List<long> QQGroups { get; set; }
public RuntimeCount CountInfo { get; set; }
}
public class RuntimeCount
{
public int Error { get; set; }
public int OK { get; set; }
}
public class CommonConfig
{
public string ProxyApi { get; set; }
//public int LiveDelay { get; set; }
public bool CoolQAir { get; set; }
public bool LiveAtAll { get; set; }
public bool httpmsg { get; set; }
public string httpport { get; set; }
public bool msglog { get; set; }
}
public class PocketProxy
{
public bool UseProxy { get; set; }
public string IP { get; set; }
public string Port { get; set; }
public string FullIP { get; set; }
public bool Test(UserInfo user,string roomid)
{
if (FullIP != "")
throw new IPNotValue();
string json = Common.GetRoomMessage(this, PocketPlugins.User.PocketToken, roomid);
if (json == "")
return true;
if (json.Contains("200"))
return true;
else
return false;
}
}
public class IPNotValue : Exception { }
}