Skip to content

Commit

Permalink
core & plugin sources, plugin assets
Browse files Browse the repository at this point in the history
  • Loading branch information
TuxPaper committed Dec 17, 2018
1 parent 3258c7f commit 4d633da
Show file tree
Hide file tree
Showing 2,880 changed files with 769,748 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ google-services.json


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


1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions BiglyBT/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ dependencies {
// https://github.com/bkhezry/Android-Toggle-Switch which is
// https://github.com/llollox/Android-Toggle-Switch
implementation project(':androidtoggleswitch')
implementation project(':core')
}

afterEvaluate {
Expand Down
Binary file removed BiglyBT/libs/BiglyBT-core-android.jar
Binary file not shown.
Binary file added BiglyBT/src/coreFlavor/assets/plugins.zip
Binary file not shown.
1 change: 1 addition & 0 deletions core/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
24 changes: 24 additions & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apply plugin: 'java-library'

sourceSets {
main {

java {
srcDirs = ['src','plugins']
}

resources {
includes = [ '**/*.properties' ]
srcDirs = ['src','plugins']
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleDependency
compile 'commons-cli:commons-cli:1.4'
}

sourceCompatibility = "1.8"
targetCompatibility = "1.8"
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
/*
* Created on Aug 28, 2010
* Created by Paul Gardner
*
* Copyright 2010 Vuze, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details ( see the LICENSE file ).
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/



package com.aelitis.azureus.core.networkmanager.impl.utp;

import java.net.InetSocketAddress;
import java.nio.ByteBuffer;

import com.biglybt.core.util.AddressUtils;

import com.biglybt.core.networkmanager.ConnectionEndpoint;
import com.biglybt.core.networkmanager.ProtocolEndpoint;
import com.biglybt.core.networkmanager.ProtocolEndpointFactory;
import com.biglybt.core.networkmanager.ProtocolEndpointHandler;
import com.biglybt.core.networkmanager.Transport;
import com.biglybt.core.networkmanager.Transport.ConnectListener;

public class
ProtocolEndpointUTP
implements ProtocolEndpoint
{
private static UTPConnectionManager manager;

public static void
register(
UTPConnectionManager _manager )
{
manager = _manager;

ProtocolEndpointFactory.registerHandler(
new ProtocolEndpointHandler()
{
public int
getType()
{
return( ProtocolEndpoint.PROTOCOL_UTP );
}

public ProtocolEndpoint
create(
InetSocketAddress address )
{
return( new ProtocolEndpointUTP( address ));
}

public ProtocolEndpoint
create(
ConnectionEndpoint connection_endpoint,
InetSocketAddress address )
{
return( new ProtocolEndpointUTP( connection_endpoint, address ));
}
});
}

private ConnectionEndpoint ce;
private InetSocketAddress address;

private
ProtocolEndpointUTP(
ConnectionEndpoint _ce,
InetSocketAddress _address )
{
ce = _ce;
address = _address;

ce.addProtocol( this );
}

private
ProtocolEndpointUTP(
InetSocketAddress _address )
{
ce = new ConnectionEndpoint(_address );
address = _address;

ce.addProtocol( this );
}

public void
setConnectionEndpoint(
ConnectionEndpoint _ce )
{
ce = _ce;

ce.addProtocol( this );
}

public int
getType()
{
return( PROTOCOL_UTP );
}

public InetSocketAddress
getAddress()
{
return( address );
}

public InetSocketAddress
getAdjustedAddress(
boolean to_lan )
{
return( AddressUtils.adjustTCPAddress( address, to_lan ));
}

public ConnectionEndpoint
getConnectionEndpoint()
{
return( ce );
}

public Transport
connectOutbound(
boolean connect_with_crypto,
boolean allow_fallback,
byte[][] shared_secrets,
ByteBuffer initial_data,
int priority,
ConnectListener listener )
{
UTPTransport t = new UTPTransport( manager, this, connect_with_crypto, allow_fallback, shared_secrets );

t.connectOutbound( initial_data, listener, priority );

return( t );
}

public String
getDescription()
{
return( address.toString());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Created on 16 Jun 2006
* Created by Paul Gardner
* Copyright (C) 2006 Aelitis, All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* AELITIS, SAS au capital de 46,603.30 euros
* 8 Allee Lenotre, La Grille Royale, 78600 Le Mesnil le Roi, France.
*
*/

package com.aelitis.azureus.core.networkmanager.impl.utp;

import com.biglybt.core.networkmanager.ProtocolEndpoint;
import com.biglybt.core.networkmanager.TransportEndpoint;

public class
TransportEndpointUTP
implements TransportEndpoint
{
private ProtocolEndpoint pe;

public
TransportEndpointUTP(
ProtocolEndpoint _pe )
{
pe = _pe;
}

public ProtocolEndpoint
getProtocolEndpoint()
{
return( pe );
}
}
Loading

0 comments on commit 4d633da

Please sign in to comment.