Skip to content

Commit 4812eea

Browse files
committed
core & plugin sources, plugin assets
1 parent 8ad3c5d commit 4812eea

File tree

2,912 files changed

+808225
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,912 files changed

+808225
-3
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ google-services.json
138138

139139

140140
# Exclude plugins since they take up lots of space.. use updatePlugins.sh to get them locally
141-
/BiglyBT/src/coreFlavor/assets/plugins/
142-
/BiglyBT/src/coreFlavor/assets/plugins.zip
143141
/BiglyBT/libs/*_*.*.*.jar
144142

145143

.idea/gradle.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

BiglyBT/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ dependencies {
177177

178178
implementation project(':recyclerview-fastscroll')
179179
implementation project(':Android-DirectoryChooser')
180+
implementation project(':core')
180181

181182
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.2'
182183
}
-9.16 MB
Binary file not shown.
389 KB
Binary file not shown.

core/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

core/build.gradle

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
apply plugin: 'java-library'
2+
3+
sourceSets {
4+
main {
5+
6+
java {
7+
srcDirs = ['src','plugins']
8+
}
9+
10+
resources {
11+
includes = [ '**/*.properties' ]
12+
srcDirs = ['src','plugins']
13+
}
14+
}
15+
}
16+
17+
dependencies {
18+
implementation fileTree(dir: 'libs', include: ['*.jar'])
19+
//noinspection GradleDependency
20+
implementation 'commons-cli:commons-cli:1.4'
21+
}
22+
23+
java {
24+
sourceCompatibility JavaVersion.VERSION_1_8
25+
targetCompatibility JavaVersion.VERSION_1_8
26+
}
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
/*
2+
* Created on Aug 28, 2010
3+
* Created by Paul Gardner
4+
*
5+
* Copyright 2010 Vuze, Inc. All rights reserved.
6+
*
7+
* This program is free software; you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation; either version 2 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details ( see the LICENSE file ).
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program; if not, write to the Free Software
19+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20+
*/
21+
22+
23+
24+
package com.aelitis.azureus.core.networkmanager.impl.utp;
25+
26+
import java.net.InetSocketAddress;
27+
import java.nio.ByteBuffer;
28+
29+
import com.biglybt.core.util.AddressUtils;
30+
31+
import com.biglybt.core.networkmanager.ConnectionEndpoint;
32+
import com.biglybt.core.networkmanager.ProtocolEndpoint;
33+
import com.biglybt.core.networkmanager.ProtocolEndpointFactory;
34+
import com.biglybt.core.networkmanager.ProtocolEndpointHandler;
35+
import com.biglybt.core.networkmanager.Transport;
36+
import com.biglybt.core.networkmanager.Transport.ConnectListener;
37+
38+
public class
39+
ProtocolEndpointUTP
40+
implements ProtocolEndpoint
41+
{
42+
private static UTPConnectionManager manager;
43+
44+
public static void
45+
register(
46+
UTPConnectionManager _manager )
47+
{
48+
manager = _manager;
49+
50+
ProtocolEndpointFactory.registerHandler(
51+
new ProtocolEndpointHandler()
52+
{
53+
public int
54+
getType()
55+
{
56+
return( ProtocolEndpoint.PROTOCOL_UTP );
57+
}
58+
59+
public ProtocolEndpoint
60+
create(
61+
InetSocketAddress address )
62+
{
63+
return( new ProtocolEndpointUTP( address ));
64+
}
65+
66+
public ProtocolEndpoint
67+
create(
68+
ConnectionEndpoint connection_endpoint,
69+
InetSocketAddress address )
70+
{
71+
return( new ProtocolEndpointUTP( connection_endpoint, address ));
72+
}
73+
});
74+
}
75+
76+
private ConnectionEndpoint ce;
77+
private InetSocketAddress address;
78+
79+
private
80+
ProtocolEndpointUTP(
81+
ConnectionEndpoint _ce,
82+
InetSocketAddress _address )
83+
{
84+
ce = _ce;
85+
address = _address;
86+
87+
ce.addProtocol( this );
88+
}
89+
90+
private
91+
ProtocolEndpointUTP(
92+
InetSocketAddress _address )
93+
{
94+
ce = new ConnectionEndpoint(_address );
95+
address = _address;
96+
97+
ce.addProtocol( this );
98+
}
99+
100+
public void
101+
setConnectionEndpoint(
102+
ConnectionEndpoint _ce )
103+
{
104+
ce = _ce;
105+
106+
ce.addProtocol( this );
107+
}
108+
109+
public int
110+
getType()
111+
{
112+
return( PROTOCOL_UTP );
113+
}
114+
115+
public InetSocketAddress
116+
getAddress()
117+
{
118+
return( address );
119+
}
120+
121+
public InetSocketAddress
122+
getAdjustedAddress(
123+
boolean to_lan )
124+
{
125+
return( AddressUtils.adjustTCPAddress( address, to_lan ));
126+
}
127+
128+
public ConnectionEndpoint
129+
getConnectionEndpoint()
130+
{
131+
return( ce );
132+
}
133+
134+
public Transport
135+
connectOutbound(
136+
boolean connect_with_crypto,
137+
boolean allow_fallback,
138+
byte[][] shared_secrets,
139+
ByteBuffer initial_data,
140+
int priority,
141+
ConnectListener listener )
142+
{
143+
UTPTransport t = new UTPTransport( manager, this, connect_with_crypto, allow_fallback, shared_secrets );
144+
145+
t.connectOutbound( initial_data, listener, priority );
146+
147+
return( t );
148+
}
149+
150+
public String
151+
getDescription()
152+
{
153+
return( address.toString());
154+
}
155+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Created on 16 Jun 2006
3+
* Created by Paul Gardner
4+
* Copyright (C) 2006 Aelitis, All Rights Reserved.
5+
*
6+
* This program is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU General Public License
8+
* as published by the Free Software Foundation; either version 2
9+
* of the License, or (at your option) any later version.
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program; if not, write to the Free Software
16+
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17+
*
18+
* AELITIS, SAS au capital de 46,603.30 euros
19+
* 8 Allee Lenotre, La Grille Royale, 78600 Le Mesnil le Roi, France.
20+
*
21+
*/
22+
23+
package com.aelitis.azureus.core.networkmanager.impl.utp;
24+
25+
import com.biglybt.core.networkmanager.ProtocolEndpoint;
26+
import com.biglybt.core.networkmanager.TransportEndpoint;
27+
28+
public class
29+
TransportEndpointUTP
30+
implements TransportEndpoint
31+
{
32+
private ProtocolEndpoint pe;
33+
34+
public
35+
TransportEndpointUTP(
36+
ProtocolEndpoint _pe )
37+
{
38+
pe = _pe;
39+
}
40+
41+
public ProtocolEndpoint
42+
getProtocolEndpoint()
43+
{
44+
return( pe );
45+
}
46+
}

0 commit comments

Comments
 (0)