Compare commits
1272 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cc3ebbe1ae | ||
![]() |
d88db81207 | ||
![]() |
9a15f1d1a3 | ||
![]() |
4e5f091b6c | ||
![]() |
517f196d73 | ||
![]() |
9461d2470a | ||
![]() |
c9f874dc93 | ||
![]() |
53b6285810 | ||
![]() |
5d4e0c41d6 | ||
![]() |
754337b58f | ||
![]() |
16f79085ad | ||
![]() |
005539d30d | ||
![]() |
2d5a90ae31 | ||
![]() |
fc060d6468 | ||
![]() |
d0937d3561 | ||
![]() |
7b8de5e28d | ||
![]() |
790f5ddfad | ||
![]() |
760231be43 | ||
![]() |
837e74a743 | ||
![]() |
630f613721 | ||
![]() |
aba9e6db47 | ||
![]() |
88858022af | ||
![]() |
852bb27de0 | ||
![]() |
9a071a3457 | ||
![]() |
db11db28e4 | ||
![]() |
79a8ef957f | ||
![]() |
0e0dfe80a7 | ||
![]() |
c112aef644 | ||
![]() |
2e30fe1899 | ||
![]() |
6b3ffa22c9 | ||
![]() |
9e78f46010 | ||
![]() |
50a09189e4 | ||
![]() |
fcda42b9f1 | ||
![]() |
48f72a3096 | ||
![]() |
e4e1ac2c18 | ||
![]() |
a719048f81 | ||
![]() |
8f1f41a4a1 | ||
![]() |
fffd53cc1f | ||
![]() |
ae7c139452 | ||
![]() |
76a3e7cd85 | ||
![]() |
20495ef32b | ||
![]() |
41b91bb0c3 | ||
![]() |
6e59cc4c33 | ||
![]() |
2aaed9b9e4 | ||
![]() |
f7dc404eaf | ||
![]() |
f3b9e70dde | ||
![]() |
d065f0abf4 | ||
![]() |
6e173558db | ||
![]() |
f78434e758 | ||
![]() |
ef5f2ccb89 | ||
![]() |
f05db7f544 | ||
![]() |
12cc25bdb0 | ||
![]() |
5936defc06 | ||
![]() |
3e9006464d | ||
![]() |
f7bf8fba40 | ||
![]() |
6bbb80a54e | ||
![]() |
7889077498 | ||
![]() |
074f0da27f | ||
![]() |
d7c35b2fe4 | ||
![]() |
4d8b55a92f | ||
![]() |
7387679a6f | ||
![]() |
af93571568 | ||
![]() |
1e2ecfc0c5 | ||
![]() |
b98a1ff1f5 | ||
![]() |
6170ef09b4 | ||
![]() |
15a1c6566f | ||
![]() |
113b3dffff | ||
![]() |
511ae721e2 | ||
![]() |
8ce3b35595 | ||
![]() |
69cb493144 | ||
![]() |
e850a5315a | ||
![]() |
d054bfce87 | ||
![]() |
7a0bafe528 | ||
![]() |
81b40df6ee | ||
![]() |
795c896abe | ||
![]() |
524a0c7885 | ||
![]() |
0ddaa3bef4 | ||
![]() |
e180b4bfc2 | ||
![]() |
16c9e95ee2 | ||
![]() |
e5be938c54 | ||
![]() |
5f81fa51fc | ||
![]() |
70014485a0 | ||
![]() |
6f1f3434cc | ||
![]() |
6323dc022f | ||
![]() |
522d7eeb4c | ||
![]() |
6065e1c576 | ||
![]() |
eff17d8fe2 | ||
![]() |
2307f6d2a5 | ||
![]() |
2e95240d34 | ||
![]() |
95df5228c6 | ||
![]() |
bc104e356c | ||
![]() |
ad143ce94f | ||
![]() |
05520f23d1 | ||
![]() |
1884073c21 | ||
![]() |
7d759917e6 | ||
![]() |
eccf4dc22c | ||
![]() |
a752a39230 | ||
![]() |
34dd2981b3 | ||
![]() |
0adb54f4b2 | ||
![]() |
2e77226f0c | ||
![]() |
31ae08544f | ||
![]() |
3da6e4ca1b | ||
![]() |
c4cd17ce2d | ||
![]() |
ee18368192 | ||
![]() |
09a7950c1d | ||
![]() |
847688bae8 | ||
![]() |
7fde427731 | ||
![]() |
7319078a5d | ||
![]() |
495afb91e9 | ||
![]() |
aa3fa8717f | ||
![]() |
052e382d93 | ||
![]() |
db39b6afd9 | ||
![]() |
e05efaeb1d | ||
![]() |
b94501f054 | ||
![]() |
f00d8e192a | ||
![]() |
9ca4600eab | ||
![]() |
5e8ebd8579 | ||
![]() |
748881ef70 | ||
![]() |
42e6600c6a | ||
![]() |
85d17a7763 | ||
![]() |
b1391b0523 | ||
![]() |
8510a42d7a | ||
![]() |
e61f6e78b3 | ||
![]() |
176ba5a6db | ||
![]() |
ad3c56e83b | ||
![]() |
2495a2f64e | ||
![]() |
0d6830b0aa | ||
![]() |
ef316590cb | ||
![]() |
c3c25190a2 | ||
![]() |
fc3d8d1aec | ||
![]() |
bbb7d1c3c7 | ||
![]() |
89dfac3009 | ||
![]() |
9610965979 | ||
![]() |
8b501403e1 | ||
![]() |
3a88aeb649 | ||
![]() |
0a0ba2291b | ||
![]() |
2484e22da9 | ||
![]() |
e8ca3e6b52 | ||
![]() |
d5c7445919 | ||
![]() |
72045404d4 | ||
![]() |
1a6e1a8c60 | ||
![]() |
540dc0fad4 | ||
![]() |
1db3e93ce1 | ||
![]() |
a5ec65bff3 | ||
![]() |
c4e3aa8a64 | ||
![]() |
e3e183d86b | ||
![]() |
bfe892f2c8 | ||
![]() |
b28116c10f | ||
![]() |
52c408fce7 | ||
![]() |
a70997ad7f | ||
![]() |
8840de316d | ||
![]() |
409483e680 | ||
![]() |
b19d690305 | ||
![]() |
0fabaf2fe0 | ||
![]() |
3035d8b901 | ||
![]() |
f3d73b5661 | ||
![]() |
f335dbf7bc | ||
![]() |
b5178dc7b8 | ||
![]() |
ad09a4dd77 | ||
![]() |
da0ead13f4 | ||
![]() |
4b6a9376de | ||
![]() |
3eab605423 | ||
![]() |
7fc37f1156 | ||
![]() |
9f03f8129a | ||
![]() |
51aa6fdf13 | ||
![]() |
f2f602dcc5 | ||
![]() |
a217381668 | ||
![]() |
4bd7befb50 | ||
![]() |
56074155e9 | ||
![]() |
86a5a9cd25 | ||
![]() |
1792ed276e | ||
![]() |
4d1e4b59c8 | ||
![]() |
e1ff4b9e12 | ||
![]() |
86400e1b8a | ||
![]() |
b3d53d1c01 | ||
![]() |
471d494b3b | ||
![]() |
6e7d983fc3 | ||
![]() |
fd1073d0b5 | ||
![]() |
7815615112 | ||
![]() |
a6d8e68ca9 | ||
![]() |
9593ba2414 | ||
![]() |
8c95045a4a | ||
![]() |
667317e513 | ||
![]() |
0026a4f26e | ||
![]() |
2fac90df9f | ||
![]() |
424e7b773d | ||
![]() |
d25506e595 | ||
![]() |
a83e90e9ce | ||
![]() |
ea93182d96 | ||
![]() |
d60ee24111 | ||
![]() |
40e5c999b3 | ||
![]() |
6175b805d2 | ||
![]() |
5b6ba8d75f | ||
![]() |
10b0f0b1ce | ||
![]() |
a81ef63075 | ||
![]() |
2dc5edbb55 | ||
![]() |
636be458a6 | ||
![]() |
64283f137c | ||
![]() |
ec1c9a9461 | ||
![]() |
d9a806d236 | ||
![]() |
ebd294b602 | ||
![]() |
6081094b73 | ||
![]() |
115dfd20e7 | ||
![]() |
038fe2866b | ||
![]() |
aec40373d3 | ||
![]() |
c9b8d27139 | ||
![]() |
d0793ebcba | ||
![]() |
00e4e8109e | ||
![]() |
bcc1dc1948 | ||
![]() |
1e67996df0 | ||
![]() |
947bed0a46 | ||
![]() |
0dd9842e84 | ||
![]() |
42728e2694 | ||
![]() |
44d14dc19c | ||
![]() |
2e95c491a1 | ||
![]() |
acfc776462 | ||
![]() |
b6692a7dab | ||
![]() |
34fc2a0d15 | ||
![]() |
07938dcef8 | ||
![]() |
847c5dfdcb | ||
![]() |
bd47603f0d | ||
![]() |
8b86146715 | ||
![]() |
5343c9109b | ||
![]() |
687acae90b | ||
![]() |
871e540957 | ||
![]() |
b0ce0b5350 | ||
![]() |
bc965b1a0c | ||
![]() |
89b60c4c15 | ||
![]() |
47a84775c5 | ||
![]() |
8de0b0cbad | ||
![]() |
b95fbd76a7 | ||
![]() |
6b44cc9b74 | ||
![]() |
0612c70ca1 | ||
![]() |
060972475f | ||
![]() |
28bbeec462 | ||
![]() |
099adadbdc | ||
![]() |
43511c6ecb | ||
![]() |
aa3e9c6fde | ||
![]() |
e53cdcb909 | ||
![]() |
fd14ad3f93 | ||
![]() |
ca1af97e42 | ||
![]() |
4970219ea7 | ||
![]() |
54c5b66ecf | ||
![]() |
8ae09d453d | ||
![]() |
f2e7ec25c8 | ||
![]() |
7f9fff4683 | ||
![]() |
13f2eea298 | ||
![]() |
d6f5a1b242 | ||
![]() |
ab37f0c2c7 | ||
![]() |
9710b37064 | ||
![]() |
54f7568111 | ||
![]() |
06758964c0 | ||
![]() |
b56552e0f4 | ||
![]() |
ef8653f7d2 | ||
![]() |
d5a6987390 | ||
![]() |
8fb92ca05c | ||
![]() |
11c7015c17 | ||
![]() |
8bc5d813b7 | ||
![]() |
012f5f05cc | ||
![]() |
cd65ec7a71 | ||
![]() |
45826df4fe | ||
![]() |
0645bab613 | ||
![]() |
4e409dfb50 | ||
![]() |
52a39b7a71 | ||
![]() |
5278b9fb47 | ||
![]() |
1ecafe3667 | ||
![]() |
190a415907 | ||
![]() |
ca609a9e62 | ||
![]() |
b72ade7b27 | ||
![]() |
e7098d01c5 | ||
![]() |
b04ee56612 | ||
![]() |
72a18e9b73 | ||
![]() |
6be64bbe36 | ||
![]() |
cf3848a54f | ||
![]() |
1a14e8dd4b | ||
![]() |
a25eb7f951 | ||
![]() |
9437cd54d3 | ||
![]() |
be55c5e4a6 | ||
![]() |
f1d774aa07 | ||
![]() |
c109133fcc | ||
![]() |
3538fdfaf7 | ||
![]() |
3468e7d404 | ||
![]() |
ec4afda184 | ||
![]() |
67b1835264 | ||
![]() |
aee64aa589 | ||
![]() |
687e6e237f | ||
![]() |
b48dd5e930 | ||
![]() |
5ee6833610 | ||
![]() |
c998ba3762 | ||
![]() |
2d4f7ab0e9 | ||
![]() |
676d03eb88 | ||
![]() |
68351a480b | ||
![]() |
33e35f1bd3 | ||
![]() |
e82b54994e | ||
![]() |
6f7ecbfb7b | ||
![]() |
c4aa49eb32 | ||
![]() |
32aae44ffc | ||
![]() |
7883534c5e | ||
![]() |
b58c9fb718 | ||
![]() |
99d8f63f9e | ||
![]() |
635e8240d2 | ||
![]() |
117a670aa3 | ||
![]() |
f49c58a1fa | ||
![]() |
2492f1b797 | ||
![]() |
d6781f67b2 | ||
![]() |
2e0c22eb6d | ||
![]() |
211e152863 | ||
![]() |
f7bf4060ea | ||
![]() |
8c953bbf01 | ||
![]() |
4e91761fdf | ||
![]() |
53f8465e67 | ||
![]() |
5818b914a3 | ||
![]() |
0680d39d90 | ||
![]() |
4ca6676be0 | ||
![]() |
3d85e751b7 | ||
![]() |
965da06214 | ||
![]() |
e8bc2816ef | ||
![]() |
28ed7cc8a5 | ||
![]() |
089d9f2e3d | ||
![]() |
9abce7a586 | ||
![]() |
53162b4bd3 | ||
![]() |
80d78a027b | ||
![]() |
b4eda2ed54 | ||
![]() |
4d8d21a815 | ||
![]() |
f3290800d8 | ||
![]() |
22a858c076 | ||
![]() |
823419c032 | ||
![]() |
908d3f64f4 | ||
![]() |
3843d68766 | ||
![]() |
4b599f391c | ||
![]() |
6d8239caab | ||
![]() |
dae37f273a | ||
![]() |
1615bff2d0 | ||
![]() |
b303befbb9 | ||
![]() |
e243c11cc0 | ||
![]() |
c860bca320 | ||
![]() |
a60c1fca36 | ||
![]() |
23f55ef33a | ||
![]() |
5ad2c7a371 | ||
![]() |
e4c729a588 | ||
![]() |
3df0218347 | ||
![]() |
601783aef6 | ||
![]() |
f09c5722be | ||
![]() |
e73ae99e38 | ||
![]() |
10c5c99385 | ||
![]() |
ac5af81344 | ||
![]() |
823563c84f | ||
![]() |
47410c5eb6 | ||
![]() |
af135f4ae9 | ||
![]() |
3eeced3a04 | ||
![]() |
8ea99b548d | ||
![]() |
ae73e8188d | ||
![]() |
9c5cda72da | ||
![]() |
fb1e24799d | ||
![]() |
5721948434 | ||
![]() |
d7b6f413be | ||
![]() |
959ec4667d | ||
![]() |
20433db169 | ||
![]() |
54465798e9 | ||
![]() |
313147d224 | ||
![]() |
84bd947eca | ||
![]() |
366abc4431 | ||
![]() |
2f7fa2f063 | ||
![]() |
205f6cac12 | ||
![]() |
f602b3db24 | ||
![]() |
0d72f1f228 | ||
![]() |
508125e68f | ||
![]() |
cfb714e13c | ||
![]() |
b9dcfd1b02 | ||
![]() |
a1b2dc67b8 | ||
![]() |
2207c5a961 | ||
![]() |
2caa09bb1e | ||
![]() |
68906f6e40 | ||
![]() |
2cf3cf15e3 | ||
![]() |
88202c1f7f | ||
![]() |
6293c787e7 | ||
![]() |
f67fda3bf4 | ||
![]() |
0a70f91bf1 | ||
![]() |
88945be5d7 | ||
![]() |
c81dd24fe7 | ||
![]() |
af94dd2757 | ||
![]() |
0a07738c5b | ||
![]() |
e05783a25a | ||
![]() |
27d4ab3967 | ||
![]() |
04b3efbbc2 | ||
![]() |
ccd5347be2 | ||
![]() |
e1c5f3ed6d | ||
![]() |
c1fb41204c | ||
![]() |
b50733054f | ||
![]() |
e324773c91 | ||
![]() |
6a4c34d5df | ||
![]() |
bc34b9f176 | ||
![]() |
96af05fbef | ||
![]() |
842d9e79ce | ||
![]() |
086d8b32e9 | ||
![]() |
a6390f2bc5 | ||
![]() |
1ab0827ae7 | ||
![]() |
db0f651f33 | ||
![]() |
7f163c3945 | ||
![]() |
cb53867b37 | ||
![]() |
b5b907c9ed | ||
![]() |
2f8ef4aec2 | ||
![]() |
e5929c850c | ||
![]() |
86771a87c6 | ||
![]() |
5df131140f | ||
![]() |
8002483e68 | ||
![]() |
ce84264490 | ||
![]() |
fca6ac0dbc | ||
![]() |
da61eb8988 | ||
![]() |
ef22d43f46 | ||
![]() |
f63f1361ce | ||
![]() |
547c9174b1 | ||
![]() |
cb292bbf06 | ||
![]() |
784c41b83a | ||
![]() |
42fbe9270a | ||
![]() |
8067f1948e | ||
![]() |
143cc6e8d0 | ||
![]() |
628ab0ca82 | ||
![]() |
cc13d7edf6 | ||
![]() |
6ea2c18384 | ||
![]() |
fb316d9068 | ||
![]() |
fda730dcad | ||
![]() |
8d921202fa | ||
![]() |
615794a4bf | ||
![]() |
5eed9d7038 | ||
![]() |
e6b135e151 | ||
![]() |
dbde3b469a | ||
![]() |
7841bcab06 | ||
![]() |
efe1346d41 | ||
![]() |
f162902b36 | ||
![]() |
a752683965 | ||
![]() |
683bd6e2d4 | ||
![]() |
13426fe7ec | ||
![]() |
d87d0f87b1 | ||
![]() |
85ec169755 | ||
![]() |
9cc40144a9 | ||
![]() |
42beb6018e | ||
![]() |
2d0e82159d | ||
![]() |
08ad94a2f5 | ||
![]() |
0eebea0ef7 | ||
![]() |
e4888b83d8 | ||
![]() |
37f8066901 | ||
![]() |
92f976916f | ||
![]() |
530ad7ecf5 | ||
![]() |
c1bc750059 | ||
![]() |
364061fde0 | ||
![]() |
1b4826f966 | ||
![]() |
580eacdb18 | ||
![]() |
270b8c9041 | ||
![]() |
9f7590783d | ||
![]() |
63dceed010 | ||
![]() |
ee3e0dd0e1 | ||
![]() |
e19d59c4ab | ||
![]() |
d29132a540 | ||
![]() |
0037811fb5 | ||
![]() |
1f1b8d0074 | ||
![]() |
dae6aeb4b5 | ||
![]() |
9bfb249425 | ||
![]() |
0bbcecc1c3 | ||
![]() |
a871e35449 | ||
![]() |
9961031b0e | ||
![]() |
c2d3214c01 | ||
![]() |
13e14f3e62 | ||
![]() |
ffe435051b | ||
![]() |
5e00b2ec33 | ||
![]() |
a73fbccd22 | ||
![]() |
48cdc3bb5e | ||
![]() |
535f71c18c | ||
![]() |
9ceeb71448 | ||
![]() |
457449866e | ||
![]() |
427428d09b | ||
![]() |
82b203c9c3 | ||
![]() |
9677c2deee | ||
![]() |
9000745877 | ||
![]() |
2fb413123c | ||
![]() |
6316b82600 | ||
![]() |
2746d797ee | ||
![]() |
7e5a7ad153 | ||
![]() |
e947059da1 | ||
![]() |
65aaaa3d77 | ||
![]() |
c2b2c94e1b | ||
![]() |
e8465f23b9 | ||
![]() |
09d37ab232 | ||
![]() |
f413355610 | ||
![]() |
5a97cd7dd2 | ||
![]() |
7b354d1582 | ||
![]() |
b964a33ae2 | ||
![]() |
dfa513da24 | ||
![]() |
dcee9128f9 | ||
![]() |
30a8e1b4c5 | ||
![]() |
a5e2e6ef60 | ||
![]() |
772709d46c | ||
![]() |
71f60c612a | ||
![]() |
e6834990ec | ||
![]() |
17d7ed5a2b | ||
![]() |
10bf70c663 | ||
![]() |
8c14820a38 | ||
![]() |
63772f289d | ||
![]() |
8d5aec030c | ||
![]() |
280547ad01 | ||
![]() |
d01d57037e | ||
![]() |
48279699eb | ||
![]() |
b26e287a62 | ||
![]() |
66289cb3f3 | ||
![]() |
5bfe0179b2 | ||
![]() |
b9b5b3a442 | ||
![]() |
402dd9d917 | ||
![]() |
7d332aada4 | ||
![]() |
df8f634ede | ||
![]() |
fcd0167ee7 | ||
![]() |
8cd330e5fb | ||
![]() |
77d8ef50b3 | ||
![]() |
4d480e204a | ||
![]() |
a6486fc233 | ||
![]() |
655bc5c05e | ||
![]() |
3dfd0d22bb | ||
![]() |
c56c2b0dd9 | ||
![]() |
01a43e04e1 | ||
![]() |
2ad2e06754 | ||
![]() |
20d1813793 | ||
![]() |
534e718925 | ||
![]() |
9fc5b97de8 | ||
![]() |
684fadd2d2 | ||
![]() |
b66fd18380 | ||
![]() |
d1d8ef916e | ||
![]() |
c9a53fa2b2 | ||
![]() |
93d1976a14 | ||
![]() |
5b07e6424a | ||
![]() |
ecec3d2006 | ||
![]() |
f99bc5ba41 | ||
![]() |
9aae53bfb7 | ||
![]() |
59700dcd91 | ||
![]() |
13e1ab231f | ||
![]() |
8fd10dd2d1 | ||
![]() |
271036b527 | ||
![]() |
66ca1942b3 | ||
![]() |
87db689ea9 | ||
![]() |
525f78caca | ||
![]() |
0e38b1ada8 | ||
![]() |
50da308553 | ||
![]() |
c11de64a35 | ||
![]() |
d232acb85e | ||
![]() |
9cfbdd3545 | ||
![]() |
cdc6210160 | ||
![]() |
c866748de3 | ||
![]() |
af869583e3 | ||
![]() |
756cf7c0a6 | ||
![]() |
a839f7d56f | ||
![]() |
06bf11b64e | ||
![]() |
626a9cbc6a | ||
![]() |
ef9f5ad865 | ||
![]() |
b775064c60 | ||
![]() |
21f8fa966d | ||
![]() |
257295ed08 | ||
![]() |
57fc97dff7 | ||
![]() |
55ee2148e1 | ||
![]() |
65b008b75a | ||
![]() |
dc8d1698f0 | ||
![]() |
9071b1fe29 | ||
![]() |
3190cd0fd5 | ||
![]() |
0e5f843bac | ||
![]() |
5eb84f6236 | ||
![]() |
c94b8682c8 | ||
![]() |
4ba5e64ccb | ||
![]() |
799b7ca422 | ||
![]() |
9d188996ca | ||
![]() |
f808b61210 | ||
![]() |
e4a8ef36c0 | ||
![]() |
478e3ba74e | ||
![]() |
cbde01d520 | ||
![]() |
403621ab8a | ||
![]() |
71a42b089e | ||
![]() |
65ce4f54a1 | ||
![]() |
2d900d1734 | ||
![]() |
af90708fad | ||
![]() |
649f57b0bf | ||
![]() |
792d2a433f | ||
![]() |
b55d55c640 | ||
![]() |
021468d6f5 | ||
![]() |
6e5e326d64 | ||
![]() |
da212064f4 | ||
![]() |
f4a0dfb6de | ||
![]() |
d4e184fbca | ||
![]() |
e4cd2351cf | ||
![]() |
b1a9361221 | ||
![]() |
c137530f5d | ||
![]() |
aa1583497c | ||
![]() |
e564149ee0 | ||
![]() |
a2fbaba8e8 | ||
![]() |
15ff725ee5 | ||
![]() |
8db85b5abb | ||
![]() |
6ad732cd87 | ||
![]() |
7d1110e86a | ||
![]() |
b4fd588e9b | ||
![]() |
2120457518 | ||
![]() |
24c4a1e002 | ||
![]() |
7c5e557f7f | ||
![]() |
e3fc4a86a3 | ||
![]() |
0e3baba110 | ||
![]() |
c2e7282bd3 | ||
![]() |
119784ab5c | ||
![]() |
3e5e48c3a0 | ||
![]() |
7ab8138060 | ||
![]() |
60505e1638 | ||
![]() |
b52c67848c | ||
![]() |
a0a7055583 | ||
![]() |
83163c2b9b | ||
![]() |
fb499570aa | ||
![]() |
536d6a65db | ||
![]() |
82d0c934ff | ||
![]() |
75bb28f376 | ||
![]() |
21c7bf604a | ||
![]() |
a3de7fc47b | ||
![]() |
e3d9c68f5a | ||
![]() |
3b27a04590 | ||
![]() |
4b9ff6a6f8 | ||
![]() |
a2185bf957 | ||
![]() |
02f0dd8c59 | ||
![]() |
3848a0bcd6 | ||
![]() |
e2cc72589a | ||
![]() |
4216136d42 | ||
![]() |
e9f18fb93e | ||
![]() |
395ac68c32 | ||
![]() |
461fdc43e9 | ||
![]() |
f9888d7ffb | ||
![]() |
ec75dedc57 | ||
![]() |
a26db3a772 | ||
![]() |
ae559bc482 | ||
![]() |
b9c3c95129 | ||
![]() |
1fbe024e53 | ||
![]() |
8948cc56a9 | ||
![]() |
af2cfd5a2c | ||
![]() |
054ef1b66f | ||
![]() |
1f47546846 | ||
![]() |
4b3adbcb2f | ||
![]() |
8e8488a939 | ||
![]() |
8252a2884d | ||
![]() |
d766cdcf0c | ||
![]() |
4955d8c71d | ||
![]() |
566a83bb98 | ||
![]() |
785d00a1e0 | ||
![]() |
6e6e89463c | ||
![]() |
24ccd16311 | ||
![]() |
a67dd5dc6a | ||
![]() |
144bb40707 | ||
![]() |
ed82e34d10 | ||
![]() |
0b1c9751e5 | ||
![]() |
05f82c66b0 | ||
![]() |
32dd7293d0 | ||
![]() |
a923563357 | ||
![]() |
5e4022cc43 | ||
![]() |
5e35072a39 | ||
![]() |
bfb88e60e0 | ||
![]() |
35df096333 | ||
![]() |
c2328ae72c | ||
![]() |
02b12dc8e4 | ||
![]() |
9a5f0de726 | ||
![]() |
4504d45f0c | ||
![]() |
b53a30a267 | ||
![]() |
3ce6296a58 | ||
![]() |
1556dc46c1 | ||
![]() |
15bf794f9e | ||
![]() |
1c13158e79 | ||
![]() |
940863a1a4 | ||
![]() |
ccf6780e6d | ||
![]() |
abb644eeb8 | ||
![]() |
5bfa6ff736 | ||
![]() |
da51c070d0 | ||
![]() |
6d09f67adc | ||
![]() |
ea0c155c27 | ||
![]() |
60fb7bc3d5 | ||
![]() |
ba59cbd1b3 | ||
![]() |
a433eb564b | ||
![]() |
9215ae44ba | ||
![]() |
ad4aa891cf | ||
![]() |
1c03172211 | ||
![]() |
92263c6e04 | ||
![]() |
0b208008cf | ||
![]() |
7db24cc4a0 | ||
![]() |
5558136b51 | ||
![]() |
d49666835f | ||
![]() |
7f5612d0dc | ||
![]() |
7253a09531 | ||
![]() |
f56e53255e | ||
![]() |
27286a1b71 | ||
![]() |
a5d4fadca5 | ||
![]() |
1165d5ff9c | ||
![]() |
c65a4dbe12 | ||
![]() |
c335ae6eb4 | ||
![]() |
6ffb9dc9ef | ||
![]() |
08ce9b903b | ||
![]() |
156f6f6cce | ||
![]() |
3f681060b2 | ||
![]() |
6a4a9a09f5 | ||
![]() |
6dae7cd11d | ||
![]() |
85f522b055 | ||
![]() |
5eb63005ad | ||
![]() |
2fb3d52b44 | ||
![]() |
7c1fbdd44b | ||
![]() |
fdeacaa554 | ||
![]() |
d81b00616a | ||
![]() |
2af5e0c37b | ||
![]() |
7c657796aa | ||
![]() |
c8c62354f4 | ||
![]() |
62e9f712a0 | ||
![]() |
c60ae71bd9 | ||
![]() |
99b27fa084 | ||
![]() |
52ff0a6a1d | ||
![]() |
2a224785c3 | ||
![]() |
54ee2a1e97 | ||
![]() |
8eace1b1e9 | ||
![]() |
eb658ab421 | ||
![]() |
53f33b0fc1 | ||
![]() |
871966166b | ||
![]() |
69e71bbe87 | ||
![]() |
ac9274c540 | ||
![]() |
bcd9836088 | ||
![]() |
4fef4f872e | ||
![]() |
d578f585b3 | ||
![]() |
42b9e2a406 | ||
![]() |
de2f6eeabf | ||
![]() |
3fcaf3926a | ||
![]() |
b396818c52 | ||
![]() |
f89c9769be | ||
![]() |
dd9a6c1c7b | ||
![]() |
98b92ddc76 | ||
![]() |
8e9b144cff | ||
![]() |
9cc4021cb3 | ||
![]() |
c63c615dc3 | ||
![]() |
4055c205da | ||
![]() |
dc892cd95b | ||
![]() |
f609f1cc9c | ||
![]() |
ebad07fde5 | ||
![]() |
d44dc77511 | ||
![]() |
2a9e0d4c73 | ||
![]() |
6ecc500dde | ||
![]() |
f452f20189 | ||
![]() |
f25719fd9e | ||
![]() |
8f0c5e478e | ||
![]() |
bbcff986f9 | ||
![]() |
1bc3413660 | ||
![]() |
bd6f1ec538 | ||
![]() |
6c487e159b | ||
![]() |
57f9be98b8 | ||
![]() |
6a0bebad3b | ||
![]() |
4d7e170dcc | ||
![]() |
7dad79d5a5 | ||
![]() |
2a2298dcec | ||
![]() |
31118e222b | ||
![]() |
8a02403f83 | ||
![]() |
26933d9286 | ||
![]() |
a33c9eea0a | ||
![]() |
93eae3fdbf | ||
![]() |
becfabfc79 | ||
![]() |
946c8bd5bf | ||
![]() |
5f01a62292 | ||
![]() |
739708edb4 | ||
![]() |
f21cb39d38 | ||
![]() |
05a9e96bbb | ||
![]() |
b639c27883 | ||
![]() |
9e1bec1ea4 | ||
![]() |
3c4ae55407 | ||
![]() |
70ca19c6d9 | ||
![]() |
92c11b8320 | ||
![]() |
7f59ae0b6f | ||
![]() |
232819b6bd | ||
![]() |
29b83757e3 | ||
![]() |
efc4600918 | ||
![]() |
e92b87e4dd | ||
![]() |
5ef4e2f0dd | ||
![]() |
ae2264f344 | ||
![]() |
8c32b8ccb1 | ||
![]() |
80fb235b06 | ||
![]() |
f07e603826 | ||
![]() |
bcdf1cc781 | ||
![]() |
e9bbaf7075 | ||
![]() |
d71a8798dc | ||
![]() |
15a9eee66e | ||
![]() |
cacafcff58 | ||
![]() |
7193d6d28f | ||
![]() |
ceaeb02105 | ||
![]() |
4942d429f0 | ||
![]() |
67093c96bc | ||
![]() |
78daa5012d | ||
![]() |
748565b6dc | ||
![]() |
33581ce5b0 | ||
![]() |
7309e6a694 | ||
![]() |
61d1c02961 | ||
![]() |
87584668dd | ||
![]() |
8773022f10 | ||
![]() |
1a803fb182 | ||
![]() |
e2b23b6ebc | ||
![]() |
a5f845625f | ||
![]() |
f949291cdc | ||
![]() |
2ab1c3a63e | ||
![]() |
55805e251c | ||
![]() |
844d2ba1ad | ||
![]() |
4059815811 | ||
![]() |
caac781651 | ||
![]() |
ff1e19dbc7 | ||
![]() |
95adced183 | ||
![]() |
44dbdf2f10 | ||
![]() |
68cbd6e6be | ||
![]() |
2e8196b753 | ||
![]() |
cf9677ec38 | ||
![]() |
d7c25cb94b | ||
![]() |
c08b4f4fcd | ||
![]() |
dd8ecd1380 | ||
![]() |
e923be03cc | ||
![]() |
c040cf3a3a | ||
![]() |
5c0dadcb3a | ||
![]() |
6f7f50c82f | ||
![]() |
8c90b8ed02 | ||
![]() |
121c7bc686 | ||
![]() |
743de0fae7 | ||
![]() |
9b3b140fad | ||
![]() |
ed41d383a3 | ||
![]() |
4692cd60ee | ||
![]() |
14d3a9eb0a | ||
![]() |
20b4d93686 | ||
![]() |
80960665ec | ||
![]() |
97a5d58f13 | ||
![]() |
26258f2768 | ||
![]() |
be2514f3c0 | ||
![]() |
74535a54ee | ||
![]() |
fea5e454fc | ||
![]() |
a54c089e6d | ||
![]() |
dafe618494 | ||
![]() |
cab46874f7 | ||
![]() |
cce2cb01f9 | ||
![]() |
f31e0d1c13 | ||
![]() |
2c029f7532 | ||
![]() |
e6f8109749 | ||
![]() |
b4f4ed5fe0 | ||
![]() |
7fb6fd4fd9 | ||
![]() |
38384bd1df | ||
![]() |
3a5db7e813 | ||
![]() |
df068d6e4d | ||
![]() |
318cc86c6b | ||
![]() |
2c83038ea8 | ||
![]() |
29f111aec4 | ||
![]() |
6a24c55f06 | ||
![]() |
11ff114a61 | ||
![]() |
f7fb87f62b | ||
![]() |
3ba8dda800 | ||
![]() |
54c1acb669 | ||
![]() |
ad5a949d60 | ||
![]() |
6901b128d0 | ||
![]() |
aa002d1ee4 | ||
![]() |
a4edb62743 | ||
![]() |
eee8d1d8ff | ||
![]() |
2934bfb3e7 | ||
![]() |
105bd85441 | ||
![]() |
d49cb02d2f | ||
![]() |
bc4bbbb7fb | ||
![]() |
70a47c80b5 | ||
![]() |
ed8deaa1ba | ||
![]() |
9b7dfdc01d | ||
![]() |
f6e37d0b83 | ||
![]() |
4dc07fbc26 | ||
![]() |
4d2adf4325 | ||
![]() |
bed9b9d54b | ||
![]() |
35191c913d | ||
![]() |
4f93f1efc6 | ||
![]() |
0f5937b387 | ||
![]() |
4eda11f79e | ||
![]() |
7f7496d64e | ||
![]() |
57aa438e64 | ||
![]() |
bffe1e3796 | ||
![]() |
acc8a24c21 | ||
![]() |
74cdd16bc6 | ||
![]() |
eed9745c67 | ||
![]() |
5fbe1ce66e | ||
![]() |
492816ab35 | ||
![]() |
16f255745f | ||
![]() |
570553f7d6 | ||
![]() |
254b918a08 | ||
![]() |
f49a960f5e | ||
![]() |
b8507c71b6 | ||
![]() |
e4698309a4 | ||
![]() |
20c57bcac6 | ||
![]() |
36c5ec25ab | ||
![]() |
3d5c22b640 | ||
![]() |
4697e53d7c | ||
![]() |
f7d5bc0ab5 | ||
![]() |
d7945eed8c | ||
![]() |
1d060af852 | ||
![]() |
670141aef7 | ||
![]() |
93330fc56e | ||
![]() |
72df2c1545 | ||
![]() |
fc3a1e21d3 | ||
![]() |
c20688837f | ||
![]() |
1db57a746b | ||
![]() |
d9178dd053 | ||
![]() |
e163e6f8cf | ||
![]() |
4b11007393 | ||
![]() |
3929ff2662 | ||
![]() |
76b088b5ec | ||
![]() |
59388a8f80 | ||
![]() |
01dec12909 | ||
![]() |
dda27ef45f | ||
![]() |
968a7729c3 | ||
![]() |
afe64a1b8f | ||
![]() |
83ab3c8b07 | ||
![]() |
baf20927e4 | ||
![]() |
3a126f07c4 | ||
![]() |
c1e495b212 | ||
![]() |
9a50a378cb | ||
![]() |
4cf9dc6eb9 | ||
![]() |
86c5c61e84 | ||
![]() |
d12888f611 | ||
![]() |
1c8bce2935 | ||
![]() |
075092857b | ||
![]() |
dd09daf28f | ||
![]() |
798dc9bf4b | ||
![]() |
0a82f950c3 | ||
![]() |
dc46dd48b1 | ||
![]() |
280be17c3a | ||
![]() |
fb6c7d2b64 | ||
![]() |
7b80d3c07e | ||
![]() |
b2a27591e6 | ||
![]() |
fb63d22666 | ||
![]() |
dcb171a655 | ||
![]() |
b2bc982c1c | ||
![]() |
255a0f0ffa | ||
![]() |
80ea816bc7 | ||
![]() |
b1371aae2b | ||
![]() |
c66984cd3b | ||
![]() |
27a455ad00 | ||
![]() |
69e7c7def3 | ||
![]() |
21882c81d8 | ||
![]() |
47f53ab47f | ||
![]() |
30ac099653 | ||
![]() |
1a85927e44 | ||
![]() |
b1d55fdf00 | ||
![]() |
1c62504b22 | ||
![]() |
fe504ed660 | ||
![]() |
9507369293 | ||
![]() |
84571f05fc | ||
![]() |
a6ba9040d9 | ||
![]() |
29e61feede | ||
![]() |
d055cf789f | ||
![]() |
15412c2508 | ||
![]() |
c216727735 | ||
![]() |
a38b13608e | ||
![]() |
0b302915d6 | ||
![]() |
009cc28415 | ||
![]() |
7007f2e650 | ||
![]() |
05b1895205 | ||
![]() |
955aa2c9ec | ||
![]() |
7b8f6ccd7f | ||
![]() |
a6b5401c0b | ||
![]() |
6d53e486c5 | ||
![]() |
aa35280ca9 | ||
![]() |
b5d846442d | ||
![]() |
b040187c3f | ||
![]() |
804dc12a47 | ||
![]() |
5095c543d0 | ||
![]() |
3ae850e69b | ||
![]() |
4cd01433b7 | ||
![]() |
06c47ec10a | ||
![]() |
e90bf47d8a | ||
![]() |
52c0179e8e | ||
![]() |
2209ab226c | ||
![]() |
ed0dbf4f18 | ||
![]() |
81b2eed342 | ||
![]() |
5a555427ee | ||
![]() |
9c98465b21 | ||
![]() |
8c053797ce | ||
![]() |
210085b854 | ||
![]() |
e72298ad42 | ||
![]() |
3b447b697c | ||
![]() |
a3c685388e | ||
![]() |
2363793d29 | ||
![]() |
969c365a64 | ||
![]() |
1d1259e8eb | ||
![]() |
55ce1394c6 | ||
![]() |
8499d06a14 | ||
![]() |
1739ac3935 | ||
![]() |
1a802f3e32 | ||
![]() |
51d2c2148a | ||
![]() |
25d0ec6ddb | ||
![]() |
b9d12aec9b | ||
![]() |
44f241a4eb | ||
![]() |
27e314088e | ||
![]() |
be2a041a71 | ||
![]() |
38d5394a48 | ||
![]() |
2b32fb358c | ||
![]() |
7ce1c4acfb | ||
![]() |
571c52a0f2 | ||
![]() |
47a2ffa313 | ||
![]() |
1026d0a290 | ||
![]() |
f02dad054b | ||
![]() |
36bd2c032f | ||
![]() |
5c35ada012 | ||
![]() |
e0833ba719 | ||
![]() |
7039bbdb51 | ||
![]() |
bc4d69ffd8 | ||
![]() |
a319838029 | ||
![]() |
570ea5bb51 | ||
![]() |
7638d9bc39 | ||
![]() |
46c993d608 | ||
![]() |
0838174622 | ||
![]() |
75849ecceb | ||
![]() |
9139e64762 | ||
![]() |
4d9ca394f4 | ||
![]() |
1c88cf96df | ||
![]() |
8a6b9d4de7 | ||
![]() |
7829643104 | ||
![]() |
84ccd323e0 | ||
![]() |
e93d8f0f7c | ||
![]() |
132a04d9b9 | ||
![]() |
332a434499 | ||
![]() |
4dc8055830 | ||
![]() |
ea7421ea93 | ||
![]() |
959f66ad78 | ||
![]() |
f9d128994d | ||
![]() |
9bf7d5b92a | ||
![]() |
445f19dcd2 | ||
![]() |
ccffdaa5ee | ||
![]() |
804c771cbe | ||
![]() |
0ab6734dec | ||
![]() |
23ae126026 | ||
![]() |
963b7aa78f | ||
![]() |
3eb7534ddd | ||
![]() |
8dad840f3f | ||
![]() |
be128ed1d5 | ||
![]() |
fb904840b8 | ||
![]() |
b4e81301a3 | ||
![]() |
0ada1871ba | ||
![]() |
6200eba45d | ||
![]() |
7f7c6eb1c4 | ||
![]() |
92fb27e188 | ||
![]() |
82eebf82d3 | ||
![]() |
5607458f60 | ||
![]() |
16654d46df | ||
![]() |
c8bfd73c8d | ||
![]() |
e6a2646a98 | ||
![]() |
6dc12f0d3c | ||
![]() |
0846ca40cd | ||
![]() |
dae55ad500 | ||
![]() |
5e361c2087 | ||
![]() |
3d7ecd197b | ||
![]() |
c0524db98d | ||
![]() |
fa8021c048 | ||
![]() |
246a761eb7 | ||
![]() |
28260afdd9 | ||
![]() |
4c42995ebc | ||
![]() |
bdc2843b40 | ||
![]() |
6e61f38644 | ||
![]() |
8ff186d716 | ||
![]() |
c58b9d58a9 | ||
![]() |
1603516666 | ||
![]() |
46e841fc13 | ||
![]() |
d4ff5d3022 | ||
![]() |
935416cf0d | ||
![]() |
7ca75f51e3 | ||
![]() |
9b592259aa | ||
![]() |
281678892d | ||
![]() |
9aace8ae16 | ||
![]() |
adcfade7f2 | ||
![]() |
d0d51a907e | ||
![]() |
0a4e003bde | ||
![]() |
7230507f5a | ||
![]() |
07744ab88f | ||
![]() |
a8f80ca60e | ||
![]() |
3011f22101 | ||
![]() |
f3098bd6d9 | ||
![]() |
b9d3592f3a | ||
![]() |
f299cf3ac3 | ||
![]() |
48118d5691 | ||
![]() |
5d6b71b7a7 | ||
![]() |
e5982b49a2 | ||
![]() |
bb80da9b19 | ||
![]() |
d027901257 | ||
![]() |
8b8629ef19 | ||
![]() |
3cdab54f5c | ||
![]() |
d0342019bc | ||
![]() |
3c61cb6f06 | ||
![]() |
3863008846 | ||
![]() |
22ca2d9552 | ||
![]() |
e6029c41a7 | ||
![]() |
63cf687f02 | ||
![]() |
d30bde715c | ||
![]() |
12b9d6ca7d | ||
![]() |
0933d913dc | ||
![]() |
8aa82a22f4 | ||
![]() |
91817a10ff | ||
![]() |
8f10d27d0f | ||
![]() |
49a7c8df7a | ||
![]() |
34780f91be | ||
![]() |
851a4d30e1 | ||
![]() |
2ab6d13493 | ||
![]() |
fd79b317ea | ||
![]() |
0e0d53fa00 | ||
![]() |
034edbd32a | ||
![]() |
ecc438b21e | ||
![]() |
d2d3dfbe77 | ||
![]() |
addd6ae226 | ||
![]() |
5818548dbf | ||
![]() |
38e039ac34 | ||
![]() |
4c3f45fd8c | ||
![]() |
1b7e8a9edf | ||
![]() |
af4df90832 | ||
![]() |
c99fdfe641 | ||
![]() |
211e80cb17 | ||
![]() |
d687dfc3e1 | ||
![]() |
1ea5b21956 | ||
![]() |
aff3af0214 | ||
![]() |
f9b2875470 | ||
![]() |
606c82921b | ||
![]() |
4463fc0550 | ||
![]() |
2bdb1ee0ff | ||
![]() |
2af27c0a87 | ||
![]() |
db9fb73b4d | ||
![]() |
aee64183fc | ||
![]() |
9cabf72829 | ||
![]() |
ec7a2d049c | ||
![]() |
11ebe34f55 | ||
![]() |
db476951fe | ||
![]() |
a49e0d5667 | ||
![]() |
605c6bcada | ||
![]() |
9c2e5b4219 | ||
![]() |
2e1ce6f202 | ||
![]() |
650435aaef | ||
![]() |
f2248200af | ||
![]() |
6a9777895c | ||
![]() |
47a8c977d9 | ||
![]() |
b138e243ee | ||
![]() |
fbab796e76 | ||
![]() |
8126fc3c85 | ||
![]() |
27a7b2d711 | ||
![]() |
86ecacffcb | ||
![]() |
8b5d3d0170 | ||
![]() |
4c3cb9f295 | ||
![]() |
c9f945a08e | ||
![]() |
46c6bd74a2 | ||
![]() |
61e2add89a | ||
![]() |
24fe395cf0 | ||
![]() |
aab8968a14 | ||
![]() |
de98438102 | ||
![]() |
108213f098 | ||
![]() |
861271ac04 | ||
![]() |
b378f74202 | ||
![]() |
866e1df174 | ||
![]() |
0bb231eeca | ||
![]() |
fb5c82ff85 | ||
![]() |
d9f57b4e13 | ||
![]() |
4676972493 | ||
![]() |
1d3ac34011 | ||
![]() |
634a860f5c | ||
![]() |
eb00665df1 | ||
![]() |
5e77d27021 | ||
![]() |
8fec3ede4e | ||
![]() |
ae6d5ccfc6 | ||
![]() |
e309d96c51 | ||
![]() |
2a3b42f83a | ||
![]() |
4819a3c8ed | ||
![]() |
34d091942a | ||
![]() |
ee2abe6751 | ||
![]() |
27f0448caf | ||
![]() |
6493037251 | ||
![]() |
0cd11e1882 | ||
![]() |
cfdafa01c9 | ||
![]() |
e3852bcb1b | ||
![]() |
e33e95c1b2 | ||
![]() |
3d0e777d22 | ||
![]() |
aeb3d49c06 | ||
![]() |
c2cf5adeb2 | ||
![]() |
40ab7280ca | ||
![]() |
0c37a191fd | ||
![]() |
19547bc58f | ||
![]() |
bcbe18214b | ||
![]() |
eb60a6854c | ||
![]() |
11406697be | ||
![]() |
b2b576a72d | ||
![]() |
e537e4976e | ||
![]() |
490254d16b | ||
![]() |
a5cc7d973f | ||
![]() |
3e000453a5 | ||
![]() |
8f090fabef | ||
![]() |
91eb4c37cb | ||
![]() |
da43f17558 | ||
![]() |
3b3c3b0947 | ||
![]() |
06e386c253 | ||
![]() |
a2ae2d3384 | ||
![]() |
3532a73d59 | ||
![]() |
b7daffea87 | ||
![]() |
e7b9f8c5ec | ||
![]() |
9ada58a6e3 | ||
![]() |
c8d974cf52 | ||
![]() |
c544de8fed | ||
![]() |
93ec102a86 | ||
![]() |
92bda2b09b | ||
![]() |
1cd0358531 | ||
![]() |
222fec2fd0 | ||
![]() |
3790cbb894 | ||
![]() |
05d5798046 | ||
![]() |
9e9deb17c7 | ||
![]() |
2aedc4f335 | ||
![]() |
dfa708e355 | ||
![]() |
6d1997ef96 | ||
![]() |
db479d8de8 | ||
![]() |
741e6407ce | ||
![]() |
141f3e57e5 | ||
![]() |
00027a41c1 | ||
![]() |
e754d3da9f | ||
![]() |
bf54a2f171 | ||
![]() |
7b7d0082b6 | ||
![]() |
3614b1b3da | ||
![]() |
39b0670a29 | ||
![]() |
1689c46c91 | ||
![]() |
0143bdfe14 | ||
![]() |
93a9568a77 | ||
![]() |
40079b0365 | ||
![]() |
168f04e786 | ||
![]() |
861a33f4af | ||
![]() |
57c52d9eb2 | ||
![]() |
f574dedbe8 | ||
![]() |
a6d2ecffbb | ||
![]() |
300354ef13 | ||
![]() |
4a519226f5 | ||
![]() |
6a4f6e3638 | ||
![]() |
157b042c0a | ||
![]() |
9385218c9d | ||
![]() |
7482e8d9c4 | ||
![]() |
5501d282de | ||
![]() |
123bb4af5f | ||
![]() |
4d36dae634 | ||
![]() |
eac11ab807 | ||
![]() |
b6892f1dc6 | ||
![]() |
0695b8f84e | ||
![]() |
04995f1a10 | ||
![]() |
44d9b3ecc8 | ||
![]() |
a311509b7c | ||
![]() |
0db4229bd4 | ||
![]() |
441aad5a18 | ||
![]() |
d8d911abf8 | ||
![]() |
7423e3f5bc | ||
![]() |
48fea35645 | ||
![]() |
cef72f11d0 | ||
![]() |
ad3039b70f | ||
![]() |
73d590cebd | ||
![]() |
1d0790471f | ||
![]() |
3b3048aa01 | ||
![]() |
183fb56b0a | ||
![]() |
466be31e6f | ||
![]() |
db42bc944b | ||
![]() |
102e7338f9 | ||
![]() |
01b30b0743 | ||
![]() |
947dbac485 | ||
![]() |
0d29e85c80 | ||
![]() |
89a28e2e95 | ||
![]() |
66b2c20b42 | ||
![]() |
e6035bcaa5 | ||
![]() |
68aac78360 | ||
![]() |
4b02141250 | ||
![]() |
8e1d321817 | ||
![]() |
3354d37aa3 | ||
![]() |
7675214092 | ||
![]() |
7af8e1916e | ||
![]() |
6d4720e58f | ||
![]() |
9928815777 | ||
![]() |
a7d65fedfb | ||
![]() |
464b142130 | ||
![]() |
e1bcdce019 | ||
![]() |
ced9bad4f8 | ||
![]() |
c6140d7eef | ||
![]() |
97f4a9de5d | ||
![]() |
be1f6a43a7 | ||
![]() |
c8d96990d5 | ||
![]() |
e9db6edce8 |
6
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,9 +1,9 @@
|
||||
**Please use the search bar** at the top of the page and make sure you are not creating an already submitted issue. Duplicating issues makes it more difficult for everyone to follow. Your issue may have already been solved in the past as well.
|
||||
|
||||
Provide a description of the feature request or bug, the more details the better.
|
||||
If you are experiencing an issue with a tracker, a **full log must be included**. Instructions for obtaining logs are here: https://github.com/Jackett/Jackett#troubleshooting
|
||||
If you are experiencing an issue with a tracker, a **full enhanced log must be included**. Instructions for obtaining logs are here: https://github.com/Jackett/Jackett#troubleshooting
|
||||
|
||||
Jackett version:
|
||||
Mono version (if not using Windows):
|
||||
**Jackett version**:
|
||||
**Mono version** (if not using Windows):
|
||||
|
||||
-------------------------------
|
||||
|
100
.github/appveyor.yml
vendored
@@ -1,100 +0,0 @@
|
||||
version: 0.7.{build}
|
||||
skip_tags: true
|
||||
image: Visual Studio 2015
|
||||
configuration: Release
|
||||
assembly_info:
|
||||
patch: true
|
||||
file: '**\AssemblyInfo.*'
|
||||
assembly_version: '{version}'
|
||||
assembly_file_version: '{version}'
|
||||
assembly_informational_version: '{version}'
|
||||
install:
|
||||
- cmd: choco install InnoSetup
|
||||
before_build:
|
||||
- cmd: nuget restore src\Jackett.sln
|
||||
build:
|
||||
verbosity: minimal
|
||||
after_build:
|
||||
- cmd: >-
|
||||
xcopy src\Jackett.Console\bin\Release build.windows\ /e /y
|
||||
|
||||
copy /Y src\Jackett.Service\bin\Release\JackettService.exe* %APPVEYOR_BUILD_FOLDER%\build.windows\
|
||||
|
||||
copy /Y src\Jackett.Tray\bin\Release\JackettTray.exe* %APPVEYOR_BUILD_FOLDER%\build.windows\
|
||||
|
||||
copy /Y src\Jackett.Updater\bin\Release\JackettUpdater.exe* %APPVEYOR_BUILD_FOLDER%\build.windows\
|
||||
|
||||
copy /Y LICENSE build.windows\LICENSE
|
||||
|
||||
copy /Y README.md build.windows\README.md
|
||||
|
||||
|
||||
xcopy build.windows WindowsBuild\Jackett\ /e /y
|
||||
|
||||
|
||||
msbuild src\Jackett.sln /t:Clean /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
|
||||
"C:\Program Files (x86)\Mono\bin\xbuild.bat" src\Jackett.sln /t:Build /p:Configuration=Release /verbosity:minimal /tv:12.0
|
||||
|
||||
|
||||
xcopy src\Jackett.Console\bin\Release build.mono\ /e /y
|
||||
|
||||
copy /Y src\Jackett.Service\bin\Release\JackettService.exe* %APPVEYOR_BUILD_FOLDER%\build.mono\
|
||||
|
||||
copy /Y src\Jackett.Tray\bin\Release\JackettTray.exe* %APPVEYOR_BUILD_FOLDER%\build.mono\
|
||||
|
||||
copy /Y src\Jackett.Updater\bin\Release\JackettUpdater.exe* %APPVEYOR_BUILD_FOLDER%\build.mono\
|
||||
|
||||
copy /Y LICENSE build.mono\LICENSE
|
||||
|
||||
copy /Y README.md build.mono\README.md
|
||||
|
||||
copy /Y Upstart.config build.mono\Upstart.config
|
||||
|
||||
|
||||
xcopy build.mono MonoBuild\Jackett\ /e /y
|
||||
|
||||
|
||||
"C:\Program Files (x86)\Inno Setup 5\ISCC.exe" Installer.iss
|
||||
|
||||
RENAME Output\setup.exe Jackett.Installer.Windows.exe
|
||||
|
||||
MOVE Output\Jackett.Installer.Windows.exe %APPVEYOR_BUILD_FOLDER%
|
||||
|
||||
|
||||
cd WindowsBuild
|
||||
|
||||
7z a -tzip -r "%APPVEYOR_BUILD_FOLDER%\Jackett.Binaries.Windows.zip" "Jackett\"
|
||||
|
||||
|
||||
cd %APPVEYOR_BUILD_FOLDER%
|
||||
|
||||
cd MonoBuild
|
||||
|
||||
7z a -ttar "%APPVEYOR_BUILD_FOLDER%\Jackett.Binaries.Mono.tar" "Jackett\"
|
||||
|
||||
cd %APPVEYOR_BUILD_FOLDER%
|
||||
|
||||
7z a -tgzip "Jackett.Binaries.Mono.tar.gz" "Jackett.Binaries.Mono.tar"
|
||||
|
||||
|
||||
appveyor PushArtifact Jackett.Installer.Windows.exe
|
||||
|
||||
appveyor PushArtifact Jackett.Binaries.Windows.zip
|
||||
|
||||
appveyor PushArtifact Jackett.Binaries.Mono.tar.gz
|
||||
deploy:
|
||||
- provider: GitHub
|
||||
tag: v$(appveyor_build_version)
|
||||
auth_token:
|
||||
secure: hOg+16YTIbq4kO9u4D1YVOTbWDqgCX6mAQYMbnmBBSw2CiUsZh7OKbupoUb3FtWa
|
||||
draft: true
|
||||
on:
|
||||
branch: master
|
||||
notifications:
|
||||
- provider: GitHubPullRequest
|
||||
auth_token:
|
||||
secure: k6ZZACPbKcvAFiXe/uOmY6Ofs4aw2rgKEWMNA8EilQpdJ6o7ef31we4DPn3SXZzx
|
||||
on_build_success: true
|
||||
on_build_failure: true
|
||||
on_build_status_changed: true
|
BIN
.github/cookies-chrome.png
vendored
Normal file
After Width: | Height: | Size: 480 KiB |
BIN
.github/cookies-firefox.png
vendored
Normal file
After Width: | Height: | Size: 439 KiB |
7
.github/duplicate_issue.md
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
Duplicate of #{{ chosenIssue.number }}
|
||||
|
||||
Hi @{{ payload.sender.login }},
|
||||
|
||||
This issue looks similar to #{{ chosenIssue.number }}.
|
||||
|
||||
To prevent issue tracker clutter, this issue will now be closed. If you feel this issue isn't a duplicate of #{{ chosenIssue.number }}, then feel free to post a comment on this issue stating why it's not a duplicate. Your comment will automatically re-open this issue.
|
9
.github/no_information_provided.md
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
Hi @{{ payload.sender.login }},
|
||||
|
||||
You've created an issue, but haven't provided any details to allow the community to assist you. To prevent issue tracker clutter, this issue will now be closed. Please provide the information needed below and your comment will automatically re-open this issue.
|
||||
|
||||
Provide a description of the feature request or bug, the more details the better.
|
||||
If you are experiencing an issue with a tracker, a **full enhanced log must be included**. Instructions for obtaining logs are here: https://github.com/Jackett/Jackett#troubleshooting
|
||||
|
||||
**Jackett version**:
|
||||
**Mono version** (if not using Windows):
|
3
.github/no_response.md
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
Hi @{{ payload.data.user.login }},
|
||||
|
||||
No response has been received for {{ days }} days. To prevent issue tracker clutter, this issue will now be closed. To re-open the issue, please provide the information requested and the issue will automatically re-open.
|
7
.github/pull_request_readme.md
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
Hi @{{ payload.pull_request.user.login }},
|
||||
|
||||
Thanks for your contribution to Jackett!
|
||||
|
||||
If you are adding a new indexer, please ensure that you've added it to the readme as well
|
||||
|
||||
A human will be along soon to review
|
10
.gitignore
vendored
@@ -194,6 +194,10 @@ FakesAssemblies/
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
/Build.mono
|
||||
/Build.windows
|
||||
/Output
|
||||
/tools
|
||||
/BuildOutput
|
||||
/Artifacts
|
||||
/TestResults
|
||||
*.DS_Store
|
||||
.idea/
|
||||
launchSettings.json
|
||||
|
37
Build.bat
@@ -1,37 +0,0 @@
|
||||
|
||||
rmdir /s /q build.windows
|
||||
rmdir /s /q build.mono
|
||||
rmdir /s /q Output
|
||||
cd src
|
||||
Msbuild Jackett.sln /t:Clean,Build /p:Configuration=Release /verbosity:minimal
|
||||
cd ..
|
||||
|
||||
xcopy src\Jackett.Console\bin\Release build.windows\ /e /y
|
||||
copy /Y src\Jackett.Service\bin\Release\JackettService.exe build.windows\JackettService.exe
|
||||
copy /Y src\Jackett.Service\bin\Release\JackettService.exe.config build.windows\JackettService.exe.config
|
||||
copy /Y src\Jackett.Tray\bin\Release\JackettTray.exe build.windows\JackettTray.exe
|
||||
copy /Y src\Jackett.Tray\bin\Release\JackettTray.exe.config build.windows\JackettTray.exe.config
|
||||
copy /Y src\Jackett.Updater\bin\Release\JackettUpdater.exe build.windows\JackettUpdater.exe
|
||||
copy /Y src\Jackett.Updater\bin\Release\JackettUpdater.exe.config build.windows\JackettUpdater.exe.config
|
||||
copy /Y LICENSE build.windows\LICENSE
|
||||
copy /Y README.md build.windows\README.md
|
||||
|
||||
|
||||
cd src
|
||||
Msbuild Jackett.sln /t:Clean
|
||||
call "C:\Program Files (x86)\Mono\bin\xbuild.bat" Jackett.sln /t:Build /p:Configuration=Release /verbosity:minimal
|
||||
cd ..
|
||||
|
||||
xcopy src\Jackett.Console\bin\Release build.mono\ /e /y
|
||||
copy /Y src\Jackett.Service\bin\Release\JackettService.exe build.mono\JackettService.exe
|
||||
copy /Y src\Jackett.Service\bin\Release\JackettService.exe.config build.mono\JackettService.exe.config
|
||||
copy /Y src\Jackett.Tray\bin\Release\JackettTray.exe build.mono\JackettTray.exe
|
||||
copy /Y src\Jackett.Tray\bin\Release\JackettTray.exe.config build.mono\JackettTray.exe.config
|
||||
copy /Y src\Jackett.Updater\bin\Release\JackettUpdater.exe build.mono\JackettUpdater.exe
|
||||
copy /Y src\Jackett.Updater\bin\Release\JackettUpdater.exe.config build.mono\JackettUpdater.exe.config
|
||||
copy /Y LICENSE build.mono\LICENSE
|
||||
copy /Y README.md build.mono\README.md
|
||||
copy /Y Upstart.config build.mono\Upstart.config
|
||||
|
||||
iscc Installer.iss
|
||||
|
@@ -2,8 +2,8 @@
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
#define MyAppName "Jackett"
|
||||
#define MyAppVersion GetFileVersion("build.windows/Jackett.dll")
|
||||
#define MyAppPublisher "Jackett Inc."
|
||||
#define MyAppVersion GetFileVersion(MyFileForVersion)
|
||||
#define MyAppPublisher "Jackett"
|
||||
#define MyAppURL "https://github.com/Jackett/Jackett"
|
||||
#define MyAppExeName "JackettTray.exe"
|
||||
|
||||
@@ -22,9 +22,11 @@ AppUpdatesURL={#MyAppURL}
|
||||
DefaultDirName={pf}\{#MyAppName}
|
||||
DefaultGroupName={#MyAppName}
|
||||
DisableProgramGroupPage=yes
|
||||
OutputBaseFilename=setup
|
||||
SetupIconFile=src\Jackett.Console\jackett.ico
|
||||
UninstallDisplayIcon={commonappdata}\Jackett\JackettConsole.exe
|
||||
OutputBaseFilename={#MyOutputFilename}
|
||||
SetupIconFile=src\Jackett.Tray\jackett.ico
|
||||
UninstallDisplayIcon={commonappdata}\Jackett\{#MyAppExeName}
|
||||
VersionInfoVersion={#MyAppVersion}
|
||||
UninstallDisplayName={#MyAppName}
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
DisableDirPage=yes
|
||||
@@ -37,9 +39,7 @@ Name: "windowsService"; Description: "Install as a Windows Service"
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||
|
||||
[Files]
|
||||
Source: "build.windows\JackettTray.exe"; DestDir: "{commonappdata}\Jackett"; Flags: ignoreversion
|
||||
Source: "build.windows\JackettUpdater.exe"; DestDir: "{commonappdata}\Jackett"; Flags: ignoreversion
|
||||
Source: "build.windows\*"; DestDir: "{commonappdata}\Jackett"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
Source: "{#MySourceFolder}\*"; DestDir: "{commonappdata}\Jackett"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||
|
||||
[Icons]
|
||||
@@ -48,16 +48,15 @@ Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
|
||||
Name: "{commondesktop}\{#MyAppName}"; Filename: "{commonappdata}\Jackett\{#MyAppExeName}"; Tasks: desktopicon
|
||||
|
||||
[Run]
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Uninstall"; Flags: waituntilterminated runhidden;
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--ReserveUrls"; Flags: waituntilterminated runhidden;
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Install"; Flags: waituntilterminated runhidden; Tasks: windowsService
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Start"; Flags: waituntilterminated runhidden; Tasks: windowsService
|
||||
Filename: "{commonappdata}\Jackett\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
||||
|
||||
[Run]
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Uninstall"; Flags: waituntilterminated;
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--ReserveUrls"; Flags: waituntilterminated;
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--MigrateSettings"; Flags: waituntilterminated;
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Install"; Flags: waituntilterminated; Tasks: windowsService
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Start"; Flags: waituntilterminated; Tasks: windowsService
|
||||
|
||||
[UninstallRun]
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Uninstall"; Flags: waituntilterminated skipifdoesntexist
|
||||
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Uninstall"; Flags: waituntilterminated skipifdoesntexist runhidden
|
||||
Filename: "{sys}\taskkill.exe"; Parameters: "/f /im {#MyAppExeName}"; Flags: waituntilterminated skipifdoesntexist runhidden
|
||||
Filename: "{sys}\taskkill.exe"; Parameters: "/f /im JackettConsole.exe"; Flags: waituntilterminated skipifdoesntexist runhidden
|
||||
|
||||
|
||||
|
280
README.md
@@ -1,60 +1,98 @@
|
||||
# Jackett
|
||||
# Jackett
|
||||
|
||||
[](https://github.com/Jackett/Jackett/issues)
|
||||
[](https://github.com/Jackett/Jackett/pulls)
|
||||
[](https://www.bountysource.com/teams/jackett)
|
||||
[](https://ci.appveyor.com/project/camjac251/jackett)
|
||||
[](https://ci.appveyor.com/project/Jackett/jackett)
|
||||
[](https://github.com/Jackett/Jackett/releases/latest)
|
||||
[](https://hub.docker.com/r/linuxserver/jackett/)
|
||||
[](https://discord.gg/J865QuA)
|
||||
|
||||
This project is a new fork and is recruiting development help. If you are able to help out please contact us.
|
||||
|
||||
Jackett works as a proxy server: it translates queries from apps ([Sonarr](https://github.com/Sonarr/Sonarr), [Radarr](https://github.com/Radarr/Radarr), [SickRage](https://sickrage.github.io/), [CouchPotato](https://couchpota.to/), [Mylar](https://github.com/evilhero/mylar), etc) into tracker-site-specific http queries, parses the html response, then sends results back to the requesting software. This allows for getting recent uploads (like RSS) and performing searches. Jackett is a single repository of maintained indexer scraping & translation logic - removing the burden from other apps.
|
||||
Jackett works as a proxy server: it translates queries from apps ([Sonarr](https://github.com/Sonarr/Sonarr), [Radarr](https://github.com/Radarr/Radarr), [SickRage](https://sickrage.github.io/), [CouchPotato](https://couchpota.to/), [Mylar](https://github.com/evilhero/mylar), [DuckieTV](https://github.com/SchizoDuckie/DuckieTV), etc) into tracker-site-specific http queries, parses the html response, then sends results back to the requesting software. This allows for getting recent uploads (like RSS) and performing searches. Jackett is a single repository of maintained indexer scraping & translation logic - removing the burden from other apps.
|
||||
|
||||
Developer note: The software implements the [Torznab](https://github.com/Sonarr/Sonarr/wiki/Implementing-a-Torznab-indexer) (with [nZEDb](https://github.com/nZEDb/nZEDb/blob/dev/docs/newznab_api_specification.txt) category numbering) and [TorrentPotato](https://github.com/RuudBurger/CouchPotatoServer/wiki/Couchpotato-torrent-provider) APIs.
|
||||
|
||||
|
||||
|
||||
#### Supported Systems
|
||||
* Windows using .NET 4.5
|
||||
* Linux and OSX using Mono 4 (mono 3 is no longer supported).
|
||||
* Windows using .NET 4.6.1 or above [Download here](https://www.microsoft.com/net/framework/versions/net461).
|
||||
* Linux and macOS using Mono 5.8 or above. [Download here](http://www.mono-project.com/download/).
|
||||
|
||||
### Supported Public Trackers
|
||||
* 1337x
|
||||
* Anidex
|
||||
* Anime Tosho
|
||||
* AniRena
|
||||
* btbit
|
||||
* BTDB
|
||||
* BT-Scene
|
||||
* cpasbien
|
||||
* ETTV
|
||||
* ExtraTorrent.ag
|
||||
* ExtraTorrentClone
|
||||
* EZTV
|
||||
* Frozen Layer
|
||||
* GkTorrent
|
||||
* Horrible Subs
|
||||
* Idope
|
||||
* Il Corsaro Nero <!-- maintained by bonny1992 -->
|
||||
* Isohunt
|
||||
* Il Corsaro Blu
|
||||
* Isohunt2
|
||||
* KickAssTorrent
|
||||
* KickAssTorrent (kat.how clone)
|
||||
* KickAssTorrent (thekat.se clone)
|
||||
* LimeTorrents
|
||||
* NextTorrent
|
||||
* MagnetDL
|
||||
* MejorTorrent <!-- maintained by ivandelabeldad -->
|
||||
* Newpct (aka: tvsinpagar, descargas2020, torrentlocura, torrentrapid, etc)
|
||||
* Nyaa.si
|
||||
* Nyaa-Pantsu
|
||||
* Nyoo
|
||||
* RARBG
|
||||
* RuTor
|
||||
* ShowRSS
|
||||
* Sky torrents
|
||||
* sukebei.Nyaa.si
|
||||
* sukebei-Pantsu
|
||||
* The Pirate Bay
|
||||
* TNTVillage <!-- maintained by bonny1992 -->
|
||||
* Tokyo Toshokan
|
||||
* Torlock
|
||||
* Torrent Downloads
|
||||
* TorrentProject
|
||||
* Torrent9
|
||||
* Torrentz2
|
||||
* zetorrents
|
||||
* World Wide Torrents
|
||||
* YTS.ag
|
||||
* Zooqle
|
||||
|
||||
### Supported Semi-Private Trackers
|
||||
* 7tor
|
||||
* CzTorrent
|
||||
* Deildu
|
||||
* Gay-Torrents.net
|
||||
* Gay-Torrents.org
|
||||
* Kinozal
|
||||
* LostFilm.tv
|
||||
* Mega-Bliz
|
||||
* Metal Tracker
|
||||
* MVGroup Forum
|
||||
* MVGroup Main
|
||||
* Newstudio
|
||||
* NetHD
|
||||
* NoName Club
|
||||
* RuTracker
|
||||
* SkTorrent
|
||||
* Union Fansub
|
||||
* Xtreme Zone
|
||||
* YggTorrent
|
||||
* Ztracker
|
||||
|
||||
### Supported Private Trackers
|
||||
* 2 Fast 4 You
|
||||
* 3D Torrents
|
||||
* 7tor
|
||||
* 720pier
|
||||
* Abnormal
|
||||
* Acid-Lounge
|
||||
* AlphaRatio
|
||||
* Andraste
|
||||
* AnimeBytes
|
||||
* AnimeTorrents
|
||||
* AOX
|
||||
@@ -62,82 +100,96 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* ArabaFenice
|
||||
* Arche Torrent
|
||||
* AsianDVDClub
|
||||
* AST4u
|
||||
* Audiobook Torrents
|
||||
* Awesome-HD
|
||||
* Avistaz
|
||||
* B2S-Share
|
||||
* Back-ups
|
||||
* BakaBT [![(invite needed)][inviteneeded]](#)
|
||||
* bB
|
||||
* Best Friends
|
||||
* BeyondHD
|
||||
* BIGTorrent
|
||||
* BigTower
|
||||
* Bit-City Reloaded
|
||||
* BIT-HDTV
|
||||
* BitHQ
|
||||
* Bithorlo
|
||||
* BitHUmen
|
||||
* BitMe
|
||||
* BitMeTV
|
||||
* BitSoup [![(invite needed)][inviteneeded]](#)
|
||||
* Bitspyder
|
||||
* Blu-bits
|
||||
* BitTorrentFiles [![(invite needed)][inviteneeded]](#)
|
||||
* BJ-Share
|
||||
* BlueBird
|
||||
* Blutopia
|
||||
* BroadcastTheNet [![(invite needed)][inviteneeded]](#)
|
||||
* Brasil Tracker
|
||||
* BroadcastTheNet
|
||||
* BrokenStones
|
||||
* BTGigs
|
||||
* BTNext
|
||||
* BTXpress
|
||||
* Carpathians
|
||||
* CCFBits
|
||||
* CGPeers
|
||||
* CHDBits
|
||||
* Cinematik
|
||||
* Cinemageddon
|
||||
* CinemaZ
|
||||
* Classix
|
||||
* CZTeam
|
||||
* DanishBits
|
||||
* DataScene
|
||||
* Deildu
|
||||
* Demonoid
|
||||
* Diablo Torrent
|
||||
* DigitalHive
|
||||
* Dragon World (DTW)
|
||||
* Downloadville
|
||||
* Dragonworld Reloaded
|
||||
* Dream Team
|
||||
* EoT-Forum
|
||||
* EliteHD [![(invite needed)][inviteneeded]](#)
|
||||
* Elit Tracker
|
||||
* Elite-Tracker
|
||||
* Empornium
|
||||
* eStone
|
||||
* Ethor.net (Thor's Land)
|
||||
* FANO.IN
|
||||
* FileList
|
||||
* Femdomcult
|
||||
* Freedom-HD
|
||||
* FullMixMusic
|
||||
* FunFile
|
||||
* FunkyTorrents
|
||||
* Fuzer
|
||||
* GAYtorrent.ru
|
||||
* GazelleGames
|
||||
* Gfxnews
|
||||
* GFXPeers
|
||||
* Ghost City
|
||||
* GigaTorrents [![(invite needed)][inviteneeded]](#)
|
||||
* GigaTorrents
|
||||
* GimmePeers <!-- maintained by jamesb2147 -->
|
||||
* Girotottent
|
||||
* GODS [![(invite needed)][inviteneeded]](#)
|
||||
* Gormogon
|
||||
* Greek Team
|
||||
* HacheDe
|
||||
* Hardbay
|
||||
* HD-Forever
|
||||
* HD-Only
|
||||
* HD-Space
|
||||
* HD-Spain
|
||||
* HD-Torrents
|
||||
* HD-Bits.com
|
||||
* HD4Free
|
||||
* HDBits
|
||||
* HDChina
|
||||
* HDClub
|
||||
* HDCity
|
||||
* HDHome
|
||||
* HDME
|
||||
* HDSky
|
||||
* HDTorrents.it
|
||||
* Hebits
|
||||
* Hon3y HD
|
||||
* Hounddawgs
|
||||
* House-of-Torrents
|
||||
* HQSource
|
||||
* Hyperay
|
||||
* ICE Torrent
|
||||
* I Love Classics
|
||||
* Immortalseed
|
||||
* Infinity-T
|
||||
* inPeril
|
||||
* Insane Tracker
|
||||
* IPTorrents
|
||||
@@ -157,14 +209,13 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* MySpleen
|
||||
* NCore
|
||||
* Nebulance
|
||||
* NetHD
|
||||
* New Real World
|
||||
* NextGen
|
||||
* Norbits [![(invite needed)][inviteneeded]](#) <!-- added by DiseaseNO but no longer maintained? -->
|
||||
* NordicBits
|
||||
* Norbits <!-- added by DiseaseNO but no longer maintained? -->
|
||||
* notwhat.cd
|
||||
* Ourbits
|
||||
* Passione Torrent <!-- maintained by bonny1992 -->
|
||||
* PassThePopcorn [![(invite needed)][inviteneeded]](#)
|
||||
* PassThePopcorn
|
||||
* PirateTheNet
|
||||
* PiXELHD
|
||||
* PolishSource
|
||||
@@ -173,13 +224,17 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* PrivateHD
|
||||
* Psytorrents
|
||||
* PTFiles
|
||||
* PuntoTorrent
|
||||
* Racing4Everyone (R4E)
|
||||
* Redacted (PassTheHeadphones)
|
||||
* Red Star Torrent
|
||||
* Redtopia (RED)
|
||||
* RetroFlix
|
||||
* RevolutionTT
|
||||
* Rockhard Lossless
|
||||
* RGU
|
||||
* RoDVD
|
||||
* RuTracker
|
||||
* SceneAccess
|
||||
* SceneFZ
|
||||
* SceneReactor
|
||||
* SceneTime
|
||||
* SDBits
|
||||
* Secret Cinema
|
||||
@@ -187,11 +242,16 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* ShareSpaceDB
|
||||
* Shazbat
|
||||
* Shellife
|
||||
* Speed-Share
|
||||
* SpeedCD
|
||||
* SpeedTorrent Reloaded
|
||||
* SportsCult
|
||||
* SportHD
|
||||
* Superbits
|
||||
* Tasmanit
|
||||
* TBPlus
|
||||
* TehConnection.me
|
||||
* TenYardTracker
|
||||
* The Empire
|
||||
* The Geeks
|
||||
* The Horror Charnel
|
||||
@@ -202,45 +262,53 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* The Show
|
||||
* The Vault
|
||||
* The-Torrents
|
||||
* TehConnection
|
||||
* TenYardTracker
|
||||
* Torrent Network
|
||||
* Torrent Sector Crew
|
||||
* Torrent9
|
||||
* Torrent.LT
|
||||
* TorrentBD
|
||||
* TorrentBytes
|
||||
* TorrentCCF [![(invite needed)][inviteneeded]](#)
|
||||
* TorrentDay
|
||||
* Torrentech
|
||||
* TorrentHeaven
|
||||
* TorrentHR
|
||||
* Torrenting
|
||||
* Torrentland
|
||||
* TorrentLeech
|
||||
* Torrents.Md
|
||||
* TorrentSeeds
|
||||
* Torrent-Syndikat
|
||||
* TOrrent-tuRK (TORK)
|
||||
* TorViet
|
||||
* ToTheGlory
|
||||
* TranceTraffic
|
||||
* Trezzor
|
||||
* TV Chaos UK
|
||||
* TV-Vault
|
||||
* T411 v2
|
||||
* u-Torrent
|
||||
* u-torrents (SceneFZ)
|
||||
* UHDBits
|
||||
* Ultimate Gamer Club
|
||||
* ULTRAHDCLUB
|
||||
* Waffles
|
||||
* World-In-HD
|
||||
* WorldOfP2P
|
||||
* x-ite.me
|
||||
* x264
|
||||
* xBytesV2
|
||||
* XSpeeds
|
||||
* Xthor
|
||||
* Xtreme Zone
|
||||
* YggTorrent
|
||||
* ExoticaZ (Your Exotic Torrents)
|
||||
* Zamunda.net
|
||||
* Zelka.org
|
||||
* Ztracker
|
||||
|
||||
Trackers marked with [![(invite needed)][inviteneeded]](#) have no active maintainer and are missing features or are broken. If you have an invite for them please send it to kaso1717 -at- gmail.com to get them fixed/improved.
|
||||
|
||||
### Aggregate indexers
|
||||
|
||||
A special "all" indexer is available at `/api/v2.0/indexers/all/results/torznab/api`.
|
||||
It will query all configured indexers and return the combined results.
|
||||
|
||||
To get all Jackett indexers including their capabilities you can use `t=indexers` on the all indexer. To get only configured/unconfigured indexers you can also add `configured=true/false` as query parameter.
|
||||
|
||||
## Installation on Windows
|
||||
|
||||
We recommend you install Jackett as a Windows service using the supplied installer. You may also download the zipped version if you would like to configure everything manually.
|
||||
@@ -259,7 +327,7 @@ When installed as a service the tray icon acts as a way to open/start/stop Jacke
|
||||
Jackett can also be run from the command line if you would like to see log messages (Ensure the server isn't already running from the tray/service). This can be done by using "JackettConsole.exe" (for Command Prompt), found in the Jackett data folder: "%ProgramData%\Jackett".
|
||||
|
||||
## Installation on Linux
|
||||
1. Install [Mono 4](http://www.mono-project.com/download/#download-lin) or better (version 4.8 is recommended)
|
||||
1. Install [Mono 5.8](http://www.mono-project.com/download/#download-lin) or better (using the latest stable release is recommended)
|
||||
* Follow the instructions on the mono website and install the `mono-devel` and the `ca-certificates-mono` packages.
|
||||
* On Red Hat/CentOS/openSUSE/Fedora the `mono-locale-extras` package is also required.
|
||||
2. Install libcurl:
|
||||
@@ -270,14 +338,32 @@ Jackett can also be run from the command line if you would like to see log messa
|
||||
|
||||
Detailed instructions for [Ubuntu 14.x](http://www.htpcguides.com/install-jackett-on-ubuntu-14-x-for-custom-torrents-in-sonarr/) and [Ubuntu 15.x](http://www.htpcguides.com/install-jackett-ubuntu-15-x-for-custom-torrents-in-sonarr/)
|
||||
|
||||
## Installation on OSX
|
||||
1. Install [Mono 4](http://www.mono-project.com/download/#download-mac) or better (version 4.8 is recommended)
|
||||
* Setup ssl support by running
|
||||
```
|
||||
https://curl.haxx.se/ca/cacert.pem
|
||||
cert-sync --user ~/Downloads/cacert.pem
|
||||
```
|
||||
1. Download and extract the latest `Jackett.Binaries.Mono.tar.gz` release from the [releases page](https://github.com/Jackett/Jackett/releases) and run Jackett using mono with the command `mono --debug JackettConsole.exe`.
|
||||
If you want to run it with a user without a /home directory you need to add `Environment=XDG_CONFIG_HOME=/path/to/folder` to your systemd file, this folder will be used to store your config files.
|
||||
|
||||
Mono must be compiled with the Roslyn compiler (default), using MCS will cause "An error has occurred." errors (See https://github.com/Jackett/Jackett/issues/2704).
|
||||
|
||||
### Installation on Linux via Ansible
|
||||
|
||||
On a RHEL/Centos 7 system: [linuxhq.jackett](https://galaxy.ansible.com/linuxhq/jackett)
|
||||
|
||||
On an Ubuntu 16 system: [chrisjohnson00.jackett](https://galaxy.ansible.com/chrisjohnson00/jackett)
|
||||
|
||||
## Installation on macOS
|
||||
|
||||
### Prerequisites
|
||||
Install [Mono 5.8](http://www.mono-project.com/download/#download-mac) or better (using the latest pkg installer is recommended).
|
||||
* Setup ssl support by running `curl -sS https://curl.haxx.se/ca/cacert.pem | cert-sync --user /dev/stdin`
|
||||
|
||||
### Install as service
|
||||
1. Download and extract the latest `Jackett.Binaries.Mono.tar.gz` release from the [releases page](https://github.com/Jackett/Jackett/releases).
|
||||
2. Open the extracted folder and double-click on `install_service_macos`.
|
||||
3. If the installation was a success, you can close the Terminal window.
|
||||
|
||||
The service will start on each logon. You can always stop it by running `launchctl unload ~/Library/LaunchAgents/org.user.Jackett.plist` from Terminal. You can start it again it using `launchctl load ~/Library/LaunchAgents/org.user.Jackett.plist`.
|
||||
Logs are stored as usual under `~/.config/Jackett/log.txt`.
|
||||
|
||||
### Run without installing as a service
|
||||
Download and extract the latest `Jackett.Binaries.Mono.tar.gz` release from the [releases page](https://github.com/Jackett/Jackett/releases) and run Jackett using mono with the command `mono --debug JackettConsole.exe`.
|
||||
|
||||
## Installation using Docker
|
||||
Detailed instructions are available at [LinuxServer.io Jackett Docker](https://hub.docker.com/r/linuxserver/jackett/). The Jackett Docker is highly recommended, especially if you are having Mono stability issues or having issues running Mono on your system eg. QNAP, Synology. Thanks to [LinuxServer.io](https://linuxserver.io)
|
||||
@@ -285,34 +371,98 @@ Detailed instructions are available at [LinuxServer.io Jackett Docker](https://h
|
||||
## Installation on Synology
|
||||
Jackett is available as beta package from [SynoCommunity](https://synocommunity.com/)
|
||||
|
||||
## Running Jackett behind a reverse proxy
|
||||
When running jackett behind a reverse proxy make sure that the original hostname of the request is passed to Jackett. If HTTPS is used also set the X-Forwarded-Proto header to "https". Don't forget to adjust the "Base Path Override" Jackett option accordingly.
|
||||
|
||||
Example config for apache:
|
||||
```
|
||||
<Location /jackett>
|
||||
ProxyPreserveHost On
|
||||
RequestHeader set X-Forwarded-Proto expr=%{REQUEST_SCHEME}
|
||||
ProxyPass http://127.0.0.1:9117
|
||||
ProxyPassReverse http://127.0.0.1:9117
|
||||
</Location>
|
||||
```
|
||||
|
||||
Example config for nginx:
|
||||
```
|
||||
location /jackett {
|
||||
proxy_pass http://127.0.0.1:9117;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Host $http_host;
|
||||
proxy_redirect off;
|
||||
}
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
* __Command line switches__
|
||||
|
||||
You can pass various options when running via the command line, see --help for details.
|
||||
|
||||
* __Unable to connect to trackers with invalid SSL certificates__
|
||||
* __Error "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."__
|
||||
|
||||
If you're using mono this is often caused by missing ca-certificates.
|
||||
This is often caused by missing CA certificates.
|
||||
Try reimporting the certificates in this case:
|
||||
- On Linux (as user root): `wget -O - https://curl.haxx.se/ca/cacert.pem | cert-sync /dev/stdin`
|
||||
- On macOS: `curl -sS https://curl.haxx.se/ca/cacert.pem | cert-sync --user /dev/stdin`
|
||||
|
||||
`wget -O - https://curl.haxx.se/ca/cacert.pem | cert-sync /dev/stdin`
|
||||
* __Enable enhanced logging__
|
||||
|
||||
As a option of last resort you can disable certificate validation using the `--IgnoreSslErrors true` option but it's not recommended to use it as it enables Man-in-the-middle attacks on your connections.
|
||||
|
||||
* __Enable logging__
|
||||
|
||||
You can get additional logging with the command line switches `-t -l` or by enabeling `Enhanced logging` via the web interface.
|
||||
You can get *enhanced* logging with the command line switches `-t -l` or by enabling `Enhanced logging` via the web interface (followed by clicking on the `Apply Server Settings` button).
|
||||
Please post logs if you are unable to resolve your issue with these switches ensuring to remove your username/password/cookies.
|
||||
The logfiles (log.txt/updater.txt) are stored in `%ProgramData%\Jackett` on Windows and `~/.config/Jackett/` on Linux/OSX.
|
||||
The logfiles (log.txt/updater.txt) are stored in `%ProgramData%\Jackett` on Windows and `~/.config/Jackett/` on Linux/macOS.
|
||||
|
||||
## Configuring OMDb
|
||||
This feature is used as a fallback to get the movie/series title if only the IMDB ID is provided in the request.
|
||||
To use it, please just request a free API key on [OMDb](http://www.omdbapi.com/apikey.aspx) (1,000 daily requests limit) and paste the key in Jackett
|
||||
|
||||
## Creating an issue
|
||||
Please supply as much information about the problem you are experiencing as possible. Your issue has a much greater chance of being resolved if logs are supplied so that we can see what is going on. Creating an issue with '### isn't working' doesn't help anyone to fix the problem.
|
||||
|
||||
## Contributing
|
||||
All contributions are welcome just send a pull request. Jackett's framework allows our team (and any other volunteering dev) to implement new trackers in an hour or two. If you'd like support for a new tracker but are not a developer then feel free to leave a request on the [issues page](https://github.com/Jackett/Jackett/issues). It is recommended to use Visual studio 2015 when making code changes in this project.
|
||||
All contributions are welcome just send a pull request. Jackett's framework allows our team (and any other volunteering dev) to implement new trackers in an hour or two. If you'd like support for a new tracker but are not a developer then feel free to leave a request on the [issues page](https://github.com/Jackett/Jackett/issues). It is recommended to use Visual Studio 2017 when making code changes in this project. You can download the community version for free [here](https://www.visualstudio.com/downloads/).
|
||||
|
||||
|
||||
## Building from source
|
||||
|
||||
### Windows
|
||||
* Install the .NET Core [SDK](https://www.microsoft.com/net/download/windows)
|
||||
* Open the Jackett solution in Visual Studio 2017 (version 15.7 or above)
|
||||
* Right click on the Jackett solution and click 'Rebuild Solution' to restore nuget packages
|
||||
* Select Jackett.Server as startup project
|
||||
* In the drop down menu of the run button select "Jackett.Server" instead of "IIS Express"
|
||||
* Build/Start the project
|
||||
|
||||
### OSX
|
||||
NOTE: msbuild is included in the mono release.
|
||||
* Install Homebrew https://brew.sh
|
||||
* open terminal
|
||||
* brew install nuget mono
|
||||
* git clone https://github.com/Jackett/Jackett.git
|
||||
* cd Jackett/src
|
||||
* nuget restore Jackett.sln
|
||||
|
||||
NOTE: if you get the error "NU1102: Unable to find package Microsoft.AspNetCore with version (>= 2.1.2)" while restoring packages, you'll need to install it manually.https://www.microsoft.com/net/download/thank-you/dotnet-sdk-2.1.302-macos-x64-installer then delete the entire project directory and restart from a new clone
|
||||
|
||||
* msbuild Jackett.Server/Jackett.Server.csproj /t:Build /p:Configuration=Debug
|
||||
* curl -sS https://curl.haxx.se/ca/cacert.pem | cert-sync --user /dev/stdin
|
||||
* mono Jackett.Server/bin/Debug/JackettServer.exe
|
||||
|
||||
|
||||
### Linux
|
||||
|
||||
```bash
|
||||
sudo apt install mono-complete nuget msbuild # install build tools (debian/ubuntu)
|
||||
git clone https://github.com/Jackett/Jackett.git
|
||||
cd Jackett/src
|
||||
nuget restore Jackett.sln # prepare dependencies
|
||||
msbuild Jackett.Server/Jackett.Server.csproj /t:Build /p:Configuration=Debug # compile
|
||||
mono Jackett.Server/bin/Debug/JackettServer.exe # run jackett
|
||||
```
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||
|
40
appveyor.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
version: 0.10.{build}
|
||||
skip_tags: true
|
||||
image: Visual Studio 2017
|
||||
configuration: Release
|
||||
assembly_info:
|
||||
patch: true
|
||||
file: '**\AssemblyInfo.*'
|
||||
assembly_version: '{version}'
|
||||
assembly_file_version: '{version}'
|
||||
assembly_informational_version: '{version}'
|
||||
dotnet_csproj:
|
||||
patch: true
|
||||
file: '**\*.csproj'
|
||||
version: '{version}'
|
||||
package_version: '{version}'
|
||||
assembly_version: '{version}'
|
||||
file_version: '{version}'
|
||||
informational_version: '{version}'
|
||||
build_script:
|
||||
- ps: .\build.ps1
|
||||
test: off
|
||||
before_deploy:
|
||||
- ps: ${env:release_description} = ( Get-Content -LiteralPath BuildOutput/ReleaseNotes.txt -Encoding UTF8 ) -join "`n";
|
||||
deploy:
|
||||
- provider: GitHub
|
||||
tag: v$(appveyor_build_version)
|
||||
description: $(release_description)
|
||||
auth_token:
|
||||
secure: hOg+16YTIbq4kO9u4D1YVOTbWDqgCX6mAQYMbnmBBSw2CiUsZh7OKbupoUb3FtWa
|
||||
artifact: /^(?:(?![Ee]xperimental).)*$/
|
||||
draft: true
|
||||
on:
|
||||
branch: master
|
||||
notifications:
|
||||
- provider: Webhook
|
||||
url: https://skyhook.glitch.me/api/webhooks/346588605843767297/_VWi5abKliaWsBmQO7AX69tD28FhqSLjKyLBwkSwwT13uyWJQHx5TSWK_iAs-0RzmyvZ/appveyor
|
||||
method: POST
|
||||
on_build_success: true
|
||||
on_build_failure: true
|
||||
on_build_status_changed: true
|
326
build.cake
Normal file
@@ -0,0 +1,326 @@
|
||||
#tool nuget:?package=NUnit.ConsoleRunner
|
||||
#addin nuget:?package=Cake.Git
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// ARGUMENTS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
var target = Argument("target", "Default");
|
||||
var configuration = Argument("configuration", "Debug");
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// PREPARATION
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Define directories.
|
||||
var workingDir = MakeAbsolute(Directory("./"));
|
||||
var artifactsDirName = "Artifacts";
|
||||
var testResultsDirName = "TestResults";
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// TASKS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
Task("Info")
|
||||
.Does(() =>
|
||||
{
|
||||
Information(@"Jackett Cake build script starting...");
|
||||
Information(@"Requires InnoSetup and C:\cygwin to be present for packaging (Pre-installed on AppVeyor)");
|
||||
Information(@"Working directory is: " + workingDir);
|
||||
});
|
||||
|
||||
Task("Clean")
|
||||
.IsDependentOn("Info")
|
||||
.Does(() =>
|
||||
{
|
||||
CleanDirectories("./src/**/obj");
|
||||
CleanDirectories("./src/**/bin");
|
||||
CleanDirectories("./BuildOutput");
|
||||
CleanDirectories("./" + artifactsDirName);
|
||||
CleanDirectories("./" + testResultsDirName);
|
||||
|
||||
Information("Clean completed");
|
||||
});
|
||||
|
||||
Task("Build-Full-Framework")
|
||||
.IsDependentOn("Clean")
|
||||
.Does(() =>
|
||||
{
|
||||
NuGetRestore("./src/Jackett.sln");
|
||||
|
||||
var buildSettings = new MSBuildSettings()
|
||||
.SetConfiguration(configuration)
|
||||
.UseToolVersion(MSBuildToolVersion.VS2017);
|
||||
|
||||
MSBuild("./src/Jackett.sln", buildSettings);
|
||||
});
|
||||
|
||||
Task("Run-Unit-Tests")
|
||||
.IsDependentOn("Build-Full-Framework")
|
||||
.Does(() =>
|
||||
{
|
||||
CreateDirectory("./" + testResultsDirName);
|
||||
var resultsFile = $"./{testResultsDirName}/JackettTestResult.xml";
|
||||
|
||||
NUnit3("./src/**/bin/" + configuration + "/**/*.Test.dll", new NUnit3Settings
|
||||
{
|
||||
Results = new[] { new NUnit3Result { FileName = resultsFile } }
|
||||
});
|
||||
|
||||
if(AppVeyor.IsRunningOnAppVeyor)
|
||||
{
|
||||
AppVeyor.UploadTestResults(resultsFile, AppVeyorTestResultsType.NUnit3);
|
||||
}
|
||||
});
|
||||
|
||||
Task("Check-Packaging-Platform")
|
||||
.IsDependentOn("Run-Unit-Tests")
|
||||
.Does(() =>
|
||||
{
|
||||
if (IsRunningOnWindows())
|
||||
{
|
||||
CreateDirectory("./" + artifactsDirName);
|
||||
Information("Platform is Windows");
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("Packaging is currently only implemented for a Windows environment");
|
||||
}
|
||||
});
|
||||
|
||||
Task("Package-Windows-Full-Framework")
|
||||
.IsDependentOn("Check-Packaging-Platform")
|
||||
.Does(() =>
|
||||
{
|
||||
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
||||
string buildOutputPath = "./BuildOutput/Experimental/net461/win7-x86/Jackett";
|
||||
|
||||
DotNetCorePublish(serverProjectPath, "net461", "win7-x86");
|
||||
|
||||
CopyFiles("./src/Jackett.Service/bin/" + configuration + "/JackettService.*", buildOutputPath);
|
||||
CopyFiles("./src/Jackett.Tray/bin/" + configuration + "/JackettTray.*", buildOutputPath);
|
||||
CopyFiles("./src/Jackett.Updater/bin/" + configuration + "/net461" + "/JackettUpdater.*", buildOutputPath); //builds against multiple frameworks
|
||||
|
||||
Zip("./BuildOutput/Experimental/net461/win7-x86", $"./{artifactsDirName}/Jackett.Binaries.Windows.zip");
|
||||
|
||||
//InnoSetup
|
||||
string sourceFolder = MakeAbsolute(Directory(buildOutputPath)).ToString();
|
||||
|
||||
InnoSetupSettings settings = new InnoSetupSettings();
|
||||
settings.OutputDirectory = workingDir + "/" + artifactsDirName;
|
||||
settings.Defines = new Dictionary<string, string>
|
||||
{
|
||||
{ "MyFileForVersion", sourceFolder + "/Jackett.Common.dll" },
|
||||
{ "MySourceFolder", sourceFolder },
|
||||
{ "MyOutputFilename", "Jackett.Installer.Windows" },
|
||||
};
|
||||
|
||||
InnoSetup("./Installer.iss", settings);
|
||||
});
|
||||
|
||||
Task("Package-Mono-Full-Framework")
|
||||
.IsDependentOn("Check-Packaging-Platform")
|
||||
.Does(() =>
|
||||
{
|
||||
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
||||
string buildOutputPath = "./BuildOutput/Experimental/net461/linux-x64/Jackett";
|
||||
|
||||
DotNetCorePublish(serverProjectPath, "net461", "linux-x64");
|
||||
|
||||
CopyFiles("./src/Jackett.Updater/bin/" + configuration + "/net461" + "/JackettUpdater.*", buildOutputPath); //builds against multiple frameworks
|
||||
|
||||
//There is an issue with Mono 5.8 (fixed in Mono 5.12) where its expecting to use its own patched version of System.Net.Http.dll, instead of the version supplied in folder
|
||||
//https://github.com/dotnet/corefx/issues/19914
|
||||
//https://bugzilla.xamarin.com/show_bug.cgi?id=60315
|
||||
//The workaround is to delete System.Net.Http.dll and patch the .exe.config file
|
||||
|
||||
DeleteFile(buildOutputPath + "/System.Net.Http.dll");
|
||||
|
||||
var configFile = File(buildOutputPath + "/JackettConsole.exe.config");
|
||||
XmlPoke(configFile, "configuration/runtime/*[name()='assemblyBinding']/*[name()='dependentAssembly']/*[name()='assemblyIdentity'][@name='System.Net.Http']/../*[name()='bindingRedirect']/@newVersion", "4.0.0.0");
|
||||
|
||||
//Mono on FreeBSD doesn't like the bundled System.Runtime.InteropServices.RuntimeInformation
|
||||
//https://github.com/dotnet/corefx/issues/23989
|
||||
//https://github.com/Jackett/Jackett/issues/3547
|
||||
|
||||
DeleteFile(buildOutputPath + "/System.Runtime.InteropServices.RuntimeInformation.dll");
|
||||
|
||||
Gzip("./BuildOutput/Experimental/net461/linux-x64", $"./{artifactsDirName}", "Jackett", "Jackett.Binaries.Mono.tar.gz");
|
||||
});
|
||||
|
||||
Task("Experimental-DotNetCore")
|
||||
.IsDependentOn("Check-Packaging-Platform")
|
||||
.Does(() =>
|
||||
{
|
||||
string serverProjectPath = "./src/Jackett.Server/Jackett.Server.csproj";
|
||||
|
||||
DotNetCorePublish(serverProjectPath, "netcoreapp2.1", "win-x86");
|
||||
DotNetCorePublish(serverProjectPath, "netcoreapp2.1", "linux-x64");
|
||||
DotNetCorePublish(serverProjectPath, "netcoreapp2.1", "osx-x64");
|
||||
|
||||
Zip("./BuildOutput/Experimental/netcoreapp2.1/win-x86", $"./{artifactsDirName}/Experimental.netcoreapp.win-x86.zip");
|
||||
Zip("./BuildOutput/Experimental/netcoreapp2.1/osx-x64", $"./{artifactsDirName}/Experimental.netcoreapp.osx-x64.zip");
|
||||
Gzip("./BuildOutput/Experimental/netcoreapp2.1/linux-x64", $"./{artifactsDirName}", "Jackett", "Experimental.netcoreapp.linux-x64.tar.gz");
|
||||
});
|
||||
|
||||
Task("Package")
|
||||
.IsDependentOn("Package-Windows-Full-Framework")
|
||||
.IsDependentOn("Package-Mono-Full-Framework")
|
||||
//.IsDependentOn("Experimental-DotNetCore")
|
||||
.Does(() =>
|
||||
{
|
||||
Information("Packaging completed");
|
||||
});
|
||||
|
||||
Task("Appveyor-Push-Artifacts")
|
||||
.IsDependentOn("Package")
|
||||
.Does(() =>
|
||||
{
|
||||
if (AppVeyor.IsRunningOnAppVeyor)
|
||||
{
|
||||
foreach (var file in GetFiles(workingDir + $"/{artifactsDirName}/*"))
|
||||
{
|
||||
AppVeyor.UploadArtifact(file.FullPath);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Information(@"Skipping as not running in AppVeyor Environment");
|
||||
}
|
||||
});
|
||||
|
||||
Task("Release-Notes")
|
||||
.IsDependentOn("Appveyor-Push-Artifacts")
|
||||
.Does(() =>
|
||||
{
|
||||
string latestTag = GitDescribe(".", false, GitDescribeStrategy.Tags, 0);
|
||||
Information($"Latest tag is: {latestTag}" + Environment.NewLine);
|
||||
|
||||
List<GitCommit> relevantCommits = new List<GitCommit>();
|
||||
|
||||
var commitCollection = GitLog("./", 50);
|
||||
|
||||
foreach(GitCommit commit in commitCollection)
|
||||
{
|
||||
var commitTag = GitDescribe(".", commit.Sha, false, GitDescribeStrategy.Tags, 0);
|
||||
|
||||
if (commitTag == latestTag)
|
||||
{
|
||||
relevantCommits.Add(commit);
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
relevantCommits = relevantCommits.AsEnumerable().Reverse().Skip(1).ToList();
|
||||
|
||||
if (relevantCommits.Count() > 0)
|
||||
{
|
||||
List<string> notesList = new List<string>();
|
||||
|
||||
foreach(GitCommit commit in relevantCommits)
|
||||
{
|
||||
notesList.Add($"{commit.MessageShort} (Thank you @{commit.Author.Name})");
|
||||
}
|
||||
|
||||
string buildNote = String.Join(Environment.NewLine, notesList);
|
||||
Information(buildNote);
|
||||
|
||||
System.IO.File.WriteAllLines(workingDir + "\\BuildOutput\\ReleaseNotes.txt", notesList.ToArray());
|
||||
}
|
||||
else
|
||||
{
|
||||
Information($"No commit messages found to create release notes");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
private void RunCygwinCommand(string utility, string utilityArguments)
|
||||
{
|
||||
var cygwinDir = @"C:\cygwin\bin\";
|
||||
var utilityProcess = cygwinDir + utility + ".exe";
|
||||
|
||||
Information("CygWin Utility: " + utility);
|
||||
Information("CygWin Directory: " + cygwinDir);
|
||||
Information("Utility Location: " + utilityProcess);
|
||||
Information("Utility Arguments: " + utilityArguments);
|
||||
|
||||
IEnumerable<string> redirectedStandardOutput;
|
||||
IEnumerable<string> redirectedErrorOutput;
|
||||
var exitCodeWithArgument =
|
||||
StartProcess(
|
||||
utilityProcess,
|
||||
new ProcessSettings {
|
||||
Arguments = utilityArguments,
|
||||
WorkingDirectory = cygwinDir,
|
||||
RedirectStandardOutput = true
|
||||
},
|
||||
out redirectedStandardOutput,
|
||||
out redirectedErrorOutput
|
||||
);
|
||||
|
||||
Information(utility + " output:" + Environment.NewLine + string.Join(Environment.NewLine, redirectedStandardOutput.ToArray()));
|
||||
|
||||
// Throw exception if anything was written to the standard error.
|
||||
if (redirectedErrorOutput != null && redirectedErrorOutput.Any())
|
||||
{
|
||||
throw new Exception(
|
||||
string.Format(
|
||||
utility + " Errors ocurred: {0}",
|
||||
string.Join(", ", redirectedErrorOutput)));
|
||||
}
|
||||
|
||||
Information(utility + " Exit code: {0}", exitCodeWithArgument);
|
||||
}
|
||||
|
||||
private string RelativeWinPathToCygPath(string relativePath)
|
||||
{
|
||||
var cygdriveBase = "/cygdrive/" + workingDir.ToString().Replace(":", "").Replace("\\", "/");
|
||||
var cygPath = cygdriveBase + relativePath.TrimStart('.');
|
||||
return cygPath;
|
||||
}
|
||||
|
||||
private void Gzip(string sourceFolder, string outputDirectory, string tarCdirectoryOption, string outputFileName)
|
||||
{
|
||||
var cygSourcePath = RelativeWinPathToCygPath(sourceFolder);
|
||||
var tarFileName = outputFileName.Remove(outputFileName.Length - 3, 3);
|
||||
var tarArguments = @"-cvf " + cygSourcePath + "/" + tarFileName + " -C " + cygSourcePath + $" {tarCdirectoryOption} --mode ='755'";
|
||||
var gzipArguments = @"-k " + cygSourcePath + "/" + tarFileName;
|
||||
|
||||
RunCygwinCommand("Tar", tarArguments);
|
||||
RunCygwinCommand("Gzip", gzipArguments);
|
||||
|
||||
MoveFile($"{sourceFolder}/{tarFileName}.gz", $"{outputDirectory}/{tarFileName}.gz");
|
||||
}
|
||||
|
||||
private void DotNetCorePublish(string projectPath, string framework, string runtime)
|
||||
{
|
||||
var settings = new DotNetCorePublishSettings
|
||||
{
|
||||
Framework = framework,
|
||||
Runtime = runtime,
|
||||
OutputDirectory = $"./BuildOutput/Experimental/{framework}/{runtime}/Jackett"
|
||||
};
|
||||
|
||||
DotNetCorePublish(projectPath, settings);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// TASK TARGETS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
Task("Default")
|
||||
.IsDependentOn("Release-Notes")
|
||||
.Does(() =>
|
||||
{
|
||||
Information("Default Task Completed");
|
||||
});
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// EXECUTION
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
RunTarget(target);
|
235
build.ps1
Normal file
@@ -0,0 +1,235 @@
|
||||
##########################################################################
|
||||
# This is the Cake bootstrapper script for PowerShell.
|
||||
# This file was downloaded from https://github.com/cake-build/resources
|
||||
# Feel free to change this file to fit your needs.
|
||||
##########################################################################
|
||||
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
This is a Powershell script to bootstrap a Cake build.
|
||||
|
||||
.DESCRIPTION
|
||||
This Powershell script will download NuGet if missing, restore NuGet tools (including Cake)
|
||||
and execute your Cake build script with the parameters you provide.
|
||||
|
||||
.PARAMETER Script
|
||||
The build script to execute.
|
||||
.PARAMETER Target
|
||||
The build script target to run.
|
||||
.PARAMETER Configuration
|
||||
The build configuration to use.
|
||||
.PARAMETER Verbosity
|
||||
Specifies the amount of information to be displayed.
|
||||
.PARAMETER ShowDescription
|
||||
Shows description about tasks.
|
||||
.PARAMETER DryRun
|
||||
Performs a dry run.
|
||||
.PARAMETER Experimental
|
||||
Uses the nightly builds of the Roslyn script engine.
|
||||
.PARAMETER Mono
|
||||
Uses the Mono Compiler rather than the Roslyn script engine.
|
||||
.PARAMETER SkipToolPackageRestore
|
||||
Skips restoring of packages.
|
||||
.PARAMETER ScriptArgs
|
||||
Remaining arguments are added here.
|
||||
|
||||
.LINK
|
||||
https://cakebuild.net
|
||||
|
||||
#>
|
||||
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
[string]$Script = "build.cake",
|
||||
[string]$Target,
|
||||
[string]$Configuration,
|
||||
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
|
||||
[string]$Verbosity,
|
||||
[switch]$ShowDescription,
|
||||
[Alias("WhatIf", "Noop")]
|
||||
[switch]$DryRun,
|
||||
[switch]$Experimental,
|
||||
[switch]$Mono,
|
||||
[switch]$SkipToolPackageRestore,
|
||||
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
|
||||
[string[]]$ScriptArgs
|
||||
)
|
||||
|
||||
[Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null
|
||||
function MD5HashFile([string] $filePath)
|
||||
{
|
||||
if ([string]::IsNullOrEmpty($filePath) -or !(Test-Path $filePath -PathType Leaf))
|
||||
{
|
||||
return $null
|
||||
}
|
||||
|
||||
[System.IO.Stream] $file = $null;
|
||||
[System.Security.Cryptography.MD5] $md5 = $null;
|
||||
try
|
||||
{
|
||||
$md5 = [System.Security.Cryptography.MD5]::Create()
|
||||
$file = [System.IO.File]::OpenRead($filePath)
|
||||
return [System.BitConverter]::ToString($md5.ComputeHash($file))
|
||||
}
|
||||
finally
|
||||
{
|
||||
if ($file -ne $null)
|
||||
{
|
||||
$file.Dispose()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function GetProxyEnabledWebClient
|
||||
{
|
||||
$wc = New-Object System.Net.WebClient
|
||||
$proxy = [System.Net.WebRequest]::GetSystemWebProxy()
|
||||
$proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials
|
||||
$wc.Proxy = $proxy
|
||||
return $wc
|
||||
}
|
||||
|
||||
Write-Host "Preparing to run build script..."
|
||||
|
||||
if(!$PSScriptRoot){
|
||||
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
|
||||
}
|
||||
|
||||
$TOOLS_DIR = Join-Path $PSScriptRoot "tools"
|
||||
$ADDINS_DIR = Join-Path $TOOLS_DIR "Addins"
|
||||
$MODULES_DIR = Join-Path $TOOLS_DIR "Modules"
|
||||
$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe"
|
||||
$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe"
|
||||
$NUGET_URL = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
|
||||
$PACKAGES_CONFIG = Join-Path $TOOLS_DIR "packages.config"
|
||||
$PACKAGES_CONFIG_MD5 = Join-Path $TOOLS_DIR "packages.config.md5sum"
|
||||
$ADDINS_PACKAGES_CONFIG = Join-Path $ADDINS_DIR "packages.config"
|
||||
$MODULES_PACKAGES_CONFIG = Join-Path $MODULES_DIR "packages.config"
|
||||
|
||||
# Make sure tools folder exists
|
||||
if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) {
|
||||
Write-Verbose -Message "Creating tools directory..."
|
||||
New-Item -Path $TOOLS_DIR -Type directory | out-null
|
||||
}
|
||||
|
||||
# Make sure that packages.config exist.
|
||||
if (!(Test-Path $PACKAGES_CONFIG)) {
|
||||
Write-Verbose -Message "Downloading packages.config..."
|
||||
try {
|
||||
$wc = GetProxyEnabledWebClient
|
||||
$wc.DownloadFile("https://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG) } catch {
|
||||
Throw "Could not download packages.config."
|
||||
}
|
||||
}
|
||||
|
||||
# Try find NuGet.exe in path if not exists
|
||||
if (!(Test-Path $NUGET_EXE)) {
|
||||
Write-Verbose -Message "Trying to find nuget.exe in PATH..."
|
||||
$existingPaths = $Env:Path -Split ';' | Where-Object { (![string]::IsNullOrEmpty($_)) -and (Test-Path $_ -PathType Container) }
|
||||
$NUGET_EXE_IN_PATH = Get-ChildItem -Path $existingPaths -Filter "nuget.exe" | Select -First 1
|
||||
if ($NUGET_EXE_IN_PATH -ne $null -and (Test-Path $NUGET_EXE_IN_PATH.FullName)) {
|
||||
Write-Verbose -Message "Found in PATH at $($NUGET_EXE_IN_PATH.FullName)."
|
||||
$NUGET_EXE = $NUGET_EXE_IN_PATH.FullName
|
||||
}
|
||||
}
|
||||
|
||||
# Try download NuGet.exe if not exists
|
||||
if (!(Test-Path $NUGET_EXE)) {
|
||||
Write-Verbose -Message "Downloading NuGet.exe..."
|
||||
try {
|
||||
$wc = GetProxyEnabledWebClient
|
||||
$wc.DownloadFile($NUGET_URL, $NUGET_EXE)
|
||||
} catch {
|
||||
Throw "Could not download NuGet.exe."
|
||||
}
|
||||
}
|
||||
|
||||
# Save nuget.exe path to environment to be available to child processed
|
||||
$ENV:NUGET_EXE = $NUGET_EXE
|
||||
|
||||
# Restore tools from NuGet?
|
||||
if(-Not $SkipToolPackageRestore.IsPresent) {
|
||||
Push-Location
|
||||
Set-Location $TOOLS_DIR
|
||||
|
||||
# Check for changes in packages.config and remove installed tools if true.
|
||||
[string] $md5Hash = MD5HashFile($PACKAGES_CONFIG)
|
||||
if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or
|
||||
($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) {
|
||||
Write-Verbose -Message "Missing or changed package.config hash..."
|
||||
Get-ChildItem -Exclude packages.config,nuget.exe,Cake.Bakery |
|
||||
Remove-Item -Recurse
|
||||
}
|
||||
|
||||
Write-Verbose -Message "Restoring tools from NuGet..."
|
||||
$NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`""
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Throw "An error occurred while restoring NuGet tools."
|
||||
}
|
||||
else
|
||||
{
|
||||
$md5Hash | Out-File $PACKAGES_CONFIG_MD5 -Encoding "ASCII"
|
||||
}
|
||||
Write-Verbose -Message ($NuGetOutput | out-string)
|
||||
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
# Restore addins from NuGet
|
||||
if (Test-Path $ADDINS_PACKAGES_CONFIG) {
|
||||
Push-Location
|
||||
Set-Location $ADDINS_DIR
|
||||
|
||||
Write-Verbose -Message "Restoring addins from NuGet..."
|
||||
$NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$ADDINS_DIR`""
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Throw "An error occurred while restoring NuGet addins."
|
||||
}
|
||||
|
||||
Write-Verbose -Message ($NuGetOutput | out-string)
|
||||
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
# Restore modules from NuGet
|
||||
if (Test-Path $MODULES_PACKAGES_CONFIG) {
|
||||
Push-Location
|
||||
Set-Location $MODULES_DIR
|
||||
|
||||
Write-Verbose -Message "Restoring modules from NuGet..."
|
||||
$NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$MODULES_DIR`""
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Throw "An error occurred while restoring NuGet modules."
|
||||
}
|
||||
|
||||
Write-Verbose -Message ($NuGetOutput | out-string)
|
||||
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
# Make sure that Cake has been installed.
|
||||
if (!(Test-Path $CAKE_EXE)) {
|
||||
Throw "Could not find Cake.exe at $CAKE_EXE"
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Build Cake arguments
|
||||
$cakeArguments = @("$Script");
|
||||
if ($Target) { $cakeArguments += "-target=$Target" }
|
||||
if ($Configuration) { $cakeArguments += "-configuration=$Configuration" }
|
||||
if ($Verbosity) { $cakeArguments += "-verbosity=$Verbosity" }
|
||||
if ($ShowDescription) { $cakeArguments += "-showdescription" }
|
||||
if ($DryRun) { $cakeArguments += "-dryrun" }
|
||||
if ($Experimental) { $cakeArguments += "-experimental" }
|
||||
if ($Mono) { $cakeArguments += "-mono" }
|
||||
$cakeArguments += $ScriptArgs
|
||||
|
||||
# Start Cake
|
||||
Write-Host "Running build script..."
|
||||
&$CAKE_EXE $cakeArguments
|
||||
exit $LASTEXITCODE
|
77
install_service_macos
Normal file
@@ -0,0 +1,77 @@
|
||||
#!/bin/bash
|
||||
|
||||
#Setting up colors
|
||||
BOLDRED="$(printf '\033[1;31m')"
|
||||
BOLDGREEN="$(printf '\033[1;32m')"
|
||||
NC="$(printf '\033[0m')" # No Color
|
||||
|
||||
# Stop and unload the service if it's running
|
||||
launchctl remove org.user.Jackett
|
||||
|
||||
# Move working directory to Jackett's
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Check if we're running from Jackett's directory
|
||||
if [ ! -f ./JackettConsole.exe ]; then
|
||||
echo "${BOLDRED}ERROR${NC}: Couldn't locate JackettConsole.exe. Is the script in the right directory?"
|
||||
exit 1
|
||||
fi
|
||||
jackettdir="$(pwd)"
|
||||
|
||||
# Check if mono is installed
|
||||
command -v mono >/dev/null 2>&1 || { echo >&2 "${BOLDRED}ERROR${NC}: Jackett requires Mono but it's not installed. Aborting."; exit 1; }
|
||||
monodir="$(dirname $(command -v mono))"
|
||||
|
||||
# Check that no other service called Jackett is already running
|
||||
if [[ $(launchctl list | grep org.user.Jackett) ]]; then
|
||||
echo "${BOLDRED}ERROR${NC}: Jackett already seems to be running as a service. Please stop it before running this script again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Write the plist to LaunchAgents
|
||||
mkdir -p ~/Library/LaunchAgents/
|
||||
cat >~/Library/LaunchAgents/org.user.Jackett.plist <<EOL
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>EnvironmentVariables</key>
|
||||
<dict>
|
||||
<key>PATH</key>
|
||||
<string>/usr/bin:/bin:/usr/sbin:/sbin:${monodir}</string>
|
||||
</dict>
|
||||
<key>KeepAlive</key>
|
||||
<true/>
|
||||
<key>Label</key>
|
||||
<string>org.user.Jackett</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>${monodir}/mono</string>
|
||||
<string>--debug</string>
|
||||
<string>JackettConsole.exe</string>
|
||||
<string>--NoRestart</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>WorkingDirectory</key>
|
||||
<string>${jackettdir}</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
EOL
|
||||
|
||||
# Run the agent
|
||||
launchctl load ~/Library/LaunchAgents/org.user.Jackett.plist
|
||||
|
||||
# Check that it's running
|
||||
if [[ $(launchctl list | grep org.user.Jackett) ]]; then
|
||||
echo "${BOLDGREEN}Agent successfully installed and launched!${NC}"
|
||||
else
|
||||
cat << EOL
|
||||
${BOLDRED}ERROR${NC}: Could not launch agent. The installation might have failed.
|
||||
Please open an issue on https://github.com/Jackett/Jackett/issues and paste following information:
|
||||
Mono directory: \`${monodir}\`
|
||||
Jackett directory: \`${jackettdir}\`
|
||||
|
||||
EOL
|
||||
fi
|
@@ -1,239 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Called when cURL has debug information for the client.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For usage, see the sample <c>Upload.cs</c>.
|
||||
/// Arguments passed to the recipient include:
|
||||
/// <list type="table">
|
||||
/// <listheader>
|
||||
/// <term>Argument</term>
|
||||
/// <description>Description</description>
|
||||
/// </listheader>
|
||||
/// <item>
|
||||
/// <term>infoType</term>
|
||||
/// <description>
|
||||
/// Type of debug information, see
|
||||
/// <see cref="CurlInfoType" />.
|
||||
/// </description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>message</term>
|
||||
/// <description>Debug information as a string.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>extraData</term>
|
||||
/// <description>Client-provided extra data.</description>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// </remarks>
|
||||
public delegate void CurlDebugCallback(CurlInfoType infoType, String message, Object extraData);
|
||||
|
||||
/// <summary>
|
||||
/// Called when cURL has header data for the client.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For usage, see the sample <c>Headers.cs</c>.
|
||||
/// Arguments passed to the recipient include:
|
||||
/// <list type="table">
|
||||
/// <listheader>
|
||||
/// <term>Argument</term>
|
||||
/// <description>Description</description>
|
||||
/// </listheader>
|
||||
/// <item>
|
||||
/// <term>buf</term>
|
||||
/// <description>Header data from cURL to the client.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>size</term>
|
||||
/// <description>Size of a character, in bytes.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>nmemb</term>
|
||||
/// <description>Number of characters.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>extraData</term>
|
||||
/// <description>Client-provided extra data.</description>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// Your implementation should return the number of bytes (not
|
||||
/// characters) processed. Usually this is <c>size * nmemb</c>.
|
||||
/// Return -1 to abort the transfer.
|
||||
/// </remarks>
|
||||
public delegate int CurlHeaderCallback(byte[] buf, int size, int nmemb, Object extraData);
|
||||
|
||||
/// <summary>
|
||||
/// Called when cURL needs for the client to perform an
|
||||
/// IOCTL operation. An example might be when an FTP
|
||||
/// upload requires rewinding of the input file to deal
|
||||
/// with a resend occasioned by an error.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <list type="table">
|
||||
/// <listheader>
|
||||
/// <term>Argument</term>
|
||||
/// <description>Description</description>
|
||||
/// </listheader>
|
||||
/// <item>
|
||||
/// <term>cmd</term>
|
||||
/// <description>
|
||||
/// A <see cref="CurlIoCommand" />; for now, only
|
||||
/// <c>RestartRead</c> should be passed.
|
||||
/// </description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>extraData</term>
|
||||
/// <description>
|
||||
/// Client-provided extra data; in the
|
||||
/// case of an FTP upload, it might be a
|
||||
/// <c>FileStream</c> object.
|
||||
/// </description>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// Your implementation should return a <see cref="CurlIoError" />,
|
||||
/// which should be <see cref="CurlIoError.Ok" /> if everything
|
||||
/// is okay.
|
||||
/// </remarks>
|
||||
public delegate CurlIoError CurlIoctlCallback(CurlIoCommand cmd, Object extraData);
|
||||
|
||||
/// <summary>
|
||||
/// Called when cURL wants to report progress.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For usage, see the sample <c>Upload.cs</c>.
|
||||
/// Arguments passed to the recipient include:
|
||||
/// <list type="table">
|
||||
/// <listheader>
|
||||
/// <term>Argument</term>
|
||||
/// <description>Description</description>
|
||||
/// </listheader>
|
||||
/// <item>
|
||||
/// <term>extraData</term>
|
||||
/// <description>Client-provided extra data.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>dlTotal</term>
|
||||
/// <description>Number of bytes to download.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>dlNow</term>
|
||||
/// <description>Number of bytes downloaded so far.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>ulTotal</term>
|
||||
/// <description>Number of bytes to upload.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>ulNow</term>
|
||||
/// <description>Number of bytes uploaded so far.</description>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// Your implementation should return 0 to continue, or a non-zero
|
||||
/// value to abort the transfer.
|
||||
/// </remarks>
|
||||
public delegate int CurlProgressCallback(Object extraData, double dlTotal, double dlNow,
|
||||
double ulTotal, double ulNow);
|
||||
|
||||
/// <summary>
|
||||
/// Called when cURL wants to read data from the client.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For usage, see the sample <c>Upload.cs</c>.
|
||||
/// Arguments passed to the recipient include:
|
||||
/// <list type="table">
|
||||
/// <listheader>
|
||||
/// <term>Argument</term>
|
||||
/// <description>Description</description>
|
||||
/// </listheader>
|
||||
/// <item>
|
||||
/// <term>buf</term>
|
||||
/// <description>
|
||||
/// Buffer into which your client should write data
|
||||
/// for cURL.
|
||||
/// </description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>size</term>
|
||||
/// <description>Size of a character, usually 1.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>nmemb</term>
|
||||
/// <description>Number of characters.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>extraData</term>
|
||||
/// <description>Client-provided extra data.</description>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// Your implementation should return the number of bytes (not
|
||||
/// characters) written to <c>buf</c>. Return 0 to abort the transfer.
|
||||
/// </remarks>
|
||||
public delegate int CurlReadCallback([Out] byte[] buf, int size, int nmemb, Object extraData);
|
||||
|
||||
/// <summary>
|
||||
/// Called when cURL wants to report an Ssl event.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For usage, see the sample <c>SSLGet.cs</c>.
|
||||
/// Arguments passed to the recipient include:
|
||||
/// <list type="table">
|
||||
/// <listheader>
|
||||
/// <term>Argument</term>
|
||||
/// <description>Description</description>
|
||||
/// </listheader>
|
||||
/// <item>
|
||||
/// <term>ctx</term>
|
||||
/// <description>
|
||||
/// An <see cref="CurlSslContext" /> object that wraps an
|
||||
/// OpenSSL <c>SSL_CTX</c> pointer.
|
||||
/// </description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>extraData</term>
|
||||
/// <description>Client-provided extra data.</description>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// Your implementation should return a <see cref="CurlCode" />,
|
||||
/// which should be <see cref="CurlCode.Ok" /> if everything
|
||||
/// is okay.
|
||||
/// </remarks>
|
||||
public delegate CurlCode CurlSslContextCallback(CurlSslContext ctx, Object extraData);
|
||||
|
||||
/// <summary>
|
||||
/// Called when cURL has data for the client.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For usage, see the example <c>EasyGet.cs</c>.
|
||||
/// Arguments passed to the delegate implementation include:
|
||||
/// <list type="table">
|
||||
/// <listheader>
|
||||
/// <term>Argument</term>
|
||||
/// <description>Description</description>
|
||||
/// </listheader>
|
||||
/// <item>
|
||||
/// <term>buf</term>
|
||||
/// <description>Data cURL is providing to the client.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>size</term>
|
||||
/// <description>Size of a character, usually 1.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>nmemb</term>
|
||||
/// <description>Number of characters.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>extraData</term>
|
||||
/// <description>Client-provided extra data.</description>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// Your implementation should return the number of bytes (not
|
||||
/// characters) processed. Return 0 to abort the transfer.
|
||||
/// </remarks>
|
||||
public delegate int CurlWriteCallback(byte[] buf, int size, int nmemb, Object extraData);
|
||||
}
|
@@ -1,75 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Called when <c>cURL</c> wants to lock a shared resource.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For a usage example, refer to the <c>ShareDemo.cs</c> sample.
|
||||
/// Arguments passed to your delegate implementation include:
|
||||
/// <list type="table">
|
||||
/// <listheader>
|
||||
/// <term>Argument</term>
|
||||
/// <term>Description</term>
|
||||
/// </listheader>
|
||||
/// <item>
|
||||
/// <term>data</term>
|
||||
/// <term>
|
||||
/// Type of data to lock; one of the values in the
|
||||
/// <see cref="CurlLockData" /> enumeration.
|
||||
/// </term>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>access</term>
|
||||
/// <term>
|
||||
/// Lock access requested; one of the values in the
|
||||
/// <see cref="CurlLockAccess" /> enumeration.
|
||||
/// </term>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>userData</term>
|
||||
/// <term>
|
||||
/// Client-provided data that is not touched internally by
|
||||
/// <c>cURL</c>. This is set via
|
||||
/// <see cref="CurlShareOption.UserData" /> when calling the
|
||||
/// <see cref="CurlShare.SetOpt" /> member of the <see cref="CurlShare" />
|
||||
/// class.
|
||||
/// </term>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// </remarks>
|
||||
public delegate void CurlShareLockCallback(CurlLockData data, CurlLockAccess access, Object userData);
|
||||
|
||||
/// <summary>
|
||||
/// Called when <c>cURL</c> wants to unlock a shared resource.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For a usage example, refer to the <c>ShareDemo.cs</c> sample.
|
||||
/// Arguments passed to your delegate implementation include:
|
||||
/// <list type="table">
|
||||
/// <listheader>
|
||||
/// <term>Argument</term>
|
||||
/// <term>Description</term>
|
||||
/// </listheader>
|
||||
/// <item>
|
||||
/// <term>data</term>
|
||||
/// <term>
|
||||
/// Type of data to unlock; one of the values in the
|
||||
/// <see cref="CurlLockData" /> enumeration.
|
||||
/// </term>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>userData</term>
|
||||
/// <term>
|
||||
/// Client-provided data that is not touched internally by
|
||||
/// <c>cURL</c>. This is set via
|
||||
/// <see cref="CurlShareOption.UserData" /> when calling the
|
||||
/// <see cref="CurlShare.SetOpt" /> member of the <see cref="CurlShare" />
|
||||
/// class.
|
||||
/// </term>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// </remarks>
|
||||
public delegate void CurlShareUnlockCallback(CurlLockData data, Object userData);
|
||||
}
|
@@ -1,170 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* CurlS#arp
|
||||
*
|
||||
* Copyright (c) 2013 Dr. Masroor Ehsan (masroore@gmail.com)
|
||||
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Top-level class for initialization and cleanup.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// It also implements static methods for capabilities that don't
|
||||
/// logically belong in a class.
|
||||
/// </remarks>
|
||||
public static class Curl
|
||||
{
|
||||
// for state management
|
||||
private static CurlCode _initCode;
|
||||
|
||||
/// <summary>
|
||||
/// Class constructor - initialize global status.
|
||||
/// </summary>
|
||||
static Curl()
|
||||
{
|
||||
_initCode = CurlCode.FailedInit;
|
||||
}
|
||||
|
||||
// hidden instance stuff
|
||||
|
||||
/// <summary>
|
||||
/// Get the underlying cURL version as a string, example "7.12.2".
|
||||
/// </summary>
|
||||
/// <exception cref="System.InvalidOperationException">
|
||||
/// Thrown if cURL isn't properly initialized.
|
||||
/// </exception>
|
||||
public static string Version
|
||||
{
|
||||
get
|
||||
{
|
||||
EnsureCurl();
|
||||
return Marshal.PtrToStringAnsi(NativeMethods.curl_version());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Process-wide initialization -- call only once per process.
|
||||
/// </summary>
|
||||
/// <param name="flags">
|
||||
/// An or'd combination of
|
||||
/// <see cref="CurlInitFlag" /> members.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// A <see cref="CurlCode" />, hopefully
|
||||
/// <c>CurlCode.Ok</c>.
|
||||
/// </returns>
|
||||
public static CurlCode GlobalInit(CurlInitFlag flags)
|
||||
{
|
||||
_initCode = NativeMethods.curl_global_init((int)flags);
|
||||
#if USE_LIBCURLSHIM
|
||||
if (_initCode == CurlCode.Ok)
|
||||
NativeMethods.curl_shim_initialize();
|
||||
#endif
|
||||
return _initCode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Process-wide cleanup -- call just before exiting process.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// While it's not necessary that your program call this method
|
||||
/// before exiting, doing so will prevent leaks of native cURL resources.
|
||||
/// </remarks>
|
||||
public static void GlobalCleanup()
|
||||
{
|
||||
if (_initCode == CurlCode.Ok)
|
||||
{
|
||||
#if USE_LIBCURLSHIM
|
||||
NativeMethods.curl_shim_cleanup();
|
||||
#endif
|
||||
NativeMethods.curl_global_cleanup();
|
||||
_initCode = CurlCode.FailedInit;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// URL encode a String.
|
||||
/// </summary>
|
||||
/// <param name="url">The string to URL encode.</param>
|
||||
/// <param name="length">
|
||||
/// Input string length;
|
||||
/// use 0 for cURL to determine.
|
||||
/// </param>
|
||||
/// <returns>A new URL encoded string.</returns>
|
||||
/// <exception cref="System.InvalidOperationException">
|
||||
/// Thrown if cURL isn't properly initialized.
|
||||
/// </exception>
|
||||
public static string Escape(string url, int length)
|
||||
{
|
||||
EnsureCurl();
|
||||
var p = NativeMethods.curl_escape(url, length);
|
||||
var s = Marshal.PtrToStringAnsi(p);
|
||||
NativeMethods.curl_free(p);
|
||||
return s;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// URL decode a String.
|
||||
/// </summary>
|
||||
/// <param name="url">The string to URL decode.</param>
|
||||
/// <param name="length">
|
||||
/// Input string length;
|
||||
/// use 0 for cURL to determine.
|
||||
/// </param>
|
||||
/// <returns>A new URL decoded string.</returns>
|
||||
/// <exception cref="System.InvalidOperationException">
|
||||
/// Thrown if cURL isn't properly initialized.
|
||||
/// </exception>
|
||||
public static string Unescape(string url, int length)
|
||||
{
|
||||
EnsureCurl();
|
||||
var p = NativeMethods.curl_unescape(url, length);
|
||||
var s = Marshal.PtrToStringAnsi(p);
|
||||
NativeMethods.curl_free(p);
|
||||
return s;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a <see cref="CurlVersionInfoData" /> object.
|
||||
/// </summary>
|
||||
/// <param name="ver">
|
||||
/// Specify a <see cref="CurlVersion" />, such as
|
||||
/// <c>CurlVersion.Now</c>.
|
||||
/// </param>
|
||||
/// <returns>A <see cref="CurlVersionInfoData" /> object.</returns>
|
||||
/// <exception cref="System.InvalidOperationException">
|
||||
/// Thrown if cURL isn't properly initialized.
|
||||
/// </exception>
|
||||
public static CurlVersionInfoData GetVersionInfo(CurlVersion ver)
|
||||
{
|
||||
EnsureCurl();
|
||||
return new CurlVersionInfoData(ver);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by other classes to ensure valid cURL state.
|
||||
/// </summary>
|
||||
internal static void EnsureCurl()
|
||||
{
|
||||
if (_initCode != CurlCode.Ok)
|
||||
throw new InvalidOperationException("cURL not initialized");
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,388 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* CurlS#arp
|
||||
*
|
||||
* Copyright (c) 2014 Dr. Masroor Ehsan (masroore@gmail.com)
|
||||
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// This trivial class wraps the internal <c>curl_forms</c> struct.
|
||||
/// </summary>
|
||||
public sealed class CurlForms
|
||||
{
|
||||
/// <summary>The <see cref="CurlFormOption" />.</summary>
|
||||
public CurlFormOption Option;
|
||||
|
||||
/// <summary>Value for the option.</summary>
|
||||
public Object Value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wraps a section of multipart form data to be submitted via the
|
||||
/// <see cref="CurlOption.HttpPost" /> option in the
|
||||
/// <see cref="CurlEasy.SetOpt" /> member of the <see cref="CurlEasy" /> class.
|
||||
/// </summary>
|
||||
public class CurlHttpMultiPartForm : IDisposable
|
||||
{
|
||||
// the two curlform pointers
|
||||
private readonly IntPtr[] _pItems;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <exception cref="System.InvalidOperationException">
|
||||
/// This is thrown
|
||||
/// if <see cref="Curl" /> hasn't bee properly initialized.
|
||||
/// </exception>
|
||||
public CurlHttpMultiPartForm()
|
||||
{
|
||||
Curl.EnsureCurl();
|
||||
_pItems = new IntPtr[2];
|
||||
_pItems[0] = IntPtr.Zero;
|
||||
_pItems[1] = IntPtr.Zero;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Free unmanaged resources.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destructor
|
||||
/// </summary>
|
||||
~CurlHttpMultiPartForm()
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
// for CurlEasy.SetOpt()
|
||||
internal IntPtr GetHandle()
|
||||
{
|
||||
return _pItems[0];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add a multi-part form section.
|
||||
/// </summary>
|
||||
/// <param name="args">
|
||||
/// Argument list, as described in the remarks.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// A <see cref="CurlFormCode" />, hopefully
|
||||
/// <c>CurlFormCode.Ok</c>.
|
||||
/// </returns>
|
||||
/// <remarks>
|
||||
/// This is definitely the workhorse method for this class. It
|
||||
/// should be called in roughly the same manner as
|
||||
/// <c>curl_formadd()</c>, except you would omit the first two
|
||||
/// <c>struct curl_httppost**</c> arguments (<c>firstitem</c> and
|
||||
/// <c>lastitem</c>), which are wrapped in this class. So you should
|
||||
/// pass arguments in the following sequence:
|
||||
/// <para>
|
||||
/// <c>
|
||||
/// CurlHttpMultiPartForm.AddSection(option1, value1, ..., optionX, valueX,
|
||||
/// CurlFormOption.End)
|
||||
/// </c>
|
||||
/// ;
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// For a complete list of possible options, see the documentation for
|
||||
/// the <see cref="CurlFormOption" /> enumeration.
|
||||
/// </para>
|
||||
/// <note>
|
||||
/// The pointer options (<c>PtrName</c>, etc.) make an
|
||||
/// internal copy of the passed <c>byte</c> array. Therefore, any
|
||||
/// changes you make to the client copy of this array AFTER calling
|
||||
/// this method, won't be reflected internally with <c>cURL</c>. The
|
||||
/// purpose of providing the pointer options is to support the
|
||||
/// posting of non-string binary data.
|
||||
/// </note>
|
||||
/// </remarks>
|
||||
public CurlFormCode AddSection(params object[] args)
|
||||
{
|
||||
var nCount = args.Length;
|
||||
var nRealCount = nCount;
|
||||
var retCode = CurlFormCode.Ok;
|
||||
CurlForms[] aForms = null;
|
||||
|
||||
// one arg or even number of args is an error
|
||||
if ((nCount == 1) || (nCount%2 == 0))
|
||||
return CurlFormCode.Incomplete;
|
||||
|
||||
// ensure the last argument is End
|
||||
var iCode = (CurlFormOption)
|
||||
Convert.ToInt32(args.GetValue(nCount - 1));
|
||||
if (iCode != CurlFormOption.End)
|
||||
return CurlFormCode.Incomplete;
|
||||
|
||||
// walk through any passed arrays to get the true number of
|
||||
// items and ensure the child arrays are properly (and not
|
||||
// prematurely) terminated with End
|
||||
for (var i = 0; i < nCount; i += 2)
|
||||
{
|
||||
iCode = (CurlFormOption) Convert.ToInt32(args.GetValue(i));
|
||||
switch (iCode)
|
||||
{
|
||||
case CurlFormOption.Array:
|
||||
{
|
||||
aForms = args.GetValue(i + 1) as CurlForms[];
|
||||
if (aForms == null)
|
||||
return CurlFormCode.Incomplete;
|
||||
var nFormsCount = aForms.Length;
|
||||
for (var j = 0; j < nFormsCount; j++)
|
||||
{
|
||||
var pcf = aForms.GetValue(j) as CurlForms;
|
||||
if (pcf == null)
|
||||
return CurlFormCode.Incomplete;
|
||||
if (j == nFormsCount - 1)
|
||||
{
|
||||
if (pcf.Option != CurlFormOption.End)
|
||||
return CurlFormCode.Incomplete;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pcf.Option == CurlFormOption.End)
|
||||
return CurlFormCode.Incomplete;
|
||||
}
|
||||
}
|
||||
// -2 accounts for the fact that we're a) not
|
||||
// including the item with End and b) not
|
||||
// including Array in what we pass to cURL
|
||||
nRealCount += 2*(nFormsCount - 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// allocate the IntPtr array for the data
|
||||
var aPointers = new IntPtr[nRealCount];
|
||||
for (var i = 0; i < nRealCount - 1; i++)
|
||||
aPointers[i] = IntPtr.Zero;
|
||||
aPointers[nRealCount - 1] = (IntPtr) CurlFormOption.End;
|
||||
|
||||
// now we go through the args
|
||||
aForms = null;
|
||||
var formArrayPos = 0;
|
||||
var argArrayPos = 0;
|
||||
var ptrArrayPos = 0;
|
||||
Object obj = null;
|
||||
|
||||
while ((retCode == CurlFormCode.Ok) &&
|
||||
(ptrArrayPos < nRealCount))
|
||||
{
|
||||
if (aForms != null)
|
||||
{
|
||||
var pcf = aForms.GetValue(formArrayPos++)
|
||||
as CurlForms;
|
||||
if (pcf == null)
|
||||
{
|
||||
retCode = CurlFormCode.UnknownOption;
|
||||
break;
|
||||
}
|
||||
iCode = pcf.Option;
|
||||
obj = pcf.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
iCode = (CurlFormOption) Convert.ToInt32(
|
||||
args.GetValue(argArrayPos++));
|
||||
obj = (iCode == CurlFormOption.End)
|
||||
? null
|
||||
: args.GetValue(argArrayPos++);
|
||||
}
|
||||
|
||||
switch (iCode)
|
||||
{
|
||||
// handle byte-array pointer-related items
|
||||
case CurlFormOption.PtrName:
|
||||
case CurlFormOption.PtrContents:
|
||||
case CurlFormOption.BufferPtr:
|
||||
{
|
||||
var bytes = obj as byte[];
|
||||
if (bytes == null)
|
||||
retCode = CurlFormCode.UnknownOption;
|
||||
else
|
||||
{
|
||||
var nLen = bytes.Length;
|
||||
var ptr = Marshal.AllocHGlobal(nLen);
|
||||
if (ptr != IntPtr.Zero)
|
||||
{
|
||||
aPointers[ptrArrayPos++] = (IntPtr) iCode;
|
||||
// copy bytes to unmanaged buffer
|
||||
for (var j = 0; j < nLen; j++)
|
||||
Marshal.WriteByte(ptr, bytes[j]);
|
||||
aPointers[ptrArrayPos++] = ptr;
|
||||
}
|
||||
else
|
||||
retCode = CurlFormCode.Memory;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// length values
|
||||
case CurlFormOption.NameLength:
|
||||
case CurlFormOption.ContentsLength:
|
||||
case CurlFormOption.BufferLength:
|
||||
aPointers[ptrArrayPos++] = (IntPtr) iCode;
|
||||
aPointers[ptrArrayPos++] = (IntPtr)
|
||||
Convert.ToInt32(obj);
|
||||
break;
|
||||
|
||||
// strings
|
||||
case CurlFormOption.CopyName:
|
||||
case CurlFormOption.CopyContents:
|
||||
case CurlFormOption.FileContent:
|
||||
case CurlFormOption.File:
|
||||
case CurlFormOption.ContentType:
|
||||
case CurlFormOption.Filename:
|
||||
case CurlFormOption.Buffer:
|
||||
{
|
||||
aPointers[ptrArrayPos++] = (IntPtr) iCode;
|
||||
var s = obj as String;
|
||||
if (s == null)
|
||||
retCode = CurlFormCode.UnknownOption;
|
||||
else
|
||||
{
|
||||
var p = Marshal.StringToHGlobalAnsi(s);
|
||||
if (p != IntPtr.Zero)
|
||||
aPointers[ptrArrayPos++] = p;
|
||||
else
|
||||
retCode = CurlFormCode.Memory;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// array case: already handled
|
||||
case CurlFormOption.Array:
|
||||
if (aForms != null)
|
||||
retCode = CurlFormCode.IllegalArray;
|
||||
else
|
||||
{
|
||||
aForms = obj as CurlForms[];
|
||||
if (aForms == null)
|
||||
retCode = CurlFormCode.UnknownOption;
|
||||
}
|
||||
break;
|
||||
|
||||
// slist
|
||||
case CurlFormOption.ContentHeader:
|
||||
{
|
||||
aPointers[ptrArrayPos++] = (IntPtr) iCode;
|
||||
var s = obj as CurlSlist;
|
||||
if (s == null)
|
||||
retCode = CurlFormCode.UnknownOption;
|
||||
else
|
||||
aPointers[ptrArrayPos++] = s.Handle;
|
||||
break;
|
||||
}
|
||||
|
||||
// erroneous stuff
|
||||
case CurlFormOption.Nothing:
|
||||
retCode = CurlFormCode.Incomplete;
|
||||
break;
|
||||
|
||||
// end
|
||||
case CurlFormOption.End:
|
||||
if (aForms != null) // end of form
|
||||
{
|
||||
aForms = null;
|
||||
formArrayPos = 0;
|
||||
}
|
||||
else
|
||||
aPointers[ptrArrayPos++] = (IntPtr) iCode;
|
||||
break;
|
||||
|
||||
// default is unknown
|
||||
default:
|
||||
retCode = CurlFormCode.UnknownOption;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// ensure we didn't come up short on parameters
|
||||
if (ptrArrayPos != nRealCount)
|
||||
retCode = CurlFormCode.Incomplete;
|
||||
|
||||
// if we're OK here, call into curl
|
||||
if (retCode == CurlFormCode.Ok)
|
||||
{
|
||||
#if USE_LIBCURLSHIM
|
||||
retCode = (CurlFormCode) NativeMethods.curl_shim_formadd(_pItems, aPointers, nRealCount);
|
||||
#else
|
||||
retCode = (CurlFormCode) NativeMethods.curl_formadd(ref _pItems[0], ref _pItems[1],
|
||||
(int) aPointers[0], aPointers[1],
|
||||
(int) aPointers[2], aPointers[3],
|
||||
(int) aPointers[4]);
|
||||
#endif
|
||||
}
|
||||
|
||||
// unmarshal native allocations
|
||||
for (var i = 0; i < nRealCount - 1; i += 2)
|
||||
{
|
||||
iCode = (CurlFormOption) (int) aPointers[i];
|
||||
switch (iCode)
|
||||
{
|
||||
case CurlFormOption.CopyName:
|
||||
case CurlFormOption.CopyContents:
|
||||
case CurlFormOption.FileContent:
|
||||
case CurlFormOption.File:
|
||||
case CurlFormOption.ContentType:
|
||||
case CurlFormOption.Filename:
|
||||
case CurlFormOption.Buffer:
|
||||
// byte buffer cases
|
||||
case CurlFormOption.PtrName:
|
||||
case CurlFormOption.PtrContents:
|
||||
case CurlFormOption.BufferPtr:
|
||||
{
|
||||
if (aPointers[i + 1] != IntPtr.Zero)
|
||||
Marshal.FreeHGlobal(aPointers[i + 1]);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return retCode;
|
||||
}
|
||||
|
||||
private void Dispose(bool disposing)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
// clean up managed objects
|
||||
}
|
||||
|
||||
// clean up native objects
|
||||
if (_pItems[0] != IntPtr.Zero)
|
||||
NativeMethods.curl_formfree(_pItems[0]);
|
||||
_pItems[0] = IntPtr.Zero;
|
||||
_pItems[1] = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,302 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* CurlS#arp
|
||||
*
|
||||
* Copyright (c) 2014 Dr. Masroor Ehsan (masroore@gmail.com)
|
||||
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the <c>curl_multi_xxx</c> API.
|
||||
/// </summary>
|
||||
public class CurlMulti : IDisposable
|
||||
{
|
||||
// private members
|
||||
private readonly Hashtable _htEasy;
|
||||
private int _maxFd;
|
||||
private CurlMultiInfo[] _multiInfo;
|
||||
private bool _bGotMultiInfo;
|
||||
#if USE_LIBCURLSHIM
|
||||
private IntPtr _fdSets;
|
||||
#else
|
||||
private NativeMethods.fd_set _fd_read, _fd_write, _fd_except;
|
||||
#endif
|
||||
private IntPtr _pMulti;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <exception cref="System.InvalidOperationException">
|
||||
/// This is thrown
|
||||
/// if <see cref="Curl" /> hasn't bee properly initialized.
|
||||
/// </exception>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
|
||||
/// created successfully.
|
||||
/// </exception>
|
||||
public CurlMulti()
|
||||
{
|
||||
Curl.EnsureCurl();
|
||||
_pMulti = NativeMethods.curl_multi_init();
|
||||
ensureHandle();
|
||||
_maxFd = 0;
|
||||
#if USE_LIBCURLSHIM
|
||||
_fdSets = IntPtr.Zero;
|
||||
_fdSets = NativeMethods.curl_shim_alloc_fd_sets();
|
||||
#else
|
||||
_fd_read = NativeMethods.fd_set.Create();
|
||||
_fd_read = NativeMethods.fd_set.Create();
|
||||
_fd_write = NativeMethods.fd_set.Create();
|
||||
_fd_except = NativeMethods.fd_set.Create();
|
||||
#endif
|
||||
_multiInfo = null;
|
||||
_bGotMultiInfo = false;
|
||||
_htEasy = new Hashtable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Max file descriptor
|
||||
/// </summary>
|
||||
public int MaxFd
|
||||
{
|
||||
get { return _maxFd; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cleanup unmanaged resources.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destructor
|
||||
/// </summary>
|
||||
~CurlMulti()
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
private void Dispose(bool disposing)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
// if (disposing) // managed member cleanup
|
||||
// unmanaged cleanup
|
||||
if (_pMulti != IntPtr.Zero)
|
||||
{
|
||||
NativeMethods.curl_multi_cleanup(_pMulti);
|
||||
_pMulti = IntPtr.Zero;
|
||||
}
|
||||
|
||||
#if USE_LIBCURLSHIM
|
||||
if (_fdSets != IntPtr.Zero)
|
||||
{
|
||||
NativeMethods.curl_shim_free_fd_sets(_fdSets);
|
||||
_fdSets = IntPtr.Zero;
|
||||
}
|
||||
#else
|
||||
_fd_read.Cleanup();
|
||||
_fd_write.Cleanup();
|
||||
_fd_except.Cleanup();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
private void ensureHandle()
|
||||
{
|
||||
if (_pMulti == IntPtr.Zero)
|
||||
throw new NullReferenceException("No internal multi handle");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add an CurlEasy object.
|
||||
/// </summary>
|
||||
/// <param name="curlEasy">
|
||||
/// <see cref="CurlEasy" /> object to add.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// A <see cref="CurlMultiCode" />, hopefully <c>CurlMultiCode.Ok</c>
|
||||
/// </returns>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
|
||||
/// created successfully.
|
||||
/// </exception>
|
||||
public CurlMultiCode AddHandle(CurlEasy curlEasy)
|
||||
{
|
||||
ensureHandle();
|
||||
var p = curlEasy.Handle;
|
||||
_htEasy.Add(p, curlEasy);
|
||||
return NativeMethods.curl_multi_add_handle(_pMulti, p);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove an CurlEasy object.
|
||||
/// </summary>
|
||||
/// <param name="curlEasy">
|
||||
/// <see cref="CurlEasy" /> object to remove.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// A <see cref="CurlMultiCode" />, hopefully <c>CurlMultiCode.Ok</c>
|
||||
/// </returns>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
|
||||
/// created successfully.
|
||||
/// </exception>
|
||||
public CurlMultiCode RemoveHandle(CurlEasy curlEasy)
|
||||
{
|
||||
ensureHandle();
|
||||
var p = curlEasy.Handle;
|
||||
_htEasy.Remove(p);
|
||||
return NativeMethods.curl_multi_remove_handle(_pMulti, curlEasy.Handle);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a string description of an error code.
|
||||
/// </summary>
|
||||
/// <param name="errorNum">
|
||||
/// The <see cref="CurlMultiCode" /> for which to obtain the error
|
||||
/// string description.
|
||||
/// </param>
|
||||
/// <returns>The string description.</returns>
|
||||
public String StrError(CurlMultiCode errorNum)
|
||||
{
|
||||
return Marshal.PtrToStringAnsi(NativeMethods.curl_multi_strerror(errorNum));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read/write data to/from each CurlEasy object.
|
||||
/// </summary>
|
||||
/// <param name="runningObjects">
|
||||
/// The number of <see cref="CurlEasy" /> objects still in process is
|
||||
/// written by this function to this reference parameter.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// A <see cref="CurlMultiCode" />, hopefully <c>CurlMultiCode.Ok</c>
|
||||
/// </returns>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
|
||||
/// created successfully.
|
||||
/// </exception>
|
||||
public CurlMultiCode Perform(ref int runningObjects)
|
||||
{
|
||||
ensureHandle();
|
||||
return NativeMethods.curl_multi_perform(_pMulti, ref runningObjects);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set internal file desriptor information before calling Select.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// A <see cref="CurlMultiCode" />, hopefully <c>CurlMultiCode.Ok</c>
|
||||
/// </returns>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
|
||||
/// created successfully.
|
||||
/// </exception>
|
||||
public CurlMultiCode FdSet()
|
||||
{
|
||||
ensureHandle();
|
||||
#if USE_LIBCURLSHIM
|
||||
return NativeMethods.curl_shim_multi_fdset(_pMulti, _fdSets, ref _maxFd);
|
||||
#else
|
||||
NativeMethods.FD_ZERO(_fd_read);
|
||||
NativeMethods.FD_ZERO(_fd_write);
|
||||
NativeMethods.FD_ZERO(_fd_except);
|
||||
return NativeMethods.curl_multi_fdset(_pMulti, ref _fd_read, ref _fd_write, ref _fd_except, ref _maxFd);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Call <c>select()</c> on the CurlEasy objects.
|
||||
/// </summary>
|
||||
/// <param name="timeoutMillis">
|
||||
/// The timeout for the internal <c>select()</c> call,
|
||||
/// in milliseconds.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// Number or <see cref="CurlEasy" /> objects with pending reads.
|
||||
/// </returns>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
|
||||
/// created successfully.
|
||||
/// </exception>
|
||||
public int Select(int timeoutMillis)
|
||||
{
|
||||
ensureHandle();
|
||||
#if USE_LIBCURLSHIM
|
||||
return NativeMethods.curl_shim_select(_maxFd + 1, _fdSets, timeoutMillis);
|
||||
#else
|
||||
var timeout = NativeMethods.timeval.Create(timeoutMillis);
|
||||
return NativeMethods.select(_maxFd + 1, ref _fd_read, ref _fd_write, ref _fd_except, ref timeout);
|
||||
//return NativeMethods.select2(_maxFd + 1, _fd_read, _fd_write, _fd_except, timeout);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Obtain status information for a CurlMulti transfer. Requires
|
||||
/// CurlSharp be compiled with the libcurlshim helper.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// An array of <see cref="CurlMultiInfo" /> objects, one for each
|
||||
/// <see cref="CurlEasy" /> object child.
|
||||
/// </returns>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
|
||||
/// created successfully.
|
||||
/// </exception>
|
||||
public CurlMultiInfo[] InfoRead()
|
||||
{
|
||||
if (_bGotMultiInfo)
|
||||
return _multiInfo;
|
||||
|
||||
_bGotMultiInfo = true;
|
||||
|
||||
#if USE_LIBCURLSHIM
|
||||
var nMsgs = 0;
|
||||
var pInfo = NativeMethods.curl_shim_multi_info_read(_pMulti, ref nMsgs);
|
||||
if (pInfo != IntPtr.Zero)
|
||||
{
|
||||
_multiInfo = new CurlMultiInfo[nMsgs];
|
||||
for (var i = 0; i < nMsgs; i++)
|
||||
{
|
||||
var msg = (CurlMessage) Marshal.ReadInt32(pInfo, i*12);
|
||||
var pEasy = Marshal.ReadIntPtr(pInfo, i*12 + 4);
|
||||
var code = (CurlCode) Marshal.ReadInt32(pInfo, i*12 + 8);
|
||||
_multiInfo[i] = new CurlMultiInfo(msg, (CurlEasy) _htEasy[pEasy], code);
|
||||
}
|
||||
NativeMethods.curl_shim_multi_info_free(pInfo);
|
||||
}
|
||||
|
||||
return _multiInfo;
|
||||
|
||||
#else
|
||||
|
||||
throw new NotImplementedException(
|
||||
"Sorry, CurlMulti.InfoRead is not implemented on this system."
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,65 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* CurlS#arp
|
||||
*
|
||||
* Copyright (c) 2013 Dr. Masroor Ehsan (masroore@gmail.com)
|
||||
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Wraps the <c>cURL</c> struct <c>CURLMsg</c>. This class provides
|
||||
/// status information following a <see cref="CurlMulti" /> transfer.
|
||||
/// </summary>
|
||||
public sealed class CurlMultiInfo
|
||||
{
|
||||
// private members
|
||||
private readonly CurlEasy _mCurlEasy;
|
||||
private readonly CurlMessage _msg;
|
||||
private readonly CurlCode _result;
|
||||
|
||||
internal CurlMultiInfo(CurlMessage msg, CurlEasy curlEasy, CurlCode result)
|
||||
{
|
||||
_msg = msg;
|
||||
_mCurlEasy = curlEasy;
|
||||
_result = result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the status code from the <see cref="CurlMessage" /> enumeration.
|
||||
/// </summary>
|
||||
public CurlMessage Msg
|
||||
{
|
||||
get { return _msg; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the <see cref="CurlEasy" /> object for this child.
|
||||
/// </summary>
|
||||
public CurlEasy CurlEasyHandle
|
||||
{
|
||||
get { return _mCurlEasy; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the return code for the transfer, as a
|
||||
/// <see cref="CurlCode" />.
|
||||
/// </summary>
|
||||
public CurlCode Result
|
||||
{
|
||||
get { return _result; }
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,276 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* CurlS#arp
|
||||
*
|
||||
* Copyright (c) 2013 Dr. Masroor Ehsan (masroore@gmail.com)
|
||||
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// This class provides an infrastructure for serializing access to data
|
||||
/// shared by multiple <see cref="CurlEasy" /> objects, including cookie data
|
||||
/// and Dns hosts. It implements the <c>curl_share_xxx</c> API.
|
||||
/// </summary>
|
||||
public class CurlShare : IDisposable
|
||||
{
|
||||
// private members
|
||||
private GCHandle _hThis; // for handle extraction
|
||||
private CurlShareCode _lastErrorCode;
|
||||
private string _lastErrorDescription;
|
||||
#if USE_LIBCURLSHIM
|
||||
private NativeMethods._ShimLockCallback _pDelLock; // lock delegate
|
||||
private NativeMethods._ShimUnlockCallback _pDelUnlock; // unlock delegate
|
||||
#endif
|
||||
private IntPtr _pShare; // share handle
|
||||
private CurlShareLockCallback _pfLock; // client lock delegate
|
||||
private CurlShareUnlockCallback _pfUnlock; // client unlock delegate
|
||||
private IntPtr _ptrThis; // numeric handle
|
||||
private Object _userData; // user data for delegates
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <exception cref="System.InvalidOperationException">
|
||||
/// This is thrown
|
||||
/// if <see cref="Curl" /> hasn't bee properly initialized.
|
||||
/// </exception>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// This is thrown if
|
||||
/// the native <c>share</c> handle wasn't created successfully.
|
||||
/// </exception>
|
||||
public CurlShare()
|
||||
{
|
||||
Curl.EnsureCurl();
|
||||
_pShare = NativeMethods.curl_share_init();
|
||||
EnsureHandle();
|
||||
LockFunction = null;
|
||||
UnlockFunction = null;
|
||||
UserData = null;
|
||||
installDelegates();
|
||||
}
|
||||
|
||||
public object UserData
|
||||
{
|
||||
get { return _userData; }
|
||||
set { _userData = value; }
|
||||
}
|
||||
|
||||
public CurlShareUnlockCallback UnlockFunction
|
||||
{
|
||||
get { return _pfUnlock; }
|
||||
set { _pfUnlock = value; }
|
||||
}
|
||||
|
||||
public CurlShareLockCallback LockFunction
|
||||
{
|
||||
get { return _pfLock; }
|
||||
set { _pfLock = value; }
|
||||
}
|
||||
|
||||
public CurlLockData Share
|
||||
{
|
||||
set { setShareOption(CurlShareOption.Share, value); }
|
||||
}
|
||||
|
||||
public CurlLockData Unshare
|
||||
{
|
||||
set { setShareOption(CurlShareOption.Unshare, value); }
|
||||
}
|
||||
|
||||
public CurlShareCode LastErrorCode
|
||||
{
|
||||
get { return _lastErrorCode; }
|
||||
}
|
||||
|
||||
public string LastErrorDescription
|
||||
{
|
||||
get { return _lastErrorDescription; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cleanup unmanaged resources.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destructor
|
||||
/// </summary>
|
||||
~CurlShare()
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set options for this object.
|
||||
/// </summary>
|
||||
/// <param name="option">
|
||||
/// One of the values in the <see cref="CurlShareOption" />
|
||||
/// enumeration.
|
||||
/// </param>
|
||||
/// <param name="parameter">
|
||||
/// An appropriate object based on the value passed in the
|
||||
/// <c>option</c> argument. See <see cref="CurlShareOption" />
|
||||
/// for more information about the appropriate parameter type.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// A <see cref="CurlShareCode" />, hopefully
|
||||
/// <c>CurlShareCode.Ok</c>.
|
||||
/// </returns>
|
||||
/// <exception cref="System.NullReferenceException">
|
||||
/// This is thrown if
|
||||
/// the native <c>share</c> handle wasn't created successfully.
|
||||
/// </exception>
|
||||
public CurlShareCode SetOpt(CurlShareOption option, Object parameter)
|
||||
{
|
||||
EnsureHandle();
|
||||
var retCode = CurlShareCode.Ok;
|
||||
|
||||
switch (option)
|
||||
{
|
||||
case CurlShareOption.LockFunction:
|
||||
var lf = parameter as CurlShareLockCallback;
|
||||
if (lf == null)
|
||||
return CurlShareCode.BadOption;
|
||||
_pfLock = lf;
|
||||
break;
|
||||
|
||||
case CurlShareOption.UnlockFunction:
|
||||
var ulf = parameter as CurlShareUnlockCallback;
|
||||
if (ulf == null)
|
||||
return CurlShareCode.BadOption;
|
||||
_pfUnlock = ulf;
|
||||
break;
|
||||
|
||||
case CurlShareOption.Share:
|
||||
case CurlShareOption.Unshare:
|
||||
{
|
||||
var opt = (CurlLockData) Convert.ToInt32(parameter);
|
||||
retCode = setShareOption(option, opt);
|
||||
break;
|
||||
}
|
||||
|
||||
case CurlShareOption.UserData:
|
||||
_userData = parameter;
|
||||
break;
|
||||
|
||||
default:
|
||||
retCode = CurlShareCode.BadOption;
|
||||
break;
|
||||
}
|
||||
return retCode;
|
||||
}
|
||||
|
||||
private void setLastError(CurlShareCode code, CurlShareOption opt)
|
||||
{
|
||||
if (_lastErrorCode == CurlShareCode.Ok && code != CurlShareCode.Ok)
|
||||
{
|
||||
_lastErrorCode = code;
|
||||
_lastErrorDescription = string.Format("Error: {0} setting option {1}", StrError(code), opt);
|
||||
}
|
||||
}
|
||||
|
||||
private CurlShareCode setShareOption(CurlShareOption option, CurlLockData value)
|
||||
{
|
||||
var retCode = (value != CurlLockData.Cookie) && (value != CurlLockData.Dns)
|
||||
? CurlShareCode.BadOption
|
||||
: NativeMethods.curl_share_setopt(_pShare, option, (IntPtr) value);
|
||||
setLastError(retCode, option);
|
||||
return retCode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return a String description of an error code.
|
||||
/// </summary>
|
||||
/// <param name="errorNum">
|
||||
/// The <see cref="CurlShareCode" /> for which to obtain the error
|
||||
/// string description.
|
||||
/// </param>
|
||||
/// <returns>The string description.</returns>
|
||||
public String StrError(CurlShareCode errorNum)
|
||||
{
|
||||
return Marshal.PtrToStringAnsi(NativeMethods.curl_share_strerror(errorNum));
|
||||
}
|
||||
|
||||
private void Dispose(bool disposing)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
// if (disposing) cleanup managed objects
|
||||
if (_pShare != IntPtr.Zero)
|
||||
{
|
||||
#if USE_LIBCURLSHIM
|
||||
NativeMethods.curl_shim_cleanup_share_delegates(_pShare);
|
||||
#endif
|
||||
NativeMethods.curl_share_cleanup(_pShare);
|
||||
_hThis.Free();
|
||||
_ptrThis = IntPtr.Zero;
|
||||
_pShare = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal IntPtr GetHandle()
|
||||
{
|
||||
return _pShare;
|
||||
}
|
||||
|
||||
private void EnsureHandle()
|
||||
{
|
||||
if (_pShare == IntPtr.Zero)
|
||||
throw new NullReferenceException("No internal share handle");
|
||||
}
|
||||
|
||||
private void installDelegates()
|
||||
{
|
||||
_hThis = GCHandle.Alloc(this);
|
||||
_ptrThis = (IntPtr)_hThis;
|
||||
#if USE_LIBCURLSHIM
|
||||
_pDelLock = LockDelegate;
|
||||
_pDelUnlock = UnlockDelegate;
|
||||
NativeMethods.curl_shim_install_share_delegates(_pShare, _ptrThis, _pDelLock, _pDelUnlock);
|
||||
#endif
|
||||
}
|
||||
|
||||
internal static void LockDelegate(int data, int access, IntPtr userPtr)
|
||||
{
|
||||
var gch = (GCHandle) userPtr;
|
||||
var share = (CurlShare) gch.Target;
|
||||
if (share == null)
|
||||
return;
|
||||
if (share.LockFunction == null)
|
||||
return;
|
||||
share.LockFunction((CurlLockData) data, (CurlLockAccess) access, share.UserData);
|
||||
}
|
||||
|
||||
internal static void UnlockDelegate(int data, IntPtr userPtr)
|
||||
{
|
||||
var gch = (GCHandle) userPtr;
|
||||
var share = (CurlShare) gch.Target;
|
||||
if (share == null)
|
||||
return;
|
||||
if (share.UnlockFunction == null)
|
||||
return;
|
||||
share.UnlockFunction((CurlLockData) data, share.UserData);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,109 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{74420A79-CC16-442C-8B1E-7C1B913844F0}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CurlSharp</RootNamespace>
|
||||
<AssemblyName>CurlSharp</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Curl.cs" />
|
||||
<Compile Include="CurlEasy.cs" />
|
||||
<Compile Include="CurlHttpMultiPartForm.cs" />
|
||||
<Compile Include="CurlMulti.cs" />
|
||||
<Compile Include="CurlMultiInfo.cs" />
|
||||
<Compile Include="CurlShare.cs" />
|
||||
<Compile Include="CurlSlist.cs" />
|
||||
<Compile Include="CurlSslContext.cs" />
|
||||
<Compile Include="CurlVersionInfoData.cs" />
|
||||
<Compile Include="NativeMethods.cs" />
|
||||
<Compile Include="Enums\CurlClosePolicy.cs" />
|
||||
<Compile Include="Enums\CurlCode.cs" />
|
||||
<Compile Include="Enums\CurlFormCode.cs" />
|
||||
<Compile Include="Enums\CurlFormOption.cs" />
|
||||
<Compile Include="Enums\CurlFtpAuth.cs" />
|
||||
<Compile Include="Enums\CurlFtpSsl.cs" />
|
||||
<Compile Include="Enums\CurlHttpAuth.cs" />
|
||||
<Compile Include="Enums\CurlHttpVersion.cs" />
|
||||
<Compile Include="Enums\CurlInfo.cs" />
|
||||
<Compile Include="Enums\CurlInfoType.cs" />
|
||||
<Compile Include="Enums\CurlInitFlag.cs" />
|
||||
<Compile Include="Enums\CurlIoCommand.cs" />
|
||||
<Compile Include="Enums\CurlIoError.cs" />
|
||||
<Compile Include="Enums\CurlIpResolve.cs" />
|
||||
<Compile Include="Enums\CurlLockAccess.cs" />
|
||||
<Compile Include="Enums\CurlLockData.cs" />
|
||||
<Compile Include="Enums\CurlMessage.cs" />
|
||||
<Compile Include="Enums\CurlMultiCode.cs" />
|
||||
<Compile Include="Enums\CurlNetrcOption.cs" />
|
||||
<Compile Include="Enums\CurlOption.cs" />
|
||||
<Compile Include="Enums\CurlProxyType.cs" />
|
||||
<Compile Include="Enums\CurlShareCode.cs" />
|
||||
<Compile Include="Enums\CurlShareOption.cs" />
|
||||
<Compile Include="Enums\CurlSslVersion.cs" />
|
||||
<Compile Include="Enums\CurlTimeCond.cs" />
|
||||
<Compile Include="Enums\CurlVersion.cs" />
|
||||
<Compile Include="Enums\CurlVersionFeatureBitmask.cs" />
|
||||
<Compile Include="Callbacks\CurlEasyCallbacks.cs" />
|
||||
<Compile Include="Callbacks\CurlShareCallbacks.cs" />
|
||||
<Compile Include="SSLFix.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<ItemGroup />
|
||||
<ProjectExtensions>
|
||||
<MonoDevelop>
|
||||
<Properties>
|
||||
<Policies>
|
||||
<TextStylePolicy TabWidth="4" IndentWidth="4" RemoveTrailingWhitespace="True" NoTabsAfterNonTabs="False" EolMarker="Native" FileWidth="80" TabsToSpaces="True" scope="text/x-csharp">
|
||||
<inheritsSet />
|
||||
<inheritsScope />
|
||||
</TextStylePolicy>
|
||||
<CSharpFormattingPolicy IndentBlock="True" IndentBraces="False" IndentSwitchSection="False" IndentSwitchCaseSection="True" LabelPositioning="OneLess" NewLinesForBracesInTypes="True" NewLinesForBracesInMethods="True" NewLinesForBracesInProperties="False" NewLinesForBracesInAccessors="False" NewLinesForBracesInAnonymousMethods="False" NewLinesForBracesInControlBlocks="False" NewLinesForBracesInAnonymousTypes="False" NewLinesForBracesInObjectCollectionArrayInitializers="False" NewLinesForBracesInLambdaExpressionBody="False" NewLineForElse="False" NewLineForCatch="False" NewLineForFinally="False" NewLineForMembersInObjectInit="False" NewLineForMembersInAnonymousTypes="False" NewLineForClausesInQuery="False" SpacingAfterMethodDeclarationName="True" SpaceWithinMethodDeclarationParenthesis="False" SpaceBetweenEmptyMethodDeclarationParentheses="False" SpaceAfterMethodCallName="True" SpaceWithinMethodCallParentheses="False" SpaceBetweenEmptyMethodCallParentheses="False" SpaceAfterControlFlowStatementKeyword="True" SpaceWithinExpressionParentheses="False" SpaceWithinCastParentheses="False" SpaceWithinOtherParentheses="False" SpaceAfterCast="False" SpacesIgnoreAroundVariableDeclaration="False" SpaceBeforeOpenSquareBracket="True" SpaceBetweenEmptySquareBrackets="False" SpaceWithinSquareBrackets="False" SpaceAfterColonInBaseTypeDeclaration="True" SpaceAfterComma="True" SpaceAfterDot="False" SpaceAfterSemicolonsInForStatement="True" SpaceBeforeColonInBaseTypeDeclaration="True" SpaceBeforeComma="False" SpaceBeforeDot="False" SpaceBeforeSemicolonsInForStatement="False" SpacingAroundBinaryOperator="Single" WrappingPreserveSingleLine="True" WrappingKeepStatementsOnSingleLine="True" PlaceSystemDirectiveFirst="True" scope="text/x-csharp">
|
||||
<inheritsSet />
|
||||
<inheritsScope />
|
||||
</CSharpFormattingPolicy>
|
||||
</Policies>
|
||||
</Properties>
|
||||
</MonoDevelop>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
@@ -1,144 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* CurlS#arp
|
||||
*
|
||||
* Copyright (c) 2013 Dr. Masroor Ehsan (masroore@gmail.com)
|
||||
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// This class wraps a linked list of strings used in <c>cURL</c>. Use it
|
||||
/// to build string lists where they're required, such as when calling
|
||||
/// <see cref="CurlEasy.SetOpt" /> with <see cref="CurlOption.Quote" />
|
||||
/// as the option.
|
||||
/// </summary>
|
||||
public class CurlSlist : IDisposable
|
||||
{
|
||||
#if !USE_LIBCURLSHIM
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
private class curl_slist
|
||||
{
|
||||
/// char*
|
||||
[MarshalAs(UnmanagedType.LPStr)] public string data;
|
||||
|
||||
/// curl_slist*
|
||||
public IntPtr next;
|
||||
}
|
||||
#endif
|
||||
private IntPtr _handle;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <exception cref="System.InvalidOperationException">
|
||||
/// This is thrown
|
||||
/// if <see cref="Curl" /> hasn't bee properly initialized.
|
||||
/// </exception>
|
||||
public CurlSlist()
|
||||
{
|
||||
Curl.EnsureCurl();
|
||||
_handle = IntPtr.Zero;
|
||||
}
|
||||
|
||||
public CurlSlist(IntPtr handle)
|
||||
{
|
||||
_handle = handle;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read-only copy of the strings stored in the SList
|
||||
/// </summary>
|
||||
public List<string> Strings
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_handle == IntPtr.Zero)
|
||||
return null;
|
||||
var strings = new List<string>();
|
||||
|
||||
#if !USE_LIBCURLSHIM
|
||||
var slist = new curl_slist();
|
||||
Marshal.PtrToStructure(_handle, slist);
|
||||
|
||||
while (true)
|
||||
{
|
||||
strings.Add(slist.data);
|
||||
if (slist.next != IntPtr.Zero)
|
||||
Marshal.PtrToStructure(slist.next, slist);
|
||||
else
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
return strings;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destructor
|
||||
/// </summary>
|
||||
~CurlSlist()
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Append a string to the list.
|
||||
/// </summary>
|
||||
/// <param name="str">The <c>string</c> to append.</param>
|
||||
public void Append(string str)
|
||||
{
|
||||
#if USE_LIBCURLSHIM
|
||||
_handle = NativeMethods.curl_shim_add_string_to_slist(_handle, str);
|
||||
#else
|
||||
_handle = NativeMethods.curl_slist_append(_handle, str);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Free all internal strings.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
GC.SuppressFinalize(this);
|
||||
Dispose(true);
|
||||
}
|
||||
|
||||
internal IntPtr Handle
|
||||
{
|
||||
get { return _handle; }
|
||||
}
|
||||
|
||||
private void Dispose(bool disposing)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (_handle != IntPtr.Zero)
|
||||
{
|
||||
#if USE_LIBCURLSHIM
|
||||
NativeMethods.curl_shim_free_slist(_handle);
|
||||
#else
|
||||
NativeMethods.curl_slist_free_all(_handle);
|
||||
#endif
|
||||
_handle = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,49 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* CurlS#arp
|
||||
*
|
||||
* Copyright (c) 2013 Dr. Masroor Ehsan (masroore@gmail.com)
|
||||
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
using System;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// An instance of this class is passed to the delegate
|
||||
/// <see cref="CurlSslContextCallback" />, if it's implemented.
|
||||
/// Within that delegate, the code will have to make native calls to
|
||||
/// the <c>OpenSSL</c> library with the value returned from the
|
||||
/// <see cref="CurlSslContext.Context" /> property cast to an
|
||||
/// <c>SSL_CTX</c> pointer.
|
||||
/// </summary>
|
||||
public sealed class CurlSslContext
|
||||
{
|
||||
private readonly IntPtr _pvContext;
|
||||
|
||||
internal CurlSslContext(IntPtr pvContext)
|
||||
{
|
||||
_pvContext = pvContext;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the underlying OpenSSL context.
|
||||
/// </summary>
|
||||
public IntPtr Context
|
||||
{
|
||||
get { return _pvContext; }
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,207 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* CurlS#arp
|
||||
*
|
||||
* Copyright (c) 2013 Dr. Masroor Ehsan (masroore@gmail.com)
|
||||
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// This class wraps a <c>curl_version_info_data</c> struct. An instance is
|
||||
/// obtained by calling <see cref="Curl.GetVersionInfo" />.
|
||||
/// </summary>
|
||||
public sealed class CurlVersionInfoData
|
||||
{
|
||||
private const int OFFSET_AGE = 0;
|
||||
private const int OFFSET_VERSION = 4;
|
||||
private const int OFFSET_VERSION_NUM = 8;
|
||||
private const int OFFSET_HOST = 12;
|
||||
private const int OFFSET_FEATURES = 16;
|
||||
private const int OFFSET_SSL_VERSION = 20;
|
||||
private const int OFFSET_SSL_VERSION_NUM = 24;
|
||||
private const int OFFSET_LIBZ_VERSION = 28;
|
||||
private const int OFFSET_PROTOCOLS = 32;
|
||||
private const int OFFSET_ARES_VERSION = 36;
|
||||
private const int OFFSET_ARES_VERSION_NUM = 40;
|
||||
private const int OFFSET_LIBIDN_VERSION = 44;
|
||||
|
||||
private readonly IntPtr m_pVersionInfoData;
|
||||
|
||||
internal CurlVersionInfoData(CurlVersion ver)
|
||||
{
|
||||
m_pVersionInfoData = NativeMethods.curl_version_info(ver);
|
||||
}
|
||||
#if USE_LIBCURLSHIM
|
||||
/// <summary>
|
||||
/// Age of this struct, depending on how recent the linked-in
|
||||
/// <c>libcurl</c> is, as a <see cref="CurlVersion" />.
|
||||
/// </summary>
|
||||
public CurlVersion Age
|
||||
{
|
||||
get { return (CurlVersion) NativeMethods.curl_shim_get_version_int_value(m_pVersionInfoData, OFFSET_AGE); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the internal cURL version, as a <c>string</c>.
|
||||
/// </summary>
|
||||
public string Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return Marshal.PtrToStringAnsi(
|
||||
NativeMethods.curl_shim_get_version_char_ptr(m_pVersionInfoData, OFFSET_VERSION));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the internal cURL version number, a A 24-bit number created
|
||||
/// like this: [8 bits major number] | [8 bits minor number] | [8
|
||||
/// bits patch number]. For example, Version 7.12.2 is <c>0x070C02</c>.
|
||||
/// </summary>
|
||||
public int VersionNum
|
||||
{
|
||||
get { return NativeMethods.curl_shim_get_version_int_value(m_pVersionInfoData, OFFSET_VERSION_NUM); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the host information on which the underlying cURL was built.
|
||||
/// </summary>
|
||||
public string Host
|
||||
{
|
||||
get
|
||||
{
|
||||
return
|
||||
Marshal.PtrToStringAnsi(NativeMethods.curl_shim_get_version_char_ptr(m_pVersionInfoData, OFFSET_HOST));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a bitmask of features, containing bits or'd from the
|
||||
/// <see cref="CurlVersionFeatureBitmask" /> enumeration.
|
||||
/// </summary>
|
||||
public int Features
|
||||
{
|
||||
get { return NativeMethods.curl_shim_get_version_int_value(m_pVersionInfoData, OFFSET_FEATURES); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the Ssl version, if it's linked in.
|
||||
/// </summary>
|
||||
public string SslVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return
|
||||
Marshal.PtrToStringAnsi(NativeMethods.curl_shim_get_version_char_ptr(m_pVersionInfoData,
|
||||
OFFSET_SSL_VERSION));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the Ssl version number, if Ssl is linked in.
|
||||
/// </summary>
|
||||
public int SSLVersionNum
|
||||
{
|
||||
get { return NativeMethods.curl_shim_get_version_int_value(m_pVersionInfoData, OFFSET_SSL_VERSION_NUM); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the libz version, if libz is linked in.
|
||||
/// </summary>
|
||||
public string LibZVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return
|
||||
Marshal.PtrToStringAnsi(NativeMethods.curl_shim_get_version_char_ptr(m_pVersionInfoData,
|
||||
OFFSET_LIBZ_VERSION));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the names of the supported protocols.
|
||||
/// </summary>
|
||||
public string[] Protocols
|
||||
{
|
||||
get
|
||||
{
|
||||
var nProts = NativeMethods.curl_shim_get_number_of_protocols(
|
||||
m_pVersionInfoData, OFFSET_PROTOCOLS);
|
||||
var aProts = new String[nProts];
|
||||
for (var i = 0; i < nProts; i++)
|
||||
{
|
||||
aProts[i] =
|
||||
Marshal.PtrToStringAnsi(NativeMethods.curl_shim_get_protocol_string(m_pVersionInfoData,
|
||||
OFFSET_PROTOCOLS, i));
|
||||
}
|
||||
return aProts;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the ARes version, if ARes is linked in.
|
||||
/// </summary>
|
||||
public string ARes
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Age > CurlVersion.First)
|
||||
{
|
||||
return
|
||||
Marshal.PtrToStringAnsi(NativeMethods.curl_shim_get_version_char_ptr(m_pVersionInfoData,
|
||||
OFFSET_ARES_VERSION));
|
||||
}
|
||||
return "n.a.";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the ARes version number, if ARes is linked in.
|
||||
/// </summary>
|
||||
public int AResNum
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Age > CurlVersion.First)
|
||||
{
|
||||
return NativeMethods.curl_shim_get_version_int_value(m_pVersionInfoData, OFFSET_ARES_VERSION_NUM);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the libidn version, if libidn is linked in.
|
||||
/// </summary>
|
||||
public string LibIdn
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Age > CurlVersion.Second)
|
||||
{
|
||||
return
|
||||
Marshal.PtrToStringAnsi(NativeMethods.curl_shim_get_version_char_ptr(m_pVersionInfoData,
|
||||
OFFSET_LIBIDN_VERSION));
|
||||
}
|
||||
return "n.a.";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
@@ -1,46 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains values used to specify the order in which cached connections
|
||||
/// are closed. One of these is passed as the
|
||||
/// <see cref="CurlOption.ClosePolicy" /> option in a call
|
||||
/// to <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlClosePolicy
|
||||
{
|
||||
/// <summary>
|
||||
/// No close policy. Never use this.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Close the oldest cached connections first.
|
||||
/// </summary>
|
||||
Oldest = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Close the least recently used connections first.
|
||||
/// </summary>
|
||||
LeastRecentlyUsed = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Close the connections with the least traffic first.
|
||||
/// </summary>
|
||||
LeastTraffic = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Close the slowest connections first.
|
||||
/// </summary>
|
||||
Slowest = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Currently unimplemented.
|
||||
/// </summary>
|
||||
Callback = 5,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 6
|
||||
};
|
||||
}
|
@@ -1,403 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Status code returned from <see cref="CurlEasy" /> functions.
|
||||
/// </summary>
|
||||
public enum CurlCode
|
||||
{
|
||||
/// <summary>
|
||||
/// All fine. Proceed as usual.
|
||||
/// </summary>
|
||||
Ok = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Aborted by callback. An internal callback returned "abort"
|
||||
/// to libcurl.
|
||||
/// </summary>
|
||||
AbortedByCallback = 42,
|
||||
|
||||
/// <summary>
|
||||
/// Internal error. A function was called in a bad order.
|
||||
/// </summary>
|
||||
BadCallingOrder = 44,
|
||||
|
||||
/// <summary>
|
||||
/// Unrecognized transfer encoding.
|
||||
/// </summary>
|
||||
BadContentEncoding = 61,
|
||||
|
||||
/// <summary>
|
||||
/// Attempting FTP resume beyond file size.
|
||||
/// </summary>
|
||||
BadDownloadResume = 36,
|
||||
|
||||
/// <summary>
|
||||
/// Internal error. A function was called with a bad parameter.
|
||||
/// </summary>
|
||||
BadFunctionArgument = 43,
|
||||
|
||||
/// <summary>
|
||||
/// Bad password entered. An error was signaled when the password was
|
||||
/// entered. This can also be the result of a "bad password" returned
|
||||
/// from a specified password callback.
|
||||
/// </summary>
|
||||
BadPasswordEntered = 46,
|
||||
|
||||
/// <summary>
|
||||
/// Failed to connect to host or proxy.
|
||||
/// </summary>
|
||||
CouldntConnect = 7,
|
||||
|
||||
/// <summary>
|
||||
/// Couldn't resolve host. The given remote host was not resolved.
|
||||
/// </summary>
|
||||
CouldntResolveHost = 6,
|
||||
|
||||
/// <summary>
|
||||
/// Couldn't resolve proxy. The given proxy host could not be resolved.
|
||||
/// </summary>
|
||||
CouldntResolveProxy = 5,
|
||||
|
||||
/// <summary>
|
||||
/// Very early initialization code failed. This is likely to be an
|
||||
/// internal error or problem.
|
||||
/// </summary>
|
||||
FailedInit = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Maximum file size exceeded.
|
||||
/// </summary>
|
||||
FilesizeExceeded = 63,
|
||||
|
||||
/// <summary>
|
||||
/// A file given with FILE:// couldn't be opened. Most likely
|
||||
/// because the file path doesn't identify an existing file. Did
|
||||
/// you check file permissions?
|
||||
/// </summary>
|
||||
FileCouldntReadFile = 37,
|
||||
|
||||
/// <summary>
|
||||
/// We were denied access when trying to login to an FTP server or
|
||||
/// when trying to change working directory to the one given in the URL.
|
||||
/// </summary>
|
||||
FtpAccessDenied = 9,
|
||||
|
||||
/// <summary>
|
||||
/// An internal failure to lookup the host used for the new
|
||||
/// connection.
|
||||
/// </summary>
|
||||
FtpCantGetHost = 15,
|
||||
|
||||
/// <summary>
|
||||
/// A bad return code on either PASV or EPSV was sent by the FTP
|
||||
/// server, preventing libcurl from being able to continue.
|
||||
/// </summary>
|
||||
FtpCantReconnect = 16,
|
||||
|
||||
/// <summary>
|
||||
/// The FTP SIZE command returned error. SIZE is not a kosher FTP
|
||||
/// command, it is an extension and not all servers support it. This
|
||||
/// is not a surprising error.
|
||||
/// </summary>
|
||||
FtpCouldntGetSize = 32,
|
||||
|
||||
/// <summary>
|
||||
/// This was either a weird reply to a 'RETR' command or a zero byte
|
||||
/// transfer complete.
|
||||
/// </summary>
|
||||
FtpCouldntRetrFile = 19,
|
||||
|
||||
/// <summary>
|
||||
/// libcurl failed to set ASCII transfer type (TYPE A).
|
||||
/// </summary>
|
||||
FtpCouldntSetAscii = 29,
|
||||
|
||||
/// <summary>
|
||||
/// Received an error when trying to set the transfer mode to binary.
|
||||
/// </summary>
|
||||
FtpCouldntSetBinary = 17,
|
||||
|
||||
/// <summary>
|
||||
/// FTP couldn't STOR file. The server denied the STOR operation.
|
||||
/// The error buffer usually contains the server's explanation to this.
|
||||
/// </summary>
|
||||
FtpCouldntStorFile = 25,
|
||||
|
||||
/// <summary>
|
||||
/// The FTP REST command returned error. This should never happen
|
||||
/// if the server is sane.
|
||||
/// </summary>
|
||||
FtpCouldntUseRest = 31,
|
||||
|
||||
/// <summary>
|
||||
/// The FTP PORT command returned error. This mostly happen when
|
||||
/// you haven't specified a good enough address for libcurl to use.
|
||||
/// See <see cref="CurlOption.FtpPort" />.
|
||||
/// </summary>
|
||||
FtpPortFailed = 30,
|
||||
|
||||
/// <summary>
|
||||
/// When sending custom "QUOTE" commands to the remote server, one
|
||||
/// of the commands returned an error code that was 400 or higher.
|
||||
/// </summary>
|
||||
FtpQuoteError = 21,
|
||||
|
||||
/// <summary>
|
||||
/// Requested FTP Ssl level failed.
|
||||
/// </summary>
|
||||
FtpSslFailed = 64,
|
||||
|
||||
/// <summary>
|
||||
/// The FTP server rejected access to the server after the password
|
||||
/// was sent to it. It might be because the username and/or the
|
||||
/// password were incorrect or just that the server is not allowing
|
||||
/// you access for the moment etc.
|
||||
/// </summary>
|
||||
FtpUserPasswordIncorrect = 10,
|
||||
|
||||
/// <summary>
|
||||
/// FTP servers return a 227-line as a response to a PASV command.
|
||||
/// If libcurl fails to parse that line, this return code is
|
||||
/// passed back.
|
||||
/// </summary>
|
||||
FtpWeird227Format = 14,
|
||||
|
||||
/// <summary>
|
||||
/// After having sent the FTP password to the server, libcurl expects
|
||||
/// a proper reply. This error code indicates that an unexpected code
|
||||
/// was returned.
|
||||
/// </summary>
|
||||
FtpWeirdPassReply = 11,
|
||||
|
||||
/// <summary>
|
||||
/// libcurl failed to get a sensible result back from the server as
|
||||
/// a response to either a PASV or a EPSV command. The server is flawed.
|
||||
/// </summary>
|
||||
FtpWeirdPasvReply = 13,
|
||||
|
||||
/// <summary>
|
||||
/// After connecting to an FTP server, libcurl expects to get a
|
||||
/// certain reply back. This error code implies that it got a strange
|
||||
/// or bad reply. The given remote server is probably not an
|
||||
/// OK FTP server.
|
||||
/// </summary>
|
||||
FtpWeirdServerReply = 8,
|
||||
|
||||
/// <summary>
|
||||
/// After having sent user name to the FTP server, libcurl expects a
|
||||
/// proper reply. This error code indicates that an unexpected code
|
||||
/// was returned.
|
||||
/// </summary>
|
||||
FtpWeirdUserReply = 12,
|
||||
|
||||
/// <summary>
|
||||
/// After a completed file transfer, the FTP server did not respond a
|
||||
/// proper "transfer successful" code.
|
||||
/// </summary>
|
||||
FtpWriteError = 20,
|
||||
|
||||
/// <summary>
|
||||
/// Function not found. A required LDAP function was not found.
|
||||
/// </summary>
|
||||
FunctionNotFound = 41,
|
||||
|
||||
/// <summary>
|
||||
/// Nothing was returned from the server, and under the circumstances,
|
||||
/// getting nothing is considered an error.
|
||||
/// </summary>
|
||||
GotNothing = 52,
|
||||
|
||||
/// <summary>
|
||||
/// This is an odd error that mainly occurs due to internal confusion.
|
||||
/// </summary>
|
||||
HttpPostError = 34,
|
||||
|
||||
/// <summary>
|
||||
/// The HTTP server does not support or accept range requests.
|
||||
/// </summary>
|
||||
HttpRangeError = 33,
|
||||
|
||||
/// <summary>
|
||||
/// This is returned if <see cref="CurlOption.FailOnError" />
|
||||
/// is set TRUE and the HTTP server returns an error code that
|
||||
/// is >= 400.
|
||||
/// </summary>
|
||||
HttpReturnedError = 22,
|
||||
|
||||
/// <summary>
|
||||
/// Interface error. A specified outgoing interface could not be
|
||||
/// used. Set which interface to use for outgoing connections'
|
||||
/// source IP address with <see cref="CurlOption.Interface" />.
|
||||
/// </summary>
|
||||
InterfaceFailed = 45,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker; do not use in client applications.
|
||||
/// </summary>
|
||||
Last = 67,
|
||||
|
||||
/// <summary>
|
||||
/// LDAP cannot bind. LDAP bind operation failed.
|
||||
/// </summary>
|
||||
LdapCannotBind = 38,
|
||||
|
||||
/// <summary>
|
||||
/// Invalid LDAP URL.
|
||||
/// </summary>
|
||||
LdapInvalidUrl = 62,
|
||||
|
||||
/// <summary>
|
||||
/// LDAP search failed.
|
||||
/// </summary>
|
||||
LdapSearchFailed = 39,
|
||||
|
||||
/// <summary>
|
||||
/// Library not found. The LDAP library was not found.
|
||||
/// </summary>
|
||||
LibraryNotFound = 40,
|
||||
|
||||
/// <summary>
|
||||
/// Malformat user. User name badly specified. *Not currently used*
|
||||
/// </summary>
|
||||
MalformatUser = 24,
|
||||
|
||||
/// <summary>
|
||||
/// This is not an error. This used to be another error code in an
|
||||
/// old libcurl version and is currently unused.
|
||||
/// </summary>
|
||||
Obsolete = 50,
|
||||
|
||||
/// <summary>
|
||||
/// Operation timeout. The specified time-out period was reached
|
||||
/// according to the conditions.
|
||||
/// </summary>
|
||||
OperationTimeouted = 28,
|
||||
|
||||
/// <summary>
|
||||
/// Out of memory. A memory allocation request failed. This is serious
|
||||
/// badness and things are severely messed up if this ever occurs.
|
||||
/// </summary>
|
||||
OutOfMemory = 27,
|
||||
|
||||
/// <summary>
|
||||
/// A file transfer was shorter or larger than expected. This
|
||||
/// happens when the server first reports an expected transfer size,
|
||||
/// and then delivers data that doesn't match the previously
|
||||
/// given size.
|
||||
/// </summary>
|
||||
PartialFile = 18,
|
||||
|
||||
/// <summary>
|
||||
/// There was a problem reading a local file or an error returned by
|
||||
/// the read callback.
|
||||
/// </summary>
|
||||
ReadError = 26,
|
||||
|
||||
/// <summary>
|
||||
/// Failure with receiving network data.
|
||||
/// </summary>
|
||||
RecvError = 56,
|
||||
|
||||
/// <summary>
|
||||
/// Failed sending network data.
|
||||
/// </summary>
|
||||
SendError = 55,
|
||||
|
||||
/// <summary>
|
||||
/// Sending the data requires a rewind that failed.
|
||||
/// </summary>
|
||||
SendFailRewind = 65,
|
||||
|
||||
/// <summary>
|
||||
/// CurlShare is in use.
|
||||
/// </summary>
|
||||
ShareInUse = 57,
|
||||
|
||||
/// <summary>
|
||||
/// Problem with the CA cert (path? access rights?)
|
||||
/// </summary>
|
||||
SslCaCert = 60,
|
||||
|
||||
/// <summary>
|
||||
/// There's a problem with the local client certificate.
|
||||
/// </summary>
|
||||
SslCertProblem = 58,
|
||||
|
||||
/// <summary>
|
||||
/// Couldn't use specified cipher.
|
||||
/// </summary>
|
||||
SslCipher = 59,
|
||||
|
||||
/// <summary>
|
||||
/// A problem occurred somewhere in the Ssl/TLS handshake. You really
|
||||
/// want to use the <see cref="CurlEasy.CurlDebugCallback" /> delegate and read
|
||||
/// the message there as it pinpoints the problem slightly more. It
|
||||
/// could be certificates (file formats, paths, permissions),
|
||||
/// passwords, and others.
|
||||
/// </summary>
|
||||
SslConnectError = 35,
|
||||
|
||||
/// <summary>
|
||||
/// Failed to initialize Ssl engine.
|
||||
/// </summary>
|
||||
SslEngineInitFailed = 66,
|
||||
|
||||
/// <summary>
|
||||
/// The specified crypto engine wasn't found.
|
||||
/// </summary>
|
||||
SslEngineNotFound = 53,
|
||||
|
||||
/// <summary>
|
||||
/// Failed setting the selected Ssl crypto engine as default!
|
||||
/// </summary>
|
||||
SslEngineSetFailed = 54,
|
||||
|
||||
/// <summary>
|
||||
/// The remote server's Ssl certificate was deemed not OK.
|
||||
/// </summary>
|
||||
SslPeerCertificate = 51,
|
||||
|
||||
/// <summary>
|
||||
/// A telnet option string was improperly formatted.
|
||||
/// </summary>
|
||||
TelnetOptionSyntax = 49,
|
||||
|
||||
/// <summary>
|
||||
/// Too many redirects. When following redirects, libcurl hit the
|
||||
/// maximum amount. Set your limit with
|
||||
/// <see cref="CurlOption.MaxRedirs" />.
|
||||
/// </summary>
|
||||
TooManyRedirects = 47,
|
||||
|
||||
/// <summary>
|
||||
/// An option set with <see cref="CurlOption.TelnetOptions" />
|
||||
/// was not recognized/known. Refer to the appropriate documentation.
|
||||
/// </summary>
|
||||
UnknownTelnetOption = 48,
|
||||
|
||||
/// <summary>
|
||||
/// The URL you passed to libcurl used a protocol that this libcurl
|
||||
/// does not support. The support might be a compile-time option that
|
||||
/// wasn't used, it can be a misspelled protocol string or just a
|
||||
/// protocol libcurl has no code for.
|
||||
/// </summary>
|
||||
UnsupportedProtocol = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The URL was not properly formatted.
|
||||
/// </summary>
|
||||
UrlMalformat = 3,
|
||||
|
||||
/// <summary>
|
||||
/// URL user malformatted. The user-part of the URL syntax was not
|
||||
/// correct.
|
||||
/// </summary>
|
||||
UrlMalformatUser = 4,
|
||||
|
||||
/// <summary>
|
||||
/// An error occurred when writing received data to a local file,
|
||||
/// or an error was returned to libcurl from a write callback.
|
||||
/// </summary>
|
||||
WriteError = 23,
|
||||
};
|
||||
}
|
@@ -1,76 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* Project: libcurl.NET
|
||||
*
|
||||
* Copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
* $Id: Enums.cs,v 1.1 2005/02/17 22:47:25 jeffreyphillips Exp $
|
||||
**************************************************************************/
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// One of these is returned by <see cref="CurlHttpMultiPartForm.AddSection" />.
|
||||
/// </summary>
|
||||
public enum CurlFormCode
|
||||
{
|
||||
/// <summary>
|
||||
/// The section was added properly.
|
||||
/// </summary>
|
||||
Ok = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Out-of-memory when adding the section.
|
||||
/// </summary>
|
||||
Memory = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Invalid attempt to add the same option more than once to a
|
||||
/// section.
|
||||
/// </summary>
|
||||
OptionTwice = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Invalid attempt to pass a <c>null</c> string or byte array in
|
||||
/// one of the arguments.
|
||||
/// </summary>
|
||||
Null = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Invalid attempt to pass an unrecognized option in one of the
|
||||
/// arguments.
|
||||
/// </summary>
|
||||
UnknownOption = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Incomplete argument lists.
|
||||
/// </summary>
|
||||
Incomplete = 5,
|
||||
|
||||
/// <summary>
|
||||
/// Invalid attempt to provide a nested <c>Array</c>.
|
||||
/// </summary>
|
||||
IllegalArray = 6,
|
||||
|
||||
/// <summary>
|
||||
/// This will not be returned so long as HTTP is enabled, which
|
||||
/// it always is in libcurl.NET.
|
||||
/// </summary>
|
||||
Disabled = 7,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 8
|
||||
};
|
||||
}
|
@@ -1,142 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// These are options available to build a multi-part form section
|
||||
/// in a call to <see cref="CurlHttpMultiPartForm.AddSection" />
|
||||
/// </summary>
|
||||
public enum CurlFormOption
|
||||
{
|
||||
/// <summary>
|
||||
/// Another possibility to send options to
|
||||
/// <see cref="CurlHttpMultiPartForm.AddSection" /> is this option, that
|
||||
/// passes a <see cref="CurlForms" /> array reference as its value.
|
||||
/// Each <see cref="CurlForms" /> array element has a
|
||||
/// <see cref="CurlFormOption" /> and a <c>string</c>. All available
|
||||
/// options can be used in an array, except the <c>Array</c>
|
||||
/// option itself! The last argument in such an array must always be
|
||||
/// <c>End</c>.
|
||||
/// </summary>
|
||||
Array = 8,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a <c>string</c>, tells libcurl that a buffer is to be
|
||||
/// used to upload data instead of using a file.
|
||||
/// </summary>
|
||||
Buffer = 11,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by an <c>int</c> with the size of the
|
||||
/// <c>BufferPtr</c> byte array, tells libcurl the length of
|
||||
/// the data to upload.
|
||||
/// </summary>
|
||||
BufferLength = 13,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a <c>byte[]</c> array, tells libcurl the address of
|
||||
/// the buffer containing data to upload (as indicated with
|
||||
/// <c>Buffer</c>). You must also use
|
||||
/// <c>BufferLength</c> to set the length of the buffer area.
|
||||
/// </summary>
|
||||
BufferPtr = 12,
|
||||
|
||||
/// <summary>
|
||||
/// Specifies extra headers for the form POST section. This takes an
|
||||
/// <see cref="CurlSlist" /> prepared in the usual way using
|
||||
/// <see cref="CurlSlist.Append" /> and appends the list of headers to
|
||||
/// those libcurl automatically generates.
|
||||
/// </summary>
|
||||
ContentHeader = 15,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by an <c>int</c> setting the length of the contents.
|
||||
/// </summary>
|
||||
ContentsLength = 6,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a <c>string</c> with a content-type will make cURL
|
||||
/// use this given content-type for this file upload part, possibly
|
||||
/// instead of an internally chosen one.
|
||||
/// </summary>
|
||||
ContentType = 14,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a <c>string</c> is used for the contents of this part, the
|
||||
/// actual data to send away. If you'd like it to contain zero bytes,
|
||||
/// you need to set the length of the name with
|
||||
/// <c>ContentsLength</c>.
|
||||
/// </summary>
|
||||
CopyContents = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a <c>string</c> used to set the name of this part.
|
||||
/// If you'd like it to contain zero bytes, you need to set the
|
||||
/// length of the name with <c>NameLength</c>.
|
||||
/// </summary>
|
||||
CopyName = 1,
|
||||
|
||||
/// <summary>
|
||||
/// This should be the last argument to a call to
|
||||
/// <see cref="CurlHttpMultiPartForm.AddSection" />.
|
||||
/// </summary>
|
||||
End = 17,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a file name, makes this part a file upload part. It
|
||||
/// sets the file name field to the actual file name used here,
|
||||
/// it gets the contents of the file and passes as data and sets the
|
||||
/// content-type if the given file match one of the new internally
|
||||
/// known file extension. For <c>File</c> the user may send
|
||||
/// one or more files in one part by providing multiple <c>File</c>
|
||||
/// arguments each followed by the filename (and each <c>File</c>
|
||||
/// is allowed to have a <c>ContentType</c>).
|
||||
/// </summary>
|
||||
File = 10,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a file name, and does the file read: the contents
|
||||
/// will be used in as data in this part.
|
||||
/// </summary>
|
||||
FileContent = 7,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a <c>string</c> file name, will make libcurl use the
|
||||
/// given name in the file upload part, instead of the actual file
|
||||
/// name given to <c>File</c>.
|
||||
/// </summary>
|
||||
Filename = 16,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by an <c>int</c> setting the length of the name.
|
||||
/// </summary>
|
||||
NameLength = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Not used.
|
||||
/// </summary>
|
||||
Nothing = 0,
|
||||
|
||||
/// <summary>
|
||||
/// No longer used.
|
||||
/// </summary>
|
||||
Obsolete = 9,
|
||||
|
||||
/// <summary>
|
||||
/// No longer used.
|
||||
/// </summary>
|
||||
Obsolete2 = 18,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a <c>byte[]</c> used for the contents of this part.
|
||||
/// If you'd like it to contain zero bytes, you need to set the
|
||||
/// length of the name with <c>ContentsLength</c>.
|
||||
/// </summary>
|
||||
PtrContents = 5,
|
||||
|
||||
/// <summary>
|
||||
/// Followed by a <c>byte[]</c> used for the name of this part.
|
||||
/// If you'd like it to contain zero bytes, you need to set the
|
||||
/// length of the name with <c>NameLength</c>.
|
||||
/// </summary>
|
||||
PtrName = 2
|
||||
};
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// This enumeration contains values used to specify the FTP Ssl
|
||||
/// authorization level using the
|
||||
/// <see cref="CurlOption.FtpSslAuth" /> option when calling
|
||||
/// <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlFtpAuth
|
||||
{
|
||||
/// <summary>
|
||||
/// Let <c>libcurl</c> decide on the authorization scheme.
|
||||
/// </summary>
|
||||
Default = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Use "AUTH Ssl".
|
||||
/// </summary>
|
||||
SSL = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Use "AUTH TLS".
|
||||
/// </summary>
|
||||
TLS = 2,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker. Do not use in a client application.
|
||||
/// </summary>
|
||||
Last = 3
|
||||
};
|
||||
}
|
@@ -1,37 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// This enumeration contains values used to specify the FTP Ssl level
|
||||
/// using the <see cref="CurlOption.FtpSsl" /> option when calling
|
||||
/// <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlFtpSsl
|
||||
{
|
||||
/// <summary>
|
||||
/// Don't attempt to use Ssl.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Try using Ssl, proceed as normal otherwise.
|
||||
/// </summary>
|
||||
Try = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Require Ssl for the control connection or fail with
|
||||
/// <see cref="CurlCode.FtpSslFailed" />.
|
||||
/// </summary>
|
||||
Control = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Require Ssl for all communication or fail with
|
||||
/// <see cref="CurlCode.FtpSslFailed" />.
|
||||
/// </summary>
|
||||
All = 3,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker. Do not use in a client application.
|
||||
/// </summary>
|
||||
Last = 4
|
||||
};
|
||||
}
|
@@ -1,65 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// This enumeration contains values used to specify the HTTP authentication
|
||||
/// when using the <see cref="CurlOption.HttpAuth" /> option when
|
||||
/// calling <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlHttpAuth
|
||||
{
|
||||
/// <summary>
|
||||
/// No authentication.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// HTTP Basic authentication. This is the default choice, and the
|
||||
/// only method that is in wide-spread use and supported virtually
|
||||
/// everywhere. This is sending the user name and password over the
|
||||
/// network in plain text, easily captured by others.
|
||||
/// </summary>
|
||||
Basic = 1,
|
||||
|
||||
/// <summary>
|
||||
/// HTTP Digest authentication. Digest authentication is defined
|
||||
/// in RFC2617 and is a more secure way to do authentication over
|
||||
/// public networks than the regular old-fashioned Basic method.
|
||||
/// </summary>
|
||||
Digest = 2,
|
||||
|
||||
/// <summary>
|
||||
/// HTTP GSS-Negotiate authentication. The GSS-Negotiate (also known
|
||||
/// as plain "Negotiate") method was designed by Microsoft and is
|
||||
/// used in their web applications. It is primarily meant as a
|
||||
/// support for Kerberos5 authentication but may be also used along
|
||||
/// with another authentication methods. For more information see IETF
|
||||
/// draft draft-brezak-spnego-http-04.txt.
|
||||
/// <note>
|
||||
/// You need to use a version of libcurl.NET built with a suitable
|
||||
/// GSS-API library for this to work. This is not currently standard.
|
||||
/// </note>
|
||||
/// </summary>
|
||||
GssNegotiate = 4,
|
||||
|
||||
/// <summary>
|
||||
/// HTTP Ntlm authentication. A proprietary protocol invented and
|
||||
/// used by Microsoft. It uses a challenge-response and hash concept
|
||||
/// similar to Digest, to prevent the password from being eavesdropped.
|
||||
/// </summary>
|
||||
Ntlm = 8,
|
||||
|
||||
/// <summary>
|
||||
/// This is a convenience macro that sets all bits and thus makes
|
||||
/// libcurl pick any it finds suitable. libcurl will automatically
|
||||
/// select the one it finds most secure.
|
||||
/// </summary>
|
||||
Any = 15, // ~0
|
||||
|
||||
/// <summary>
|
||||
/// This is a convenience macro that sets all bits except Basic
|
||||
/// and thus makes libcurl pick any it finds suitable. libcurl
|
||||
/// will automatically select the one it finds most secure.
|
||||
/// </summary>
|
||||
AnySafe = 14 // ~Basic
|
||||
};
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains values used to specify the HTTP version level when using
|
||||
/// the <see cref="CurlOption.HttpVersion" /> option in a call
|
||||
/// to <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlHttpVersion
|
||||
{
|
||||
/// <summary>
|
||||
/// We don't care about what version the library uses. libcurl will
|
||||
/// use whatever it thinks fit.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Enforce HTTP 1.0 requests.
|
||||
/// </summary>
|
||||
Http1_0 = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Enforce HTTP 1.1 requests.
|
||||
/// </summary>
|
||||
Http1_1 = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Last entry in enumeration; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 3
|
||||
};
|
||||
}
|
@@ -1,222 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// This enumeration is used to extract information associated with an
|
||||
/// <see cref="CurlEasy" /> transfer. Specifically, a member of this
|
||||
/// enumeration is passed as the first argument to
|
||||
/// CurlEasy.GetInfo specifying the item to retrieve in the
|
||||
/// second argument, which is a reference to an <c>int</c>, a
|
||||
/// <c>double</c>, a <c>string</c>, a <c>DateTime</c> or an <c>object</c>.
|
||||
/// </summary>
|
||||
public enum CurlInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The second argument receives the elapsed time, as a <c>double</c>,
|
||||
/// in seconds, from the start until the connect to the remote host
|
||||
/// (or proxy) was completed.
|
||||
/// </summary>
|
||||
ConnectTime = 0x300005,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as a <c>double</c>, the content-length
|
||||
/// of the download. This is the value read from the Content-Length: field.
|
||||
/// </summary>
|
||||
ContentLengthDownload = 0x30000F,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as a <c>double</c>, the specified size
|
||||
/// of the upload.
|
||||
/// </summary>
|
||||
ContentLengthUpload = 0x300010,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as a <c>string</c>, the content-type of
|
||||
/// the downloaded object. This is the value read from the Content-Type:
|
||||
/// field. If you get <c>null</c>, it means that the server didn't
|
||||
/// send a valid Content-Type header or that the protocol used
|
||||
/// doesn't support this.
|
||||
/// </summary>
|
||||
ContentType = 0x100012,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as a <c>string</c>, the last
|
||||
/// used effective URL.
|
||||
/// </summary>
|
||||
EffectiveUrl = 0x100001,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as a <c>long</c>, the remote time
|
||||
/// of the retrieved document. You should construct a <c>DateTime</c>
|
||||
/// from this value, as shown in the <c>InfoDemo</c> sample. If you
|
||||
/// get a date in the distant
|
||||
/// past, it can be because of many reasons (unknown, the server
|
||||
/// hides it or the server doesn't support the command that tells
|
||||
/// document time etc) and the time of the document is unknown. Note
|
||||
/// that you must tell the server to collect this information before
|
||||
/// the transfer is made, by using the
|
||||
/// <see cref="CurlOption.Filetime" /> option to
|
||||
/// <see cref="CurlEasy.SetOpt" />. (Added in 7.5)
|
||||
/// </summary>
|
||||
Filetime = 0x20000E,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives an <c>int</c> specifying the total size
|
||||
/// of all the headers received.
|
||||
/// </summary>
|
||||
HeaderSize = 0x20000B,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as an <c>int</c>, a bitmask indicating
|
||||
/// the authentication method(s) available. The meaning of the bits is
|
||||
/// explained in the documentation of
|
||||
/// <see cref="CurlOption.HttpAuth" />. (Added in 7.10.8)
|
||||
/// </summary>
|
||||
HttpAuthAvail = 0x200017,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives an <c>int</c> indicating the numeric
|
||||
/// connect code for the HTTP request.
|
||||
/// </summary>
|
||||
HttpConnectCode = 0x200016,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker; do not use in client applications.
|
||||
/// </summary>
|
||||
LastOne = 0x1C,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as a <c>double</c>, the time, in
|
||||
/// seconds it took from the start until the name resolving was
|
||||
/// completed.
|
||||
/// </summary>
|
||||
NameLookupTime = 0x300004,
|
||||
|
||||
/// <summary>
|
||||
/// Never used.
|
||||
/// </summary>
|
||||
None = 0x0,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives an <c>int</c> indicating the
|
||||
/// number of current connections. (Added in 7.13.0)
|
||||
/// </summary>
|
||||
NumConnects = 0x20001A,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives an <c>int</c> indicating the operating
|
||||
/// system error number: <c>_errro</c> or <c>GetLastError()</c>,
|
||||
/// depending on the platform. (Added in 7.12.2)
|
||||
/// </summary>
|
||||
OsErrno = 0x200019,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as a <c>double</c>, the time, in
|
||||
/// seconds, it took from the start until the file transfer is just about
|
||||
/// to begin. This includes all pre-transfer commands and negotiations
|
||||
/// that are specific to the particular protocol(s) involved.
|
||||
/// </summary>
|
||||
PreTransferTime = 0x300006,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives a reference to the private data
|
||||
/// associated with the <see cref="CurlEasy" /> object (set with the
|
||||
/// <see cref="CurlOption.Private" /> option to
|
||||
/// <see cref="CurlEasy.SetOpt" />. (Added in 7.10.3)
|
||||
/// </summary>
|
||||
Private = 0x100015,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as an <c>int</c>, a bitmask
|
||||
/// indicating the authentication method(s) available for your
|
||||
/// proxy authentication. This will be a bitmask of
|
||||
/// <see cref="CurlHttpAuth" /> enumeration constants.
|
||||
/// (Added in 7.10.8)
|
||||
/// </summary>
|
||||
ProxyAuthAvail = 0x200018,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives an <c>int</c> indicating the total
|
||||
/// number of redirections that were actually followed. (Added in 7.9.7)
|
||||
/// </summary>
|
||||
RedirectCount = 0x200014,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives, as a <c>double</c>, the total time, in
|
||||
/// seconds, for all redirection steps include name lookup, connect,
|
||||
/// pretransfer and transfer before final transaction was started.
|
||||
/// <c>RedirectTime</c> contains the complete execution
|
||||
/// time for multiple redirections. (Added in 7.9.7)
|
||||
/// </summary>
|
||||
RedirectTime = 0x300013,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives an <c>int</c> containing the total size
|
||||
/// of the issued requests. This is so far only for HTTP requests. Note
|
||||
/// that this may be more than one request if
|
||||
/// <see cref="CurlOption.FollowLocation" /> is <c>true</c>.
|
||||
/// </summary>
|
||||
RequestSize = 0x20000C,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives an <c>int</c> with the last received HTTP
|
||||
/// or FTP code. This option was known as <c>CURLINFO_HTTP_CODE</c> in
|
||||
/// libcurl 7.10.7 and earlier.
|
||||
/// </summary>
|
||||
ResponseCode = 0x200002,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives a <c>double</c> with the total amount of
|
||||
/// bytes that were downloaded. The amount is only for the latest transfer
|
||||
/// and will be reset again for each new transfer.
|
||||
/// </summary>
|
||||
SizeDownload = 0x300008,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives a <c>double</c> with the total amount
|
||||
/// of bytes that were uploaded.
|
||||
/// </summary>
|
||||
SizeUpload = 0x300007,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives a <c>double</c> with the average
|
||||
/// download speed that cURL measured for the complete download.
|
||||
/// </summary>
|
||||
SpeedDownload = 0x300009,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives a <c>double</c> with the average
|
||||
/// upload speed that libcurl measured for the complete upload.
|
||||
/// </summary>
|
||||
SpeedUpload = 0x30000A,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives an <see cref="CurlSlist" /> containing
|
||||
/// the names of the available Ssl engines.
|
||||
/// </summary>
|
||||
SslEngines = 0x40001B,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives an <c>int</c> with the result of
|
||||
/// the certificate verification that was requested (using the
|
||||
/// <see cref="CurlOption.SslVerifyPeer" /> option in
|
||||
/// <see cref="CurlEasy.SetOpt" />.
|
||||
/// </summary>
|
||||
SslVerifyResult = 0x20000D,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives a <c>double</c> specifying the time,
|
||||
/// in seconds, from the start until the first byte is just about to be
|
||||
/// transferred. This includes <c>PreTransferTime</c> and
|
||||
/// also the time the server needs to calculate the result.
|
||||
/// </summary>
|
||||
StartTransferTime = 0x300011,
|
||||
|
||||
/// <summary>
|
||||
/// The second argument receives a <c>double</c> indicating the total transaction
|
||||
/// time in seconds for the previous transfer. This time does not include
|
||||
/// the connect time, so if you want the complete operation time,
|
||||
/// you should add the <c>ConnectTime</c>.
|
||||
/// </summary>
|
||||
TotalTime = 0x300003,
|
||||
};
|
||||
}
|
@@ -1,50 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// A member of this enumeration is passed as the first parameter to the
|
||||
/// <see cref="CurlEasy.CurlDebugCallback" /> delegate to which libcurl passes
|
||||
/// debug messages.
|
||||
/// </summary>
|
||||
public enum CurlInfoType
|
||||
{
|
||||
/// <summary>
|
||||
/// The data is informational text.
|
||||
/// </summary>
|
||||
Text = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The data is header (or header-like) data received from the peer.
|
||||
/// </summary>
|
||||
HeaderIn = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The data is header (or header-like) data sent to the peer.
|
||||
/// </summary>
|
||||
HeaderOut = 2,
|
||||
|
||||
/// <summary>
|
||||
/// The data is protocol data received from the peer.
|
||||
/// </summary>
|
||||
DataIn = 3,
|
||||
|
||||
/// <summary>
|
||||
/// The data is protocol data sent to the peer.
|
||||
/// </summary>
|
||||
DataOut = 4,
|
||||
|
||||
/// <summary>
|
||||
/// The data is Ssl-related data sent to the peer.
|
||||
/// </summary>
|
||||
SslDataIn = 5,
|
||||
|
||||
/// <summary>
|
||||
/// The data is Ssl-related data received from the peer.
|
||||
/// </summary>
|
||||
SslDataOut = 6,
|
||||
|
||||
/// <summary>
|
||||
/// End of enumeration marker, don't use in a client application.
|
||||
/// </summary>
|
||||
End = 7
|
||||
};
|
||||
}
|
@@ -1,34 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains values used to initialize libcurl internally. One of
|
||||
/// these is passed in the call to <see cref="Curl.GlobalInit" />.
|
||||
/// </summary>
|
||||
public enum CurlInitFlag
|
||||
{
|
||||
/// <summary>
|
||||
/// Initialise nothing extra. This sets no bit.
|
||||
/// </summary>
|
||||
Nothing = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Initialize Ssl.
|
||||
/// </summary>
|
||||
Ssl = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the Win32 socket libraries.
|
||||
/// </summary>
|
||||
Win32 = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Initialize everything possible. This sets all known bits.
|
||||
/// </summary>
|
||||
All = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Equivalent to <c>All</c>.
|
||||
/// </summary>
|
||||
Default = All
|
||||
};
|
||||
}
|
@@ -1,27 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Your handler for the <see cref="CurlEasy.CurlIoctlCallback" />
|
||||
/// delegate is passed one of these values as its first parameter.
|
||||
/// Right now, the only supported value is
|
||||
/// <code>RestartRead</code>.
|
||||
/// </summary>
|
||||
public enum CurlIoCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// No IOCTL operation; we should never see this.
|
||||
/// </summary>
|
||||
Nop = 0,
|
||||
|
||||
/// <summary>
|
||||
/// When this is sent, your callback may need to, for example,
|
||||
/// rewind a local file that is being sent via FTP.
|
||||
/// </summary>
|
||||
RestartRead = 1,
|
||||
|
||||
/// <summary>
|
||||
/// End of enumeration marker, don't use in a client application.
|
||||
/// </summary>
|
||||
Last = 2
|
||||
}
|
||||
}
|
@@ -1,30 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Your handler for the <see cref="CurlEasy.CurlIoctlCallback" /> delegate
|
||||
/// should return a member of this enumeration.
|
||||
/// </summary>
|
||||
public enum CurlIoError
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicate that the callback processed everything okay.
|
||||
/// </summary>
|
||||
Ok = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Unknown command sent to callback. Right now, only
|
||||
/// <code>RestartRead</code> is supported.
|
||||
/// </summary>
|
||||
UnknownCommand = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Indicate to libcurl that a restart failed.
|
||||
/// </summary>
|
||||
FailRestart = 2,
|
||||
|
||||
/// <summary>
|
||||
/// End of enumeration marker, don't use in a client application.
|
||||
/// </summary>
|
||||
Last = 3
|
||||
}
|
||||
}
|
@@ -1,26 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// This enumeration contains values used to specify the IP resolution
|
||||
/// method when using the <see cref="CurlOption.IpResolve" />
|
||||
/// option in a call to <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlIpResolve
|
||||
{
|
||||
/// <summary>
|
||||
/// Default, resolves addresses to all IP versions that your system
|
||||
/// allows.
|
||||
/// </summary>
|
||||
Whatever = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Resolve to ipv4 addresses.
|
||||
/// </summary>
|
||||
V4 = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Resolve to ipv6 addresses.
|
||||
/// </summary>
|
||||
V6 = 2
|
||||
};
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Values containing the type of shared access requested when libcurl
|
||||
/// calls the <see cref="CurlShare.CurlShareLockCallback" /> delegate.
|
||||
/// </summary>
|
||||
public enum CurlLockAccess
|
||||
{
|
||||
/// <summary>
|
||||
/// Unspecified action; the delegate should never receive this.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The delegate receives this call when libcurl is requesting
|
||||
/// read access to the shared resource.
|
||||
/// </summary>
|
||||
Shared = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The delegate receives this call when libcurl is requesting
|
||||
/// write access to the shared resource.
|
||||
/// </summary>
|
||||
Single = 2,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 3
|
||||
};
|
||||
}
|
@@ -1,48 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Members of this enumeration should be passed to
|
||||
/// <see cref="CurlShare.SetOpt" /> when it is called with the
|
||||
/// <c>CurlShare</c> or <c>Unshare</c> options
|
||||
/// provided in the <see cref="CurlShareOption" /> enumeration.
|
||||
/// </summary>
|
||||
public enum CurlLockData
|
||||
{
|
||||
/// <summary>
|
||||
/// Not used.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Used internally by libcurl.
|
||||
/// </summary>
|
||||
Share = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Cookie data will be shared across the <see cref="CurlEasy" /> objects
|
||||
/// using this shared object.
|
||||
/// </summary>
|
||||
Cookie = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Cached Dns hosts will be shared across the <see cref="CurlEasy" />
|
||||
/// objects using this shared object.
|
||||
/// </summary>
|
||||
Dns = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Not supported yet.
|
||||
/// </summary>
|
||||
SslSession = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Not supported yet.
|
||||
/// </summary>
|
||||
Connect = 5,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 6
|
||||
};
|
||||
}
|
@@ -1,25 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// The status code associated with an <see cref="CurlEasy" /> object in a
|
||||
/// <see cref="CurlMulti" /> operation. One of these is returned in response
|
||||
/// to reading the <see cref="CurlMultiInfo.Msg" /> property.
|
||||
/// </summary>
|
||||
public enum CurlMessage
|
||||
{
|
||||
/// <summary>
|
||||
/// First entry in the enumeration, not used.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The associated <see cref="CurlEasy" /> object completed.
|
||||
/// </summary>
|
||||
Done = 1,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker, not used.
|
||||
/// </summary>
|
||||
Last = 2
|
||||
};
|
||||
}
|
@@ -1,46 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains return codes for many of the functions in the
|
||||
/// <see cref="CurlMulti" /> class.
|
||||
/// </summary>
|
||||
public enum CurlMultiCode
|
||||
{
|
||||
/// <summary>
|
||||
/// You should call <see cref="CurlMulti.Perform" /> again before calling
|
||||
/// <see cref="CurlMulti.Select" />.
|
||||
/// </summary>
|
||||
CallMultiPerform = -1,
|
||||
|
||||
/// <summary>
|
||||
/// The function succeded.
|
||||
/// </summary>
|
||||
Ok = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The internal <see cref="CurlMulti" /> is bad.
|
||||
/// </summary>
|
||||
BadHandle = 1,
|
||||
|
||||
/// <summary>
|
||||
/// One of the <see cref="CurlEasy" /> handles associated with the
|
||||
/// <see cref="CurlMulti" /> object is bad.
|
||||
/// </summary>
|
||||
BadEasyHandle = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Out of memory. This is a severe problem.
|
||||
/// </summary>
|
||||
OutOfMemory = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Internal error deep within the libcurl library.
|
||||
/// </summary>
|
||||
InternalError = 4,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker, not used.
|
||||
/// </summary>
|
||||
Last = 5
|
||||
};
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains values used to specify the preference of libcurl between
|
||||
/// using user names and passwords from your ~/.netrc file, relative to
|
||||
/// user names and passwords in the URL supplied with
|
||||
/// <see cref="CurlOption.Url" />. This is passed when using
|
||||
/// the <see cref="CurlOption.Netrc" /> option in a call
|
||||
/// to <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlNetrcOption
|
||||
{
|
||||
/// <summary>
|
||||
/// The library will ignore the file and use only the information
|
||||
/// in the URL. This is the default.
|
||||
/// </summary>
|
||||
Ignored = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The use of your ~/.netrc file is optional, and information in the
|
||||
/// URL is to be preferred. The file will be scanned with the host
|
||||
/// and user name (to find the password only) or with the host only,
|
||||
/// to find the first user name and password after that machine,
|
||||
/// which ever information is not specified in the URL.
|
||||
/// <para>
|
||||
/// Undefined values of the option will have this effect.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
Optional = 1,
|
||||
|
||||
/// <summary>
|
||||
/// This value tells the library that use of the file is required,
|
||||
/// to ignore the information in the URL, and to search the file
|
||||
/// with the host only.
|
||||
/// </summary>
|
||||
Required = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Last entry in enumeration; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 3
|
||||
};
|
||||
}
|
@@ -1,27 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// This enumeration contains values used to specify the proxy type when
|
||||
/// using the <see cref="CurlOption.Proxy" /> option when calling
|
||||
/// <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlProxyType
|
||||
{
|
||||
/// <summary>
|
||||
/// Ordinary HTTP proxy.
|
||||
/// </summary>
|
||||
Http = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Use if the proxy supports SOCKS4 user authentication. If you're
|
||||
/// unfamiliar with this, consult your network administrator.
|
||||
/// </summary>
|
||||
Socks4 = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Use if the proxy supports SOCKS5 user authentication. If you're
|
||||
/// unfamiliar with this, consult your network administrator.
|
||||
/// </summary>
|
||||
Socks5 = 5
|
||||
};
|
||||
}
|
@@ -1,40 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains return codes from many of the functions in the
|
||||
/// <see cref="CurlShare" /> class.
|
||||
/// </summary>
|
||||
public enum CurlShareCode
|
||||
{
|
||||
/// <summary>
|
||||
/// The function succeeded.
|
||||
/// </summary>
|
||||
Ok = 0,
|
||||
|
||||
/// <summary>
|
||||
/// A bad option was passed to <see cref="CurlShare.SetOpt" />.
|
||||
/// </summary>
|
||||
BadOption = 1,
|
||||
|
||||
/// <summary>
|
||||
/// An attempt was made to pass an option to
|
||||
/// <see cref="CurlShare.SetOpt" /> while the CurlShare object is in use.
|
||||
/// </summary>
|
||||
InUse = 2,
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="CurlShare" /> object's internal handle is invalid.
|
||||
/// </summary>
|
||||
Invalid = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Out of memory. This is a severe problem.
|
||||
/// </summary>
|
||||
NoMem = 4,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 5
|
||||
};
|
||||
}
|
@@ -1,53 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// A member of this enumeration is passed to the function
|
||||
/// <see cref="CurlShare.SetOpt" /> to configure a <see cref="CurlShare" />
|
||||
/// transfer.
|
||||
/// </summary>
|
||||
public enum CurlShareOption
|
||||
{
|
||||
/// <summary>
|
||||
/// Start-of-enumeration; do not use in application code.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The parameter, which should be a member of the
|
||||
/// <see cref="CurlLockData" /> enumeration, specifies a type of
|
||||
/// data that should be shared.
|
||||
/// </summary>
|
||||
Share = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The parameter, which should be a member of the
|
||||
/// <see cref="CurlLockData" /> enumeration, specifies a type of
|
||||
/// data that should be unshared.
|
||||
/// </summary>
|
||||
Unshare = 2,
|
||||
|
||||
/// <summary>
|
||||
/// The parameter should be a reference to a
|
||||
/// <see cref="CurlShare.CurlShareLockCallback" /> delegate.
|
||||
/// </summary>
|
||||
LockFunction = 3,
|
||||
|
||||
/// <summary>
|
||||
/// The parameter should be a reference to a
|
||||
/// <see cref="CurlShare.CurlShareUnlockCallback" /> delegate.
|
||||
/// </summary>
|
||||
UnlockFunction = 4,
|
||||
|
||||
/// <summary>
|
||||
/// The parameter allows you to specify an object reference that
|
||||
/// will passed to the <see cref="CurlShare.CurlShareLockCallback" /> delegate and
|
||||
/// the <see cref="CurlShare.CurlShareUnlockCallback" /> delegate.
|
||||
/// </summary>
|
||||
UserData = 5,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 6
|
||||
};
|
||||
}
|
@@ -1,36 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains values used to specify the Ssl version level when using
|
||||
/// the <see cref="CurlOption.SslVersion" /> option in a call
|
||||
/// to <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlSslVersion
|
||||
{
|
||||
/// <summary>
|
||||
/// Use whatever version the Ssl library selects.
|
||||
/// </summary>
|
||||
Default = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Use TLS version 1.
|
||||
/// </summary>
|
||||
Tlsv1 = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Use Ssl version 2. This is not a good option unless it's the
|
||||
/// only version supported by the remote server.
|
||||
/// </summary>
|
||||
Sslv2 = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Use Ssl version 3. This is a preferred option.
|
||||
/// </summary>
|
||||
Sslv3 = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Last entry in enumeration; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 4
|
||||
};
|
||||
}
|
@@ -1,39 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains values used to specify the time condition when using
|
||||
/// the <see cref="CurlOption.TimeCondition" /> option in a call
|
||||
/// to <see cref="CurlEasy.SetOpt" />
|
||||
/// </summary>
|
||||
public enum CurlTimeCond
|
||||
{
|
||||
/// <summary>
|
||||
/// Use no time condition.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The time condition is true if the resource has been modified
|
||||
/// since the date/time passed in
|
||||
/// <see cref="CurlOption.TimeValue" />.
|
||||
/// </summary>
|
||||
IfModSince = 1,
|
||||
|
||||
/// <summary>
|
||||
/// True if the resource has not been modified since the date/time
|
||||
/// passed in <see cref="CurlOption.TimeValue" />.
|
||||
/// </summary>
|
||||
IfUnmodSince = 2,
|
||||
|
||||
/// <summary>
|
||||
/// True if the resource's last modification date/time equals that
|
||||
/// passed in <see cref="CurlOption.TimeValue" />.
|
||||
/// </summary>
|
||||
LastMod = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Last entry in enumeration; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 4
|
||||
};
|
||||
}
|
@@ -1,34 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// A member of this enumeration is passed to the function
|
||||
/// <see cref="Curl.GetVersionInfo" />
|
||||
/// </summary>
|
||||
public enum CurlVersion
|
||||
{
|
||||
/// <summary>
|
||||
/// Capabilities associated with the initial version of libcurl.
|
||||
/// </summary>
|
||||
First = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Capabilities associated with the second version of libcurl.
|
||||
/// </summary>
|
||||
Second = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Capabilities associated with the third version of libcurl.
|
||||
/// </summary>
|
||||
Third = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Same as <c>Third</c>.
|
||||
/// </summary>
|
||||
Now = Third,
|
||||
|
||||
/// <summary>
|
||||
/// End-of-enumeration marker; do not use in application code.
|
||||
/// </summary>
|
||||
Last = 3
|
||||
};
|
||||
}
|
@@ -1,71 +0,0 @@
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// A bitmask of libcurl features OR'd together as the value of the
|
||||
/// property <see cref="CurlVersionInfoData.Features" />. The feature
|
||||
/// bits are summarized in the table below.
|
||||
/// </summary>
|
||||
public enum CurlVersionFeatureBitmask
|
||||
{
|
||||
/// <summary>
|
||||
/// Supports Ipv6.
|
||||
/// </summary>
|
||||
Ipv6 = 0x01,
|
||||
|
||||
/// <summary>
|
||||
/// Supports kerberos4 (when using FTP).
|
||||
/// </summary>
|
||||
Kerberos64 = 0x02,
|
||||
|
||||
/// <summary>
|
||||
/// Supports Ssl (HTTPS/FTPS).
|
||||
/// </summary>
|
||||
Ssl = 0x04,
|
||||
|
||||
/// <summary>
|
||||
/// Supports HTTP deflate using libz.
|
||||
/// </summary>
|
||||
LibZ = 0x08,
|
||||
|
||||
/// <summary>
|
||||
/// Supports HTTP Ntlm (added in 7.10.6).
|
||||
/// </summary>
|
||||
Ntlm = 0x10,
|
||||
|
||||
/// <summary>
|
||||
/// Supports HTTP GSS-Negotiate (added in 7.10.6).
|
||||
/// </summary>
|
||||
GssNegotiate = 0x20,
|
||||
|
||||
/// <summary>
|
||||
/// libcurl was built with extra debug capabilities built-in. This
|
||||
/// is mainly of interest for libcurl hackers. (added in 7.10.6)
|
||||
/// </summary>
|
||||
Debug = 0x40,
|
||||
|
||||
/// <summary>
|
||||
/// libcurl was built with support for asynchronous name lookups,
|
||||
/// which allows more exact timeouts (even on Windows) and less
|
||||
/// blocking when using the multi interface. (added in 7.10.7)
|
||||
/// </summary>
|
||||
AsynchDns = 0x80,
|
||||
|
||||
/// <summary>
|
||||
/// libcurl was built with support for Spnego authentication
|
||||
/// (Simple and Protected GSS-API Negotiation Mechanism, defined
|
||||
/// in RFC 2478.) (added in 7.10.8)
|
||||
/// </summary>
|
||||
Spnego = 0x100,
|
||||
|
||||
/// <summary>
|
||||
/// libcurl was built with support for large files.
|
||||
/// </summary>
|
||||
LargeFile = 0x200,
|
||||
|
||||
/// <summary>
|
||||
/// libcurl was built with support for IDNA, domain names with
|
||||
/// international letters.
|
||||
/// </summary>
|
||||
Idn = 0x400
|
||||
};
|
||||
}
|
@@ -1,402 +0,0 @@
|
||||
/***************************************************************************
|
||||
*
|
||||
* CurlS#arp
|
||||
*
|
||||
* Copyright (c) 2014 Dr. Masroor Ehsan (masroore@gmail.com)
|
||||
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
|
||||
*
|
||||
* This software is licensed as described in the file LICENSE, which you
|
||||
* should have received as part of this distribution.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of this Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the LICENSE file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
|
||||
* ANY KIND, either express or implied.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
//#define USE_LIBCURLSHIM
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// P/Invoke signatures.
|
||||
/// </summary>
|
||||
internal static unsafe class NativeMethods
|
||||
{
|
||||
#if WIN64
|
||||
private const string CURL_LIB = "libcurl64.dll";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if USE_LIBCURLSHIM
|
||||
private const string CURLSHIM_LIB = "libcurlshim64.dll";
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#else
|
||||
#if LINUX
|
||||
private const string CURL_LIB = "libcurl";
|
||||
#else
|
||||
private const string CURL_LIB = "libcurl.dll";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if USE_LIBCURLSHIM
|
||||
private const string CURLSHIM_LIB = "libcurlshim.dll";
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if !USE_LIBCURLSHIM
|
||||
#if LINUX
|
||||
private const string WINSOCK_LIB = "libc";
|
||||
#else
|
||||
private const string WINSOCK_LIB = "ws2_32.dll";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// internal delegates from cURL
|
||||
|
||||
// libcurl imports
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern CurlCode curl_global_init (int flags);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void curl_global_cleanup ();
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
internal static extern IntPtr curl_escape (String url, int length);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
internal static extern IntPtr curl_unescape (String url, int length);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void curl_free (IntPtr p);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr curl_version ();
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr curl_easy_init ();
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void curl_easy_cleanup (IntPtr pCurl);
|
||||
|
||||
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||||
internal delegate int _CurlGenericCallback (IntPtr ptr, int sz, int nmemb, IntPtr userdata);
|
||||
|
||||
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||||
internal delegate int _CurlProgressCallback (
|
||||
IntPtr extraData, double dlTotal, double dlNow, double ulTotal, double ulNow);
|
||||
|
||||
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||||
internal delegate int _CurlDebugCallback (
|
||||
IntPtr ptrCurl, CurlInfoType infoType, string message, int size, IntPtr ptrUserData);
|
||||
|
||||
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||||
internal delegate int _CurlSslCtxCallback (IntPtr ctx, IntPtr parm);
|
||||
|
||||
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||||
internal delegate CurlIoError _CurlIoctlCallback (CurlIoCommand cmd, IntPtr parm);
|
||||
|
||||
// curl_easy_setopt() overloads
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern CurlCode curl_easy_setopt (IntPtr pCurl, CurlOption opt, IntPtr parm);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern CurlCode curl_easy_setopt (IntPtr pCurl, CurlOption opt, string parm);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern CurlCode curl_easy_setopt (IntPtr pCurl, CurlOption opt, byte[] parm);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern CurlCode curl_easy_setopt (IntPtr pCurl, CurlOption opt, long parm);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern CurlCode curl_easy_setopt (IntPtr pCurl, CurlOption opt, bool parm);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl, EntryPoint = "curl_easy_setopt")]
|
||||
internal static extern CurlCode curl_easy_setopt_cb (IntPtr pCurl, CurlOption opt, _CurlGenericCallback parm);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl, EntryPoint = "curl_easy_setopt")]
|
||||
internal static extern CurlCode curl_easy_setopt_cb (IntPtr pCurl, CurlOption opt, _CurlProgressCallback parm);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl, EntryPoint = "curl_easy_setopt")]
|
||||
internal static extern CurlCode curl_easy_setopt_cb (IntPtr pCurl, CurlOption opt, _CurlDebugCallback parm);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl, EntryPoint = "curl_easy_setopt")]
|
||||
internal static extern CurlCode curl_easy_setopt_cb (IntPtr pCurl, CurlOption opt, _CurlSslCtxCallback parm);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl, EntryPoint = "curl_easy_setopt")]
|
||||
internal static extern CurlCode curl_easy_setopt_cb (IntPtr pCurl, CurlOption opt, _CurlIoctlCallback parm);
|
||||
|
||||
#if !USE_LIBCURLSHIM
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern CurlMultiCode curl_multi_fdset (IntPtr pmulti,
|
||||
[In, Out] ref fd_set read_fd_set,
|
||||
[In, Out] ref fd_set write_fd_set,
|
||||
[In, Out] ref fd_set exc_fd_set,
|
||||
[In, Out] ref int max_fd);
|
||||
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
internal struct fd_set
|
||||
{
|
||||
internal uint fd_count;
|
||||
//[MarshalAs(UnmanagedType.ByValArray, SizeConst = FD_SETSIZE)] internal IntPtr[] fd_array;
|
||||
internal fixed uint fd_array[FD_SETSIZE];
|
||||
|
||||
internal const int FD_SETSIZE = 64;
|
||||
|
||||
internal void Cleanup ()
|
||||
{
|
||||
//fd_array = null;
|
||||
}
|
||||
|
||||
internal static fd_set Create ()
|
||||
{
|
||||
return new fd_set {
|
||||
//fd_array = new IntPtr[FD_SETSIZE],
|
||||
fd_count = 0
|
||||
};
|
||||
}
|
||||
|
||||
internal static fd_set Create (IntPtr socket)
|
||||
{
|
||||
var handle = Create ();
|
||||
handle.fd_count = 1;
|
||||
handle.fd_array [0] = (uint)socket;
|
||||
return handle;
|
||||
}
|
||||
}
|
||||
|
||||
internal static void FD_ZERO (fd_set fds)
|
||||
{
|
||||
for (var i = 0; i < fd_set.FD_SETSIZE; i++) {
|
||||
//fds.fd_array[i] = (IntPtr) 0;
|
||||
fds.fd_array [i] = 0;
|
||||
}
|
||||
fds.fd_count = 0;
|
||||
}
|
||||
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
internal struct timeval
|
||||
{
|
||||
/// <summary>
|
||||
/// Time interval, in seconds.
|
||||
/// </summary>
|
||||
internal int tv_sec;
|
||||
|
||||
/// <summary>
|
||||
/// Time interval, in microseconds.
|
||||
/// </summary>
|
||||
internal int tv_usec;
|
||||
|
||||
internal static timeval Create (int milliseconds)
|
||||
{
|
||||
return new timeval {
|
||||
tv_sec = milliseconds / 1000,
|
||||
tv_usec = (milliseconds % 1000) * 1000
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
[DllImport (WINSOCK_LIB, EntryPoint = "select")]
|
||||
internal static extern int select (
|
||||
int nfds, // number of sockets, (ignored in winsock)
|
||||
[In, Out] ref fd_set readfds, // read sockets to watch
|
||||
[In, Out] ref fd_set writefds, // write sockets to watch
|
||||
[In, Out] ref fd_set exceptfds, // error sockets to watch
|
||||
ref timeval timeout);
|
||||
|
||||
//[DllImport(WINSOCK_LIB, EntryPoint = "select")]
|
||||
//internal static extern int select(int ndfs, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, timeval* timeout);
|
||||
#endif
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern CurlCode curl_easy_perform (IntPtr pCurl);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr curl_easy_duphandle (IntPtr pCurl);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr curl_easy_strerror (CurlCode err);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern CurlCode curl_easy_getinfo (IntPtr pCurl, CurlInfo info, ref IntPtr pInfo);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern CurlCode curl_easy_getinfo (IntPtr pCurl, CurlInfo info, ref double dblVal);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void curl_easy_reset (IntPtr pCurl);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr curl_multi_init ();
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern CurlMultiCode curl_multi_cleanup (IntPtr pmulti);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern CurlMultiCode curl_multi_add_handle (IntPtr pmulti, IntPtr peasy);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern CurlMultiCode curl_multi_remove_handle (IntPtr pmulti, IntPtr peasy);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr curl_multi_strerror (CurlMultiCode errorNum);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern CurlMultiCode curl_multi_perform (IntPtr pmulti, ref int runningHandles);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void curl_formfree (IntPtr pForm);
|
||||
|
||||
#if !USE_LIBCURLSHIM
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern int curl_formadd (ref IntPtr pHttppost, ref IntPtr pLastPost,
|
||||
int codeFirst, IntPtr bufFirst,
|
||||
int codeNext, IntPtr bufNext,
|
||||
int codeLast);
|
||||
#endif
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr curl_share_init ();
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern CurlShareCode curl_share_cleanup (IntPtr pShare);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr curl_share_strerror (CurlShareCode errorCode);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern CurlShareCode curl_share_setopt (IntPtr pShare, CurlShareOption optCode, IntPtr option);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
internal static extern IntPtr curl_slist_append (IntPtr slist, string data);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern CurlShareCode curl_slist_free_all (IntPtr pList);
|
||||
|
||||
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr curl_version_info (CurlVersion ver);
|
||||
|
||||
#if USE_LIBCURLSHIM
|
||||
|
||||
// libcurlshim imports
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void curl_shim_initialize();
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void curl_shim_cleanup();
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr curl_shim_alloc_strings();
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl,
|
||||
CharSet = CharSet.Ansi)]
|
||||
internal static extern IntPtr curl_shim_add_string_to_slist(
|
||||
IntPtr pStrings, String str);
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl,
|
||||
CharSet = CharSet.Ansi)]
|
||||
internal static extern IntPtr curl_shim_get_string_from_slist(
|
||||
IntPtr pSlist, ref IntPtr pStr);
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl,
|
||||
CharSet = CharSet.Ansi)]
|
||||
internal static extern IntPtr curl_shim_add_string(IntPtr pStrings, String str);
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void curl_shim_free_strings(IntPtr pStrings);
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern int curl_shim_install_delegates(IntPtr pCurl, IntPtr pThis,
|
||||
_ShimWriteCallback pWrite, _ShimReadCallback pRead,
|
||||
_ShimProgressCallback pProgress, _ShimDebugCallback pDebug,
|
||||
_ShimHeaderCallback pHeader, _ShimSslCtxCallback pCtx,
|
||||
_ShimIoctlCallback pIoctl);
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void curl_shim_cleanup_delegates(IntPtr pThis);
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void curl_shim_get_file_time(int unixTime,
|
||||
ref int yy, ref int mm, ref int dd, ref int hh, ref int mn, ref int ss);
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void curl_shim_free_slist(IntPtr p);
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr curl_shim_alloc_fd_sets();
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void curl_shim_free_fd_sets(IntPtr fdsets);
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern CurlMultiCode curl_shim_multi_fdset(IntPtr multi,
|
||||
IntPtr fdsets, ref int maxFD);
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern int curl_shim_select(int maxFD, IntPtr fdsets,
|
||||
int milliseconds);
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr curl_shim_multi_info_read(IntPtr multi,
|
||||
ref int nMsgs);
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void curl_shim_multi_info_free(IntPtr multiInfo);
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern int curl_shim_formadd(IntPtr[] ppForms, IntPtr[] pParams, int nParams);
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern int curl_shim_install_share_delegates(IntPtr pShare,
|
||||
IntPtr pThis, _ShimLockCallback pLock, _ShimUnlockCallback pUnlock);
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void curl_shim_cleanup_share_delegates(IntPtr pShare);
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern int curl_shim_get_version_int_value(IntPtr p, int offset);
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr curl_shim_get_version_char_ptr(IntPtr p, int offset);
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern int curl_shim_get_number_of_protocols(IntPtr p, int offset);
|
||||
|
||||
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr curl_shim_get_protocol_string(IntPtr p, int offset, int index);
|
||||
|
||||
internal delegate void _ShimLockCallback(int data, int access, IntPtr userPtr);
|
||||
|
||||
internal delegate void _ShimUnlockCallback(int data, IntPtr userPtr);
|
||||
|
||||
internal delegate int _ShimDebugCallback(CurlInfoType infoType, IntPtr msgBuf, int msgBufSize, IntPtr parm);
|
||||
|
||||
internal delegate int _ShimHeaderCallback(IntPtr buf, int sz, int nmemb, IntPtr stream);
|
||||
|
||||
internal delegate CurlIoError _ShimIoctlCallback(CurlIoCommand cmd, IntPtr parm);
|
||||
|
||||
internal delegate int _ShimProgressCallback(IntPtr parm, double dlTotal, double dlNow, double ulTotal, double ulNow);
|
||||
|
||||
internal delegate int _ShimReadCallback(IntPtr buf, int sz, int nmemb, IntPtr parm);
|
||||
|
||||
internal delegate int _ShimSslCtxCallback(IntPtr ctx, IntPtr parm);
|
||||
|
||||
internal delegate int _ShimWriteCallback(IntPtr buf, int sz, int nmemb, IntPtr parm);
|
||||
#endif
|
||||
}
|
||||
}
|
@@ -1,22 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
// Information about this assembly is defined by the following attributes.
|
||||
// Change them to the values specific to your project.
|
||||
[assembly: AssemblyTitle ("CurlSharp")]
|
||||
[assembly: AssemblyDescription ("")]
|
||||
[assembly: AssemblyConfiguration ("")]
|
||||
[assembly: AssemblyCompany ("")]
|
||||
[assembly: AssemblyProduct ("")]
|
||||
[assembly: AssemblyCopyright ("max")]
|
||||
[assembly: AssemblyTrademark ("")]
|
||||
[assembly: AssemblyCulture ("")]
|
||||
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
|
||||
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
|
||||
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
|
||||
[assembly: AssemblyVersion ("1.0.*")]
|
||||
// The following attributes are used to specify the signing key for the assembly,
|
||||
// if desired. See the Mono documentation for more information about signing.
|
||||
//[assembly: AssemblyDelaySign(false)]
|
||||
//[assembly: AssemblyKeyFile("")]
|
||||
|
@@ -1,13 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CurlSharp
|
||||
{
|
||||
public class SSLFix
|
||||
{
|
||||
public const string CipherList = "rsa_aes_128_sha,ecdhe_rsa_aes_256_sha,ecdhe_ecdsa_aes_128_sha";
|
||||
}
|
||||
}
|
618
src/DateTimeRoutines/DateTimeRoutines.cs
Normal file
@@ -0,0 +1,618 @@
|
||||
//********************************************************************************************
|
||||
//Author: Sergey Stoyan, CliverSoft.com
|
||||
// http://cliversoft.com
|
||||
// stoyan@cliversoft.com
|
||||
// sergey.stoyan@gmail.com
|
||||
// 27 February 2007
|
||||
//********************************************************************************************
|
||||
|
||||
using System;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace DateTimeRoutines
|
||||
{
|
||||
/// <summary>
|
||||
/// Miscellaneous and parsing methods for DateTime
|
||||
/// </summary>
|
||||
public static class DateTimeRoutines
|
||||
{
|
||||
#region miscellaneous methods
|
||||
|
||||
/// <summary>
|
||||
/// Amount of seconds elapsed between 1970-01-01 00:00:00 and the date-time.
|
||||
/// </summary>
|
||||
/// <param name="date_time">date-time</param>
|
||||
/// <returns>seconds</returns>
|
||||
public static uint GetSecondsSinceUnixEpoch(this DateTime date_time)
|
||||
{
|
||||
TimeSpan t = date_time - new DateTime(1970, 1, 1);
|
||||
int ss = (int)t.TotalSeconds;
|
||||
if (ss < 0)
|
||||
return 0;
|
||||
return (uint)ss;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region parsing definitions
|
||||
|
||||
/// <summary>
|
||||
/// Defines a substring where date-time was found and result of conversion
|
||||
/// </summary>
|
||||
public class ParsedDateTime
|
||||
{
|
||||
/// <summary>
|
||||
/// Index of first char of a date substring found in the string
|
||||
/// </summary>
|
||||
readonly public int IndexOfDate = -1;
|
||||
/// <summary>
|
||||
/// Length a date substring found in the string
|
||||
/// </summary>
|
||||
readonly public int LengthOfDate = -1;
|
||||
/// <summary>
|
||||
/// Index of first char of a time substring found in the string
|
||||
/// </summary>
|
||||
readonly public int IndexOfTime = -1;
|
||||
/// <summary>
|
||||
/// Length of a time substring found in the string
|
||||
/// </summary>
|
||||
readonly public int LengthOfTime = -1;
|
||||
/// <summary>
|
||||
/// DateTime found in the string
|
||||
/// </summary>
|
||||
readonly public DateTime DateTime;
|
||||
/// <summary>
|
||||
/// True if a date was found within the string
|
||||
/// </summary>
|
||||
readonly public bool IsDateFound;
|
||||
/// <summary>
|
||||
/// True if a time was found within the string
|
||||
/// </summary>
|
||||
readonly public bool IsTimeFound;
|
||||
/// <summary>
|
||||
/// UTC offset if it was found within the string
|
||||
/// </summary>
|
||||
readonly public TimeSpan UtcOffset;
|
||||
/// <summary>
|
||||
/// True if UTC offset was found in the string
|
||||
/// </summary>
|
||||
readonly public bool IsUtcOffsetFound;
|
||||
/// <summary>
|
||||
/// Utc gotten from DateTime if IsUtcOffsetFound is True
|
||||
/// </summary>
|
||||
public DateTime UtcDateTime;
|
||||
|
||||
internal ParsedDateTime(int index_of_date, int length_of_date, int index_of_time, int length_of_time, DateTime date_time)
|
||||
{
|
||||
IndexOfDate = index_of_date;
|
||||
LengthOfDate = length_of_date;
|
||||
IndexOfTime = index_of_time;
|
||||
LengthOfTime = length_of_time;
|
||||
DateTime = date_time;
|
||||
IsDateFound = index_of_date > -1;
|
||||
IsTimeFound = index_of_time > -1;
|
||||
UtcOffset = new TimeSpan(25, 0, 0);
|
||||
IsUtcOffsetFound = false;
|
||||
UtcDateTime = new DateTime(1, 1, 1);
|
||||
}
|
||||
|
||||
internal ParsedDateTime(int index_of_date, int length_of_date, int index_of_time, int length_of_time, DateTime date_time, TimeSpan utc_offset)
|
||||
{
|
||||
IndexOfDate = index_of_date;
|
||||
LengthOfDate = length_of_date;
|
||||
IndexOfTime = index_of_time;
|
||||
LengthOfTime = length_of_time;
|
||||
DateTime = date_time;
|
||||
IsDateFound = index_of_date > -1;
|
||||
IsTimeFound = index_of_time > -1;
|
||||
UtcOffset = utc_offset;
|
||||
IsUtcOffsetFound = Math.Abs(utc_offset.TotalHours) < 12;
|
||||
if (!IsUtcOffsetFound)
|
||||
UtcDateTime = new DateTime(1, 1, 1);
|
||||
else
|
||||
{
|
||||
if (index_of_date < 0)//to avoid negative date exception when date is undefined
|
||||
{
|
||||
TimeSpan ts = date_time.TimeOfDay + utc_offset;
|
||||
if (ts < new TimeSpan(0))
|
||||
UtcDateTime = new DateTime(1, 1, 2) + ts;
|
||||
else
|
||||
UtcDateTime = new DateTime(1, 1, 1) + ts;
|
||||
}
|
||||
else
|
||||
UtcDateTime = date_time + utc_offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Date that is accepted in the following cases:
|
||||
/// - no date was parsed by TryParseDateOrTime();
|
||||
/// - no year was found by TryParseDate();
|
||||
/// It is ignored if DefaultDateIsNow = true was set after DefaultDate
|
||||
/// </summary>
|
||||
public static DateTime DefaultDate
|
||||
{
|
||||
set
|
||||
{
|
||||
_DefaultDate = value;
|
||||
DefaultDateIsNow = false;
|
||||
}
|
||||
get
|
||||
{
|
||||
if (DefaultDateIsNow)
|
||||
return DateTime.Now;
|
||||
else
|
||||
return _DefaultDate;
|
||||
}
|
||||
}
|
||||
static DateTime _DefaultDate = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// If true then DefaultDate property is ignored and DefaultDate is always DateTime.Now
|
||||
/// </summary>
|
||||
public static bool DefaultDateIsNow = true;
|
||||
|
||||
/// <summary>
|
||||
/// Defines default date-time format.
|
||||
/// </summary>
|
||||
public enum DateTimeFormat
|
||||
{
|
||||
/// <summary>
|
||||
/// month number goes before day number
|
||||
/// </summary>
|
||||
USA_DATE,
|
||||
/// <summary>
|
||||
/// day number goes before month number
|
||||
/// </summary>
|
||||
UK_DATE,
|
||||
///// <summary>
|
||||
///// time is specifed through AM or PM
|
||||
///// </summary>
|
||||
//USA_TIME,
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region parsing derived methods for DateTime output
|
||||
|
||||
/// <summary>
|
||||
/// Tries to find date and time within the passed string and return it as DateTime structure.
|
||||
/// </summary>
|
||||
/// <param name="str">string that contains date and/or time</param>
|
||||
/// <param name="default_format">format to be used preferably in ambivalent instances</param>
|
||||
/// <param name="date_time">parsed date-time output</param>
|
||||
/// <returns>true if both date and time were found, else false</returns>
|
||||
static public bool TryParseDateTime(this string str, DateTimeFormat default_format, out DateTime date_time)
|
||||
{
|
||||
ParsedDateTime parsed_date_time;
|
||||
if (!TryParseDateTime(str, default_format, out parsed_date_time))
|
||||
{
|
||||
date_time = new DateTime(1, 1, 1);
|
||||
return false;
|
||||
}
|
||||
date_time = parsed_date_time.DateTime;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to find date and/or time within the passed string and return it as DateTime structure.
|
||||
/// If only date was found, time in the returned DateTime is always 0:0:0.
|
||||
/// If only time was found, date in the returned DateTime is DefaultDate.
|
||||
/// </summary>
|
||||
/// <param name="str">string that contains date and(or) time</param>
|
||||
/// <param name="default_format">format to be used preferably in ambivalent instances</param>
|
||||
/// <param name="date_time">parsed date-time output</param>
|
||||
/// <returns>true if date and/or time was found, else false</returns>
|
||||
static public bool TryParseDateOrTime(this string str, DateTimeFormat default_format, out DateTime date_time)
|
||||
{
|
||||
ParsedDateTime parsed_date_time;
|
||||
if (!TryParseDateOrTime(str, default_format, out parsed_date_time))
|
||||
{
|
||||
date_time = new DateTime(1, 1, 1);
|
||||
return false;
|
||||
}
|
||||
date_time = parsed_date_time.DateTime;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to find time within the passed string and return it as DateTime structure.
|
||||
/// It recognizes only time while ignoring date, so date in the returned DateTime is always 1/1/1.
|
||||
/// </summary>
|
||||
/// <param name="str">string that contains time</param>
|
||||
/// <param name="default_format">format to be used preferably in ambivalent instances</param>
|
||||
/// <param name="time">parsed time output</param>
|
||||
/// <returns>true if time was found, else false</returns>
|
||||
public static bool TryParseTime(this string str, DateTimeFormat default_format, out DateTime time)
|
||||
{
|
||||
ParsedDateTime parsed_time;
|
||||
if (!TryParseTime(str, default_format, out parsed_time, null))
|
||||
{
|
||||
time = new DateTime(1, 1, 1);
|
||||
return false;
|
||||
}
|
||||
time = parsed_time.DateTime;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to find date within the passed string and return it as DateTime structure.
|
||||
/// It recognizes only date while ignoring time, so time in the returned DateTime is always 0:0:0.
|
||||
/// If year of the date was not found then it accepts the current year.
|
||||
/// </summary>
|
||||
/// <param name="str">string that contains date</param>
|
||||
/// <param name="default_format">format to be used preferably in ambivalent instances</param>
|
||||
/// <param name="date">parsed date output</param>
|
||||
/// <returns>true if date was found, else false</returns>
|
||||
static public bool TryParseDate(this string str, DateTimeFormat default_format, out DateTime date)
|
||||
{
|
||||
ParsedDateTime parsed_date;
|
||||
if (!TryParseDate(str, default_format, out parsed_date))
|
||||
{
|
||||
date = new DateTime(1, 1, 1);
|
||||
return false;
|
||||
}
|
||||
date = parsed_date.DateTime;
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region parsing derived methods for ParsedDateTime output
|
||||
|
||||
/// <summary>
|
||||
/// Tries to find date and time within the passed string and return it as ParsedDateTime object.
|
||||
/// </summary>
|
||||
/// <param name="str">string that contains date-time</param>
|
||||
/// <param name="default_format">format to be used preferably in ambivalent instances</param>
|
||||
/// <param name="parsed_date_time">parsed date-time output</param>
|
||||
/// <returns>true if both date and time were found, else false</returns>
|
||||
static public bool TryParseDateTime(this string str, DateTimeFormat default_format, out ParsedDateTime parsed_date_time)
|
||||
{
|
||||
if (DateTimeRoutines.TryParseDateOrTime(str, default_format, out parsed_date_time)
|
||||
&& parsed_date_time.IsDateFound
|
||||
&& parsed_date_time.IsTimeFound
|
||||
)
|
||||
return true;
|
||||
|
||||
parsed_date_time = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to find time within the passed string and return it as ParsedDateTime object.
|
||||
/// It recognizes only time while ignoring date, so date in the returned ParsedDateTime is always 1/1/1
|
||||
/// </summary>
|
||||
/// <param name="str">string that contains date-time</param>
|
||||
/// <param name="default_format">format to be used preferably in ambivalent instances</param>
|
||||
/// <param name="parsed_time">parsed date-time output</param>
|
||||
/// <returns>true if time was found, else false</returns>
|
||||
static public bool TryParseTime(this string str, DateTimeFormat default_format, out ParsedDateTime parsed_time)
|
||||
{
|
||||
return TryParseTime(str, default_format, out parsed_time, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to find date and/or time within the passed string and return it as ParsedDateTime object.
|
||||
/// If only date was found, time in the returned ParsedDateTime is always 0:0:0.
|
||||
/// If only time was found, date in the returned ParsedDateTime is DefaultDate.
|
||||
/// </summary>
|
||||
/// <param name="str">string that contains date-time</param>
|
||||
/// <param name="default_format">format to be used preferably in ambivalent instances</param>
|
||||
/// <param name="parsed_date_time">parsed date-time output</param>
|
||||
/// <returns>true if date or time was found, else false</returns>
|
||||
static public bool TryParseDateOrTime(this string str, DateTimeFormat default_format, out ParsedDateTime parsed_date_time)
|
||||
{
|
||||
parsed_date_time = null;
|
||||
|
||||
ParsedDateTime parsed_date;
|
||||
ParsedDateTime parsed_time;
|
||||
if (!TryParseDate(str, default_format, out parsed_date))
|
||||
{
|
||||
if (!TryParseTime(str, default_format, out parsed_time, null))
|
||||
return false;
|
||||
|
||||
DateTime date_time = new DateTime(DefaultDate.Year, DefaultDate.Month, DefaultDate.Day, parsed_time.DateTime.Hour, parsed_time.DateTime.Minute, parsed_time.DateTime.Second);
|
||||
parsed_date_time = new ParsedDateTime(-1, -1, parsed_time.IndexOfTime, parsed_time.LengthOfTime, date_time, parsed_time.UtcOffset);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!TryParseTime(str, default_format, out parsed_time, parsed_date))
|
||||
{
|
||||
DateTime date_time = new DateTime(parsed_date.DateTime.Year, parsed_date.DateTime.Month, parsed_date.DateTime.Day, 0, 0, 0);
|
||||
parsed_date_time = new ParsedDateTime(parsed_date.IndexOfDate, parsed_date.LengthOfDate, -1, -1, date_time);
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime date_time = new DateTime(parsed_date.DateTime.Year, parsed_date.DateTime.Month, parsed_date.DateTime.Day, parsed_time.DateTime.Hour, parsed_time.DateTime.Minute, parsed_time.DateTime.Second);
|
||||
parsed_date_time = new ParsedDateTime(parsed_date.IndexOfDate, parsed_date.LengthOfDate, parsed_time.IndexOfTime, parsed_time.LengthOfTime, date_time, parsed_time.UtcOffset);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region parsing base methods
|
||||
|
||||
/// <summary>
|
||||
/// Tries to find time within the passed string (relatively to the passed parsed_date if any) and return it as ParsedDateTime object.
|
||||
/// It recognizes only time while ignoring date, so date in the returned ParsedDateTime is always 1/1/1
|
||||
/// </summary>
|
||||
/// <param name="str">string that contains date</param>
|
||||
/// <param name="default_format">format to be used preferably in ambivalent instances</param>
|
||||
/// <param name="parsed_time">parsed date-time output</param>
|
||||
/// <param name="parsed_date">ParsedDateTime object if the date was found within this string, else NULL</param>
|
||||
/// <returns>true if time was found, else false</returns>
|
||||
public static bool TryParseTime(this string str, DateTimeFormat default_format, out ParsedDateTime parsed_time, ParsedDateTime parsed_date)
|
||||
{
|
||||
parsed_time = null;
|
||||
|
||||
string time_zone_r;
|
||||
if(default_format == DateTimeFormat.USA_DATE)
|
||||
time_zone_r = @"(?:\s*(?'time_zone'UTC|GMT|CST|EST))?";
|
||||
else
|
||||
time_zone_r = @"(?:\s*(?'time_zone'UTC|GMT))?";
|
||||
|
||||
Match m;
|
||||
if (parsed_date != null && parsed_date.IndexOfDate > -1)
|
||||
{//look around the found date
|
||||
//look for <date> hh:mm:ss <UTC offset>
|
||||
m = Regex.Match(str.Substring(parsed_date.IndexOfDate + parsed_date.LengthOfDate), @"(?<=^\s*,?\s+|^\s*at\s*|^\s*[T\-]\s*)(?'hour'\d{2})\s*:\s*(?'minute'\d{2})\s*:\s*(?'second'\d{2})\s+(?'offset_sign'[\+\-])(?'offset_hh'\d{2}):?(?'offset_mm'\d{2})(?=$|[^\d\w])", RegexOptions.Compiled);
|
||||
if (!m.Success)
|
||||
//look for <date> [h]h:mm[:ss] [PM/AM] [UTC/GMT]
|
||||
m = Regex.Match(str.Substring(parsed_date.IndexOfDate + parsed_date.LengthOfDate), @"(?<=^\s*,?\s+|^\s*at\s*|^\s*[T\-]\s*)(?'hour'\d{1,2})\s*:\s*(?'minute'\d{2})\s*(?::\s*(?'second'\d{2}))?(?:\s*(?'ampm'AM|am|PM|pm))?"+time_zone_r+@"(?=$|[^\d\w])", RegexOptions.Compiled);
|
||||
if (!m.Success)
|
||||
//look for [h]h:mm:ss [PM/AM] [UTC/GMT] <date>
|
||||
m = Regex.Match(str.Substring(0, parsed_date.IndexOfDate), @"(?<=^|[^\d])(?'hour'\d{1,2})\s*:\s*(?'minute'\d{2})\s*(?::\s*(?'second'\d{2}))?(?:\s*(?'ampm'AM|am|PM|pm))?"+time_zone_r+@"(?=$|[\s,]+)", RegexOptions.Compiled);
|
||||
if (!m.Success)
|
||||
//look for [h]h:mm:ss [PM/AM] [UTC/GMT] within <date>
|
||||
m = Regex.Match(str.Substring(parsed_date.IndexOfDate, parsed_date.LengthOfDate), @"(?<=^|[^\d])(?'hour'\d{1,2})\s*:\s*(?'minute'\d{2})\s*(?::\s*(?'second'\d{2}))?(?:\s*(?'ampm'AM|am|PM|pm))?"+time_zone_r+@"(?=$|[\s,]+)", RegexOptions.Compiled);
|
||||
}
|
||||
else//look anywhere within string
|
||||
{
|
||||
//look for hh:mm:ss <UTC offset>
|
||||
m = Regex.Match(str, @"(?<=^|\s+|\s*T\s*)(?'hour'\d{2})\s*:\s*(?'minute'\d{2})\s*:\s*(?'second'\d{2})\s+(?'offset_sign'[\+\-])(?'offset_hh'\d{2}):?(?'offset_mm'\d{2})?(?=$|[^\d\w])", RegexOptions.Compiled);
|
||||
if (!m.Success)
|
||||
//look for [h]h:mm[:ss] [PM/AM] [UTC/GMT]
|
||||
m = Regex.Match(str, @"(?<=^|\s+|\s*T\s*)(?'hour'\d{1,2})\s*:\s*(?'minute'\d{2})\s*(?::\s*(?'second'\d{2}))?(?:\s*(?'ampm'AM|am|PM|pm))?"+time_zone_r+@"(?=$|[^\d\w])", RegexOptions.Compiled);
|
||||
}
|
||||
|
||||
if (!m.Success)
|
||||
return false;
|
||||
|
||||
//try
|
||||
//{
|
||||
int hour = int.Parse(m.Groups["hour"].Value);
|
||||
if (hour < 0 || hour > 23)
|
||||
return false;
|
||||
|
||||
int minute = int.Parse(m.Groups["minute"].Value);
|
||||
if (minute < 0 || minute > 59)
|
||||
return false;
|
||||
|
||||
int second = 0;
|
||||
if (!string.IsNullOrEmpty(m.Groups["second"].Value))
|
||||
{
|
||||
second = int.Parse(m.Groups["second"].Value);
|
||||
if (second < 0 || second > 59)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (string.Compare(m.Groups["ampm"].Value, "PM", true) == 0 && hour < 12)
|
||||
hour += 12;
|
||||
else if (string.Compare(m.Groups["ampm"].Value, "AM", true) == 0 && hour == 12)
|
||||
hour -= 12;
|
||||
|
||||
DateTime date_time = new DateTime(1, 1, 1, hour, minute, second);
|
||||
|
||||
if (m.Groups["offset_hh"].Success)
|
||||
{
|
||||
int offset_hh = int.Parse(m.Groups["offset_hh"].Value);
|
||||
int offset_mm = 0;
|
||||
if (m.Groups["offset_mm"].Success)
|
||||
offset_mm = int.Parse(m.Groups["offset_mm"].Value);
|
||||
TimeSpan utc_offset = new TimeSpan(offset_hh, offset_mm, 0);
|
||||
if (m.Groups["offset_sign"].Value == "-")
|
||||
utc_offset = -utc_offset;
|
||||
parsed_time = new ParsedDateTime(-1, -1, m.Index, m.Length, date_time, utc_offset);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (m.Groups["time_zone"].Success)
|
||||
{
|
||||
TimeSpan utc_offset;
|
||||
switch (m.Groups["time_zone"].Value)
|
||||
{
|
||||
case "UTC":
|
||||
case "GMT":
|
||||
utc_offset = new TimeSpan(0, 0, 0);
|
||||
break;
|
||||
case "CST":
|
||||
utc_offset = new TimeSpan(-6, 0, 0);
|
||||
break;
|
||||
case "EST":
|
||||
utc_offset = new TimeSpan(-5, 0, 0);
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Time zone: " + m.Groups["time_zone"].Value + " is not defined.");
|
||||
}
|
||||
parsed_time = new ParsedDateTime(-1, -1, m.Index, m.Length, date_time, utc_offset);
|
||||
return true;
|
||||
}
|
||||
|
||||
parsed_time = new ParsedDateTime(-1, -1, m.Index, m.Length, date_time);
|
||||
//}
|
||||
//catch(Exception e)
|
||||
//{
|
||||
// return false;
|
||||
//}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to find date within the passed string and return it as ParsedDateTime object.
|
||||
/// It recognizes only date while ignoring time, so time in the returned ParsedDateTime is always 0:0:0.
|
||||
/// If year of the date was not found then it accepts the current year.
|
||||
/// </summary>
|
||||
/// <param name="str">string that contains date</param>
|
||||
/// <param name="default_format">format to be used preferably in ambivalent instances</param>
|
||||
/// <param name="parsed_date">parsed date output</param>
|
||||
/// <returns>true if date was found, else false</returns>
|
||||
static public bool TryParseDate(this string str, DateTimeFormat default_format, out ParsedDateTime parsed_date)
|
||||
{
|
||||
parsed_date = null;
|
||||
|
||||
if (string.IsNullOrEmpty(str))
|
||||
return false;
|
||||
|
||||
//look for dd/mm/yy
|
||||
Match m = Regex.Match(str, @"(?<=^|[^\d])(?'day'\d{1,2})\s*(?'separator'[\\/\.])+\s*(?'month'\d{1,2})\s*\'separator'+\s*(?'year'\d{2}|\d{4})(?=$|[^\d])", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
if (m.Success)
|
||||
{
|
||||
DateTime date;
|
||||
if ((default_format ^ DateTimeFormat.USA_DATE) == DateTimeFormat.USA_DATE)
|
||||
{
|
||||
if (!convert_to_date(int.Parse(m.Groups["year"].Value), int.Parse(m.Groups["day"].Value), int.Parse(m.Groups["month"].Value), out date))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!convert_to_date(int.Parse(m.Groups["year"].Value), int.Parse(m.Groups["month"].Value), int.Parse(m.Groups["day"].Value), out date))
|
||||
return false;
|
||||
}
|
||||
parsed_date = new ParsedDateTime(m.Index, m.Length, -1, -1, date);
|
||||
return true;
|
||||
}
|
||||
|
||||
//look for [yy]yy-mm-dd
|
||||
m = Regex.Match(str, @"(?<=^|[^\d])(?'year'\d{2}|\d{4})\s*(?'separator'[\-])\s*(?'month'\d{1,2})\s*\'separator'+\s*(?'day'\d{1,2})(?=$|[^\d])", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
if (m.Success)
|
||||
{
|
||||
DateTime date;
|
||||
if (!convert_to_date(int.Parse(m.Groups["year"].Value), int.Parse(m.Groups["month"].Value), int.Parse(m.Groups["day"].Value), out date))
|
||||
return false;
|
||||
parsed_date = new ParsedDateTime(m.Index, m.Length, -1, -1, date);
|
||||
return true;
|
||||
}
|
||||
|
||||
//look for month dd yyyy
|
||||
m = Regex.Match(str, @"(?:^|[^\d\w])(?'month'Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[uarychilestmbro]*\s+(?'day'\d{1,2})(?:-?st|-?th|-?rd|-?nd)?\s*,?\s*(?'year'\d{4})(?=$|[^\d\w])", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
if (!m.Success)
|
||||
//look for dd month [yy]yy
|
||||
m = Regex.Match(str, @"(?:^|[^\d\w:])(?'day'\d{1,2})(?:-?st\s+|-?th\s+|-?rd\s+|-?nd\s+|-|\s+)(?'month'Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[uarychilestmbro]*(?:\s*,?\s*|-)'?(?'year'\d{2}|\d{4})(?=$|[^\d\w])", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
if (!m.Success)
|
||||
//look for yyyy month dd
|
||||
m = Regex.Match(str, @"(?:^|[^\d\w])(?'year'\d{4})\s+(?'month'Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[uarychilestmbro]*\s+(?'day'\d{1,2})(?:-?st|-?th|-?rd|-?nd)?(?=$|[^\d\w])", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
if (!m.Success)
|
||||
//look for month dd hh:mm:ss MDT|UTC yyyy
|
||||
m = Regex.Match(str, @"(?:^|[^\d\w])(?'month'Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[uarychilestmbro]*\s+(?'day'\d{1,2})\s+\d{2}\:\d{2}\:\d{2}\s+(?:MDT|UTC)\s+(?'year'\d{4})(?=$|[^\d\w])", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
if (!m.Success)
|
||||
//look for month dd [yyyy]
|
||||
m = Regex.Match(str, @"(?:^|[^\d\w])(?'month'Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[uarychilestmbro]*\s+(?'day'\d{1,2})(?:-?st|-?th|-?rd|-?nd)?(?:\s*,?\s*(?'year'\d{4}))?(?=$|[^\d\w])", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
if (m.Success)
|
||||
{
|
||||
int month = -1;
|
||||
int index_of_date = m.Index;
|
||||
int length_of_date = m.Length;
|
||||
|
||||
switch (m.Groups["month"].Value)
|
||||
{
|
||||
case "Jan":
|
||||
case "JAN":
|
||||
month = 1;
|
||||
break;
|
||||
case "Feb":
|
||||
case "FEB":
|
||||
month = 2;
|
||||
break;
|
||||
case "Mar":
|
||||
case "MAR":
|
||||
month = 3;
|
||||
break;
|
||||
case "Apr":
|
||||
case "APR":
|
||||
month = 4;
|
||||
break;
|
||||
case "May":
|
||||
case "MAY":
|
||||
month = 5;
|
||||
break;
|
||||
case "Jun":
|
||||
case "JUN":
|
||||
month = 6;
|
||||
break;
|
||||
case "Jul":
|
||||
month = 7;
|
||||
break;
|
||||
case "Aug":
|
||||
case "AUG":
|
||||
month = 8;
|
||||
break;
|
||||
case "Sep":
|
||||
case "SEP":
|
||||
month = 9;
|
||||
break;
|
||||
case "Oct":
|
||||
case "OCT":
|
||||
month = 10;
|
||||
break;
|
||||
case "Nov":
|
||||
case "NOV":
|
||||
month = 11;
|
||||
break;
|
||||
case "Dec":
|
||||
case "DEC":
|
||||
month = 12;
|
||||
break;
|
||||
}
|
||||
|
||||
int year;
|
||||
if (!string.IsNullOrEmpty(m.Groups["year"].Value))
|
||||
year = int.Parse(m.Groups["year"].Value);
|
||||
else
|
||||
year = DefaultDate.Year;
|
||||
|
||||
DateTime date;
|
||||
if (!convert_to_date(year, month, int.Parse(m.Groups["day"].Value), out date))
|
||||
return false;
|
||||
parsed_date = new ParsedDateTime(index_of_date, length_of_date, -1, -1, date);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool convert_to_date(int year, int month, int day, out DateTime date)
|
||||
{
|
||||
if (year >= 100)
|
||||
{
|
||||
if (year < 1000)
|
||||
{
|
||||
date = new DateTime(1, 1, 1);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (year > 30)
|
||||
year += 1900;
|
||||
else
|
||||
year += 2000;
|
||||
|
||||
try
|
||||
{
|
||||
date = new DateTime(year, month, day);
|
||||
}
|
||||
catch
|
||||
{
|
||||
date = new DateTime(1, 1, 1);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
7
src/DateTimeRoutines/DateTimeRoutines.csproj
Normal file
@@ -0,0 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net452</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
1
src/Jackett.Common/Content/css/bootstrap-multiselect.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
span.multiselect-native-select{position:relative}span.multiselect-native-select select{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px -1px -1px -3px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;left:50%;top:30px}.multiselect-container{position:absolute;list-style-type:none;margin:0;padding:0}.multiselect-container .input-group{margin:5px}.multiselect-container>li{padding:0}.multiselect-container>li>a.multiselect-all label{font-weight:700}.multiselect-container>li.multiselect-group label{margin:0;padding:3px 20px 3px 20px;height:100%;font-weight:700}.multiselect-container>li.multiselect-group-clickable label{cursor:pointer}.multiselect-container>li>a{padding:0}.multiselect-container>li>a>label{margin:0;height:100%;cursor:pointer;font-weight:400;padding:3px 20px 3px 40px}.multiselect-container>li>a>label.radio,.multiselect-container>li>a>label.checkbox{margin:0}.multiselect-container>li>a>label>input[type=checkbox]{margin-bottom:5px}.btn-group>.btn-group:nth-child(2)>.multiselect.btn{border-top-left-radius:4px;border-bottom-left-radius:4px}.form-inline .multiselect-container label.checkbox,.form-inline .multiselect-container label.radio{padding:3px 20px 3px 40px}.form-inline .multiselect-container li a label.checkbox input[type=checkbox],.form-inline .multiselect-container li a label.radio input[type=radio]{margin-left:-20px;margin-right:0}
|
@@ -1,275 +1,275 @@
|
||||
body {
|
||||
background-image: url("binding_dark.png");
|
||||
background-repeat: repeat;
|
||||
}
|
||||
|
||||
#page {
|
||||
border-radius: 6px;
|
||||
background-color: white;
|
||||
max-width: 900px;
|
||||
margin: 0 auto;
|
||||
margin-top: 30px;
|
||||
padding: 20px;
|
||||
margin-bottom: 100px;
|
||||
}
|
||||
|
||||
.container-fluid {
|
||||
}
|
||||
|
||||
#templates {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#indexers {
|
||||
text-align: center;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.indexer-table {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.test-success {
|
||||
color: #449d44;
|
||||
}
|
||||
|
||||
.test-error {
|
||||
color: #c9302c;
|
||||
}
|
||||
|
||||
.test-inprogress {
|
||||
color: #286090;
|
||||
}
|
||||
|
||||
.indexer-buttons {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.indexer-buttons > .btn {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.indexer-button-test {
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.setup-item-inputstring {
|
||||
max-width: 255px;
|
||||
}
|
||||
|
||||
.setup-item-inputbool input {
|
||||
max-width: 100px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.setup-item-inputselect {
|
||||
max-width: 255px;
|
||||
}
|
||||
|
||||
[data-type=hiddendata]{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
-webkit-animation: spin 2s infinite linear;
|
||||
-moz-animation: spin 2s infinite linear;
|
||||
-o-animation: spin 2s infinite linear;
|
||||
animation: spin 2s infinite linear;
|
||||
}
|
||||
|
||||
@-moz-keyframes spin {
|
||||
from {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
|
||||
to {
|
||||
-moz-transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes spin {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
|
||||
to {
|
||||
-webkit-transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
#setup-indexer-go {
|
||||
width: 70px;
|
||||
}
|
||||
|
||||
hr {
|
||||
border-top-color: #cdcdcd;
|
||||
}
|
||||
|
||||
.input-area {
|
||||
margin: 4px 0px;
|
||||
}
|
||||
|
||||
.input-area > * {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.input-area > p {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.input-header {
|
||||
font-size: 18px;
|
||||
width: 160px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.input-right {
|
||||
width: 300px;
|
||||
display: inline-block;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
#sonarr-warning {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#logo {
|
||||
max-width: 50px;
|
||||
}
|
||||
|
||||
#header-title {
|
||||
font-size: 34px;
|
||||
vertical-align: middle;
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
#footer {
|
||||
color: #444444;
|
||||
margin: 0 auto;
|
||||
margin-top: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#jackett-allowext, #jackett-allowupdate, #jackett-logging, #jackett-prerelease {
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
.modal-fillwidth {
|
||||
width: 1200px;
|
||||
min-width:80%;
|
||||
}
|
||||
|
||||
.indexer-caps {
|
||||
padding: 0px 15px 15px 15px;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.indexer-caps table {
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.jackettlogWarn {
|
||||
background-color: #FFFF8E !important;
|
||||
}
|
||||
|
||||
.jackettlogError {
|
||||
background-color: #FF6060 !important;
|
||||
}
|
||||
|
||||
.jackettdownloaded {
|
||||
color: blueviolet;
|
||||
}
|
||||
|
||||
.jacketdownloadlocal {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.downloadcolumn {
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
padding: 3px;
|
||||
margin: 0 0 0px;
|
||||
font-size: 13px;
|
||||
line-height: 1.42857143;
|
||||
color: #333;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
background-color: transparent;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.modal-open .modal {
|
||||
overflow-x: auto; /* Model can be bigger than the screen on mobiles */
|
||||
}
|
||||
|
||||
.dataTables_filter input {
|
||||
width: 400px
|
||||
}
|
||||
|
||||
#unconfigured-indexers-template {
|
||||
display: none;
|
||||
}
|
||||
.jackett-apikey{
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.jackett-apikey .input-header{
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.setup-item-displayinfo:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
table td.fit{
|
||||
white-space: nowrap;
|
||||
width: 1%;
|
||||
}
|
||||
|
||||
.label-imdb {
|
||||
background-color: #d0ab44;
|
||||
}
|
||||
|
||||
.tooltip-inner {
|
||||
max-width: 500px !important;
|
||||
}
|
||||
|
||||
.tooltip-inner img {
|
||||
max-width: 250px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.type-public {
|
||||
color: #449d44
|
||||
}
|
||||
|
||||
.type-private {
|
||||
color: #c9302c
|
||||
}
|
||||
|
||||
.type-semi-private {
|
||||
color: #ec971f
|
||||
}
|
||||
|
||||
.dataTables_deadfilter {
|
||||
float: right;
|
||||
text-align: right;
|
||||
margin-right: 1em;
|
||||
}
|
||||
input#searchquery{
|
||||
width:400px;
|
||||
}
|
||||
body {
|
||||
background-image: url("binding_dark.png");
|
||||
background-repeat: repeat;
|
||||
}
|
||||
|
||||
#page {
|
||||
border-radius: 6px;
|
||||
background-color: white;
|
||||
max-width: 900px;
|
||||
margin: 0 auto;
|
||||
margin-top: 30px;
|
||||
padding: 20px;
|
||||
margin-bottom: 100px;
|
||||
}
|
||||
|
||||
.container-fluid {
|
||||
}
|
||||
|
||||
#templates {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#indexers {
|
||||
text-align: center;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.indexer-table {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.test-success {
|
||||
color: #449d44;
|
||||
}
|
||||
|
||||
.test-error {
|
||||
color: #c9302c;
|
||||
}
|
||||
|
||||
.test-inprogress {
|
||||
color: #286090;
|
||||
}
|
||||
|
||||
.indexer-buttons {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.indexer-buttons > .btn {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.indexer-button-test {
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.setup-item-inputstring {
|
||||
max-width: 255px;
|
||||
}
|
||||
|
||||
.setup-item-inputbool input {
|
||||
max-width: 100px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.setup-item-inputselect {
|
||||
max-width: 255px;
|
||||
}
|
||||
|
||||
[data-type=hiddendata]{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
-webkit-animation: spin 2s infinite linear;
|
||||
-moz-animation: spin 2s infinite linear;
|
||||
-o-animation: spin 2s infinite linear;
|
||||
animation: spin 2s infinite linear;
|
||||
}
|
||||
|
||||
@-moz-keyframes spin {
|
||||
from {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
|
||||
to {
|
||||
-moz-transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes spin {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
|
||||
to {
|
||||
-webkit-transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
#setup-indexer-go {
|
||||
width: 70px;
|
||||
}
|
||||
|
||||
hr {
|
||||
border-top-color: #cdcdcd;
|
||||
}
|
||||
|
||||
.input-area {
|
||||
margin: 4px 0px;
|
||||
}
|
||||
|
||||
.input-area > * {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.input-area > p {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.input-header {
|
||||
font-size: 18px;
|
||||
width: 160px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.input-right {
|
||||
width: 300px;
|
||||
display: inline-block;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
#sonarr-warning {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#logo {
|
||||
max-width: 50px;
|
||||
}
|
||||
|
||||
#header-title {
|
||||
font-size: 34px;
|
||||
vertical-align: middle;
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
#footer {
|
||||
color: #444444;
|
||||
margin: 0 auto;
|
||||
margin-top: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#jackett-allowext, #jackett-allowupdate, #jackett-logging, #jackett-prerelease {
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
.modal-fillwidth {
|
||||
width: 1200px;
|
||||
min-width:80%;
|
||||
}
|
||||
|
||||
.indexer-caps {
|
||||
padding: 0px 15px 15px 15px;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.indexer-caps table {
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.jackettlogWarn {
|
||||
background-color: #FFFF8E !important;
|
||||
}
|
||||
|
||||
.jackettlogError {
|
||||
background-color: #FF6060 !important;
|
||||
}
|
||||
|
||||
.jackettdownloaded {
|
||||
color: blueviolet;
|
||||
}
|
||||
|
||||
.jacketdownloadlocal {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.downloadcolumn {
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
padding: 3px;
|
||||
margin: 0 0 0px;
|
||||
font-size: 13px;
|
||||
line-height: 1.42857143;
|
||||
color: #333;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
background-color: transparent;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.modal-open .modal {
|
||||
overflow-x: auto; /* Model can be bigger than the screen on mobiles */
|
||||
}
|
||||
|
||||
.dataTables_filter input {
|
||||
width: 400px
|
||||
}
|
||||
|
||||
#unconfigured-indexers-template {
|
||||
display: none;
|
||||
}
|
||||
.jackett-apikey{
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.jackett-apikey .input-header{
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.setup-item-displayinfo:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
table td.fit{
|
||||
white-space: nowrap;
|
||||
width: 1%;
|
||||
}
|
||||
|
||||
.label-imdb {
|
||||
background-color: #d0ab44;
|
||||
}
|
||||
|
||||
.tooltip-inner {
|
||||
max-width: 500px !important;
|
||||
}
|
||||
|
||||
.tooltip-inner img {
|
||||
max-width: 250px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.type-public {
|
||||
color: #449d44
|
||||
}
|
||||
|
||||
.type-private {
|
||||
color: #c9302c
|
||||
}
|
||||
|
||||
.type-semi-private {
|
||||
color: #ec971f
|
||||
}
|
||||
|
||||
.dataTables_deadfilter {
|
||||
float: right;
|
||||
text-align: right;
|
||||
margin-right: 1em;
|
||||
}
|
||||
input#searchquery{
|
||||
width:400px;
|
||||
}
|
@@ -24,7 +24,8 @@ $.fn.focusWithoutScrolling = function () {
|
||||
|
||||
$(document).ready(function () {
|
||||
$.ajaxSetup({ cache: false });
|
||||
window.jackettIsLocal = window.location.hostname === '127.0.0.1';
|
||||
//window.jackettIsLocal = window.location.hostname === '127.0.0.1';
|
||||
window.jackettIsLocal = false; // reCaptcha can't be solved via 127.0.0.1 anymore. This loophold was fixed by google around 2.10.2017
|
||||
|
||||
Handlebars.registerHelper('if_eq', function(a, b, opts) {
|
||||
if (a == b)
|
||||
@@ -42,12 +43,9 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
function openSearchIfNecessary() {
|
||||
var parser = document.createElement('a');
|
||||
parser.href = window.location.href;
|
||||
|
||||
if (parser.hash.startsWith("#search")) {
|
||||
var query = parser.hash.split('=')[1];
|
||||
showSearch(null, query);
|
||||
const hashArgs = location.hash.substring(1).split('&').reduce((prev, item) => Object.assign({ [item.split('=')[0]]: (item.split('=').length < 2 ? undefined : decodeURIComponent(item.split('=')[1])) }, prev), {});
|
||||
if ("search" in hashArgs) {
|
||||
showSearch(hashArgs.tracker, hashArgs.search, hashArgs.category);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,6 +66,13 @@ function loadJackettSettings() {
|
||||
$(".api-key-text").text(data.api_key);
|
||||
$("#app-version").html(data.app_version);
|
||||
$("#jackett-port").val(data.port);
|
||||
|
||||
$("#jackett-proxy-type").val(data.proxy_type);
|
||||
$("#jackett-proxy-url").val(data.proxy_url);
|
||||
$("#jackett-proxy-port").val(data.proxy_port);
|
||||
$("#jackett-proxy-username").val(data.proxy_username);
|
||||
$("#jackett-proxy-password").val(data.proxy_password);
|
||||
|
||||
$("#jackett-basepathoverride").val(data.basepathoverride);
|
||||
basePath = data.basepathoverride;
|
||||
if (basePath === null || basePath === undefined) {
|
||||
@@ -82,6 +87,7 @@ function loadJackettSettings() {
|
||||
$("#jackett-prerelease").attr('checked', data.prerelease);
|
||||
$("#jackett-logging").attr('checked', data.logging);
|
||||
$("#jackett-omdbkey").val(data.omdbkey);
|
||||
$("#jackett-omdburl").val(data.omdburl);
|
||||
var password = data.password;
|
||||
$("#jackett-adminpwd").val(password);
|
||||
if (password != null && password != '') {
|
||||
@@ -105,6 +111,7 @@ function reloadIndexers() {
|
||||
unconfiguredIndexers = [];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var item = data[i];
|
||||
item.rss_host = resolveUrl(basePath + "/api/v2.0/indexers/" + item.id + "/results/torznab/api?apikey=" + api.key + "&t=search&cat=&q=");
|
||||
item.torznab_host = resolveUrl(basePath + "/api/v2.0/indexers/" + item.id + "/results/torznab/");
|
||||
item.potato_host = resolveUrl(basePath + "/api/v2.0/indexers/" + item.id + "/results/potato/");
|
||||
|
||||
@@ -114,16 +121,16 @@ function reloadIndexers() {
|
||||
item.state = "success";
|
||||
|
||||
if (item.type == "public") {
|
||||
item.type_icon_content = "🔓\uFE0E";
|
||||
item.type_label = "success";
|
||||
}
|
||||
else if (item.type == "private") {
|
||||
item.type_icon_content = "🔐\uFE0E";
|
||||
item.type_label = "danger";
|
||||
}
|
||||
else if (item.type == "semi-private") {
|
||||
item.type_icon_content = "🔒\uFE0E";
|
||||
item.type_label = "warning";
|
||||
}
|
||||
else {
|
||||
item.type_icon_content = "";
|
||||
item.type_label = "default";
|
||||
}
|
||||
|
||||
var main_cats_list = item.caps.filter(function(c) {
|
||||
@@ -190,7 +197,7 @@ function displayUnconfiguredIndexersList() {
|
||||
var indexer = unconfiguredIndexers[i];
|
||||
$(btn).click(function () {
|
||||
$('#select-indexer-modal').modal('hide').on('hidden.bs.modal', function (e) {
|
||||
displayIndexerSetup(indexer.id, indexer.name, indexer.caps, indexer.link, indexer.alternativesitelinks);
|
||||
displayIndexerSetup(indexer.id, indexer.name, indexer.caps, indexer.link, indexer.alternativesitelinks, indexer.description);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -215,7 +222,7 @@ function displayUnconfiguredIndexersList() {
|
||||
}
|
||||
}).fail(function (data) {
|
||||
if(data.responseJSON.error !== undefined) {
|
||||
doNotify("An error occured while configuring this indexer<br /><b>" + data.responseJSON.error + "</b><br /><i><a href=\"https://github.com/Jackett/Jackett/issues/new?title=[" + indexerId + "] " + data.responseJSON.error + " (Config)\" target=\"_blank\">Click here to open an issue on Github for this indexer.</a><i>", "danger", "glyphicon glyphicon-alert", false);
|
||||
doNotify("An error occured while configuring this indexer<br /><b>" + data.responseJSON.error + "</b><br /><i><a href=\"https://github.com/Jackett/Jackett/issues/new?title=[" + indexerId + "] " + data.responseJSON.error + " (Config)\" target=\"_blank\">Click here to open an issue on GitHub for this indexer.</a><i>", "danger", "glyphicon glyphicon-alert", false);
|
||||
} else {
|
||||
doNotify("An error occured while configuring this indexer, is Jackett server running ?", "danger", "glyphicon glyphicon-alert");
|
||||
}
|
||||
@@ -371,6 +378,7 @@ function prepareSearchButtons(element) {
|
||||
var $btn = $(btn);
|
||||
var id = $btn.data("id");
|
||||
$btn.click(function() {
|
||||
window.location.hash = "search&tracker=" + id;
|
||||
showSearch(id);
|
||||
});
|
||||
});
|
||||
@@ -380,7 +388,7 @@ function prepareSetupButtons(element) {
|
||||
element.find('.indexer-setup').each(function (i, btn) {
|
||||
var indexer = configuredIndexers[i];
|
||||
$(btn).click(function () {
|
||||
displayIndexerSetup(indexer.id, indexer.name, indexer.caps, indexer.link, indexer.alternativesitelinks);
|
||||
displayIndexerSetup(indexer.id, indexer.name, indexer.caps, indexer.link, indexer.alternativesitelinks, indexer.description);
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -437,7 +445,7 @@ function testIndexer(id, notifyResult) {
|
||||
}).fail(function (data) {
|
||||
updateTestState(id, "error", data.error, indexers);
|
||||
if(data.responseJSON.error !== undefined && notifyResult) {
|
||||
doNotify("An error occured while testing this indexer<br /><b>" + data.responseJSON.error + "</b><br /><i><a href=\"https://github.com/Jackett/Jackett/issues/new?title=[" + id + "] " + data.responseJSON.error + " (Test)\" target=\"_blank\">Click here to open an issue on Github for this indexer.</a><i>", "danger", "glyphicon glyphicon-alert", false);
|
||||
doNotify("An error occured while testing this indexer<br /><b>" + data.responseJSON.error + "</b><br /><i><a href=\"https://github.com/Jackett/Jackett/issues/new?title=[" + id + "] " + data.responseJSON.error + " (Test)\" target=\"_blank\">Click here to open an issue on GitHub for this indexer.</a><i>", "danger", "glyphicon glyphicon-alert", false);
|
||||
} else {
|
||||
doNotify("An error occured while testing indexers, please take a look at indexers with failed test for more informations.", "danger", "glyphicon glyphicon-alert");
|
||||
}
|
||||
@@ -458,14 +466,14 @@ function prepareTestButtons(element) {
|
||||
});
|
||||
}
|
||||
|
||||
function displayIndexerSetup(id, name, caps, link, alternativesitelinks) {
|
||||
function displayIndexerSetup(id, name, caps, link, alternativesitelinks, description) {
|
||||
api.getIndexerConfig(id, function (data) {
|
||||
if (data.result !== undefined && data.result == "error") {
|
||||
doNotify("Error: " + data.error, "danger", "glyphicon glyphicon-alert");
|
||||
return;
|
||||
}
|
||||
|
||||
populateSetupForm(id, name, data, caps, link, alternativesitelinks);
|
||||
populateSetupForm(id, name, data, caps, link, alternativesitelinks, description);
|
||||
}).fail(function () {
|
||||
doNotify("Request to Jackett server failed", "danger", "glyphicon glyphicon-alert");
|
||||
});
|
||||
@@ -490,10 +498,14 @@ function populateConfigItems(configForm, config) {
|
||||
hasReacaptcha = true;
|
||||
captchaItem = config[i];
|
||||
}
|
||||
else if (config[i].id === 'cookieheader' && hasReacaptcha) { // inject cookie into captcha item
|
||||
captchaItem.cookieheader = config[i].value;
|
||||
console.log(captchaItem);
|
||||
}
|
||||
}
|
||||
|
||||
var setupItemTemplate = Handlebars.compile($("#setup-item").html());
|
||||
if (hasReacaptcha && !window.jackettIsLocal) {
|
||||
if (hasReacaptcha && !window.jackettIsLocal && false) { // disable this for now, use inline cookie (below)
|
||||
var setupValueTemplate = Handlebars.compile($("#setup-item-nonlocalrecaptcha").html());
|
||||
captchaItem.value_element = setupValueTemplate(captchaItem);
|
||||
var template = setupItemTemplate(captchaItem);
|
||||
@@ -502,11 +514,22 @@ function populateConfigItems(configForm, config) {
|
||||
|
||||
for (var i = 0; i < config.length; i++) {
|
||||
var item = config[i];
|
||||
var setupValueTemplate = Handlebars.compile($("#setup-item-" + item.type).html());
|
||||
item.value_element = setupValueTemplate(item);
|
||||
var template = setupItemTemplate(item);
|
||||
$formItemContainer.append(template);
|
||||
if ((item.id === 'username' || item.id === 'password') && hasReacaptcha) {
|
||||
continue; // skip username/password if there's a recaptcha
|
||||
}
|
||||
if (item.type != 'recaptcha') {
|
||||
var setupValueTemplate = Handlebars.compile($("#setup-item-" + item.type).html());
|
||||
item.value_element = setupValueTemplate(item);
|
||||
var template = setupItemTemplate(item);
|
||||
$formItemContainer.append(template);
|
||||
}
|
||||
if (item.type === 'recaptcha') {
|
||||
// inject cookie dialog until recaptcha can be solved again
|
||||
var setupValueTemplate = Handlebars.compile($("#setup-item-nonlocalrecaptcha").html());
|
||||
captchaItem.value_element = setupValueTemplate(captchaItem);
|
||||
var template = setupItemTemplate(captchaItem);
|
||||
$formItemContainer.append(template);
|
||||
/*
|
||||
var jackettrecaptcha = $('.jackettrecaptcha');
|
||||
jackettrecaptcha.data("version", item.version);
|
||||
switch (item.version) {
|
||||
@@ -536,14 +559,15 @@ function populateConfigItems(configForm, config) {
|
||||
});
|
||||
break;
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function newConfigModal(title, config, caps, link, alternativesitelinks) {
|
||||
function newConfigModal(title, config, caps, link, alternativesitelinks, description) {
|
||||
var configTemplate = Handlebars.compile($("#jackett-config-setup-modal").html());
|
||||
var configForm = $(configTemplate({ title: title, caps: caps, link:link }));
|
||||
var configForm = $(configTemplate({ title: title, caps: caps, link: link, description: description }));
|
||||
$("#modals").append(configForm);
|
||||
populateConfigItems(configForm, config);
|
||||
|
||||
@@ -551,6 +575,10 @@ function newConfigModal(title, config, caps, link, alternativesitelinks) {
|
||||
var AlternativeSiteLinksTemplate = Handlebars.compile($("#setup-item-alternativesitelinks").html());
|
||||
var template = $(AlternativeSiteLinksTemplate({ "alternativesitelinks": alternativesitelinks }));
|
||||
configForm.find("div[data-id='sitelink']").after(template);
|
||||
template.find("a.alternativesitelink").click(function (a) {
|
||||
$("div[data-id='sitelink'] input").val(this.href);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
return configForm;
|
||||
@@ -600,8 +628,8 @@ function getConfigModalJson(configForm) {
|
||||
return configJson;
|
||||
}
|
||||
|
||||
function populateSetupForm(indexerId, name, config, caps, link, alternativesitelinks) {
|
||||
var configForm = newConfigModal(name, config, caps, link, alternativesitelinks);
|
||||
function populateSetupForm(indexerId, name, config, caps, link, alternativesitelinks, description) {
|
||||
var configForm = newConfigModal(name, config, caps, link, alternativesitelinks, description);
|
||||
var $goButton = configForm.find(".setup-indexer-go");
|
||||
$goButton.click(function () {
|
||||
var data = getConfigModalJson(configForm);
|
||||
@@ -623,7 +651,7 @@ function populateSetupForm(indexerId, name, config, caps, link, alternativesitel
|
||||
}
|
||||
}).fail(function (data) {
|
||||
if(data.responseJSON.error !== undefined) {
|
||||
doNotify("An error occured while updating this indexer<br /><b>" + data.responseJSON.error + "</b><br /><i><a href=\"https://github.com/Jackett/Jackett/issues/new?title=[" + indexerId + "] " + data.responseJSON.error + " (Config)\" target=\"_blank\">Click here to open an issue on Github for this indexer.</a><i>", "danger", "glyphicon glyphicon-alert", false);
|
||||
doNotify("An error occured while updating this indexer<br /><b>" + data.responseJSON.error + "</b><br /><i><a href=\"https://github.com/Jackett/Jackett/issues/new?title=[" + indexerId + "] " + data.responseJSON.error + " (Config)\" target=\"_blank\">Click here to open an issue on GitHub for this indexer.</a><i>", "danger", "glyphicon glyphicon-alert", false);
|
||||
} else {
|
||||
doNotify("An error occured while updating this indexer, request to Jackett server failed, is server running ?", "danger", "glyphicon glyphicon-alert");
|
||||
}
|
||||
@@ -710,9 +738,9 @@ function updateReleasesRow(row)
|
||||
if (DownloadVolumeFactor == 0) {
|
||||
labels.append('\n<span class="label label-success">FREELEECH</span>');
|
||||
} else if (DownloadVolumeFactor < 1) {
|
||||
labels.append('\n<span class="label label-primary">' + DownloadVolumeFactor * 100 + '%DL</span>');
|
||||
labels.append('\n<span class="label label-primary">' + (DownloadVolumeFactor * 100).toFixed(0) + '%DL</span>');
|
||||
} else if (DownloadVolumeFactor > 1) {
|
||||
labels.append('\n<span class="label label-danger">' + DownloadVolumeFactor * 100 + '%DL</span>');
|
||||
labels.append('\n<span class="label label-danger">' + (DownloadVolumeFactor * 100).toFixed(0) + '%DL</span>');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -720,12 +748,15 @@ function updateReleasesRow(row)
|
||||
if (UploadVolumeFactor == 0) {
|
||||
labels.append('\n<span class="label label-warning">NO UPLOAD</span>');
|
||||
} else if (UploadVolumeFactor != 1) {
|
||||
labels.append('\n<span class="label label-info">' + UploadVolumeFactor * 100 + '%UL</span>');
|
||||
labels.append('\n<span class="label label-info">' + (UploadVolumeFactor * 100).toFixed(0) + '%UL</span>');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function showSearch(selectedIndexer, query) {
|
||||
function showSearch(selectedIndexer, query, category) {
|
||||
var selectedIndexers = []
|
||||
if (selectedIndexer)
|
||||
selectedIndexers = selectedIndexer.split(",");
|
||||
$('#select-indexer-modal').remove();
|
||||
var releaseTemplate = Handlebars.compile($("#jackett-search").html());
|
||||
var releaseDialog = $(releaseTemplate({
|
||||
@@ -743,28 +774,30 @@ function showSearch(selectedIndexer, query) {
|
||||
window.location.hash = '';
|
||||
}) ;
|
||||
|
||||
var setCategories = function (tracker, items) {
|
||||
var setCategories = function (trackers, items) {
|
||||
var cats = {};
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
if (items[i].configured === true && (items[i].id === tracker || tracker === '')) {
|
||||
indexers["'" + items[i].id + "'"] = items[i].name;
|
||||
for (var prop in items[i].caps) {
|
||||
if (prop < 100000 || tracker)
|
||||
cats[prop] = items[i].caps[prop];
|
||||
if (trackers.length == 0 || $.inArray(items[i].id, trackers) !== -1) {
|
||||
for (var j in items[i].caps) {
|
||||
var cat = items[i].caps[j]
|
||||
if (cat.ID < 100000 || trackers.length == 1)
|
||||
cats[cat.ID] = cat.Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
var select = $('#searchCategory');
|
||||
select.html("<option value=''>-- All --</option>");
|
||||
$.each(cats, function (index, value) {
|
||||
select.append($("<option></option>")
|
||||
.attr("value", value["ID"]).text(value["ID"] + ' (' + value["Name"] + ')'));
|
||||
var selected = select.val();
|
||||
var options = []
|
||||
$.each(cats, function (ID, Name) {
|
||||
options.push({ label: ID + ' (' + Name + ')', value: ID });
|
||||
});
|
||||
select.multiselect('dataprovider', options);
|
||||
select.val(selected).multiselect("refresh");
|
||||
};
|
||||
|
||||
$('#searchTracker').change(jQuery.proxy(function () {
|
||||
var trackerId = $('#searchTracker').val();
|
||||
setCategories(trackerId, this.items);
|
||||
var trackerIds = $('#searchTracker').val();
|
||||
setCategories(trackerIds, this.items);
|
||||
}, { items: configuredIndexers }));
|
||||
|
||||
var queryField = document.getElementById("searchquery");
|
||||
@@ -785,18 +818,16 @@ function showSearch(selectedIndexer, query) {
|
||||
var queryObj = {
|
||||
Query: searchString,
|
||||
Category: releaseDialog.find('#searchCategory').val(),
|
||||
Tracker: releaseDialog.find('#searchTracker').val().replace("'", "").replace("'", ""),
|
||||
Tracker: releaseDialog.find('#searchTracker').val()
|
||||
};
|
||||
|
||||
window.location.hash = "search=" + searchString;
|
||||
window.location.hash = $.param({ search: queryObj.Query, tracker: queryObj.Tracker.join(","), category: queryObj.Category.join(",") });
|
||||
|
||||
$('#jackett-search-perform').html($('#spinner').html());
|
||||
$('#searchResults div.dataTables_filter input').val("");
|
||||
clearSearchResultTable($('#searchResults'));
|
||||
|
||||
var trackerId = queryObj.Tracker;
|
||||
if (trackerId == null || trackerId == "")
|
||||
trackerId = "all";
|
||||
var trackerId = "all";
|
||||
api.resultsForIndexer(trackerId, queryObj, function (data) {
|
||||
for (var i = 0; i < data.Results.length; i++) {
|
||||
var item = data.Results[i];
|
||||
@@ -816,16 +847,38 @@ function showSearch(selectedIndexer, query) {
|
||||
});
|
||||
|
||||
var searchTracker = releaseDialog.find("#searchTracker");
|
||||
if (selectedIndexer)
|
||||
searchTracker.val(selectedIndexer);
|
||||
var searchCategory = releaseDialog.find('#searchCategory')
|
||||
searchCategory.multiselect({
|
||||
maxHeight: 400,
|
||||
enableFiltering: true,
|
||||
includeSelectAllOption: true,
|
||||
enableCaseInsensitiveFiltering: true,
|
||||
nonSelectedText: 'Any'
|
||||
});
|
||||
if (selectedIndexers)
|
||||
searchTracker.val(selectedIndexers);
|
||||
searchTracker.trigger("change");
|
||||
|
||||
updateSearchResultTable($('#searchResults'), []);
|
||||
clearSearchResultTable($('#searchResults'));
|
||||
releaseDialog.modal("show");
|
||||
|
||||
searchTracker.multiselect({
|
||||
maxHeight: 400,
|
||||
enableFiltering: true,
|
||||
includeSelectAllOption: true,
|
||||
enableCaseInsensitiveFiltering: true,
|
||||
nonSelectedText: 'All'
|
||||
});
|
||||
|
||||
|
||||
if (category !== undefined) {
|
||||
searchCategory.val(category.split(","));
|
||||
searchCategory.multiselect("refresh");
|
||||
}
|
||||
|
||||
releaseDialog.modal("show");
|
||||
if (query !== undefined) {
|
||||
queryField.value = decodeURIComponent(query);
|
||||
queryField.value = query;
|
||||
searchButton.click();
|
||||
}
|
||||
}
|
||||
@@ -1098,6 +1151,14 @@ function bindUIButtons() {
|
||||
var jackett_prerelease = $("#jackett-prerelease").is(':checked');
|
||||
var jackett_logging = $("#jackett-logging").is(':checked');
|
||||
var jackett_omdb_key = $("#jackett-omdbkey").val();
|
||||
var jackett_omdb_url = $("#jackett-omdburl").val();
|
||||
|
||||
var jackett_proxy_url = $("#jackett-proxy-url").val();
|
||||
var jackett_proxy_type = $("#jackett-proxy-type").val();
|
||||
var jackett_proxy_port = $("#jackett-proxy-port").val();
|
||||
var jackett_proxy_username = $("#jackett-proxy-username").val();
|
||||
var jackett_proxy_password = $("#jackett-proxy-password").val();
|
||||
|
||||
var jsonObject = {
|
||||
port: jackett_port,
|
||||
external: jackett_external,
|
||||
@@ -1106,20 +1167,26 @@ function bindUIButtons() {
|
||||
blackholedir: $("#jackett-savedir").val(),
|
||||
logging: jackett_logging,
|
||||
basepathoverride: jackett_basepathoverride,
|
||||
omdbkey: jackett_omdb_key
|
||||
omdbkey: jackett_omdb_key,
|
||||
omdburl: jackett_omdb_url,
|
||||
proxy_type: jackett_proxy_type,
|
||||
proxy_url: jackett_proxy_url,
|
||||
proxy_port: jackett_proxy_port,
|
||||
proxy_username: jackett_proxy_username,
|
||||
proxy_password: jackett_proxy_password
|
||||
};
|
||||
api.updateServerConfig(jsonObject, function (data) {
|
||||
if (data !== undefined && data.result == "error") {
|
||||
doNotify("Error: " + data.error, "danger", "glyphicon glyphicon-alert");
|
||||
doNotify("Redirecting you to complete configuration update..", "success", "glyphicon glyphicon-ok");
|
||||
window.setTimeout(function () {
|
||||
window.location.reload(true);
|
||||
}, 3000);
|
||||
}).fail(function (data) {
|
||||
if (data.responseJSON !== undefined && data.responseJSON.result == "error") {
|
||||
doNotify("Error: " + data.responseJSON.error, "danger", "glyphicon glyphicon-alert");
|
||||
return;
|
||||
} else {
|
||||
doNotify("Redirecting you to complete configuration update..", "success", "glyphicon glyphicon-ok");
|
||||
window.setTimeout(function () {
|
||||
window.location.reload(true);
|
||||
}, 3000);
|
||||
doNotify("Request to Jackett server failed", "danger", "glyphicon glyphicon-alert");
|
||||
}
|
||||
}).fail(function () {
|
||||
doNotify("Request to Jackett server failed", "danger", "glyphicon glyphicon-alert");
|
||||
});
|
||||
});
|
||||
|
Before Width: | Height: | Size: 361 KiB After Width: | Height: | Size: 361 KiB |
Before Width: | Height: | Size: 306 KiB After Width: | Height: | Size: 306 KiB |
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 160 B After Width: | Height: | Size: 160 B |
Before Width: | Height: | Size: 148 B After Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 201 B |
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 158 B |
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 146 B |