Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move entry-point main methods to separate package #59

Merged
merged 1 commit into from
Aug 26, 2013

Conversation

pwoodworth
Copy link
Contributor

Using ttorrent as a library, I ran into a couple annoying visibility issues. By moving the entry-point main methods of the codebase into classes of a separate package we get the benefit of:

  1. Enforcing 3rd-party code using ttorrent as a library has the same privileges as command-line entry-points.

  2. Uncluttering some key classes making them easier to scan and comprehend.

The moved method bodies and javadoc are kept as identical as possible, with only two non-move changes to make it possible: (a) Adding the Tracker#getTrackedTorrents() getter, and (b) making Client.ClientShutdown public.

This pull request will conflict with https://github.com/turn/ttorrent/pull/58 due to both having the new getTrackedTorrents() getter, but I will happily update whichever pull request goes second.

@mpetazzoni
Copy link
Owner

Thanks! Could you just make sure you new files have the copyright/license header at the top? Other than that change looks good.

@pwoodworth
Copy link
Contributor Author

Repushed with added copyright headers (squashed all changes into one commit).

mpetazzoni added a commit that referenced this pull request Aug 26, 2013
Move entry-point main methods to separate package

Signed-off-by: Maxime Petazzoni <[email protected]>
@mpetazzoni mpetazzoni merged commit d33c361 into mpetazzoni:master Aug 26, 2013
@mpetazzoni
Copy link
Owner

Awesome, thanks!

@pwoodworth pwoodworth deleted the climove branch August 26, 2013 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants