core
Class ItunesMediator

java.lang.Object
  extended by core.ItunesMediator

public class ItunesMediator
extends java.lang.Object

Handles sending completed downloads into iTunes. The code has been slightly modified from the Limewire Project, but the majority of it is Limewire open source code.


Field Summary
static java.lang.String ITUNES_ACTIVEX_NAME
          The name of the iTunes application used for Jacob.
 
Constructor Summary
ItunesMediator()
          Provides methods for interacting with iTunes.
 
Method Summary
 void addToWindowsITunes(java.io.File fileToAdd)
          Creates a new thread and submits it to an executor that will add the given file to iTunes.
 void forceWriteITunesXMLFile()
          Deletes the iTunes XML File and forces iTunes to create a new one.
 java.util.concurrent.ExecutorService getExecutor()
          Returns the executor responsible for executing all the add new track threads.
static void main(java.lang.String[] args)
           
static void removeOrphanedFiles(java.awt.Component c)
          Creates a new Swing Worker task that identifies and removes orphaned tracks from iTunes automatically.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ITUNES_ACTIVEX_NAME

public static final java.lang.String ITUNES_ACTIVEX_NAME
The name of the iTunes application used for Jacob.

See Also:
Constant Field Values
Constructor Detail

ItunesMediator

public ItunesMediator()
Provides methods for interacting with iTunes.

Method Detail

removeOrphanedFiles

public static void removeOrphanedFiles(java.awt.Component c)
Creates a new Swing Worker task that identifies and removes orphaned tracks from iTunes automatically.

Parameters:
c - The parent component to display the ProgressMonitor object to.

addToWindowsITunes

public void addToWindowsITunes(java.io.File fileToAdd)
Creates a new thread and submits it to an executor that will add the given file to iTunes.

Parameters:
fileToAdd - The file to add to iTunes.

forceWriteITunesXMLFile

public void forceWriteITunesXMLFile()
Deletes the iTunes XML File and forces iTunes to create a new one.


getExecutor

public java.util.concurrent.ExecutorService getExecutor()
Returns the executor responsible for executing all the add new track threads.

Returns:
executor The executor object that is responsible for adding all the new tracks to iTunes.

main

public static void main(java.lang.String[] args)