Replace tabs with spaces
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
import com.dt.iTunesController.iTunes;
|
import com.dt.iTunesController.iTunes;
|
||||||
|
|
||||||
public class Test {
|
public class Test {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
iTunes iTunes = new iTunes();
|
iTunes iTunes = new iTunes();
|
||||||
iTunes.connect();
|
iTunes.connect();
|
||||||
iTunes.playPause();
|
iTunes.playPause();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -37,7 +37,7 @@ public class ITArtwork extends ITObject {
|
|||||||
return ITArtworkFormat.values()[Dispatch.get(object, "Format").getInt()];
|
return ITArtworkFormat.values()[Dispatch.get(object, "Format").getInt()];
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Comments
|
// TODO: Comments
|
||||||
|
|
||||||
public boolean getIsDownloadedArtwork() {
|
public boolean getIsDownloadedArtwork() {
|
||||||
return Dispatch.get(object, "IsDownloadedArtwork").getBoolean();
|
return Dispatch.get(object, "IsDownloadedArtwork").getBoolean();
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ package com.dt.iTunesController;
|
|||||||
* @version 0.2
|
* @version 0.2
|
||||||
*/
|
*/
|
||||||
public enum ITArtworkFormat {
|
public enum ITArtworkFormat {
|
||||||
ITArtworkFormatUnknown,
|
ITArtworkFormatUnknown,
|
||||||
ITArtworkFormatJPEG,
|
ITArtworkFormatJPEG,
|
||||||
ITArtworkFormatPNG,
|
ITArtworkFormatPNG,
|
||||||
ITArtworkFormatBMP;
|
ITArtworkFormatBMP;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public class ITBrowserWindow extends ITWindow {
|
|||||||
return Dispatch.get(object, "MiniPlayer").getBoolean();
|
return Dispatch.get(object, "MiniPlayer").getBoolean();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Comments
|
// TODO: Comments
|
||||||
|
|
||||||
public ITTrackCollection getSelectedTracks() {
|
public ITTrackCollection getSelectedTracks() {
|
||||||
Dispatch collection = Dispatch.call(object, "SelectedTracks").getDispatch();
|
Dispatch collection = Dispatch.call(object, "SelectedTracks").getDispatch();
|
||||||
@@ -38,7 +38,7 @@ public class ITBrowserWindow extends ITWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setSelectedPlaylist(ITPlaylist playlist) {
|
public void setSelectedPlaylist(ITPlaylist playlist) {
|
||||||
Dispatch dispatchRef = playlist.fetchDispatch();
|
Dispatch dispatchRef = playlist.fetchDispatch();
|
||||||
Dispatch.put(object, "SelectedPlaylist", dispatchRef);
|
Dispatch.put(object, "SelectedPlaylist", dispatchRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ package com.dt.iTunesController;
|
|||||||
*/
|
*/
|
||||||
public class ITObjectPersistentID {
|
public class ITObjectPersistentID {
|
||||||
|
|
||||||
private long High;
|
private long High;
|
||||||
private long Low;
|
private long Low;
|
||||||
private String hexString;
|
private String hexString;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create the ITObjectPersistentID. This class is not intended to be created
|
* Create the ITObjectPersistentID. This class is not intended to be created
|
||||||
@@ -21,33 +21,33 @@ public class ITObjectPersistentID {
|
|||||||
* @param high The High Persistent ID
|
* @param high The High Persistent ID
|
||||||
* @param low The Low Persistent ID
|
* @param low The Low Persistent ID
|
||||||
*/
|
*/
|
||||||
public ITObjectPersistentID(long high, long low) {
|
public ITObjectPersistentID(long high, long low) {
|
||||||
this.High=high;
|
this.High=high;
|
||||||
this.Low=low;
|
this.Low=low;
|
||||||
this.hexString = String.format("%8s%8s",Long.toHexString(this.High),Long.toHexString(this.Low)).toUpperCase().replace(' ','0');
|
this.hexString = String.format("%8s%8s",Long.toHexString(this.High),Long.toHexString(this.Low)).toUpperCase().replace(' ','0');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the high persistent ID.
|
* Returns the high persistent ID.
|
||||||
* @return The high persistent ID.
|
* @return The high persistent ID.
|
||||||
*/
|
*/
|
||||||
public long getHigh() {
|
public long getHigh() {
|
||||||
return this.High;
|
return this.High;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the low persistent ID.
|
* Returns the low persistent ID.
|
||||||
* @return The low persistent ID.
|
* @return The low persistent ID.
|
||||||
*/
|
*/
|
||||||
public long getLow() {
|
public long getLow() {
|
||||||
return this.Low;
|
return this.Low;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a string representation (in hex) of the persistent IDs.
|
* Return a string representation (in hex) of the persistent IDs.
|
||||||
* @return String representation of the persistent IDs.
|
* @return String representation of the persistent IDs.
|
||||||
*/
|
*/
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return this.hexString;
|
return this.hexString;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,14 +42,14 @@ public class ITTrackCollection {
|
|||||||
Dispatch item = Dispatch.call(object, "Item", index).toDispatch();
|
Dispatch item = Dispatch.call(object, "Item", index).toDispatch();
|
||||||
ITTrack track = new ITTrack(item);
|
ITTrack track = new ITTrack(item);
|
||||||
if (track.getKind()==ITTrackKind.ITTrackKindFile) {
|
if (track.getKind()==ITTrackKind.ITTrackKindFile) {
|
||||||
return new ITFileOrCDTrack(item);
|
return new ITFileOrCDTrack(item);
|
||||||
} else if (track.getKind()==ITTrackKind.ITTrackKindCD) {
|
} else if (track.getKind()==ITTrackKind.ITTrackKindCD) {
|
||||||
return new ITFileOrCDTrack(item);
|
return new ITFileOrCDTrack(item);
|
||||||
} else if (track.getKind()==ITTrackKind.ITTrackKindURL ) {
|
} else if (track.getKind()==ITTrackKind.ITTrackKindURL ) {
|
||||||
return new ITURLTrack(item);
|
return new ITURLTrack(item);
|
||||||
} else {
|
} else {
|
||||||
return track;
|
return track;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ package com.dt.iTunesController;
|
|||||||
* @version 0.2
|
* @version 0.2
|
||||||
*/
|
*/
|
||||||
public enum ITVideoKind {
|
public enum ITVideoKind {
|
||||||
ITVideoKindNone,
|
ITVideoKindNone,
|
||||||
ITVideoKindMovie,
|
ITVideoKindMovie,
|
||||||
ITVideoKindMusicVideo,
|
ITVideoKindMusicVideo,
|
||||||
ITVideoKindTVShow;
|
ITVideoKindTVShow;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class ITWindowCollection {
|
|||||||
object = d;
|
object = d;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: iTunes.getWindows()
|
// TODO: iTunes.getWindows()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of playlists in the collection.
|
* Returns the number of playlists in the collection.
|
||||||
|
|||||||
@@ -413,14 +413,14 @@ public class iTunes {
|
|||||||
Dispatch item = iTunes.getProperty("CurrentTrack").toDispatch();
|
Dispatch item = iTunes.getProperty("CurrentTrack").toDispatch();
|
||||||
ITTrack track = new ITTrack(item);
|
ITTrack track = new ITTrack(item);
|
||||||
if (track.getKind()==ITTrackKind.ITTrackKindFile) {
|
if (track.getKind()==ITTrackKind.ITTrackKindFile) {
|
||||||
return new ITFileOrCDTrack(item);
|
return new ITFileOrCDTrack(item);
|
||||||
} else if (track.getKind()==ITTrackKind.ITTrackKindCD) {
|
} else if (track.getKind()==ITTrackKind.ITTrackKindCD) {
|
||||||
return new ITFileOrCDTrack(item);
|
return new ITFileOrCDTrack(item);
|
||||||
} else if (track.getKind()==ITTrackKind.ITTrackKindURL ) {
|
} else if (track.getKind()==ITTrackKind.ITTrackKindURL ) {
|
||||||
return new ITURLTrack(item);
|
return new ITURLTrack(item);
|
||||||
} else {
|
} else {
|
||||||
return track;
|
return track;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -493,12 +493,12 @@ public class iTunes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ITObjectPersistentID getObjectPersistentIDs(ITObject iObject){
|
public ITObjectPersistentID getObjectPersistentIDs(ITObject iObject){
|
||||||
return new ITObjectPersistentID(getITObjectPersistentIDHigh(iObject),getITObjectPersistentIDLow(iObject));
|
return new ITObjectPersistentID(getITObjectPersistentIDHigh(iObject),getITObjectPersistentIDLow(iObject));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITBrowserWindow getBrowserWindow(){
|
public ITBrowserWindow getBrowserWindow(){
|
||||||
Dispatch window = iTunes.getProperty("BrowserWindow").toDispatch();
|
Dispatch window = iTunes.getProperty("BrowserWindow").toDispatch();
|
||||||
return new ITBrowserWindow(window);
|
return new ITBrowserWindow(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cycleSongRepeat() {
|
public void cycleSongRepeat() {
|
||||||
|
|||||||
Reference in New Issue
Block a user