iTunesApplication omgeschreven naar bestaande iTunes wrapper. Kleine aanpassingen gemaakt in deze wrapper mbt flexibiliteit. Aantal debug teksten afgedrukt over actions, targets en applications. Serieus overwegen van een nette log module hiervoor!

This commit is contained in:
2011-02-09 09:45:30 +00:00
parent 89d16792ae
commit a20802afcc
34 changed files with 138 additions and 7239 deletions

View File

@@ -1,8 +1,8 @@
package com.dt.iTunesController;
import com.jacob.activeX.*;
import com.jacob.com.Dispatch;
import com.jacob.com.DispatchEvents;
import com.jacob.com.Variant;
/**
* Defines the top-level iTunes application object.
@@ -14,15 +14,15 @@ import com.jacob.com.Variant;
* @version 0.2
*/
public class iTunes {
ActiveXComponent iTunes;
iTunesEvents iTunesEvents;
DispatchEvents dispatchEvents;
/**
* Initiate iTunes Controller.
* @return
*/
public iTunes() {
public void connect() {
iTunes = new ActiveXComponent("iTunes.Application");
}
@@ -33,7 +33,7 @@ public class iTunes {
public void addEventHandler(iTunesEventsInterface itef) {
iTunesEvents = new iTunesEvents(itef);
dispatchEvents = new DispatchEvents(iTunes, iTunesEvents);
System.out.println("New event handler added.");
//System.out.println("New event handler added.");
}
/**
@@ -69,7 +69,7 @@ public class iTunes {
* Play the currently targeted track.
*/
public void play() {
Variant s = iTunes.invoke("ASDSDPlay");
iTunes.invoke("ASDSDPlay");
}
/**