Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add bin/ directory for LimeWire.app binary, and move core.rb into thi…

…s repo
  • Loading branch information...
commit 3d6fc6be35147356665e4b1720bde68c214f4465 1 parent faded77
@mnutt authored
Showing with 29 additions and 0 deletions.
  1. 0  bin/.gitignore
  2. +29 −0 lib/core.rb
View
0  bin/.gitignore
No changes.
View
29 lib/core.rb
@@ -0,0 +1,29 @@
+module Core
+ def self.get_singleton(klass)
+ $core.injector.get_instance(klass.java_class)
+ end
+
+ if($core)
+ # Running from Limewire
+ include Java
+
+ Geocoder = org.limewire.geocode.Geocoder
+ OldURN = com.limegroup.gnutella.URN
+ MetaDataFactoryImpl = com.limegroup.gnutella.metadata.MetaDataFactoryImpl
+ MetaDataFactoryRef = com.limegroup.gnutella.metadata.MetaDataFactory
+ GUID = org.limewire.io.GUID
+ URN = org.limewire.core.api.URN
+ URNImpl = org.limewire.core.impl.URNImpl
+ LibraryManagerRef = org.limewire.core.api.library.LibraryManager
+ SearchManagerRef = org.limewire.core.api.search.SearchManager
+ DownloadListManagerRef = org.limewire.core.api.download.DownloadListManager
+
+ SearchManager = self.get_singleton(SearchManagerRef)
+ LibraryManager = self.get_singleton(LibraryManagerRef)
+ MetaDataFactory = self.get_singleton(MetaDataFactoryRef)
+ DownloadListManager = self.get_singleton(DownloadListManagerRef)
+ else
+ # Not running from limewire, no $core available
+ end
+end
+
Please sign in to comment.
Something went wrong with that request. Please try again.