Package org.gudy.azureus2.plugins

Examples of org.gudy.azureus2.plugins.PluginInterface


     
      TranscodePipe    pipe = null;

      if ( source_file == null ){
             
        PluginInterface av_pi = plugin_interface.getPluginManager().getPluginInterfaceByID( "azupnpav" );
       
        if ( av_pi == null ){
       
          throw( new TranscodeException( "Media Server plugin not found" ));
        }
       
        IPCInterface av_ipc = av_pi.getIPC();
       
        String url_str = (String)av_ipc.invoke( "getContentURL", new Object[]{ input });
   
        if ( url_str != null && url_str.length() > 0 ){
       
View Full Code Here


    URL                output )
 
    throws TranscodeException
  {
    try{
      PluginInterface av_pi = plugin_interface.getPluginManager().getPluginInterfaceByID( "azupnpav" );
     
      if ( av_pi == null ){
     
        throw( new TranscodeException( "Media Server plugin not found" ));
      }
     
      final TranscodeProviderJob[] xcode_job = { null };
     
      URL         source_url  = null;
      TranscodePipe    pipe    = null;

      if ( direct_input ){
       
        if ( input.getDownloaded() == input.getLength()){
         
          File  file = input.getFile();
         
          if ( file.exists() && file.length() == input.getLength()){
           
            source_url = file.toURI().toURL();
          }
        }
       
        if ( source_url == null ){
       
          manager.log( "Failed to use direct input as source file doesn't exist/incomplete" );
        }
      }
     
      if ( source_url == null ){
       
        IPCInterface av_ipc = av_pi.getIPC();
       
        String url_str = (String)av_ipc.invoke( "getContentURL", new Object[]{ input });
       
       
        if ( url_str == null || url_str.length() == 0 ){
View Full Code Here

  {
    plugin        = _plugin;
    plugin_interface  = _plugin_interface;
   
    try{
      PluginInterface dht_pi = plugin_interface.getPluginManager().getPluginInterfaceByClass( DHTPlugin.class );
     
      if ( dht_pi != null ){
       
        dht_plugin = (DHTPlugin)dht_pi.getPlugin();
      }

      ddb = plugin_interface.getDistributedDatabase();
     
      ddb.addTransferHandler( transfer_type, this );
View Full Code Here

       
        transcode_file.setTranscodeRequired( false );
       
        if ( job.isStream()){
         
          PluginInterface av_pi = PluginInitializer.getDefaultInterface().getPluginManager().getPluginInterfaceByID( "azupnpav" );
         
          if ( av_pi == null ){
         
            throw( new TranscodeException( "Media Server plugin not found" ));
          }
         
          IPCInterface av_ipc = av_pi.getIPC();
         
          String url_str = (String)av_ipc.invoke( "getContentURL", new Object[]{ source });
         
         
          if ( url_str == null || url_str.length() == 0 ){
           
              // see if we can use the file directly
           
            File source_file = source.getFile();
           
            if ( source_file.exists()){
             
              job.setStream( new BufferedInputStream( new FileInputStream( source_file )));
             
            }else{
             
              throw( new TranscodeException( "No UPnPAV URL and file doesn't exist" ));
            }
          }else{
           
            URL source_url = new URL( url_str );
         
            job.setStream( source_url.openConnection().getInputStream());
          }
        }else{
         
          if ( device.getAlwaysCacheFiles()){
           
            PluginInterface av_pi = PluginInitializer.getDefaultInterface().getPluginManager().getPluginInterfaceByID( "azupnpav" );
           
            if ( av_pi == null ){
           
              throw( new TranscodeException( "Media Server plugin not found" ));
            }
           
            IPCInterface av_ipc = av_pi.getIPC();
           
            String url_str = (String)av_ipc.invoke( "getContentURL", new Object[]{ source });
           
            InputStream  is;
           
View Full Code Here

  protected
  PairingManagerImpl()
  {
    must_update_once = COConfigurationManager.getBooleanParameter( "pairing.updateoutstanding" );

    PluginInterface default_pi = PluginInitializer.getDefaultInterface();
   
    final UIManager  ui_manager = default_pi.getUIManager();
   
    BasicPluginConfigModel configModel = ui_manager.createBasicPluginConfigModel(
        ConfigSection.SECTION_CONNECTION, "Pairing");

    configModel.addHyperlinkParameter2( "ConfigView.label.please.visit.here", MessageText.getString( "ConfigView.section.connection.pairing.url" ));
View Full Code Here

     
      azureus_core  = _core;
    }
   
    try{
      PluginInterface default_pi = PluginInitializer.getDefaultInterface();

      DelayedTask dt = default_pi.getUtilities().createDelayedTask(
        new Runnable()
        {
          public void
          run()
          {
View Full Code Here

        }
       
          // grab some UPnP info for diagnostics
       
        try{
            PluginInterface pi_upnp = azureus_core.getPluginManager().getPluginInterfaceByClass( UPnPPlugin.class );

            if ( pi_upnp != null ){
             
                UPnPPlugin upnp = (UPnPPlugin)pi_upnp.getPlugin();

                if ( upnp.isEnabled()){
                 
                  List<Map<String,String>>  upnp_list = new ArrayList<Map<String,String>>();
                 
View Full Code Here

      return;
    }
    AzureusCoreFactory.addCoreRunningListener(new AzureusCoreRunningListener() {

      public void azureusCoreRunning(AzureusCore core) {
        PluginInterface pi = core.getPluginManager().getDefaultPluginInterface();
        featman = pi.getUtilities().getFeatureManager();

        fml = new FeatureManagerUIListener(featman);
        featman.addListener(fml);
        Licence[] licences = featman.getLicences();
        for (Licence licence : licences) {
          fml.licenceAdded(licence);
        }
       

        UIManager ui_manager = pi.getUIManager();

        ui_manager.addUIListener(new UIManagerListener() {
          public void UIDetached(UIInstance instance) {
          }
View Full Code Here

  /**
   * @return
   */
  public static boolean hasFullBurn() {
   
    PluginInterface pi = PluginInitializer.getDefaultInterface().getPluginState().isInitialisationComplete()
        ? AzureusCoreFactory.getSingleton().getPluginManager().getPluginInterfaceByID(
            "azburn_v") : null;
    if (pi == null) {
      // maybe not added yet.. use featman
      Set<String> featuresInstalled = UtilitiesImpl.getFeaturesInstalled();
      return featuresInstalled.contains("dvdburn_trial") && !featuresInstalled.contains("dvdburn");
    }
    return pi.getPluginState().isOperational();
  }
View Full Code Here

    String                _resource_prefix,
    final UIFunctions.actionListener  _action_listener )
  {
    plugin_id     = _plugin_id;
   
    PluginInterface existing = AzureusCoreFactory.getSingleton().getPluginManager().getPluginInterfaceByID( plugin_id );
   
    if ( existing != null ){
     
      if ( existing.getPluginState().isOperational()){
       
        _action_listener.actionComplete( true );
       
      }else{
       
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.plugins.PluginInterface

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.