Permalink
Browse files

Add [EyeTunes quit] method to match [EyeTunes launch]

  • Loading branch information...
1 parent d47026b commit 0fca137416a2a707d219fa5e69340a96a097d038 @clee clee committed Apr 30, 2011
Showing with 7 additions and 0 deletions.
  1. +3 −0 ETEyeTunes.h
  2. +4 −0 ETEyeTunes.m
View
@@ -50,6 +50,9 @@
//Launch the iTunes app, if iTunes it already running the window will take focus
+ (void)launch;
+//Quit the iTunes app, if it's running
++ (void)quit;
+
//Check if the iTunes app is running
+ (BOOL)isRunning;
View
@@ -62,6 +62,10 @@ + (void)launch{
[[NSWorkspace sharedWorkspace] launchApplication:@"iTunes"];
}
++ (void)quit{
+ [[NSRunningApplication runningApplicationsWithBundleIdentifier:@"com.apple.iTunes"] makeObjectsPerformSelector:@selector(terminate)];
+}
+
+ (BOOL)isRunning{
//TODO: It is strongly suggested that you use the NSWorkspace runningApplications method and the NSRunningApplication class to retrieve this information in applications targeted for Mac OS X v10.6 and later.
NSInteger i;

0 comments on commit 0fca137

Please sign in to comment.