diff --git a/.gitignore b/.gitignore
index 1ed38e1..dcd28b7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,13 +1,6 @@
-/java/bin
-/cpp/wiipair/.settings
-/cpp/wiipair/Debug/src
-/cpp/wiipair/Release/src
-/cpp/wiiuse/.settings
-/cpp/wiiuse/Debug/src
-/cpp/wiiuse/Release/src
-/cpp/wiiusej/.settings
-/cpp/wiiusej/Debug/src
-/cpp/wiiusej/Release/src
-/cpp/mimis/.settings
-/cpp/mimis/Debug/src
-/cpp/mimis/Release/src
\ No newline at end of file
+bin
+Debug/src
+Release/src
+.gradle
+.settings
+build
diff --git a/java/.classpath b/java/.classpath
index 4fec3f4..e4d0db4 100644
--- a/java/.classpath
+++ b/java/.classpath
@@ -1,15 +1,6 @@
-
-
-
-
-
-
-
-
-
-
+
diff --git a/java/.project b/java/.project
index 5605d1a..68b3df7 100644
--- a/java/.project
+++ b/java/.project
@@ -1,6 +1,6 @@
- Mimis
+ root
@@ -12,6 +12,23 @@
+ org.springsource.ide.eclipse.gradle.core.natureorg.eclipse.jdt.core.javanature
+
+
+ 0
+
+ 26
+
+ org.eclipse.ui.ide.orFilterMatcher
+
+
+ org.eclipse.ui.ide.multiFilter
+ 1.0-projectRelativePath-equals-true-false-mimis
+
+
+
+
+
diff --git a/java/DelcomDLL.dll b/java/DelcomDLL.dll
deleted file mode 100644
index ecfa470..0000000
Binary files a/java/DelcomDLL.dll and /dev/null differ
diff --git a/java/WiiPair.exe b/java/WiiPair.exe
deleted file mode 100644
index f16c97d..0000000
Binary files a/java/WiiPair.exe and /dev/null differ
diff --git a/java/build.xml b/java/build.xml
deleted file mode 100644
index 05ce1cb..0000000
--- a/java/build.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/java/cfg/commons-logging.properties b/java/cfg/commons-logging.properties
deleted file mode 100644
index b21aadc..0000000
--- a/java/cfg/commons-logging.properties
+++ /dev/null
@@ -1 +0,0 @@
-#org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
\ No newline at end of file
diff --git a/java/cfg/log4j.properties b/java/cfg/log4j.properties
deleted file mode 100644
index 01e7022..0000000
--- a/java/cfg/log4j.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-log4j.rootLogger=TRACE, CA
-log4j.appender.CA=org.apache.log4j.ConsoleAppender
-log4j.appender.CA.layout=org.apache.log4j.PatternLayout
-log4j.appender.CA.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
-log4j.appender.CUSTOM=test.CustomAppender
-log4j.appender.CUSTOM.Bla=1234
-log4j.appender.CUSTOM.layout=org.apache.log4j.PatternLayout
-log4j.appender.CUSTOM.layout.ConversionPattern=[%d{MMM dd HH:mm:ss}] %-5p (%F:%L) - %m%n
\ No newline at end of file
diff --git a/java/client.jar b/java/client.jar
deleted file mode 100644
index a16b1bd..0000000
Binary files a/java/client.jar and /dev/null differ
diff --git a/java/irtoy.exe b/java/irtoy.exe
deleted file mode 100644
index 0dc97e5..0000000
Binary files a/java/irtoy.exe and /dev/null differ
diff --git a/java/jacob-1.15-M3-x86.dll b/java/jacob-1.15-M3-x86.dll
deleted file mode 100644
index 34876a0..0000000
Binary files a/java/jacob-1.15-M3-x86.dll and /dev/null differ
diff --git a/java/jintellitype.dll b/java/jintellitype.dll
deleted file mode 100644
index 839236b..0000000
Binary files a/java/jintellitype.dll and /dev/null differ
diff --git a/java/jxinput.dll b/java/jxinput.dll
deleted file mode 100644
index 720b9bb..0000000
Binary files a/java/jxinput.dll and /dev/null differ
diff --git a/java/launch4j.xml b/java/launch4j.xml
deleted file mode 100644
index d3043f1..0000000
--- a/java/launch4j.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
- false
- gui
- main.jar
- mimis.exe
- Mimis
-
-
- normal
- http://java.com/download
-
- true
- false
-
- resource\M.ico
-
-
- 1.6.0
-
- preferJre
-
-
\ No newline at end of file
diff --git a/java/lib/commons-collections-3.2.1.jar b/java/lib/commons-collections-3.2.1.jar
deleted file mode 100644
index c35fa1f..0000000
Binary files a/java/lib/commons-collections-3.2.1.jar and /dev/null differ
diff --git a/java/lib/commons-logging-1.1.1.jar b/java/lib/commons-logging-1.1.1.jar
deleted file mode 100644
index 8758a96..0000000
Binary files a/java/lib/commons-logging-1.1.1.jar and /dev/null differ
diff --git a/java/lib/jacob-1.15-M3.jar b/java/lib/jacob-1.15-M3.jar
deleted file mode 100644
index 6bdefa3..0000000
Binary files a/java/lib/jacob-1.15-M3.jar and /dev/null differ
diff --git a/java/lib/jxinput.jar b/java/lib/jxinput.jar
deleted file mode 100644
index dbb035a..0000000
Binary files a/java/lib/jxinput.jar and /dev/null differ
diff --git a/java/lib/log4j-1.2.16.jar b/java/lib/log4j-1.2.16.jar
deleted file mode 100644
index 3f9d847..0000000
Binary files a/java/lib/log4j-1.2.16.jar and /dev/null differ
diff --git a/java/main.jar b/java/main.jar
deleted file mode 100644
index ba79a74..0000000
Binary files a/java/main.jar and /dev/null differ
diff --git a/java/mimis.dll b/java/mimis.dll
deleted file mode 100644
index 5b5288c..0000000
Binary files a/java/mimis.dll and /dev/null differ
diff --git a/java/mimis.exe b/java/mimis.exe
deleted file mode 100644
index 93a6acf..0000000
Binary files a/java/mimis.exe and /dev/null differ
diff --git a/java/resource/M.ico b/java/resource/M.ico
deleted file mode 100644
index d6d7103..0000000
Binary files a/java/resource/M.ico and /dev/null differ
diff --git a/java/resource/M.png b/java/resource/M.png
deleted file mode 100644
index 3399be7..0000000
Binary files a/java/resource/M.png and /dev/null differ
diff --git a/java/resource/Mimis.bmp b/java/resource/Mimis.bmp
deleted file mode 100644
index c5ac533..0000000
Binary files a/java/resource/Mimis.bmp and /dev/null differ
diff --git a/java/resource/Mimis.png b/java/resource/Mimis.png
deleted file mode 100644
index 7e885fd..0000000
Binary files a/java/resource/Mimis.png and /dev/null differ
diff --git a/java/resource/icons/camera.png b/java/resource/icons/camera.png
deleted file mode 100644
index e8608c2..0000000
Binary files a/java/resource/icons/camera.png and /dev/null differ
diff --git a/java/resource/icons/comment.png b/java/resource/icons/comment.png
deleted file mode 100644
index 30968ff..0000000
Binary files a/java/resource/icons/comment.png and /dev/null differ
diff --git a/java/resource/icons/connect.png b/java/resource/icons/connect.png
deleted file mode 100644
index 203b5e2..0000000
Binary files a/java/resource/icons/connect.png and /dev/null differ
diff --git a/java/resource/icons/control_eject_blue.png b/java/resource/icons/control_eject_blue.png
deleted file mode 100644
index 3a528af..0000000
Binary files a/java/resource/icons/control_eject_blue.png and /dev/null differ
diff --git a/java/resource/icons/control_end_blue.png b/java/resource/icons/control_end_blue.png
deleted file mode 100644
index 7b8a6ed..0000000
Binary files a/java/resource/icons/control_end_blue.png and /dev/null differ
diff --git a/java/resource/icons/control_fastforward_blue.png b/java/resource/icons/control_fastforward_blue.png
deleted file mode 100644
index e348959..0000000
Binary files a/java/resource/icons/control_fastforward_blue.png and /dev/null differ
diff --git a/java/resource/icons/control_pause_blue.png b/java/resource/icons/control_pause_blue.png
deleted file mode 100644
index 3ab8b69..0000000
Binary files a/java/resource/icons/control_pause_blue.png and /dev/null differ
diff --git a/java/resource/icons/control_play_blue.png b/java/resource/icons/control_play_blue.png
deleted file mode 100644
index a1f7345..0000000
Binary files a/java/resource/icons/control_play_blue.png and /dev/null differ
diff --git a/java/resource/icons/control_rewind_blue.png b/java/resource/icons/control_rewind_blue.png
deleted file mode 100644
index de9fc07..0000000
Binary files a/java/resource/icons/control_rewind_blue.png and /dev/null differ
diff --git a/java/resource/icons/control_start_blue.png b/java/resource/icons/control_start_blue.png
deleted file mode 100644
index b60086c..0000000
Binary files a/java/resource/icons/control_start_blue.png and /dev/null differ
diff --git a/java/resource/icons/control_stop_blue.png b/java/resource/icons/control_stop_blue.png
deleted file mode 100644
index f15bf69..0000000
Binary files a/java/resource/icons/control_stop_blue.png and /dev/null differ
diff --git a/java/resource/icons/down.png b/java/resource/icons/down.png
deleted file mode 100644
index 9859d33..0000000
Binary files a/java/resource/icons/down.png and /dev/null differ
diff --git a/java/resource/icons/forward.png b/java/resource/icons/forward.png
deleted file mode 100644
index a232fd7..0000000
Binary files a/java/resource/icons/forward.png and /dev/null differ
diff --git a/java/resource/icons/image.png b/java/resource/icons/image.png
deleted file mode 100644
index 00c0978..0000000
Binary files a/java/resource/icons/image.png and /dev/null differ
diff --git a/java/resource/icons/mute.png b/java/resource/icons/mute.png
deleted file mode 100644
index a7f3b4c..0000000
Binary files a/java/resource/icons/mute.png and /dev/null differ
diff --git a/java/resource/icons/next.png b/java/resource/icons/next.png
deleted file mode 100644
index 1b26ace..0000000
Binary files a/java/resource/icons/next.png and /dev/null differ
diff --git a/java/resource/icons/pause.png b/java/resource/icons/pause.png
deleted file mode 100644
index b48e267..0000000
Binary files a/java/resource/icons/pause.png and /dev/null differ
diff --git a/java/resource/icons/play.png b/java/resource/icons/play.png
deleted file mode 100644
index 1ee4734..0000000
Binary files a/java/resource/icons/play.png and /dev/null differ
diff --git a/java/resource/icons/previous.png b/java/resource/icons/previous.png
deleted file mode 100644
index b81d029..0000000
Binary files a/java/resource/icons/previous.png and /dev/null differ
diff --git a/java/resource/icons/repeat.png b/java/resource/icons/repeat.png
deleted file mode 100644
index 75d0469..0000000
Binary files a/java/resource/icons/repeat.png and /dev/null differ
diff --git a/java/resource/icons/rewind.png b/java/resource/icons/rewind.png
deleted file mode 100644
index 0035c23..0000000
Binary files a/java/resource/icons/rewind.png and /dev/null differ
diff --git a/java/resource/icons/shuffle.png b/java/resource/icons/shuffle.png
deleted file mode 100644
index a221495..0000000
Binary files a/java/resource/icons/shuffle.png and /dev/null differ
diff --git a/java/resource/icons/sound_mute.png b/java/resource/icons/sound_mute.png
deleted file mode 100644
index c683bc6..0000000
Binary files a/java/resource/icons/sound_mute.png and /dev/null differ
diff --git a/java/resource/icons/stop.png b/java/resource/icons/stop.png
deleted file mode 100644
index 0a3b789..0000000
Binary files a/java/resource/icons/stop.png and /dev/null differ
diff --git a/java/resource/icons/unmute.png b/java/resource/icons/unmute.png
deleted file mode 100644
index c76c3d6..0000000
Binary files a/java/resource/icons/unmute.png and /dev/null differ
diff --git a/java/resource/icons/up.png b/java/resource/icons/up.png
deleted file mode 100644
index a41932a..0000000
Binary files a/java/resource/icons/up.png and /dev/null differ
diff --git a/java/resource/icons/volumeDown.png b/java/resource/icons/volumeDown.png
deleted file mode 100644
index 4c319d2..0000000
Binary files a/java/resource/icons/volumeDown.png and /dev/null differ
diff --git a/java/resource/icons/volumeUp.png b/java/resource/icons/volumeUp.png
deleted file mode 100644
index 404088e..0000000
Binary files a/java/resource/icons/volumeUp.png and /dev/null differ
diff --git a/java/src/META-INF/services/mimis.application.Application b/java/src/META-INF/services/mimis.application.Application
deleted file mode 100644
index 974b831..0000000
--- a/java/src/META-INF/services/mimis.application.Application
+++ /dev/null
@@ -1,8 +0,0 @@
-mimis.application.cmd.windows.gomplayer.GomPlayerApplication
-mimis.application.cmd.windows.photoviewer.PhotoViewerApplication
-mimis.application.cmd.windows.winamp.WinampApplication
-mimis.application.cmd.windows.wmp.WMPApplication
-mimis.application.itunes.iTunesApplication
-mimis.application.lirc.ipod.iPodApplication
-mimis.application.mpc.MPCApplication
-mimis.application.vlc.VLCApplication
\ No newline at end of file
diff --git a/java/src/META-INF/services/mimis.device.Device b/java/src/META-INF/services/mimis.device.Device
deleted file mode 100644
index dede6bf..0000000
--- a/java/src/META-INF/services/mimis.device.Device
+++ /dev/null
@@ -1,7 +0,0 @@
-mimis.device.javainput.extreme3d.Extreme3DDevice
-mimis.device.javainput.rumblepad.RumblepadDevice
-mimis.device.jintellitype.JIntellitypeDevice
-mimis.device.lirc.LircDevice
-mimis.device.network.NetworkDevice
-mimis.device.panel.PanelDevice
-mimis.device.wiimote.WiimoteDevice
\ No newline at end of file
diff --git a/java/src/com/dt/iTunesController/ITArtwork.java b/java/src/com/dt/iTunesController/ITArtwork.java
deleted file mode 100644
index 53846c9..0000000
--- a/java/src/com/dt/iTunesController/ITArtwork.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package com.dt.iTunesController;
-import com.jacob.com.Dispatch;
-
-/**
- * Represents a artwork.
- *
- * Defines a single piece of artwork.
- *
- * Artwork is always associated with an individual track.
- * To add a piece of artwork to a track, use IITTrack::AddArtworkFromFile().
- * The IITTrack::Artwork property
- *
- * To get a collection of artwork associated with a track call
- * ITTrack.getArtwork().
- *
- * @author Steve Eyre
- * @version 0.2
- */
-public class ITArtwork extends ITObject {
-
- public ITArtwork (Dispatch d) {
- super(d);
- }
-
- /**
- * Delete this object.
- */
- public void delete() {
- Dispatch.call(object, "Delete");
- }
-
- /**
- * Returns the kind of the object.
- * @return Returns the kind of the object.
- */
- public ITArtworkFormat getFormat() {
- return ITArtworkFormat.values()[Dispatch.get(object, "Format").getInt()];
- }
-
- // TODO: Comments
-
- public boolean getIsDownloadedArtwork() {
- return Dispatch.get(object, "IsDownloadedArtwork").getBoolean();
- }
-
- public String getDescription() {
- return Dispatch.get(object, "Description").getString();
-
- }
-
- public void SaveArtworkToFile(String filePath) {
- Dispatch.call(object, "SaveArtworkToFile",filePath);
- }
-
-}
diff --git a/java/src/com/dt/iTunesController/ITArtworkCollection.java b/java/src/com/dt/iTunesController/ITArtworkCollection.java
deleted file mode 100644
index c1d8afa..0000000
--- a/java/src/com/dt/iTunesController/ITArtworkCollection.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package com.dt.iTunesController;
-import com.jacob.com.Dispatch;
-
-/**
- * Represents a collection of Artwork objects.
- *
- * Note that collection indices are always 1-based.
- *
- * You can retrieve all the Artworks defined for a source using
- * ITSource.getArtwork().
- *
- * @author Steve Eyre
- * @version 0.2
- */
-public class ITArtworkCollection {
-
- protected Dispatch object;
-
- public ITArtworkCollection(Dispatch d) {
- object = d;
- }
-
- /**
- * Returns the number of playlists in the collection.
- * @return Returns the number of playlists in the collection.
- */
- public int getCount() {
- return Dispatch.get(object, "Count").getInt();
- }
-
- /**
- * Returns an ITArtwork object corresponding to the given index (1-based).
- * @param index Index of the playlist to retrieve, must be less than or
- * equal to ITArtworkCollection.getCount().
- * @return Returns an ITArtwork object corresponding to the given index.
- * Will be set to NULL if no playlist could be retrieved.
- */
- public ITArtwork getItem (int index) {
- Dispatch item = Dispatch.call(object, "Item", index).toDispatch();
- return new ITArtwork(item);
- }
-
- /**
- * Returns an ITArtwork object with the specified persistent ID. See the
- * documentation on ITObject for more information on persistent IDs.
- * @param highID The high 32 bits of the 64-bit persistent ID.
- * @param lowID The low 32 bits of the 64-bit persistent ID.
- * @return Returns an ITArtwork object with the specified persistent ID.
- * Will be set to NULL if no playlist could be retrieved.
- */
- public ITArtwork getItemByPersistentID (int highID, int lowID) {
- Dispatch item = Dispatch.call(object, "ItemByPersistentID", highID, lowID).toDispatch();
- return new ITArtwork(item);
- }
-}
diff --git a/java/src/com/dt/iTunesController/ITArtworkFormat.java b/java/src/com/dt/iTunesController/ITArtworkFormat.java
deleted file mode 100644
index ed4b61e..0000000
--- a/java/src/com/dt/iTunesController/ITArtworkFormat.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.dt.iTunesController;
-
-/**
- * Specifies the Artwork kind.
- * @author Steve Eyre
- * @version 0.2
- */
-public enum ITArtworkFormat {
- ITArtworkFormatUnknown,
- ITArtworkFormatJPEG,
- ITArtworkFormatPNG,
- ITArtworkFormatBMP;
-}
diff --git a/java/src/com/dt/iTunesController/ITAudioCDPlaylist.java b/java/src/com/dt/iTunesController/ITAudioCDPlaylist.java
deleted file mode 100644
index bc12943..0000000
--- a/java/src/com/dt/iTunesController/ITAudioCDPlaylist.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package com.dt.iTunesController;
-import com.jacob.com.Dispatch;
-
-/**
- * Represents an audio CD playlist.
- *
- * An audio CD playlist is always associated with an IITSource of kind
- * ITSourceKindAudioCD.
- *
- * You can retrieve all the playlists defined for a source using
- * ITSource.getPlaylists().
- * @author Steve Eyre
- * @version 0.2
- */
-public class ITAudioCDPlaylist extends ITPlaylist {
-
- public ITAudioCDPlaylist(Dispatch d) {
- super(d);
- }
-
- /**
- * Returns the audio CD's artist.
- * @return Returns the audio CD's artist.
- */
- public String getArtist() {
- return Dispatch.get(object, "Artist").getString();
- }
-
- /**
- * Returns true if this audio CD is a compilation album.
- * @return Returns true if this audio CD is a compilation album.
- */
- public boolean isCompilation() {
- return Dispatch.get(object, "Compilation").getBoolean();
- }
-
- /**
- * Returns the audio CD's composer.
- * @return Returns the audio CD's composer.
- */
- public String getComposer() {
- return Dispatch.get(object, "Composer").getString();
- }
-
- /**
- * Returns the total number of discs in this CD's album.
- * @return Returns the total number of discs in this CD's album.
- */
- public long getDiscCount() {
- return Dispatch.get(object, "DiscCount").getLong();
- }
-
- /**
- * Returns the index of the CD disc in the source album.
- * @return Returns the index of the CD disc in the source album.
- */
- public long getDiscNumber() {
- return Dispatch.get(object, "DiscNumber").getLong();
- }
-
- /**
- * Returns the audio CD's genre.
- * @return Returns the audio CD's genre.
- */
- public String getGenre() {
- return Dispatch.get(object, "Genre").getString();
- }
-
- /**
- * Reveals the CD playlist in the main browser window.
- */
- public void reveal() {
- Dispatch.call(object, "Reveal");
- }
-
-}
diff --git a/java/src/com/dt/iTunesController/ITBrowserWindow.java b/java/src/com/dt/iTunesController/ITBrowserWindow.java
deleted file mode 100644
index 16dc6cf..0000000
--- a/java/src/com/dt/iTunesController/ITBrowserWindow.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.dt.iTunesController;
-import com.jacob.com.Dispatch;
-
-/**
- * Represents the main browser window.
- *
- * You can retrieve the main browser window using
- * iTunes.BrowserWindow().
- *
- * @author Steve Eyre
- * @version 0.2
- */
-
-public class ITBrowserWindow extends ITWindow {
-
- public ITBrowserWindow (Dispatch d) {
- super(d);
- }
-
- /**
- * Returns the kind of the object.
- * @return Returns the kind of the object.
- */
- public boolean getMiniPlayer() {
- return Dispatch.get(object, "MiniPlayer").getBoolean();
- }
-
- // TODO: Comments
-
- public ITTrackCollection getSelectedTracks() {
- Dispatch collection = Dispatch.call(object, "SelectedTracks").getDispatch();
- return new ITTrackCollection(collection);
- }
-
- public ITPlaylist getSelectedPlaylist() {
- Dispatch playlist = Dispatch.get(object, "SelectedPlaylist").toDispatch();
- return new ITPlaylist(playlist);
- }
-
- public void setSelectedPlaylist(ITPlaylist playlist) {
- Dispatch dispatchRef = playlist.fetchDispatch();
- Dispatch.put(object, "SelectedPlaylist", dispatchRef);
- }
-
-}
diff --git a/java/src/com/dt/iTunesController/ITCOMDisabledReason.java b/java/src/com/dt/iTunesController/ITCOMDisabledReason.java
deleted file mode 100644
index 500280c..0000000
--- a/java/src/com/dt/iTunesController/ITCOMDisabledReason.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.dt.iTunesController;
-
-/**
- * Specifies the reason the COM interface is being disabled.
- * @author Steve Eyre
- * @version 0.2
- */
-public enum ITCOMDisabledReason {
- ITCOMDisabledReasonOther,
- ITCOMDisabledReasonDialog,
- ITCOMDisabledReasonQuitting;
-}
diff --git a/java/src/com/dt/iTunesController/ITEQPreset.java b/java/src/com/dt/iTunesController/ITEQPreset.java
deleted file mode 100644
index 1d00cfb..0000000
--- a/java/src/com/dt/iTunesController/ITEQPreset.java
+++ /dev/null
@@ -1,236 +0,0 @@
-package com.dt.iTunesController;
-
-import com.jacob.com.Dispatch;
-
-/**
- * Represents an equalizer preset.
- * You can retrieve or set the currently selected EQ preset using the
- * iTunes.getCurrentEQPreset() method.
- * @author Steve Eyre
- * @version 0.2
- */
-public class ITEQPreset {
-
- protected Dispatch object;
-
- public ITEQPreset(Dispatch d) {
- object = d;
- }
-
- /**
- * Returns the name of the EQ Preset (e.g. "Acoustic").
- * @return Returns the name of the EQ Preset (e.g. "Acoustic").
- */
- public String getName() {
- return Dispatch.get(object, "Name").getString();
- }
-
- /**
- * Returns true if the EQ preset can be modified.
- * @return True if the EQ preset can be modified.
- */
- public boolean getModifiable() {
- return Dispatch.get(object, "Modifiable").getBoolean();
- }
-
- /**
- * Set the equalizer preamp level (-12.0 db to +12.0 db).
- * @param level The new equalizer preamp level (-12.0 db to +12.0 db).
- */
- public void setPreamp(double level) {
- Dispatch.put(object, "Preamp", level);
- }
-
- /**
- * Returns the equalizer preamp level (-12.0db to +12.0db).
- * @return Returns the equalizer preamp level (-12.0db to +12.0db).
- */
- public double getPreamp() {
- return Dispatch.get(object, "Preamp").getDouble();
- }
-
- /**
- * Set the equalizer 32Hz level (-12.0 db to +12.0 db).
- * @param level The new equalizer 32Hz level (-12.0 db to +12.0db).
- */
- public void setBand1(double level) {
- Dispatch.put(object, "Band1", level);
- }
-
- /**
- * Returns the equalizer 32Hz level (-12.0 db to +12.0 db).
- * @return Returns the equalizer 32Hz level (-12.0 db to +12.0 db).
- */
- public double getBand1() {
- return Dispatch.get(object, "Band1").getDouble();
- }
-
- /**
- * Set the equalizer 64Hz level (-12.0 db to +12.0 db).
- * @param level The new equalizer 64Hz level (-12.0 db to +12.0db).
- */
- public void setBand2(double level) {
- Dispatch.put(object, "Band2", level);
- }
-
- /**
- * Returns the equalizer 64Hz level (-12.0 db to +12.0 db).
- * @return Returns the equalizer 64Hz level (-12.0 db to +12.0 db).
- */
- public double getBand2() {
- return Dispatch.get(object, "Band2").getDouble();
- }
-
- /**
- * Set the equalizer 125Hz level (-12.0 db to +12.0 db).
- * @param level The new equalizer 125Hz level (-12.0 db to +12.0db).
- */
- public void setBand3(double level) {
- Dispatch.put(object, "Band3", level);
- }
-
- /**
- * Returns the equalizer 125Hz level (-12.0 db to +12.0 db).
- * @return Returns the equalizer 125Hz level (-12.0 db to +12.0 db).
- */
- public double getBand3() {
- return Dispatch.get(object, "Band3").getDouble();
- }
-
- /**
- * Set the equalizer 250Hz level (-12.0 db to +12.0 db).
- * @param level The new equalizer 250Hz level (-12.0 db to +12.0db).
- */
- public void setBand4(double level) {
- Dispatch.put(object, "Band4", level);
- }
-
- /**
- * Returns the equalizer 250Hz level (-12.0 db to +12.0 db).
- * @return Returns the equalizer 250Hz level (-12.0 db to +12.0 db).
- */
- public double getBand4() {
- return Dispatch.get(object, "Band4").getDouble();
- }
-
- /**
- * Set the equalizer 500Hz level (-12.0 db to +12.0 db).
- * @param level The new equalizer 500Hz level (-12.0 db to +12.0db).
- */
- public void setBand5(double level) {
- Dispatch.put(object, "Band5", level);
- }
-
- /**
- * Returns the equalizer 500Hz level (-12.0 db to +12.0 db).
- * @return Returns the equalizer 500Hz level (-12.0 db to +12.0 db).
- */
- public double getBand5() {
- return Dispatch.get(object, "Band5").getDouble();
- }
-
- /**
- * Set the equalizer 1KHz level (-12.0 db to +12.0 db).
- * @param level The new equalizer 1KHz level (-12.0 db to +12.0db).
- */
- public void setBand6(double level) {
- Dispatch.put(object, "Band6", level);
- }
-
- /**
- * Returns the equalizer 1KHz level (-12.0 db to +12.0 db).
- * @return Returns the equalizer 1KHz level (-12.0 db to +12.0 db).
- */
- public double getBand6() {
- return Dispatch.get(object, "Band6").getDouble();
- }
-
- /**
- * Set the equalizer 2KHz level (-12.0 db to +12.0 db).
- * @param level The new equalizer 2KHz level (-12.0 db to +12.0db).
- */
- public void setBand7(double level) {
- Dispatch.put(object, "Band7", level);
- }
-
- /**
- * Returns the equalizer 2KHz level (-12.0 db to +12.0 db).
- * @return Returns the equalizer 2KHz level (-12.0 db to +12.0 db).
- */
- public double getBand7() {
- return Dispatch.get(object, "Band7").getDouble();
- }
-
- /**
- * Set the equalizer 4KHz level (-12.0 db to +12.0 db).
- * @param level The new equalizer 4KHz level (-12.0 db to +12.0db).
- */
- public void setBand8(double level) {
- Dispatch.put(object, "Band8", level);
- }
-
- /**
- * Returns the equalizer 4KHz level (-12.0 db to +12.0 db).
- * @return Returns the equalizer 4KHz level (-12.0 db to +12.0 db).
- */
- public double getBand8() {
- return Dispatch.get(object, "Band8").getDouble();
- }
-
- /**
- * Set the equalizer 8KHz level (-12.0 db to +12.0 db).
- * @param level The new equalizer 8KHz level (-12.0 db to +12.0db).
- */
- public void setBand9(double level) {
- Dispatch.put(object, "Band9", level);
- }
-
- /**
- * Returns the equalizer 8KHz level (-12.0 db to +12.0 db).
- * @return Returns the equalizer 8KHz level (-12.0 db to +12.0 db).
- */
- public double getBand9() {
- return Dispatch.get(object, "Band9").getDouble();
- }
-
- /**
- * Set the equalizer 16KHz level (-12.0 db to +12.0 db).
- * @param level The new equalizer 16KHz level (-12.0 db to +12.0db).
- */
- public void setBand10(double level) {
- Dispatch.put(object, "Band10", level);
- }
-
- /**
- * Returns the equalizer 16KHz level (-12.0 db to +12.0 db).
- * @return Returns the equalizer 16KHz level (-12.0 db to +12.0 db).
- */
- public double getBand10() {
- return Dispatch.get(object, "Band10").getDouble();
- }
-
- /**
- * Delete this EQ Preset.
- * Any EQ preset can be deleted, including built-in presets, except for the
- * Manual preset.
- * @param updateAllTracks If true, any tracks that use this EQ preet will be
- * set to have no assigned EQ preset.
- */
- public void delete(boolean updateAllTracks) {
- Dispatch.call(object, "Delete", updateAllTracks);
- }
-
- /**
- * Rename this EQ Preset.
- * The name of any EQ preset can be changed, including built-in presets,
- * except for the Manual preset.
- * EQ preset names cannot start with leading spaces. If you specify a name
- * that starts with leading spaces they will be stripped out.
- * @param updateAllTracks If true, any tracks that use this EQ preet will be
- * updated with the new preset name.
- */
- public void rename(String newName, boolean updateAllTracks) {
- Dispatch.call(object, "Rename", newName, updateAllTracks);
- }
-
-}
diff --git a/java/src/com/dt/iTunesController/ITFileOrCDTrack.java b/java/src/com/dt/iTunesController/ITFileOrCDTrack.java
deleted file mode 100644
index 570896c..0000000
--- a/java/src/com/dt/iTunesController/ITFileOrCDTrack.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.dt.iTunesController;
-import com.jacob.com.Dispatch;
-
-/**
- * Represents a file or CD track.
- * @author Steve Eyre
- * @version 0.2
- */
-public class ITFileOrCDTrack extends ITTrack {
-
- public ITFileOrCDTrack (Dispatch d) {
- super(d);
- }
-
- /**
- * Reveals the track in the main browser window.
- */
- public void reveal() {
- Dispatch.call(object, "Reveal");
- }
-
- public ITVideoKind getVideoKind() {
- return ITVideoKind.values()[Dispatch.get(object, "VideoKind").getInt()];
- }
-
- public ITRatingKind getRatingKind() {
- return ITRatingKind.values()[Dispatch.get(object, "RatingKind").getInt()];
- }
-
- public String getLocation() {
- return Dispatch.get(object, "Location").getString();
- }
-
- public ITArtworkCollection getArtworks() {
- Dispatch artworks = Dispatch.get(object, "Artwork").toDispatch();
- return new ITArtworkCollection(artworks);
- }
-
-}
diff --git a/java/src/com/dt/iTunesController/ITLibraryPlaylist.java b/java/src/com/dt/iTunesController/ITLibraryPlaylist.java
deleted file mode 100644
index c19cba8..0000000
--- a/java/src/com/dt/iTunesController/ITLibraryPlaylist.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.dt.iTunesController;
-import com.jacob.com.Dispatch;
-
-/**
- * Represents a library playlist.
- *
- * A library playlist consists of all the tracks in a user's library.
- *
- * For convenience, you can retrieve the main library playlist using
- * iTunes.getLibraryPlaylist().
- * @author Steve Eyre
- * @version 0.2
- */
-public class ITLibraryPlaylist extends ITPlaylist {
-
- public ITLibraryPlaylist(Dispatch d) {
- super(d);
- }
-
-}
diff --git a/java/src/com/dt/iTunesController/ITObject.java b/java/src/com/dt/iTunesController/ITObject.java
deleted file mode 100644
index 27475fd..0000000
--- a/java/src/com/dt/iTunesController/ITObject.java
+++ /dev/null
@@ -1,112 +0,0 @@
-package com.dt.iTunesController;
-import com.jacob.com.Dispatch;
-
-/**
- * Defines a source, playlist or track.
- *
- * An ITObject uniquely identifies a source, playlist, or track in iTunes using
- * four separate IDs. These are runtime IDs, they are only valid while the
- * current instance of iTunes is running.
- *
- * As of iTunes 7.7, you can also identify an ITObject using a 64-bit persistent
- * ID, which is valid across multiple invocations of iTunes.
- *
- * The main use of the ITObject interface is to allow clients to track iTunes
- * database changes using
- * iTunesEventsInterface.onDatabaseChangedEvent().
- *
- * You can retrieve an ITObject with a specified runtime ID using
- * iTunes.getITObjectByID().
- *
- * An ITObject will always have a valid, non-zero source ID.
- *
- * An ITObject corresponding to a playlist or track will always have a valid
- * playlist ID. The playlist ID will be zero for a source.
- *
- * An ITObject corresponding to a track will always have a valid track and
- * track database ID. These IDs will be zero for a source or playlist.
- *
- * A track ID is unique within the track's playlist. A track database ID is
- * unique across all playlists. For example, if the same music file is in two
- * different playlists, each of the tracks could have different track IDs, but
- * they will have the same track database ID.
- *
- * An ITObject also has a 64-bit persistent ID which can be used to identify
- * the ITObject across multiple invocations of iTunes.
- *
- * @author Steve Eyre
- * @version 0.2
- */
-public class ITObject {
-
- protected Dispatch object;
-
- public ITObject(Dispatch d) {
- object = d;
- }
-
- /**
- * Returns the JACOB Dispatch object for this object.
- * @return Returns the JACOB Dispatch object for this object.
- */
- public Dispatch fetchDispatch() {
- return object;
- }
-
- /**
- * Set the name of the object.
- * @param name The new name of the object.
- */
- public void setName (String name) {
- Dispatch.put(object, "Name", name);
- }
-
- /**
- * Returns the name of the object.
- * @return Returns the name of the object.
- */
- public String getName() {
- return Dispatch.get(object, "Name").getString();
- }
-
- /**
- * Returns the index of the object in internal application order.
- * @return The index of the object in internal application order.
- */
- public int getIndex() {
- return Dispatch.get(object, "Index").getInt();
- }
-
- /**
- * Returns the ID that identifies the source.
- * @return Returns the ID that identifies the source.
- */
- public int getSourceID() {
- return Dispatch.get(object, "SourceID").getInt();
- }
-
- /**
- * Returns the ID that identifies the playlist.
- * @return Returns the ID that identifies the playlist.
- */
- public int getPlaylistID() {
- return Dispatch.get(object, "PlaylistID").getInt();
- }
-
- /**
- * Returns the ID that identifies the track within the playlist.
- * @return Returns the ID that identifies the track within the playlist.
- */
- public int getTrackID() {
- return Dispatch.get(object, "TrackID").getInt();
- }
-
- /**
- * Returns the ID that identifies the track, independent of its playlist.
- * @return Returns the ID that identifies the track, independent of its playlist.
- */
- public int getTrackDatabaseID() {
- return Dispatch.get(object, "TrackDatabaseID").getInt();
- }
-
-}
diff --git a/java/src/com/dt/iTunesController/ITObjectPersistentID.java b/java/src/com/dt/iTunesController/ITObjectPersistentID.java
deleted file mode 100644
index 748816f..0000000
--- a/java/src/com/dt/iTunesController/ITObjectPersistentID.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package com.dt.iTunesController;
-
-/**
- * Simple utility wrapper class to represent the persistent object identity
- * ID numbers. Use the getHigh() and getLow() methods individually to get
- * each ID, or the combined hex string through toString().
- *
- * @author Steve Eyre
- * @version 0.2
- */
-public class ITObjectPersistentID {
-
- private long High;
- private long Low;
- private String hexString;
-
- /**
- * Create the ITObjectPersistentID. This class is not intended to be created
- * manually, and this function should only be used by classes implementing
- * this utility.
- * @param high The High Persistent ID
- * @param low The Low Persistent ID
- */
- public ITObjectPersistentID(long high, long low) {
- this.High=high;
- this.Low=low;
- this.hexString = String.format("%8s%8s",Long.toHexString(this.High),Long.toHexString(this.Low)).toUpperCase().replace(' ','0');
- }
-
- /**
- * Returns the high persistent ID.
- * @return The high persistent ID.
- */
- public long getHigh() {
- return this.High;
- }
-
- /**
- * Returns the low persistent ID.
- * @return The low persistent ID.
- */
- public long getLow() {
- return this.Low;
- }
-
- /**
- * Return a string representation (in hex) of the persistent IDs.
- * @return String representation of the persistent IDs.
- */
- public String toString() {
- return this.hexString;
- }
-}
diff --git a/java/src/com/dt/iTunesController/ITOperationStatus.java b/java/src/com/dt/iTunesController/ITOperationStatus.java
deleted file mode 100644
index cf764aa..0000000
--- a/java/src/com/dt/iTunesController/ITOperationStatus.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.dt.iTunesController;
-import com.jacob.com.Dispatch;
-
-/**
- * Represents the status of an asynchronous add or convert operation.
- *
- * When a track is added using TLibraryPlaylist.addFile(),
- * ITLibraryPlaylist.AddFiles(), IITUserPlaylist.addFile(), or
- * ITUserPlaylist.addFiles(), the add may not complete immediately if iTunes
- * needs to make a copy of the file.
- *
- * Similarly, when converting or importing a file or track using
- * iTunes.convertFile(), iTunes.convertFiles(),
- * iTunes.convertTrack() or iTunes.convertTracks(),
- * the conversion will never complete immediately.
- *
- * These methods return an ITOperationStatus object, which can be
- * polled todetermine when the operation is done. This object will also return
- * the collection of newly added or converted tracks.
- *
- * As of version 1.1 of the iTunes type library, you should use
- * iTunes.convertFile2(), iTunes.convertFiles2(),
- * iTunes.convertTrack2() or iTunes.convertTracks2()
- * instead of the original convert methods. These new methods return an
- * ITConvertOperationStatus object to allow clients to retrieve
- * additional conversion progress information.
- *
- * @author Steve Eyre
- * @version 0.2
- */
-public class ITOperationStatus {
-
- protected Dispatch object;
-
- public ITOperationStatus(Dispatch d) {
- object = d;
- }
-
- /**
- * Returns true if the operation is still in progress.
- * You cannot retrieve the ITOperationStatus.getTracks()
- * property until the operation completes.
- * @return Returns true if the operation is still in progress.
- */
- public boolean getInProgress() {
- return Dispatch.get(object, "InProgress").getBoolean();
- }
-
- /**
- * Returns a collection containing the tracks that were generated by the
- * operation.
- * You cannot retrieve this property until
- * ITOperationStatus.getInProgress() returns false
- * @return Returns a collection containing the tracks that were generated by
- * the operation.
- */
- public ITTrackCollection getTracks() {
- Dispatch tracks = Dispatch.get(object, "Tracks").toDispatch();
- return new ITTrackCollection(tracks);
- }
-
-}
diff --git a/java/src/com/dt/iTunesController/ITPlayerState.java b/java/src/com/dt/iTunesController/ITPlayerState.java
deleted file mode 100644
index 4be2a70..0000000
--- a/java/src/com/dt/iTunesController/ITPlayerState.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.dt.iTunesController;
-
-/**
- * Specifies the state of the player.
- * @author Steve Eyre
- * @version 0.2
- */
-public enum ITPlayerState {
- ITPlayerStateStopped,
- ITPlayerStatePlaying,
- ITPlayerStateFastForward,
- ITPlayerStateRewind;
-}
diff --git a/java/src/com/dt/iTunesController/ITPlaylist.java b/java/src/com/dt/iTunesController/ITPlaylist.java
deleted file mode 100644
index 6c937cf..0000000
--- a/java/src/com/dt/iTunesController/ITPlaylist.java
+++ /dev/null
@@ -1,180 +0,0 @@
-package com.dt.iTunesController;
-import com.jacob.com.Dispatch;
-
-/**
- * Represents a playlist.
- *
- * A playlist is always associated with an ITSource.
- *
- * You can retrieve all the playlists defined for a source using
- * ITSource.getPlaylists().
- *
- * For convenience, you can retrieve the main library playlist using
- * iTunes.getLibraryPlaylist().
- *
- * You can create a new playlist using iTunes.createPlaylist().
- *
- * @author Steve Eyre
- * @version 0.2
- */
-public class ITPlaylist extends ITObject {
-
- public ITPlaylist (Dispatch d) {
- super(d);
- }
-
- /**
- * Delete this object.
- */
- public void delete() {
- Dispatch.call(object, "Delete");
- }
-
- /**
- * Start playing the first track in this object.
- */
- public void playFirstTrack() {
- Dispatch.call(object, "PlayFirstTrack");
- }
-
- /**
- * Print this object.
- * @param showPrintDialog If true, display the print dialog.
- * @param printKind The printout kind.
- * @param theme The name of the theme to use. This corresponds to the name
- * of a Theme combo box item in the print dialog for the specified printKind
- * (e.g. "Track length"). This string cannot be longer than 255 characters,
- * but it may be empty.
- */
- public void print(boolean showPrintDialog, ITPlaylistPrintKind printKind, String theme) {
- Dispatch.call(object, "Print", showPrintDialog, printKind.ordinal(), theme);
- }
-
- /**
- * Returns a collection containing the tracks with the specified text.
- * @param searchText The text to search for. This string cannot be longer
- * than 255 chracters.
- * @param searchFields Specifies which fields of each track should be
- * searched for searchText.
- * @return Collection of IITTrack objects. This will be NULL if no tracks
- * meet the search criteria.
- */
- public ITTrackCollection search (String searchText, ITPlaylistSearchField searchFields) {
- Dispatch collection = Dispatch.call(object, "Search", searchText, searchFields.ordinal()).getDispatch();
- return new ITTrackCollection(collection);
- }
-
- /**
- * Returns the kind of the object.
- * @return Returns the kind of the object.
- */
- public ITPlaylistKind getKind() {
- return ITPlaylistKind.values()[Dispatch.get(object, "Kind").getInt()];
- }
-
- /**
- * Returns an ITSource object corresponding to the source that contains the
- * object.
- * @return Returns an ITSource object corresponding to the source that
- * contains the object.
- */
- public ITSource getSource() {
- Dispatch source = Dispatch.get(object, "Source").toDispatch();
- return new ITSource(source);
- }
-
- /**
- * Returns the total length of all songs in the object (in seconds).
- * @return Returns the total length of all songs in the object (in
- * seconds).
- */
- public int getDuration() {
- return Dispatch.get(object, "Duration").getInt();
- }
-
- /**
- * Set whether songs in the object should be played in random order.
- * @param shouldShuffle True if songs in the object should be played in
- * random order.
- */
- public void setShuffle(boolean shouldShuffle) {
- Dispatch.put(object, "Shuffle", shouldShuffle);
- }
-
- /**
- * Returns the total size of all songs in the object (in bytes).
- * @return Returns the total size of all songs in the object (in bytes).
- */
- public double getSize() {
- return Dispatch.get(object, "Size").getDouble();
- }
-
- /**
- * Sets the playback repeat mode.
- * @param repeatMode The new playback repeat mode.
- */
- public void setSongRepeat(ITPlaylistRepeatMode repeatMode) {
- Dispatch.put(object, "SongRepeat", repeatMode.ordinal());
- }
-
- /**
- * Cycle repeat modes.
- */
- public void cycleSongRepeat() {
- int repeat = Dispatch.get(object, "SongRepeat").getInt();
- Dispatch.put(object, "SongRepeat", (repeat + 1) % 3);
- }
-
- /**
- * Returns the playback repeat mode.
- * @return Returns the playback repeat mode.
- */
- public ITPlaylistRepeatMode getSongRepeat() {
- return ITPlaylistRepeatMode.values()[Dispatch.get(object, "SongRepeat").getInt()];
- }
-
- /**
- * Returns the total length of all songs in the object (in MM:SS format).
- * @return Returns the total length of all songs in the object (in
- * MM:SS format).
- */
- public String getTime() {
- return Dispatch.get(object, "Time").getString();
- }
-
- /**
- * Returns true if the object is visible in the sources list.
- * @return True if the object is visible in the sources list.
- */
- public boolean getVisible() {
- return Dispatch.get(object, "Visible").getBoolean();
- }
-
- /**
- * Returns a collection containing the tracks in this object.
- * @return Collection of ITTrack objects.
- */
- public ITTrackCollection getTracks() {
- Dispatch tracks = Dispatch.get(object, "Tracks").toDispatch();
- return new ITTrackCollection(tracks);
- }
-
- /**
- * Returns the shuffle state.
- * @return true if current state is shuffle.
- */
- public boolean getShuffle() {
- return Dispatch.get(object, "Shuffle").getBoolean();
- }
-
- /**
- * Toggle the shuffle state.
- */
- public void toggleShuffle() {
- setShuffle(!getShuffle());
- }
-
- public boolean containsTrack(ITTrack track) {
- return getTracks().containsTrack(track);
- }
-}
diff --git a/java/src/com/dt/iTunesController/ITPlaylistCollection.java b/java/src/com/dt/iTunesController/ITPlaylistCollection.java
deleted file mode 100644
index 3717735..0000000
--- a/java/src/com/dt/iTunesController/ITPlaylistCollection.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package com.dt.iTunesController;
-import com.jacob.com.Dispatch;
-
-/**
- * Represents a collection of playlist objects.
- *
- * Note that collection indices are always 1-based.
- *
- * You can retrieve all the playlists defined for a source using
- * ITSource.getPlaylists().
- *
- * @author Steve Eyre
- * @version 0.2
- */
-public class ITPlaylistCollection {
-
- protected Dispatch object;
-
- public ITPlaylistCollection(Dispatch d) {
- object = d;
- }
-
- /**
- * Returns the number of playlists in the collection.
- * @return Returns the number of playlists in the collection.
- */
- public int getCount() {
- return Dispatch.get(object, "Count").getInt();
- }
-
- /**
- * Returns an ITPlaylist object corresponding to the given index (1-based).
- * @param index Index of the playlist to retrieve, must be less than or
- * equal to ITPlaylistCollection.getCount().
- * @return Returns an ITPlaylist object corresponding to the given index.
- * Will be set to NULL if no playlist could be retrieved.
- */
- public ITPlaylist getItem (int index) {
- Dispatch item = Dispatch.call(object, "Item", index).toDispatch();
- return new ITPlaylist(item);
- }
-
- /**
- * Returns an ITPlaylist object withthe specified name.
- * @param name The name of the playlist to retrieve.
- * @return Returns an ITPlaylist object corresponding to the given index.
- * Will be set to NULL if no playlist could be retrieved.
- */
- public ITPlaylist ItemByName (String name) {
- Dispatch item = Dispatch.call(object, "ItemByName", name).toDispatch();
- return new ITPlaylist(item);
- }
-
- /**
- * Returns an ITPlaylist object with the specified persistent ID. See the
- * documentation on ITObject for more information on persistent IDs.
- * @param highID The high 32 bits of the 64-bit persistent ID.
- * @param lowID The low 32 bits of the 64-bit persistent ID.
- * @return Returns an ITPlaylist object with the specified persistent ID.
- * Will be set to NULL if no playlist could be retrieved.
- */
- public ITPlaylist getItemByPersistentID (int highID, int lowID) {
- Dispatch item = Dispatch.call(object, "ItemByPersistentID", highID, lowID).toDispatch();
- return new ITPlaylist(item);
- }
-
-}
diff --git a/java/src/com/dt/iTunesController/ITPlaylistKind.java b/java/src/com/dt/iTunesController/ITPlaylistKind.java
deleted file mode 100644
index e6f685f..0000000
--- a/java/src/com/dt/iTunesController/ITPlaylistKind.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.dt.iTunesController;
-
-/**
- * Specifies the playlist kind.
- * @author Steve Eyre
- * @version 0.2
- */
-public enum ITPlaylistKind {
- ITPlaylistKindUnknown,
- ITPlaylistKindLibrary,
- ITPlaylistKindUser,
- ITPlaylistKindCD,
- ITPlaylistKindDevice,
- ITPlaylistKindRadioTuner;
-}
diff --git a/java/src/com/dt/iTunesController/ITPlaylistPrintKind.java b/java/src/com/dt/iTunesController/ITPlaylistPrintKind.java
deleted file mode 100644
index 6fc8ef8..0000000
--- a/java/src/com/dt/iTunesController/ITPlaylistPrintKind.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.dt.iTunesController;
-
-/**
- * Specifies the kind of playlist printout.
- * @author Steve Eyre
- * @version 0.2
- */
-public enum ITPlaylistPrintKind {
-
- ITPlaylistPrintKindPlaylist,
- ITPlaylistPrintKindAlbumlist,
- ITPlaylistPrintKindInsert;
-
-}
diff --git a/java/src/com/dt/iTunesController/ITPlaylistRepeatMode.java b/java/src/com/dt/iTunesController/ITPlaylistRepeatMode.java
deleted file mode 100644
index 4b6fc16..0000000
--- a/java/src/com/dt/iTunesController/ITPlaylistRepeatMode.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.dt.iTunesController;
-
-/**
- * Specifies the playlist playback repeat mode.
- * @author Steve Eyre
- * @version 0.2
- */
-public enum ITPlaylistRepeatMode {
-
- ITPlaylistRepeatModeOff,
- ITPlaylistRepeatModeOne,
- ITPlaylistRepeatModeAll;
-
-}
diff --git a/java/src/com/dt/iTunesController/ITPlaylistSearchField.java b/java/src/com/dt/iTunesController/ITPlaylistSearchField.java
deleted file mode 100644
index 420b305..0000000
--- a/java/src/com/dt/iTunesController/ITPlaylistSearchField.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.dt.iTunesController;
-
-/**
- * Specifies the fields in each track that will be searched by
- * ITPlaylist.search().
- * @author Steve Eyre
- * @version 0.2
- */
-public enum ITPlaylistSearchField {
- ITPlaylistSearchFieldAll,
- ITPlaylistSearchFieldVisible,
- ITPlaylistSearchFieldArtists,
- ITPlaylistSearchFieldAlbums,
- ITPlaylistSearchFieldComposers,
- ITPlaylistSearchFieldSongNames;
-}
diff --git a/java/src/com/dt/iTunesController/ITRatingKind.java b/java/src/com/dt/iTunesController/ITRatingKind.java
deleted file mode 100644
index 7d1cb22..0000000
--- a/java/src/com/dt/iTunesController/ITRatingKind.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.dt.iTunesController;
-
-/**
- * Specifies the rating kind.
- * @author Steve Eyre
- * @version 0.2
- */
-public enum ITRatingKind {
- ITRatingKindUser,
- ITRatingKindComputed;
-}
diff --git a/java/src/com/dt/iTunesController/ITSource.java b/java/src/com/dt/iTunesController/ITSource.java
deleted file mode 100644
index b0d93fc..0000000
--- a/java/src/com/dt/iTunesController/ITSource.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.dt.iTunesController;
-import com.jacob.com.Dispatch;
-
-/**
- * Represents an entry in the Source list (music library, CD, device, etc.).
- * You can retrieve all the sources using iTunes.getSources().
- * @author Steve Eyre
- * @version 0.2
- */
-public class ITSource extends ITObject {
-
- public ITSource(Dispatch d) {
- super(d);
- }
-
- /**
- * Returns the kind of the source.
- * @return Returns the kind of the source.
- */
- public ITSourceKind getKind() {
- return ITSourceKind.values()[Dispatch.get(object, "Kind").getInt()];
- }
-
- /**
- * Returns the total size of the source, if it has a fixed size.
- * @return Returns the total size of the source, if it has a fixed size.
- */
- public double getCapacity() {
- return Dispatch.get(object, "Capacity").getDouble();
- }
-
- /**
- * Returns the free space on the source, if it has a fixed size.
- * @return Returns the free space on the source, if it has a fixed size.
- */
- public double getFreespace() {
- return Dispatch.get(object, "Freespace").getDouble();
- }
-
- /**
- * Returns a collection containing the playlists in this source.
- * The source's primary playlist is always the first playlist in the
- * collection.
- * @return Collection of IITPlaylist objects.
- */
- public ITPlaylistCollection getPlaylists() {
- Dispatch playlists = Dispatch.get(object, "Playlists").toDispatch();
- return new ITPlaylistCollection(playlists);
- }
-
-}
diff --git a/java/src/com/dt/iTunesController/ITSourceCollection.java b/java/src/com/dt/iTunesController/ITSourceCollection.java
deleted file mode 100644
index 357bdec..0000000
--- a/java/src/com/dt/iTunesController/ITSourceCollection.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.dt.iTunesController;
-import com.jacob.com.Dispatch;
-
-/**
- * Represents a collection of source objects.
- *
- * Note that collection indices are always 1-based.
- *
- * You can retrieve all the sources using ITSource.getSources().
- *
- * @author Steve Eyre
- * @version 0.2
- */
-public class ITSourceCollection {
-
- protected Dispatch object;
-
- public ITSourceCollection(Dispatch d) {
- object = d;
- }
-
- /**
- * Returns the number of sources in the collection.
- * @return Returns the number of sources in the collection.
- */
- public int getCount() {
- return Dispatch.get(object, "Count").getInt();
- }
-
- /**
- * Returns an ITSource object corresponding to the given index (1-based).
- * @param index Index of the source to retrieve, must be less than or
- * equal to ITSourceCollection.getCount().
- * @return Returns an ITSource object corresponding to the given index.
- * Will be set to NULL if no source could be retrieved.
- */
- public ITSource getItem (int index) {
- Dispatch item = Dispatch.call(object, "Item", index).toDispatch();
- return new ITSource(item);
- }
-
- /**
- * Returns an ITSource object withthe specified name.
- * @param name The name of the source to retrieve.
- * @return Returns an ITSource object corresponding to the given index.
- * Will be set to NULL if no source could be retrieved.
- */
- public ITSource getItemByName (String name) {
- Dispatch item = Dispatch.call(object, "ItemByName", name).toDispatch();
- return new ITSource(item);
- }
-
- /**
- * Returns an ITSource object with the specified persistent ID. See the
- * documentation on ITObject for more information on persistent IDs.
- * @param highID The high 32 bits of the 64-bit persistent ID.
- * @param lowID The low 32 bits of the 64-bit persistent ID.
- * @return Returns an ITSource object with the specified persistent ID.
- * Will be set to NULL if no source could be retrieved.
- */
- public ITSource getItemByPersistentID (int highID, int lowID) {
- Dispatch item = Dispatch.call(object, "ItemByPersistentID", highID, lowID).toDispatch();
- return new ITSource(item);
- }
-
-}
\ No newline at end of file
diff --git a/java/src/com/dt/iTunesController/ITSourceKind.java b/java/src/com/dt/iTunesController/ITSourceKind.java
deleted file mode 100644
index f332249..0000000
--- a/java/src/com/dt/iTunesController/ITSourceKind.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.dt.iTunesController;
-
-/**
- * Specifies the source kind.
- * @author Steve Eyre
- * @version 0.2
- */
-public enum ITSourceKind {
- ITSourceKindUnknown,
- ITSourceKindLibrary,
- ITSourceKindIPod,
- ITSourceKindAudioCD,
- ITSourceKindMP3CD,
- ITSourceKindDevice,
- ITSourceKindRadioTuner,
- ITSourceKindSharedLibrary;
-}
diff --git a/java/src/com/dt/iTunesController/ITTrack.java b/java/src/com/dt/iTunesController/ITTrack.java
deleted file mode 100644
index 57bb11b..0000000
--- a/java/src/com/dt/iTunesController/ITTrack.java
+++ /dev/null
@@ -1,493 +0,0 @@
-package com.dt.iTunesController;
-import java.util.Date;
-
-import com.jacob.com.Dispatch;
-
-/**
- * Represents a track.
- *
- * A track represents a song in a single playlist. A song may be in more than
- * one playlist, in which case it would be represented by multiple tracks.
- *
- * You can retrieve the currently targeted (playing) track using
- * iTunes.getCurrentTrack().
- *
- * Typically, an ITrack is accessed through an ITTrackCollection.
- *
- * You can retrieve all the tracks defined for a playlist using
- * ITPlaylist.getTracks().
- *
- * You can retrieve the currently selected track or tracks using
- * iTunes.getSelectedTracks().
- *
- * @author Steve Eyre
- * @version 0.2
- */
-public class ITTrack extends ITObject {
-
- public ITTrack (Dispatch d) {
- super(d);
- }
-
- /**
- * Delete this object.
- */
- public void delete() {
- Dispatch.call(object, "Delete");
- }
-
- /**
- * Start playing this object.
- */
- public void play() {
- Dispatch.call(object, "Play");
- }
-
- /**
- * Set the name of the album containing the object.;
- * @param album The new name of the album containing the object.
- */
- public void setAlbum(String album) {
- Dispatch.put(object, "Album", album);
- }
-
- /**
- * Returns the name of the album containing the object.
- * @return Returns the name of the album containing the object.
- */
- public String getAlbum() {
- return Dispatch.get(object, "Album").getString();
- }
-
- /**
- * Set the name of the artist/source of the object.
- * @param artist The new artist/source of the object.
- */
- public void setArtist(String artist) {
- Dispatch.put(object, "Artist", artist);
- }
-
- /**
- * Returns the name of the artist/source of the object.
- * @return Returns the name of the artist/source of the object.
- */
- public String getArtist() {
- return Dispatch.get(object, "Artist").getString();
- }
-
- /**
- * Returns the bit rate of the object (in kbps).
- * @return Returns the bit rate of the object (in kbps).
- */
- public int getBitRate() {
- return Dispatch.get(object, "BitRate").getInt();
- }
-
- /**
- * Set the tempo of the object (in beats per minute).
- * @param beatsPerMinute The new tempo of the object (in beats per minute).
- */
- public void setBPM(int beatsPerMinute) {
- Dispatch.put(object, "BPM", beatsPerMinute);
- }
-
- /**
- * Returns the tempo of the object (in beats per minute).
- * @return Returns the tempo of the object (in beats per minute).
- */
- public int getBPM() {
- return Dispatch.get(object, "BPM").getInt();
- }
-
- /**
- * Set freeform notes about the object.
- * @param comment The new freeform notes about the object.
- */
- public void setComment(String comment) {
- Dispatch.put(object, "Comment", comment);
- }
-
- /**
- * Returns freeform notes about the object.
- * @return Returns freeform notes about the object.
- */
- public String getComment() {
- return Dispatch.get(object, "Comment").getString();
- }
-
- /**
- * Set whether this object is from a compilation album.
- * @param isCompilation True if this object should be from a compilation album.
- */
- public void setCompilation(boolean isCompilation) {
- Dispatch.put(object, "Compilation", isCompilation);
- }
-
- /**
- * Returns true if this object is from a compilation album.
- * @return Returns true if this object is from a compilation album.
- */
- public boolean getCompilation() {
- return Dispatch.get(object, "Compilation").getBoolean();
- }
-
- /**
- * Set the composer of the object.
- * @param composer The new composer of the object.
- */
- public void setComposer (String composer) {
- Dispatch.put(object, "Composer", composer);
- }
-
- /**
- * Returns the composer of the object.
- * @return Returns the composer of the object.
- */
- public String getComposer() {
- return Dispatch.get(object, "Composer").getString();
- }
-
- /**
- * Returns the date the object was added to the playlist.
- * @return Returns the date the object was added to the playlist.
- */
- public Date getDateAdded() {
- return Dispatch.get(object, "DateAdded").getJavaDate();
- }
-
- /**
- * Set the total number of discs in the source album.
- * @param discCount The new total number of discs in the source album.
- */
- public void setDiscCount (int discCount) {
- Dispatch.put(object, "DiscCount", discCount);
- }
-
- /**
- * Returns the total number of discs in the source album.
- * @return Returns the total number of discs in the source album.
- */
- public int getDiscCount() {
- return Dispatch.get(object, "DiscCount").getInt();
- }
-
- /**
- * Set the index of the disc containing the object on the source album.
- * @param discNumber The new index of the disc containing the object on the
- * source album.
- */
- public void setDiscNumber (int discNumber) {
- Dispatch.put(object, "DiscNumber", discNumber);
- }
-
- /**
- * Returns the index of the disc containing the object on the source album.
- * @return Returns the index of the disc containing the object on the source
- * album.
- */
- public int getDiscNumber() {
- return Dispatch.get(object, "DiscNumber").getInt();
- }
-
- /**
- * Returns the length of the object (in seconds).
- * @return Returns the length of the object (in seconds).
- */
- public int getDuration() {
- return Dispatch.get(object, "Duration").getInt();
- }
-
- /**
- * Set whether this object is checked for playback.
- * @param shouldBeEnabled True if the object should be checked for playback.
- */
- public void setEnabled (boolean shouldBeEnabled) {
- Dispatch.put(object, "Enabled", shouldBeEnabled);
- }
-
- /**
- * Returns true if the object is checked for playback.
- * @return Returns true if the object is checked for playback.
- */
- public boolean getEnabled() {
- return Dispatch.get(object, "Enabled").getBoolean();
- }
-
- /**
- * Set the name of the EQ preset of the object.
- * @param eq The new name of the EQ preset of the object.
- */
- public void setEQ (String eq) {
- Dispatch.put(object, "EQ", eq);
- }
-
- /**
- * Returns the name of the EQ preset of the object.
- * @return Returns the name of the EQ preset of the object.
- */
- public String getEQ() {
- return Dispatch.get(object, "EQ").getString();
- }
-
- /**
- * Set the stop time of the object (in seconds).
- * @param finish The new stop time of the object (in seconds).
- */
- public void setFinish(int finish) {
- Dispatch.put(object, "Finish", finish);
- }
-
- /**
- * Returns the stop time of the object (in seconds).
- * @return Returns the stop time of the object (in seconds).
- */
- public int getFinish() {
- return Dispatch.get(object, "Finish").getInt();
- }
-
- /**
- * Returns the music/audio genre (category) of the object.
- * @param genre Returns the music/audio genre (category) of the object.
- */
- public void setGenre(String genre) {
- Dispatch.put(object, "Genre", genre);
- }
-
- /**
- * Set the music/audio genre (category) of the object.
- * @return The new music/audio genre (category) of the object.
- */
- public String getGenre() {
- return Dispatch.get(object, "Genre").getString();
- }
-
- /**
- * Set the grouping (piece) of the object.
- * Generally used to denote movements within classical work.
- * @param grouping The new grouping (piece) of the object.
- */
- public void setGrouping (String grouping) {
- Dispatch.put(object, "Grouping", grouping);
- }
-
- /**
- * Returns the grouping (piece) of the object.
- * Generally used to denote movements within classical work.
- * @return Returns the grouping (piece) of the object.
- */
- public String getGrouping() {
- return Dispatch.get(object, "Grouping").getString();
- }
-
- public ITTrackKind getKind() {
- return ITTrackKind.values()[Dispatch.get(object, "Kind").getInt()];
- }
-
- /**
- * Returns the text description of the object (e.g. "AAC audio file").
- * @return Returns the text description of the object (e.g. "AAC audio file").
- */
- public String getKindAsString() {
- return Dispatch.get(object, "KindAsString").getString();
- }
-
- /**
- * Returns the modification date of the content of the object.
- * @return Returns the modification date of the content of the object.
- */
- public Date getModificationDate() {
- return Dispatch.get(object, "ModificationDate").getJavaDate();
- }
-
- /**
- * Set the number of times the object has been played. This property cannot
- * be set if the object is not playable (e.g. a PDF file).
- * @param playedCount The new number of times the object has been played.
- */
- public void setPlayedCount (int playedCount) {
- Dispatch.put(object, "PlayedCount", playedCount);
- }
-
- /**
- * Returns the number of times the object has been played.
- * @return Returns the number of times the object has been played.
- */
- public int getPlayedCount() {
- return Dispatch.get(object, "PlayedCount").getInt();
- }
-
- /**
- * Set the date and time the object was last played. This property cannot be
- * set if the object is not playable (e.g. a PDF file).
- * A value of zero means no played date.
- * @param playedDate The new date and time the object was last played.
- */
- public void setPlayedDate (Date playedDate) {
- Dispatch.put(object, "PlayedDate", playedDate);
- }
-
- /**
- * Returns the date and time the object was last played.
- * A value of zero means no played date.
- * @return Returns the date and time the object was last played.
- */
- public Date getPlayedDate() {
- return Dispatch.get(object, "PlayedDate").getJavaDate();
- }
-
- /**
- * Returns an ITPlaylist object corresponding to the playlist that contains
- * the object. Use ITFileOrCDTrack::Playlists() or IITURLTrack::Playlists()
- * to get the collection of all playlists that contain the song this object
- * represents.
- * @return Returns an ITPlaylist object corresponding to the playlist that
- * contains the object.
- */
- public ITPlaylist getPlaylist() {
- Dispatch playlist = Dispatch.get(object, "Playlist").toDispatch();
- return new ITPlaylist(playlist);
- }
-
- /**
- * Returns the play order index of the object in the owner playlist
- * (1-based).
- * You can pass this index to IITTrackCollection::ItemByPlayOrder() for the
- * collection returned by ITPlaylist::Tracks() to retrieve an ITTrack
- * object corresponding to this object.
- * @return Returns the play order index of the object in the owner playlist.
- */
- public int getPlayOrderIndex() {
- return Dispatch.get(object, "PlayOrderIndex").getInt();
- }
-
- /**
- * Set the rating of the object (0 to 100). If the object rating is set to 0,
- * it will be computed based on the album rating.
- * @param rating The new rating of the object (0 to 100).
- */
- public void setRating (int rating) {
- Dispatch.put(object, "Rating", rating);
- }
-
- /**
- * Returns the rating of the object (0 to 100). If the object rating has never
- * been set, or has been set to 0, it will be computed based on the album
- * rating.
- * @return Returns the rating of the object (0 to 100).
- */
- public int getRating() {
- return Dispatch.get(object, "Rating").getInt();
- }
-
- /**
- * Returns the sample rate of the object (in Hz).
- * @return Returns the sample rate of the object (in Hz).
- */
- public int getSampleRate() {
- return Dispatch.get(object, "SampleRate").getInt();
- }
-
- /**
- * Returns the size of the object (in bytes).
- * @return Returns the size of the object (in bytes).
- */
- public int getSize() {
- return Dispatch.get(object, "Size").getInt();
- }
-
- /**
- * Set the start time of the object (in seconds).
- * @param start The new start time of the object (in seconds).
- */
- public void setStart (int start) {
- Dispatch.put(object, "Start", start);
- }
-
- /**
- * Returns the start time of the object (in seconds).
- * @return Returns the start time of the object (in seconds).
- */
- public int getStart() {
- return Dispatch.get(object, "Start").getInt();
- }
-
- /**
- * Returns the length of the object (in MM:SS format).
- * @return Returns the length of the object (in MM:SS format).
- */
- public String getTime() {
- return Dispatch.get(object, "Time").getString();
- }
-
- /**
- * Set the total number of tracks on the source album.
- * @param trackCount The new total number of tracks on the source album.
- */
- public void setTrackCount (int trackCount) {
- Dispatch.put(object, "TrackCount", trackCount);
- }
-
- /**
- * Returns the total number of tracks on the source album.
- * @return Returns the total number of tracks on the source album.
- */
- public int getTrackCount() {
- return Dispatch.get(object, "TrackCount").getInt();
- }
-
- /**
- * Set the index of the object on the source album.
- * @param trackNumber The new index of the object on the source album.
- */
- public void setTrackNumber (int trackNumber) {
- Dispatch.put(object, "TrackNumber", trackNumber);
- }
-
- /**
- * Returns the index of the object on the source album.
- * @return Returns the index of the object on the source album.
- */
- public int getTrackNumber() {
- return Dispatch.get(object, "TrackNumebr").getInt();
- }
-
- /**
- * Set the relative volume adjustment of the object (-100% to 100%).
- * @param volumeAdjustment Set the relative volume adjustment of the object
- * (-100% to 100%).
- */
- public void setVolumeAdjustment (int volumeAdjustment) {
- Dispatch.put(object, "VolumeAdjustment", volumeAdjustment);
- }
-
- /**
- * Returns the relative volume adjustment of the object (-100% to 100%).
- * @return Returns the relative volume adjustment of the object (-100% to 100%).
- */
- public int getVolumeAdjustment() {
- return Dispatch.get(object, "VolumeAdjustment").getInt();
- }
-
- /**
- * Set the year the object was recorded/released.
- * @param year The new year the object was recorded/released.
- */
- public void setYear (int year) {
- Dispatch.put(object, "Year", year);
- }
-
- /**
- * Returns the year the object was recorded/released.
- * @return Returns the year the object was recorded/released.
- */
- public int getYear() {
- return Dispatch.get(object, "Year").getInt();
- }
-
- public ITArtworkCollection getArtwork() {
- Dispatch art = Dispatch.get(object, "Artwork").toDispatch();
- return new ITArtworkCollection(art);
-
- }
-
-}
diff --git a/java/src/com/dt/iTunesController/ITTrackCollection.java b/java/src/com/dt/iTunesController/ITTrackCollection.java
deleted file mode 100644
index 3e1f3bf..0000000
--- a/java/src/com/dt/iTunesController/ITTrackCollection.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package com.dt.iTunesController;
-import com.jacob.com.Dispatch;
-
-/**
- * Represents a collection of track objects.
- *
- * Note that collection indices are always 1-based.
- *
- * You can retrieve all the tracks defined for a playlist using
- * ITPlaylist.getTracks().
- *
- * You can retrieve the currently selected track or tracks using
- * iTunes.getSelectedTracks().
- *
- * @author Steve Eyre
- * @version 0.2
- */
-public class ITTrackCollection {
-
- protected Dispatch object;
-
- public ITTrackCollection(Dispatch d) {
- object = d;
- }
-
- /**
- * Returns the number of tracks in the collection.
- * @return Returns the number of tracks in the collection.
- */
- public int getCount() {
- return Dispatch.get(object, "Count").getInt();
- }
-
- /**
- * Returns an ITTrack object corresponding to the given index (1-based).
- * @param index Index of the track to retrieve, must be less than or
- * equal to ITTrackCollection.getCount().
- * @return Returns an ITTrack object corresponding to the given index.
- * Will be set to NULL if no track could be retrieved.
- */
- public ITTrack getItem (int index) {
- Dispatch item = Dispatch.call(object, "Item", index).toDispatch();
- ITTrack track = new ITTrack(item);
- if (track.getKind()==ITTrackKind.ITTrackKindFile) {
- return new ITFileOrCDTrack(item);
- } else if (track.getKind()==ITTrackKind.ITTrackKindCD) {
- return new ITFileOrCDTrack(item);
- } else if (track.getKind()==ITTrackKind.ITTrackKindURL ) {
- return new ITURLTrack(item);
- } else {
- return track;
- }
- }
-
- /**
- * Returns an ITTrack object corresponding to the given index (1-based).
- * @param index Index of the track to retrieve, must be less than or
- * equal to ITTrackCollection.getCount().
- * @return Returns an ITTrack object corresponding to the given index.
- * Will be set to NULL if no track could be retrieved.
- */
- public ITTrack getItemByPlayOrder(int index) {
- Dispatch item = Dispatch.call(object, "ItemByPlayOrder", index).toDispatch();
- return new ITTrack(item);
- }
-
- /**
- * Returns an ITTrack object withthe specified name.
- * @param name The name of the track to retrieve.
- * @return Returns an ITTrack object corresponding to the given index.
- * Will be set to NULL if no track could be retrieved.
- */
- public ITTrack ItemByName (String name) {
- Dispatch item = Dispatch.call(object, "ItemByName", name).toDispatch();
- return new ITTrack(item);
- }
-
- /**
- * Returns an ITTrack object with the specified persistent ID. See the
- * documentation on ITObject for more information on persistent IDs.
- * @param highID The high 32 bits of the 64-bit persistent ID.
- * @param lowID The low 32 bits of the 64-bit persistent ID.
- * @return Returns an ITTrack object with the specified persistent ID.
- * Will be set to NULL if no track could be retrieved.
- */
- public ITTrack getItemByPersistentID (int highID, int lowID) {
- Dispatch item = Dispatch.call(object, "ItemByPersistentID", highID, lowID).toDispatch();
- return new ITTrack(item);
- }
-
- public boolean containsTrack(ITTrack track) {
- String name = track.getName();
- try {
- return ItemByName(name).getName().equals(name);
- } catch (IllegalStateException e) {
- return false;
- }
- }
-}
diff --git a/java/src/com/dt/iTunesController/ITTrackKind.java b/java/src/com/dt/iTunesController/ITTrackKind.java
deleted file mode 100644
index ec233a1..0000000
--- a/java/src/com/dt/iTunesController/ITTrackKind.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.dt.iTunesController;
-
-/**
- * Specifies the track kind.
- * @author Steve Eyre
- * @version 0.2
- */
-public enum ITTrackKind {
- ITTrackKindUnknown,
- ITTrackKindFile,
- ITTrackKindCD,
- ITTrackKindURL,
- ITTrackKindDevice,
- ITTrackKindSharedLibrary;
-}
diff --git a/java/src/com/dt/iTunesController/ITURLTrack.java b/java/src/com/dt/iTunesController/ITURLTrack.java
deleted file mode 100644
index 9829190..0000000
--- a/java/src/com/dt/iTunesController/ITURLTrack.java
+++ /dev/null
@@ -1,175 +0,0 @@
-package com.dt.iTunesController;
-import com.jacob.com.Dispatch;
-
-/**
- * Represents a URL track.
- *
- * A URL track references a network audio stream.
- * @author Steve Eyre
- * @version 0.2
- */
-public class ITURLTrack extends ITTrack {
-
- public ITURLTrack (Dispatch d) {
- super(d);
- }
-
- /**
- * Returns the URL of the stream represented by this track.
- * @return The URL of the stream represented by this track.
- */
- public String getURL () {
- return Dispatch.get(object, "URL").getString();
- }
-
- /**
- * Set the URL of the stream represented by this track.
- * @param url The URL of the stream represented by this track.
- */
- public void setURL (String url) {
- Dispatch.call(object, "URL", url);
- }
-
- /**
- * Returns true if this track is a podcast track. If a podcast track is an
- * IITURLTrack, the podcast episode has not been downloaded.
- * @return Returns true if this track is a podcast track.
- */
- public boolean isPodcast () {
- return Dispatch.get(object, "Podcast").getBoolean();
- }
-
- /**
- * Returns the category for the track.
- * @return Returns the category for the track.
- */
- public String getCategory () {
- return Dispatch.get(object, "Category").getString();
- }
-
- /**
- * Sets the category for the track.
- * @param category Sets the category for the track.
- */
- public void setCategory (String category) {
- Dispatch.call(object, "Category", category);
- }
-
- /**
- * Returns the description for the track.
- * @return Returns the description for the track.
- */
- public String getDescription () {
- return Dispatch.get(object, "Description").getString();
- }
-
- /**
- * Sets the description for the track.
- * @param description The new description for the track.
- */
- public void setDescription (String description) {
- Dispatch.call(object, "Description", description);
- }
-
- /**
- * Returns the long description for the track.
- * @return Returns the description for the track.
- */
- public String getLongDescription () {
- return Dispatch.get(object, "LongDescription").getString();
- }
-
- /**
- * Sets the long description for the track.
- * @param longDescription The new long description for the track.
- */
- public void setLongDescription (String longDescription) {
- Dispatch.call(object, "LongDescription", longDescription);
- }
-
- /**
- * Returns the user or computed rating of the album that this track belongs
- * to (0 to 100). If the album rating has never been set, or has been set to
- * 0, it will be computed based on the ratings of tracks in the album.
- * @return Returns the album rating of the album that this track belongs to (0 to 100).
- */
- public long getAlbumRating () {
- return Dispatch.get(object, "AlbumRating").getLong();
- }
-
- /**
- * Set the album rating of the album that this track belongs to (0 to 100).
- * If the album rating is set to 0, it will be computed based on the ratings
- * of tracks in the album.
- * @param albumRating The new album rating of the album that this track
- * belongs to (0 to 100). If rating is outside this range, it will be
- * pinned.
- */
- public void setAlbumRating (long albumRating) {
- Dispatch.call(object, "AlbumRating", albumRating);
- }
-
- /**
- * Returns the album rating kind. If the album rating has never been set, or
- * has been set to 0, the kind is ITRatingKindComputed. Otherwise, the kind
- * is ITRatingKindUser.
- * @return Returns the album rating kind.
- */
- public ITRatingKind getAlbumRatingKind () {
- return ITRatingKind.values()[Dispatch.get(object, "AlbumRatingKind").getInt()];
- }
-
- /**
- * Returns the track rating kind. If the track rating has never been set, or
- * has been set to 0, the kind is ITRatingKindComputed. Otherwise, the kind
- * is ITRatingKindUser.
- * @return Returns the track rating kind.
- */
- public ITRatingKind getRatingKind () {
- return ITRatingKind.values()[Dispatch.get(object, "RatingKind").getInt()];
- }
-
- /**
- * Returns a collection of playlists that contain the song that this track
- * represents.
- *
- * This is the same collection of playlists that are shown in the "Show in
- * Playlist" contextual menu for a track, plus the specific playlist that
- * contains this track.
- *
- * A track represents a song in a single playlist, use
- * ITTrack.getPlaylist() to get the specific playlist that
- * contains this track.
- * @return Collection of ITPlaylist objects.
- */
- public ITPlaylistCollection getPlaylists () {
- Dispatch playlists = Dispatch.get(object, "Playlists").toDispatch();
- return new ITPlaylistCollection(playlists);
- }
-
- /**
- * Update the podcast feed for this track. This is equivalent to the user
- * choosing Update Podcast from the contextual menu for the podcast feed
- * that contains this track.
- */
- public void updatePodcastFeed () {
- Dispatch.call(object, "UpdatePodcastFeed");
- }
-
- /**
- * Start downloading the podcast episode that corresponds to this track.
- * This is equivalent to the user clicking the Get button next to this
- * track.
- */
- public void downloadPodcastEpisode () {
- Dispatch.call(object, "DownloadPodcastEpisode");
- }
-
- /**
- * Reveals the track in the main browser window.
- */
- public void reveal() {
- Dispatch.call(object, "Reveal");
- }
-
-}
diff --git a/java/src/com/dt/iTunesController/ITUserPlaylist.java b/java/src/com/dt/iTunesController/ITUserPlaylist.java
deleted file mode 100644
index b4025cf..0000000
--- a/java/src/com/dt/iTunesController/ITUserPlaylist.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.dt.iTunesController;
-import com.jacob.com.Dispatch;
-
-/**
- * Represents a user-defined playlist.
- *
- * A user playlist includes both smart and manual user-defined playlists.
- * @author Steve Eyre
- * @version 0.2
- */
-public class ITUserPlaylist extends ITPlaylist {
-
- public ITUserPlaylist(Dispatch d) {
- super(d);
- }
-
- /**
- * Add a file or files inside a folder to the playlist.
- * You cannot use this method to add a file that requires conversion to be
- * added (e.g. a CD track), use iTunes.convertFile() or
- * iTunes.convertFile2() instead. If you add a folder that
- * contains files that require conversion, they will be skipped.
- * @param filePath The full path to the file or folder to add.
- * @return Returns an ITOperationStatus object corresponding to the
- * asynchronous operation. If an error occurs, or no files were added, this
- * will be set to NULL.
- */
- public ITOperationStatus addFile (String filePath) {
- Dispatch status = Dispatch.call(object, "AddFile", filePath).toDispatch();
- return new ITOperationStatus(status);
- }
-
- /**
- * Add a streaming audio URL to the playlist.
- * @param url The URL to add. The length of the URL can be 255 characters or
- * less.
- * @return Returns an ITURLTrack object corresponding to the new track.
- */
- public ITURLTrack addURL (String url) {
- Dispatch URLTrack = Dispatch.call(object, "AddURL", url).toDispatch();
- return new ITURLTrack(URLTrack);
- }
-
- /**
- * Add an existing track to the playlist.
- * You cannot use this method to add a CD track (ITTrackKindCD) to another
- * playlist, use iTunes.convertTrack() or
- * iTunes.convertTrack2() instead.
- * You cannot add a shared library track (ITTrackKindSharedLibrary) to
- * another playlist.
- * @param track The track to add.
- * @return Returns an IITTrack object corresponding to the new track.
- */
- public ITTrack addTrack (ITTrack track) {
- Dispatch trackToAdd = track.fetchDispatch();
- Dispatch addedTrack = Dispatch.call(object, "AddTrack", trackToAdd).toDispatch();
- return new ITTrack(addedTrack);
- }
-
-}
diff --git a/java/src/com/dt/iTunesController/ITVideoKind.java b/java/src/com/dt/iTunesController/ITVideoKind.java
deleted file mode 100644
index d318724..0000000
--- a/java/src/com/dt/iTunesController/ITVideoKind.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.dt.iTunesController;
-
-/**
- * Specifies the Video kind.
- * @author Steve Eyre
- * @version 0.2
- */
-public enum ITVideoKind {
- ITVideoKindNone,
- ITVideoKindMovie,
- ITVideoKindMusicVideo,
- ITVideoKindTVShow;
-}
diff --git a/java/src/com/dt/iTunesController/ITWindow.java b/java/src/com/dt/iTunesController/ITWindow.java
deleted file mode 100644
index 4af825f..0000000
--- a/java/src/com/dt/iTunesController/ITWindow.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.dt.iTunesController;
-import com.jacob.com.Dispatch;
-
-/**
- * Represents an iTunes window.
- */
-
-public class ITWindow {
-
- protected Dispatch object;
-
- public ITWindow(Dispatch d) {
- object = d;
- }
-
- /**
- * Returns the JACOB Dispatch object for this object.
- * @return Returns the JACOB Dispatch object for this object.
- */
- public Dispatch fetchDispatch() {
- return object;
- }
-
- /**
- * Returns the name of the object.
- * @return Returns the name of the object.
- */
- public String getName() {
- return Dispatch.get(object, "Name").getString();
- }
-
-}
diff --git a/java/src/com/dt/iTunesController/ITWindowCollection.java b/java/src/com/dt/iTunesController/ITWindowCollection.java
deleted file mode 100644
index df1f3cf..0000000
--- a/java/src/com/dt/iTunesController/ITWindowCollection.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package com.dt.iTunesController;
-import com.jacob.com.Dispatch;
-
-/**
- * Represents a collection of window objects.
- *
- * Note that collection indices are always 1-based.
- *
- * You can retrieve all the windows using
- * iTunes.getWindows().
- *
- * @author Steve Eyre
- * @version 0.2
- */
-public class ITWindowCollection {
-
- protected Dispatch object;
-
- public ITWindowCollection(Dispatch d) {
- object = d;
- }
-
- // TODO: iTunes.getWindows()
-
- /**
- * Returns the number of playlists in the collection.
- * @return Returns the number of playlists in the collection.
- */
- public int getCount() {
- return Dispatch.get(object, "Count").getInt();
- }
-
- /**
- * Returns an ITWindow object corresponding to the given index (1-based).
- * @param index Index of the playlist to retrieve, must be less than or
- * equal to ITWindowCollection.getCount().
- * @return Returns an ITWindow object corresponding to the given index.
- * Will be set to NULL if no playlist could be retrieved.
- */
- public ITWindow getItem (int index) {
- Dispatch item = Dispatch.call(object, "Item", index).toDispatch();
- return new ITWindow(item);
- }
- /**
- * Returns an ITWindow object with the specified name.
- * @param name The name of the window to retrieve.
- * @return Returns an ITWindow object corresponding to the given index.
- * Will be set to NULL if no ITWindow could be retrieved.
- */
- public ITWindow ItemByName (String name) {
- Dispatch item = Dispatch.call(object, "ItemByName", name).toDispatch();
- return new ITWindow(item);
- }
-
-}
diff --git a/java/src/com/dt/iTunesController/iTunes.java b/java/src/com/dt/iTunesController/iTunes.java
deleted file mode 100644
index 6a54d07..0000000
--- a/java/src/com/dt/iTunesController/iTunes.java
+++ /dev/null
@@ -1,539 +0,0 @@
-package com.dt.iTunesController;
-
-import com.jacob.activeX.ActiveXComponent;
-import com.jacob.com.ComThread;
-import com.jacob.com.Dispatch;
-import com.jacob.com.DispatchEvents;
-
-/**
- * Defines the top-level iTunes application object.
- *
- * This interface defines the top-level iTunes application object. All other
- * iTunes interfaces are accessed through this object.
- *
- * @author Steve Eyre
- * @version 0.2
- */
-public class iTunes {
- ActiveXComponent iTunes;
- iTunesEvents iTunesEvents;
- DispatchEvents dispatchEvents;
-
- /**
- * Initiate iTunes Controller.
- * @return
- */
- public void connect() {
- iTunes = new ActiveXComponent("iTunes.Application");
- }
-
- /**
- * Add an event handler to the iTunes controller.
- * @param itef The class that will handle the iTunes events.
- */
- public void addEventHandler(iTunesEventsInterface itef) {
- iTunesEvents = new iTunesEvents(itef);
- dispatchEvents = new DispatchEvents(iTunes, iTunesEvents);
- //System.out.println("New event handler added.");
- }
-
- /**
- * Reposition to the beginning of the current track or go to the previous
- * track if already at start of current track.
- */
- public void backTrack() {
- iTunes.invoke("BackTrack");
- }
-
- /**
- * Skip forward in a playing track.
- */
- public void fastForward() {
- iTunes.invoke("FastForward");
- }
-
- /**
- * Advance to the next track in the current playlist.
- */
- public void nextTrack() {
- iTunes.invoke("NextTrack");
- }
-
- /**
- * Pause playback.
- */
- public void pause() {
- iTunes.invoke("Pause");
- }
-
- /**
- * Play the currently targeted track.
- */
- public void play() {
- iTunes.invoke("ASDSDPlay");
- }
-
- /**
- * Play the specified file path, adding it to the library if not already
- * present.
- */
- public void playFile(String filePath) {
- iTunes.invoke("PlayFile", filePath);
- }
-
- /**
- * Toggle the playing/paused state of the current track.
- */
- public void playPause() {
- iTunes.invoke("PlayPause");
- }
-
- /**
- * Return to the previous track in the current playlist.
- */
- public void previousTrack() {
- iTunes.invoke("PreviousTrack");
- }
-
- /**
- * Disable fast forward/rewind and resume playback, if playing.
- */
- public void resume() {
- iTunes.invoke("Resume");
- }
-
- /**
- * Skip backwards in a playing track.
- */
- public void rewind() {
- iTunes.invoke("Rewind");
- }
-
- /**
- * Stop playback.
- */
- public void stop() {
- iTunes.invoke("Stop");
- }
-
- /**
- * Retrieves the current state of the player buttons in the window
- * containing the currently targeted track. If there is no currently
- * targeted track, returns the current state of the player buttons
- * in the main browser window.
- */
- public void getPlayerButtonsState(boolean previousEnabled,
- String playPause, boolean nextEnabled) {
-
- }
-
- /**
- * Returns true if this version of the iTunes type library is compatible
- * with the specified version.
- * @param majorVersion Major version of iTunes interface.
- * @param minorVersion Minor version of iTunes interface.
- * @return Returns true if this version is compatible with the indicated
- * interface version.
- */
- public boolean getCheckVersion (int majorVersion, int minorVersion) {
- return iTunes.invoke("CheckVersion", majorVersion, minorVersion).getBoolean();
- }
-
- /**
- * Returns an IITObject corresponding to the specified IDs.
- * The object may be a source, playlist, or track.
- * @param sourceID The ID that identifies the source. Valid for a source,
- * playlist, or track.
- * @param playlistID The ID that identifies the playlist. Valid for a
- * playlist or track. Must be zero for a source.
- * @param trackID The ID that identifies the track within the playlist.
- * Valid for a track. Must be zero for a source or playlist.
- * @param databaseID The ID that identifies the track, independent of its
- * playlist. Valid for a track. Must be zero for a source or playlist.
- * @return Returns an IITObject object corresponding to the specified IDs.
- * Will be set to NULL if no object could be retrieved.
- */
- public ITObject getITObjectByID(int sourceID, int playlistID, int trackID, int databaseID) {
- Dispatch object = Dispatch.call(iTunes, "GetITObjectByID", sourceID, playlistID, trackID, databaseID).toDispatch();
- return new ITObject(object);
- }
-
- /**
- * Creates a new playlist in the main library.
- * @param playlistName The name of the new playlist (may be empty).
- * @return Returns an ITPlaylist object corresponding to the new playlist.
- */
- public ITPlaylist createPlaylist(String playlistName) {
- Dispatch cplaylist = Dispatch.call(iTunes, "CreatePlaylist", playlistName).toDispatch();
- ITPlaylist playlist = new ITPlaylist(cplaylist);
- ITPlaylistKind playlistKind = playlist.getKind();
- if (playlistKind == ITPlaylistKind.ITPlaylistKindCD)
- return new ITAudioCDPlaylist(cplaylist);
- else if (playlist.getKind() == ITPlaylistKind.ITPlaylistKindLibrary)
- return new ITLibraryPlaylist(cplaylist);
- else if (playlist.getKind() == ITPlaylistKind.ITPlaylistKindUser)
- return new ITUserPlaylist(cplaylist);
- else
- return playlist;
- }
-
- /**
- * Open the specified iTunes Store or streaming audio URL.
- * @param url The URL to open. The length of the URL cannot exceed 512
- * characters. iTunes Store URLs start with itms:// or itmss://. Streaming
- * audio URLs start with http://.
- */
- public void openURL (String url) {
- iTunes.invoke("OpenURL", url);
- }
-
- /**
- * Go to the iTunes Store home page.
- */
- public void gotoMusicStoreHomePage() {
- iTunes.invoke("GoToMusicStoreHomePage");
- }
-
- /**
- * Update the contents of the iPod.
- */
- public void updateIPod() {
- iTunes.invoke("UpdateIPod");
- }
-
- /**
- * Exits the iTunes application.
- */
- public void quit() {
- iTunes.invoke("Quit");
- }
-
- /**
- * Creates a new EQ preset.
- * The EQ preset will be created "flat", i.e. the preamp and all band levels
- * will be set to 0.
- * EQ preset names cannot start with leading spaces. If you specify a name
- * that starts with leading spaces they will be stripped out.
- * If eqPresetName is empty, the EQ preset will be created with
- * a default name.
- * @param eqPresetName The name of the new EQ Preset (may be empty)
- * @return Returns an ITEQPreset object corresponding to the new EQ Preset.
- */
- public ITEQPreset createEQPreset(String eqPresetName) {
- Dispatch eqPreset = Dispatch.call(iTunes, "CreateEQPreset", eqPresetName).toDispatch();
- return new ITEQPreset(eqPreset);
- }
-
- /**
- * Creates a new playlist in an existing source.
- * You may not be able to create a playlist in every source. For example,
- * you cannot create a playlist in an audio CD source, or in an iPod source
- * if it is in auto update mode.
- * If playlistName is empty, the playlist will be created with
- * a default name.
- * @param playlistName The name of the new playlist (may be empty).
- * @param source The source that will contain the new playlist.
- * @return Returns an ITPlaylist object corresponding to the new playlist.
- */
- public ITPlaylist createPlaylistInSource(String playlistName, ITSource source) {
- Dispatch cplaylist = Dispatch.call(iTunes, "CreatePlaylistInSource", playlistName, source.fetchDispatch()).toDispatch();
- ITPlaylist playlist = new ITPlaylist(cplaylist);
- ITPlaylistKind playlistKind = playlist.getKind();
- if (playlistKind == ITPlaylistKind.ITPlaylistKindCD)
- return new ITAudioCDPlaylist(cplaylist);
- else if (playlist.getKind() == ITPlaylistKind.ITPlaylistKindLibrary)
- return new ITLibraryPlaylist(cplaylist);
- else if (playlist.getKind() == ITPlaylistKind.ITPlaylistKindUser)
- return new ITUserPlaylist(cplaylist);
- else
- return playlist;
- }
-
- /**
- * Subscribes to the specified podcast feed URL. Any "unsafe" characters in
- * the URL should already be converted into their corresponding escape
- * sequences, iTunes will not do this.
- * @param url The URL to subscribe to.
- */
- public void subscribeToPodcast(String url) {
- iTunes.invoke("SubscribeToPodcast", url);
- }
-
- /**
- * Updates all podcast feeds. This is equivalent to the user pressing the
- * Update button when Podcasts is selected in the Source list.
- */
- public void updatePodcastFeeds() {
- iTunes.invoke("UpdatePodcastFeeds");
- }
-
- /**
- * Creates a new folder in the main library.
- * If folderName is empty, the folder will be created with a
- * default name.
- * @param folderName The name of the new folder (may be empty).
- * @return Returns an ITPlaylist object corresponding to the new folder.
- */
- public ITUserPlaylist createFolder(String folderName) {
- Dispatch folder = Dispatch.call(iTunes, "CreateFolder", folderName).toDispatch();
- return new ITUserPlaylist(folder);
- }
-
- /**
- * Creates a new folder in an existing source.
- * You may not be able to create a folder in every source. For example, you
- * cannot create a folder in an audio CD source, or in an iPod source if it
- * is in auto update mode.
- * If folderName is empty, the folder will be created with a
- * default name.
- * @param folderName The name of the new folder (may be empty)
- * @param iSource The source that will contain the new folder.
- * @return Returns an ITPlaylist object corresponding to the new folder.
- */
- public ITUserPlaylist createFolderInSource(String folderName, ITSource iSource) {
- Dispatch folder = Dispatch.call(iTunes, "CreateFolderInSource", folderName, iSource.fetchDispatch()).toDispatch();
- return new ITUserPlaylist(folder);
- }
-
- /**
- * Returns a collection of music sources (music library, CD, device, etc.).
- * @return Collection of ITSource objects.
- */
- public ITSourceCollection getSources() {
- Dispatch sources = Dispatch.call(iTunes, "Sources").toDispatch();
- return new ITSourceCollection(sources);
- }
-
- /**
- * Sets the sound output volume (0=minimum, 100=maximum).
- * @param volume New sound output volume
- */
- public void setSoundVolume(int volume) {
- iTunes.setProperty("SoundVolume", volume);
- }
-
- /**
- * Returns the sound output volume (0=minimum, 100=maximum).
- * @return Current sound output volume
- */
- public int getSoundVolume() {
- return iTunes.getPropertyAsInt("SoundVolume");
- }
-
- /**
- * Sets sound output mute state.
- * @param shouldMute If true, sound output will be muted.
- */
- public void setMute(boolean shouldMute) {
- iTunes.setProperty("Mute", shouldMute);
- }
-
- /**
- * Returns true if the sound output is muted.
- * @return True if sound output is muted.
- */
- public boolean getMute() {
- return iTunes.getPropertyAsBoolean("Mute");
- }
-
- /**
- * Toggle the mute state.
- */
- public void toggleMute() {
- setMute(!getMute());
- }
-
- /**
- * Toggle the shuffle state.
- */
- public void toggleShuffle() {
- getCurrentPlaylist().toggleShuffle();
- }
-
- /**
- * Returns the current player state.
- * @return Returns the current player state.
- */
- public ITPlayerState getPlayerState() {
- return ITPlayerState.values()[Dispatch.get(iTunes, "PlayerState").getInt()];
- }
-
- /**
- * Sets the player's position within the currently playing track in
- * seconds.
- * If playerPos specifies a position before the beginning of the track,
- * the position will be set to the beginning. If playerPos specifies a
- * position after the end of the track, the position will be set to the
- * end.
- * @param playerPos The player's position within the currently playing
- * track in seconds.
- */
- public void setPlayerPosition(int playerPos) {
- iTunes.setProperty("playerPosition", playerPos);
- }
-
- /**
- * Returns the player's position within the currently playing track in
- * seconds.
- * @return The player's position within the currently playing track in
- * seconds.
- */
- public int getPlayerPosition() {
- return iTunes.getPropertyAsInt("playerPosition");
- }
-
- /**
- * Returns the source that represents the main library.
- * You can also find the main library source by iterating over
- * iTunes.getSources() and looking for an ITSource
- * of kind ITSourceKindLibrary.
- * @return Returns the source that represents the main library.
- */
- public ITSource getLibrarySource() {
- Dispatch lsource = iTunes.getProperty("LibrarySource").toDispatch();
- return new ITSource(lsource);
- }
-
- /**
- * Returns the main library playlist in the main library source.
- * @return An IITLibraryPlaylist object corresponding to the main library
- * playlist.
- */
- public ITLibraryPlaylist getLibraryPlaylist() {
- Dispatch lplaylist = iTunes.getProperty("LibraryPlaylist").toDispatch();
- return new ITLibraryPlaylist(lplaylist);
- }
-
- /**
- * Returns the currently targetd track.
- * @return An ITTrack object corresponding to the currently targeted track.
- * Will be set to NULL if there is no currently targeted track.
- */
- public ITTrack getCurrentTrack() {
- Dispatch item = iTunes.getProperty("CurrentTrack").toDispatch();
- ITTrack track = new ITTrack(item);
- if (track.getKind()==ITTrackKind.ITTrackKindFile) {
- return new ITFileOrCDTrack(item);
- } else if (track.getKind()==ITTrackKind.ITTrackKindCD) {
- return new ITFileOrCDTrack(item);
- } else if (track.getKind()==ITTrackKind.ITTrackKindURL ) {
- return new ITURLTrack(item);
- } else {
- return track;
- }
- }
-
- /**
- * Returns the playlist containing the currently targeted track.
- * @return An ITPlaylist object corresponding to the playlist containing the
- * currently targeted track.
- * Will be set to NULL if there is no currently targeted playlist.
- */
- public ITPlaylist getCurrentPlaylist() {
- Dispatch cplaylist = iTunes.getProperty("CurrentPlaylist").toDispatch();
- ITPlaylist playlist = new ITPlaylist(cplaylist);
- ITPlaylistKind playlistKind = playlist.getKind();
- if (playlistKind == ITPlaylistKind.ITPlaylistKindCD)
- return new ITAudioCDPlaylist(cplaylist);
- else if (playlist.getKind() == ITPlaylistKind.ITPlaylistKindLibrary)
- return new ITLibraryPlaylist(cplaylist);
- else if (playlist.getKind() == ITPlaylistKind.ITPlaylistKindUser)
- return new ITUserPlaylist(cplaylist);
- else
- return playlist;
- }
-
- /**
- * Returns a collection containing the currently selected track or tracks.
- * The frontmost visible window in iTunes must be a browser or playlist
- * window. If there is no frontmost visible window (e.g. iTunes is minimized
- * to the system tray), the main browser window is used.
- * @return Collection of ITrack objects.
- * Will be set to NULL if there is no current selection.
- */
- public ITTrackCollection getSelectedTracks() {
- Dispatch stracks = iTunes.getProperty("SelectedTracks").toDispatch();
- return new ITTrackCollection(stracks);
- }
-
- /**
- * Returns the version of the iTunes application.
- * @return
- */
- public String getVersion() {
- return iTunes.getPropertyAsString("Version");
- }
-
- /**
- * Returns the high 32 bits of the persistent ID of the specified IITObject.
- * See the documentation on IITObject for more information on persistent
- * IDs.
- *
- * The object may be a source, playlist, or track.
- * @param iObject The object to fetch the High Persistent ID.
- * @return The high 32 bits of the 64-bit persistent ID.
- */
- public long getITObjectPersistentIDHigh (ITObject iObject) {
- Dispatch object = iObject.fetchDispatch();
- return Dispatch.call(object, "GetObjectPersistentIDHigh", object).getLong();
- }
-
- /**
- * Returns the low 32 bits of the persistent ID of the specified IITObject.
- * See the documentation on IITObject for more information on persistent
- * IDs.
- *
- * The object may be a source, playlist, or track.
- * @param iObject The object to fetch the Low Persistent ID.
- * @return The low 32 bits of the 64-bit persistent ID.
- */
- public long getITObjectPersistentIDLow (ITObject iObject) {
- Dispatch object = iObject.fetchDispatch();
- return Dispatch.call(object, "GetObjectPersistentIDLow", object).getLong();
- }
-
- public ITObjectPersistentID getObjectPersistentIDs(ITObject iObject){
- return new ITObjectPersistentID(getITObjectPersistentIDHigh(iObject),getITObjectPersistentIDLow(iObject));
- }
-
- public ITBrowserWindow getBrowserWindow(){
- Dispatch window = iTunes.getProperty("BrowserWindow").toDispatch();
- return new ITBrowserWindow(window);
- }
-
- public void cycleSongRepeat() {
- getCurrentPlaylist().cycleSongRepeat();
- }
-
- public ITPlaylist getPlaylist(String name) {
- ITPlaylistCollection playlistCollection = getLibrarySource().getPlaylists();
- ITPlaylist playlist = playlistCollection.ItemByName(name);
- try {
- playlist.getName();
- } catch (IllegalStateException e) {
- playlist = createPlaylist(name);
- }
- return playlist;
- }
-
- public ITUserPlaylist getUserPlaylist(String name) {
- ITPlaylist playlist = getPlaylist(name);
- ITUserPlaylist userPlaylist = new ITUserPlaylist(playlist.fetchDispatch());
- return userPlaylist;
- }
-
- public void playlistAddTrack(String name, ITTrack track) {
- ITUserPlaylist userPlaylist = getUserPlaylist(name);
- if (!userPlaylist.containsTrack(track)) {
- userPlaylist.addTrack(track);
- }
- }
-
- public void playlistAddCurrentTrack(String name) {
- playlistAddTrack(name, getCurrentTrack());
- }
-
- public void release() {
- ComThread.Release();
- }
-}
diff --git a/java/src/com/dt/iTunesController/iTunesEvents.java b/java/src/com/dt/iTunesController/iTunesEvents.java
deleted file mode 100644
index ddbee23..0000000
--- a/java/src/com/dt/iTunesController/iTunesEvents.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.dt.iTunesController;
-import com.jacob.com.Dispatch;
-import com.jacob.com.Variant;
-
-/**
- * This class is used to forward all iTunes COM Events to a class that
- * implements iTunesEventsInterface. To receive events, create
- * a class that implements the interface, and then use
- * iTunes.addEventHandler().
- *
- * @author Steve Eyre
- * @version 0.2
- */
-public class iTunesEvents {
-
- private iTunesEventsInterface eventHandler;
-
- public iTunesEvents (iTunesEventsInterface itef) {
- eventHandler = itef;
- }
-
- public void OnDatabaseChangedEvent(Variant[] args) {
- // Not currently implemented
- }
-
- public void OnPlayerPlayEvent(Variant[] args) {
- ITTrack itt = new ITTrack((Dispatch)args[0].getDispatch());
- eventHandler.onPlayerPlayEvent(itt);
- }
-
- public void OnPlayerStopEvent(Variant[] args) {
- ITTrack itt = new ITTrack((Dispatch)args[0].getDispatch());
- eventHandler.onPlayerStopEvent(itt);
- }
-
- public void OnPlayerPlayingTrackChangedEvent(Variant[] args) {
- ITTrack itt = new ITTrack((Dispatch)args[0].getDispatch());
- eventHandler.onPlayerPlayingTrackChangedEvent(itt);
- }
-
- public void OnCOMCallsDisabledEvent(Variant[] args) {
- ITCOMDisabledReason reason = ITCOMDisabledReason.values()[args[0].getInt()];
- eventHandler.onCOMCallsDisabledEvent(reason);
- }
-
- public void OnCOMCallsEnabledEvent(Variant[] args) {
- eventHandler.onCOMCallsEnabledEvent();
- }
-
- public void OnQuittingEvent(Variant[] args) {
- eventHandler.onQuittingEvent();
- }
-
- public void OnAboutToPromptUserToQuitEvent(Variant[] args) {
- eventHandler.onAboutToPromptUserToQuitEvent();
- }
-
- public void OnSoundVolumeChangedEvent(Variant[] args) {
- eventHandler.onSoundVolumeChangedEvent(args[0].getInt());
- }
-
-}
diff --git a/java/src/com/dt/iTunesController/iTunesEventsInterface.java b/java/src/com/dt/iTunesController/iTunesEventsInterface.java
deleted file mode 100644
index 3d8f17e..0000000
--- a/java/src/com/dt/iTunesController/iTunesEventsInterface.java
+++ /dev/null
@@ -1,115 +0,0 @@
-package com.dt.iTunesController;
-
-/**
- * Interface for receiving iTunes events.
- * @author Steve Eyre
- * @version 0.2
- */
-public interface iTunesEventsInterface {
-
- /**
- * Not currently implemented.
- *
- * The ITEventDatabaseChanged event is fired when the iTunes database is
- * changed.
- *
- * Each parameter is a two-dimensional array of integers. The first
- * dimension is the number of objects. The second dimension is always 4 and
- * specifies each of the 4 ITObject IDs, where index 0 is the source ID,
- * index 1 is the playlist ID, index 2 is the track ID, and index 3 is the
- * track database ID. For more information on object IDs, see
- * ITObject.
- *
- * Note that you can use iTunes.getITObjectByID() to retrieve
- * changed ITObject, but not for deleted objects (since they no longer
- * exist).
- *
- * @param deletedObjectIDs
- * @param changedObjectIDs
- */
- public void onDatabaseChangedEvent(int[][] deletedObjectIDs, int[][] changedObjectIDs);
-
- /**
- * The ITEventPlayerPlay event is fired when a track begins playing.
- * @param iTrack An ITTrack object corresponding to the track that has
- * started playing.
- */
- public void onPlayerPlayEvent (ITTrack iTrack);
-
- /**
- * The ITEventPlayerStop event is fired when a track stops playing.
- * @param iTrack An ITTrack object corresponding to the track that has
- * stopped playing.
- */
- public void onPlayerStopEvent (ITTrack iTrack);
-
- /**
- * The ITEventPlayerPlayingTrackChanged event is fired when information
- * about the currently playing track has changed.
- * This event is fired when the user changes information about the currently
- * playing track (e.g. the name of the track).
- * This event is also fired when iTunes plays the next joined CD track in a
- * CD playlist, since joined CD tracks are treated as a single track.
- * @param iTrack An ITTrack object corresponding to the track that is now
- * playing.
- */
- public void onPlayerPlayingTrackChangedEvent(ITTrack iTrack);
-
- /**
- * The ITEventCOMCallsDisabled event is fired when calls to the iTunes COM
- * interface will be deferred.
- * Typically, iTunes will defer COM calls when any modal dialog is being
- * displayed. When the user dismisses the last modal dialog, COM calls will
- * be enabled again, and any deferred COM calls will be executed. You can
- * use this event to avoid making a COM call which will be deferred.
- * @param reason The reason the COM interface is being disabled. This is
- * typically ITCOMDisabledReasonDialog.
- */
- public void onCOMCallsDisabledEvent(ITCOMDisabledReason reason);
-
- /**
- * The ITEventCOMCallsEnabled event is fired when calls to the iTunes COM
- * interface will no longer be deferred.
- * Typically, iTunes will defer COM calls when any modal dialog is being
- * displayed. When the user dismisses the last modal dialog, COM calls will
- * be enabled again, and any deferred COM calls will be executed.
- */
- public void onCOMCallsEnabledEvent();
-
- /**
- * The ITEventQuitting event is fired when iTunes is about to quit.
- * If the user attempts to quit iTunes while a client still has outstanding
- * iTunes COM objects instantiated, iTunes will display a warning dialog.
- * The user can still choose to quit iTunes anyway, in which case this event
- * will be fired. After this event is fired, any existing iTunes COM objects
- * will no longer be valid.
- * This event is only used to notify clients that iTunes is quitting,
- * clients cannot prevent this from happening.
- */
- public void onQuittingEvent();
-
- /**
- * The ITEventAboutToPromptUserToQuit event is fired when iTunes is about
- * prompt the user to quit.
- * This event gives clients the opportunity to prevent the warning dialog
- * prompt from occurring.
- * If the user attempts to quit iTunes while a client still has outstanding
- * iTunes COM objects instantiated, iTunes will display a warning dialog.
- * This event is fired just before the warning dialog is shown. iTunes will
- * then wait up to 5 seconds for clients to release any outstanding iTunes
- * COM objects. If all objects are released during this time, the warning
- * dialog will not be shown and iTunes will quit immediately.
- * Otherwise, the warning dialog will be shown. If the user chooses to quit
- * iTunes anyway, the ITEventQuitting event is fired. See
- * iTunesEventsInterface.onQuittingEvent() for more details.
- */
- public void onAboutToPromptUserToQuitEvent();
-
- /**
- * The ITEventSoundVolumeChanged event is fired when the sound output volume
- * has changed.
- * @param newVolume The new sound output volume (0 = minimum, 100 = maximum).
- */
- public void onSoundVolumeChangedEvent(int newVolume);
-
-}
diff --git a/java/src/com/melloware/jintellitype/HotkeyListener.java b/java/src/com/melloware/jintellitype/HotkeyListener.java
deleted file mode 100644
index c7bef85..0000000
--- a/java/src/com/melloware/jintellitype/HotkeyListener.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * JIntellitype
- * -----------------
- * Copyright 2005-2008 Emil A. Lefkof III, Melloware Inc.
- *
- * I always give it my best shot to make a program useful and solid, but
- * remeber that there is absolutely no warranty for using this program as
- * stated in the following terms:
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.melloware.jintellitype;
-
-
-/**
- * Listener interface for Windows Hotkey events registered using the
- * Windows API call RegisterHotKey to globally listen for a key combination
- * regardless if your application has focus or not.
- *
- * Copyright (c) 1999-2008
- * Melloware, Inc.
- * @author Emil A. Lefkof III
- * @version 1.3.1
- *
- * @see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/registerhotkey.asp
- */
-public interface HotkeyListener
-{
- /**
- * Event fired when a WM_HOTKEY message is received that was initiated
- * by this application.
- *
- * @param identifier the unique Identifer the Hotkey was assigned
- */
- void onHotKey( int identifier );
-}
\ No newline at end of file
diff --git a/java/src/com/melloware/jintellitype/IntellitypeListener.java b/java/src/com/melloware/jintellitype/IntellitypeListener.java
deleted file mode 100644
index 4fa5ede..0000000
--- a/java/src/com/melloware/jintellitype/IntellitypeListener.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * JIntellitype
- * -----------------
- * Copyright 2005-2008 Emil A. Lefkof III, Melloware Inc.
- *
- * I always give it my best shot to make a program useful and solid, but
- * remeber that there is absolutely no warranty for using this program as
- * stated in the following terms:
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.melloware.jintellitype;
-
-
-/**
- * Listener interface for Windows Intellitype events. Intellitype are Windows
- * App Commands that are specialand were introduced with Microsoft Keyboards
- * that had special keys for Play, Pause, Stop, Next etc for controlling
- * Media applications like Windows Media Player, Itunes, and Winamp.
- *
- * If you have ever wanted your Swing/SWT application to respond to these global
- * events you now can with JIntellitype. Just implement this interface and
- * you can now take action when those special Media keys are pressed.
- *
- * Copyright (c) 1999-2008
- * Melloware, Inc.
- * @author Emil A. Lefkof III
- * @version 1.3.1
- *
- * @see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputmessages/wm_appcommand.asp
- */
-public interface IntellitypeListener
-{
- /**
- * Event fired when a WM_APPCOMMAND message is received that was initiated
- * by this application.
- *
- * @param command the WM_APPCOMMAND that was pressed
- */
- void onIntellitype( int command );
-}
\ No newline at end of file
diff --git a/java/src/com/melloware/jintellitype/JIntellitype.java b/java/src/com/melloware/jintellitype/JIntellitype.java
deleted file mode 100644
index 1c80888..0000000
--- a/java/src/com/melloware/jintellitype/JIntellitype.java
+++ /dev/null
@@ -1,664 +0,0 @@
-/**
- * JIntellitype ----------------- Copyright 2005-2008 Emil A. Lefkof III,
- * Melloware Inc. I always give it my best shot to make a program useful and
- * solid, but remeber that there is absolutely no warranty for using this
- * program as stated in the following terms: Licensed under the Apache License,
- * Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
- * or agreed to in writing, software distributed under the License is
- * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-package com.melloware.jintellitype;
-
-import java.awt.event.InputEvent;
-import java.awt.event.KeyEvent;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import javax.swing.SwingUtilities;
-
-/**
- * JIntellitype A Java Implementation for using the Windows API Intellitype
- * commands and the RegisterHotKey and UnRegisterHotkey API calls for globally
- * responding to key events. Intellitype are commands that are using for Play,
- * Stop, Next on Media keyboards or some laptops that have those special keys.
- *
- * JIntellitype class that is used to call Windows API calls using the
- * JIntellitype.dll.
- *
- * This file comes with native code in JINTELLITYPE.DLL The DLL should go in
- * C:/WINDOWS/SYSTEM or in your current directory
- *
- *
- * Copyright (c) 1999-2008 Melloware, Inc.
- * @author Emil A. Lefkof III
- * @version 1.3.1
- */
-public final class JIntellitype implements JIntellitypeConstants {
-
- /**
- * Static variable to hold singleton.
- */
- private static JIntellitype jintellitype = null;
-
- /**
- * Static variable for double checked thread safety.
- */
- private static boolean isInitialized = false;
-
- /**
- * Static variable to hold the libary location if set
- */
- private static String libraryLocation = null;
-
- /**
- * Listeners collection for Hotkey events
- */
- private final List hotkeyListeners = Collections
- .synchronizedList(new CopyOnWriteArrayList());
-
- /**
- * Listeners collection for Hotkey events
- */
- private final List intellitypeListeners = Collections
- .synchronizedList(new CopyOnWriteArrayList());
-
- /**
- * Handler is used by JNI code to keep different JVM instances separate
- */
- private final int handler = 0;
-
- /**
- * Map containing key->keycode mapping
- * @see #registerHotKey(int, String)
- * @see #getKey2KeycodeMapping()
- */
- private final HashMap keycodeMap;
-
- /**
- * Private Constructor to prevent instantiation. Initialize the library for
- * calling.
- */
- private JIntellitype() {
- try {
- // Load JNI library
- System.loadLibrary("JIntellitype");
- } catch (Throwable ex) {
- try {
- if (getLibraryLocation() != null) {
- System.load(getLibraryLocation());
- } else {
- String jarPath = "com/melloware/jintellitype/";
- String tmpDir = System.getProperty("java.io.tmpdir");
- try {
- String dll = "JIntellitype.dll";
- fromJarToFs(jarPath + dll, tmpDir + dll);
- System.load(tmpDir + dll);
- } catch (UnsatisfiedLinkError e) {
- String dll = "JIntellitype64.dll";
- fromJarToFs(jarPath + dll, tmpDir + dll);
- System.load(tmpDir + dll);
- }
- }
- } catch (Throwable ex2) {
- throw new JIntellitypeException(
- "Could not load JIntellitype.dll from local file system or from inside JAR", ex2);
- }
- }
-
- initializeLibrary();
- this.keycodeMap = getKey2KeycodeMapping();
- }
-
- /**
- * Pulls a file out of the JAR and puts it on the File Path.
- *
- * @param jarPath the path to the JAR
- * @param filePath the file path to extract to
- * @throws IOException if any IO error occurs
- */
- private void fromJarToFs(String jarPath, String filePath) throws IOException {
- File file = new File(filePath);
- if (file.exists()) {
- boolean success = file.delete();
- if (!success) {
- throw new IOException("couldn't delete " + filePath);
- }
- }
- InputStream is = null;
- OutputStream os = null;
- try {
- is = ClassLoader.getSystemClassLoader().getResourceAsStream(jarPath);
- os = new FileOutputStream(filePath);
- byte[] buffer = new byte[8192];
- int bytesRead;
- while ((bytesRead = is.read(buffer)) != -1) {
- os.write(buffer, 0, bytesRead);
- }
- } finally {
- if (is != null) {
- is.close();
- }
- if (os != null) {
- os.close();
- }
- }
- }
-
- /**
- * Gets the singleton instance of the JIntellitype object.
- *
- * But the possibility of creation of more instance is only before the
- * instance is created. Since all code defined inside getInstance method is
- * in the synchronized block, even the subsequent requests will also come and
- * wait in the synchronized block. This is a performance issue. The same can
- * be solved using double-checked lock. Following is the implementation of
- * Singleton with lazy initialization and double-checked lock.
- *
- * @return an instance of JIntellitype class
- */
- public static JIntellitype getInstance() {
- if (!isInitialized) {
- synchronized (JIntellitype.class) {
- if (!isInitialized) {
- jintellitype = new JIntellitype();
- isInitialized = true;
- }
- }
- }
- return jintellitype;
- }
-
- /**
- * Adds a listener for hotkeys.
- *
- * @param listener the HotKeyListener to be added
- */
- public void addHotKeyListener(HotkeyListener listener) {
- hotkeyListeners.add(listener);
- }
-
- /**
- * Adds a listener for intellitype commands.
- *
- * @param listener the IntellitypeListener to be added
- */
- public void addIntellitypeListener(IntellitypeListener listener) {
- intellitypeListeners.add(listener);
- }
-
- /**
- * Cleans up all resources used by JIntellitype.
- */
- public void cleanUp() {
- try {
- terminate();
- } catch (UnsatisfiedLinkError ex) {
- throw new JIntellitypeException(ERROR_MESSAGE, ex);
- } catch (RuntimeException ex) {
- throw new JIntellitypeException(ex);
- }
- }
-
- /**
- * Registers a Hotkey with windows. This combination will be responded to by
- * all registered HotKeyListeners. Uses the JIntellitypeConstants for MOD,
- * ALT, CTRL, and WINDOWS keys.
- *
- * @param identifier a unique identifier for this key combination
- * @param modifier MOD_SHIFT, MOD_ALT, MOD_CONTROL, MOD_WIN from
- * JIntellitypeConstants, or 0 if no modifier needed
- * @param keycode the key to respond to in Ascii integer, 65 for A
- */
- public void registerHotKey(int identifier, int modifier, int keycode) {
- try {
- int modifiers = swingToIntelliType(modifier);
- if (modifiers == 0) {
- modifiers = modifier;
- }
- regHotKey(identifier, modifier, keycode);
- } catch (UnsatisfiedLinkError ex) {
- throw new JIntellitypeException(ERROR_MESSAGE, ex);
- } catch (RuntimeException ex) {
- throw new JIntellitypeException(ex);
- }
- }
-
- /**
- * Registers a Hotkey with windows. This combination will be responded to by
- * all registered HotKeyListeners. Use the Swing InputEvent constants from
- * java.awt.InputEvent.
- *
- * @param identifier a unique identifier for this key combination
- * @param modifier InputEvent.SHIFT_MASK, InputEvent.ALT_MASK,
- * InputEvent.CTRL_MASK, or 0 if no modifier needed
- * @param keycode the key to respond to in Ascii integer, 65 for A
- */
- public void registerSwingHotKey(int identifier, int modifier, int keycode) {
- try {
- regHotKey(identifier, swingToIntelliType(modifier), keycode);
- } catch (UnsatisfiedLinkError ex) {
- throw new JIntellitypeException(ERROR_MESSAGE, ex);
- } catch (RuntimeException ex) {
- throw new JIntellitypeException(ex);
- }
- }
-
- /**
- * Registers a Hotkey with windows. This combination will be responded to by
- * all registered HotKeyListeners. Use the identifiers CTRL, SHIFT, ALT
- * and/or WIN.
- *
- * @param identifier a unique identifier for this key combination
- * @param modifierAndKeyCode String with modifiers separated by + and keycode
- * (e.g. CTRL+SHIFT+A)
- * @see #registerHotKey(int, int, int)
- * @see #registerSwingHotKey(int, int, int)
- */
- public void registerHotKey(int identifier, String modifierAndKeyCode) {
- String[] split = modifierAndKeyCode.split("\\+");
- int mask = 0;
- int keycode = 0;
-
- for (int i = 0; i < split.length; i++) {
- if ("ALT".equalsIgnoreCase(split[i])) {
- mask += JIntellitype.MOD_ALT;
- } else if ("CTRL".equalsIgnoreCase(split[i]) || "CONTROL".equalsIgnoreCase(split[i])) {
- mask += JIntellitype.MOD_CONTROL;
- } else if ("SHIFT".equalsIgnoreCase(split[i])) {
- mask += JIntellitype.MOD_SHIFT;
- } else if ("WIN".equalsIgnoreCase(split[i])) {
- mask += JIntellitype.MOD_WIN;
- } else if (keycodeMap.containsKey(split[i].toLowerCase())) {
- keycode = keycodeMap.get(split[i].toLowerCase());
- }
- }
- registerHotKey(identifier, mask, keycode);
- }
-
- /**
- * Removes a listener for hotkeys.
- */
- public void removeHotKeyListener(HotkeyListener listener) {
- hotkeyListeners.remove(listener);
- }
-
- /**
- * Removes a listener for intellitype commands.
- */
- public void removeIntellitypeListener(IntellitypeListener listener) {
- intellitypeListeners.remove(listener);
- }
-
- /**
- * Unregisters a previously registered Hotkey identified by its unique
- * identifier.
- *
- * @param identifier the unique identifer of this Hotkey
- */
- public void unregisterHotKey(int identifier) {
- try {
- unregHotKey(identifier);
- } catch (UnsatisfiedLinkError ex) {
- throw new JIntellitypeException(ERROR_MESSAGE, ex);
- } catch (RuntimeException ex) {
- throw new JIntellitypeException(ex);
- }
- }
-
- /**
- * Checks to see if this application is already running.
- *
- * @param appTitle the name of the application to check for
- * @return true if running, false if not running
- */
- public static boolean checkInstanceAlreadyRunning(String appTitle) {
- return getInstance().isRunning(appTitle);
- }
-
- /**
- * Checks to make sure the OS is a Windows flavor and that the JIntellitype
- * DLL is found in the path and the JDK is 32 bit not 64 bit. The DLL
- * currently only supports 32 bit JDK.
- *
- * @return true if Jintellitype may be used, false if not
- */
- public static boolean isJIntellitypeSupported() {
- boolean result = false;
- String os = "none";
-
- try {
- os = System.getProperty("os.name").toLowerCase();
- } catch (SecurityException ex) {
- // we are not allowed to look at this property
- System.err.println("Caught a SecurityException reading the system property "
- + "'os.name'; the SystemUtils property value will default to null.");
- }
-
- // only works on Windows OS currently
- if (os.startsWith("windows")) {
- // try an get the instance and if it succeeds then return true
- try {
- getInstance();
- result = true;
- } catch (Exception e) {
- result = false;
- }
- }
-
- return result;
- }
-
- /**
- * Gets the libraryLocation.
- *
- * @return Returns the libraryLocation.
- */
- public static String getLibraryLocation() {
- return libraryLocation;
- }
-
- /**
- * Sets the libraryLocation.
- *
- * @param libraryLocation The libraryLocation to set.
- */
- public static void setLibraryLocation(String libraryLocation) {
- final File dll = new File(libraryLocation);
- if (!dll.isAbsolute()) {
- JIntellitype.libraryLocation = dll.getAbsolutePath();
- } else {
- // absolute path, no further calculation needed
- JIntellitype.libraryLocation = libraryLocation;
- }
- }
-
- /**
- * Notifies all listeners that Hotkey was pressed.
- *
- * @param identifier the unique identifier received
- */
- protected void onHotKey(final int identifier) {
- for (final HotkeyListener hotkeyListener : hotkeyListeners) {
- SwingUtilities.invokeLater(new Runnable() {
- public void run() {
- hotkeyListener.onHotKey(identifier);
- }
- });
- }
- }
-
- /**
- * Notifies all listeners that Intellitype command was received.
- *
- * @param command the unique WM_APPCOMMAND received
- */
- protected void onIntellitype(final int command) {
- for (final IntellitypeListener intellitypeListener : intellitypeListeners) {
- SwingUtilities.invokeLater(new Runnable() {
- public void run() {
- intellitypeListener.onIntellitype(command);
- }
- });
- }
- }
-
- /**
- * Swing modifier value to Jintellipad conversion. If no conversion needed
- * just return the original value. This lets users pass either the original
- * JIntellitype constants or Swing InputEvent constants.
- *
- * @param appName = the title of the hidden window to search for
- */
- private synchronized native boolean isRunning(String appName);
-}
\ No newline at end of file
diff --git a/java/src/com/melloware/jintellitype/JIntellitypeConstants.java b/java/src/com/melloware/jintellitype/JIntellitypeConstants.java
deleted file mode 100644
index d2bb3f6..0000000
--- a/java/src/com/melloware/jintellitype/JIntellitypeConstants.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/**
- * JIntellitype
- * -----------------
- * Copyright 2005-2008 Emil A. Lefkof III, Melloware Inc.
- *
- * I always give it my best shot to make a program useful and solid, but
- * remeber that there is absolutely no warranty for using this program as
- * stated in the following terms:
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.melloware.jintellitype;
-
-/**
- * Constants from the Windows API used in JIntellitype.
- *
- * Message information can be found on MSDN here:
- * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputmessages/wm_appcommand.asp
- *
- * Copyright (c) 1999-2008
- * Melloware, Inc.
- * @author Emil A. Lefkof III
- * @version 1.3.1
- */
-public interface JIntellitypeConstants {
-
- public static final String ERROR_MESSAGE = "JIntellitype DLL Error";
-
- // Modifier keys, can be added together
-
- /**
- * ALT key for registering Hotkeys.
- */
- public static final int MOD_ALT = 1;
-
- /**
- * CONTROL key for registering Hotkeys.
- */
- public static final int MOD_CONTROL = 2;
-
- /**
- * SHIFT key for registering Hotkeys.
- */
- public static final int MOD_SHIFT = 4;
-
- /**
- * WINDOWS key for registering Hotkeys.
- */
- public static final int MOD_WIN = 8;
-
-
- // Intellitype Virtual Key Constants from MSDN
-
- /**
- * Browser Navigate backward
- */
- public static final int APPCOMMAND_BROWSER_BACKWARD = 1;
-
- /**
- * Browser Navigate forward
- */
- public static final int APPCOMMAND_BROWSER_FORWARD = 2;
-
- /**
- * Browser Refresh page
- */
- public static final int APPCOMMAND_BROWSER_REFRESH = 3;
-
- /**
- * Browser Stop download
- */
- public static final int APPCOMMAND_BROWSER_STOP = 4;
-
- /**
- * Browser Open search
- */
- public static final int APPCOMMAND_BROWSER_SEARCH = 5;
-
- /**
- * Browser Open favorites
- */
- public static final int APPCOMMAND_BROWSER_FAVOURITES = 6;
-
- /**
- * Browser Navigate home
- */
- public static final int APPCOMMAND_BROWSER_HOME = 7;
-
- /**
- * Mute the volume
- */
- public static final int APPCOMMAND_VOLUME_MUTE = 8;
-
- /**
- * Lower the volume
- */
- public static final int APPCOMMAND_VOLUME_DOWN = 9;
-
- /**
- * Raise the volume
- */
- public static final int APPCOMMAND_VOLUME_UP = 10;
-
- /**
- * Media application go to next track.
- */
- public static final int APPCOMMAND_MEDIA_NEXTTRACK = 11;
-
- /**
- * Media application Go to previous track.
- */
- public static final int APPCOMMAND_MEDIA_PREVIOUSTRACK = 12;
-
- /**
- * Media application Stop playback.
- */
- public static final int APPCOMMAND_MEDIA_STOP = 13;
-
- /**
- * Media application Play or pause playback.
- */
- public static final int APPCOMMAND_MEDIA_PLAY_PAUSE = 14;
-
- /**
- * Open mail application
- */
- public static final int APPCOMMAND_LAUNCH_MAIL = 15;
-
- /**
- * Go to Media Select mode.
- */
- public static final int APPCOMMAND_LAUNCH_MEDIA_SELECT = 16;
-
- /**
- * Start App1.
- */
- public static final int APPCOMMAND_LAUNCH_APP1 = 17;
-
- /**
- * Start App2.
- */
- public static final int APPCOMMAND_LAUNCH_APP2 = 18;
-
- public static final int APPCOMMAND_BASS_DOWN = 19;
- public static final int APPCOMMAND_BASS_BOOST = 20;
- public static final int APPCOMMAND_BASS_UP = 21;
- public static final int APPCOMMAND_TREBLE_DOWN = 22;
- public static final int APPCOMMAND_TREBLE_UP = 23;
- public static final int APPCOMMAND_MICROPHONE_VOLUME_MUTE = 24;
- public static final int APPCOMMAND_MICROPHONE_VOLUME_DOWN = 25;
- public static final int APPCOMMAND_MICROPHONE_VOLUME_UP = 26;
- public static final int APPCOMMAND_HELP = 27;
- public static final int APPCOMMAND_FIND = 28;
- public static final int APPCOMMAND_NEW = 29;
- public static final int APPCOMMAND_OPEN = 30;
- public static final int APPCOMMAND_CLOSE = 31;
- public static final int APPCOMMAND_SAVE = 32;
- public static final int APPCOMMAND_PRINT = 33;
- public static final int APPCOMMAND_UNDO = 34;
- public static final int APPCOMMAND_REDO = 35;
- public static final int APPCOMMAND_COPY = 36;
- public static final int APPCOMMAND_CUT = 37;
- public static final int APPCOMMAND_PASTE = 38;
- public static final int APPCOMMAND_REPLY_TO_MAIL = 39;
- public static final int APPCOMMAND_FORWARD_MAIL = 40;
- public static final int APPCOMMAND_SEND_MAIL = 41;
- public static final int APPCOMMAND_SPELL_CHECK = 42;
- public static final int APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE = 43;
- public static final int APPCOMMAND_MIC_ON_OFF_TOGGLE = 44;
- public static final int APPCOMMAND_CORRECTION_LIST = 45;
-
-}
diff --git a/java/src/com/melloware/jintellitype/JIntellitypeException.java b/java/src/com/melloware/jintellitype/JIntellitypeException.java
deleted file mode 100644
index 539bcc0..0000000
--- a/java/src/com/melloware/jintellitype/JIntellitypeException.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * JIntellitype
- * -----------------
- * Copyright 2005-2008 Emil A. Lefkof III, Melloware Inc.
- *
- * I always give it my best shot to make a program useful and solid, but
- * remeber that there is absolutely no warranty for using this program as
- * stated in the following terms:
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.melloware.jintellitype;
-
-
-/**
- * Exception class for all JIntellitype Exceptions.
- *
- * Copyright (c) 1999-2008
- * Melloware, Inc.
- * @author Emil A. Lefkof III
- * @version 1.3.1
- */
-public class JIntellitypeException extends RuntimeException {
- protected static final long serialVersionUID = 1L;
-
-
- public JIntellitypeException() {
- super();
- }
-
-
- public JIntellitypeException(String aMessage, Throwable aCause) {
- super(aMessage, aCause);
- }
-
-
- public JIntellitypeException(String aMessage) {
- super(aMessage);
- }
-
-
- public JIntellitypeException(Throwable aCause) {
- super(aCause);
- }
-
-}
diff --git a/java/src/com/melloware/jintellitype/Main.java b/java/src/com/melloware/jintellitype/Main.java
deleted file mode 100644
index a96e185..0000000
--- a/java/src/com/melloware/jintellitype/Main.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * JIntellitype
- * -----------------
- * Copyright 2005-2008 Emil A. Lefkof III, Melloware Inc.
- *
- * I always give it my best shot to make a program useful and solid, but
- * remeber that there is absolutely no warranty for using this program as
- * stated in the following terms:
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.melloware.jintellitype;
-
-import java.util.Properties;
-
-/**
- * Simple executable class that is used as the NetworkClient-Class in the JIntellitype
- * jar. Outputs version information and other information about the environment
- * on which the jar is being executed.
- *
- * Copyright (c) 1999-2008
- * Melloware, Inc.
- * @author Emil A. Lefkof III
- * @version 1.3.1
- */
-public final class Main {
-
- /**
- * Private constructor to make sure this class is never instantiated.
- *
- */
- private Main() {
- // private constructor to make singleton.
- }
-
- /** NetworkClient method that does what the class level javadoc states. */
- public static void main(String[] argv) {
- System.out.println("JIntellitype version \"" + getProjectVersion() + "\"");
- System.out.println(" ");
-
- System.out.println("Running on java version \"" + System.getProperty("java.version") + "\""
- + " (build " + System.getProperty("java.runtime.version") + ")"
- + " from " + System.getProperty("java.vendor"));
-
- System.out.println("Operating environment \"" + System.getProperty("os.name") + "\""
- + " version " + System.getProperty("os.version") + " on " + System.getProperty("os.arch"));
-
- System.out.println("For more information on JIntellitype please visit http://www.melloware.com");
- }
-
- /**
- * Attempts to read the version number out of the pom.properties. If not found
- * then RUNNING.IN.IDE.FULL is returned as the version.
- *