aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-10-27 06:03:03 +0200
committerTeddy Wing2018-10-27 06:03:03 +0200
commit57294b01c615541b4651b2ca3076843e45a2add6 (patch)
tree91e1bbd4257a174bb6443f44bc97aa144d1c8c43
parent0155afd054d41b21f15c7048002ea99382360d81 (diff)
downloadDomeKey-57294b01c615541b4651b2ca3076843e45a2add6.tar.bz2
AppDelegate: Get rid of `MPRemoteCommandCenter` code
This code was a test for Bluetooth event handling. It didn't work for that purpose as far as I could tell. Since it's not being used, delete it.
-rw-r--r--DomeKey/AppDelegate.h2
-rw-r--r--DomeKey/AppDelegate.m23
-rw-r--r--DomeKey/HeadphoneKey.h1
3 files changed, 0 insertions, 26 deletions
diff --git a/DomeKey/AppDelegate.h b/DomeKey/AppDelegate.h
index a8f2d01..4b2fc4f 100644
--- a/DomeKey/AppDelegate.h
+++ b/DomeKey/AppDelegate.h
@@ -12,11 +12,9 @@
@interface AppDelegate : NSObject <NSApplicationDelegate> {
HeadphoneKey *_headphone_key;
- MPRemoteCommandCenter *_blargh;
Config *_config;
}
- (instancetype)initWithConfig:(Config *)config;
-- (void)mpmediaplayerBS;
@end
diff --git a/DomeKey/AppDelegate.m b/DomeKey/AppDelegate.m
index 2146ef6..a1e6563 100644
--- a/DomeKey/AppDelegate.m
+++ b/DomeKey/AppDelegate.m
@@ -23,29 +23,6 @@
{
_headphone_key = [[HeadphoneKey alloc] initWithTimeout:_config->timeout];
[_headphone_key startMonitoringBluetoothEvents];
-
- _blargh = [MPRemoteCommandCenter sharedCommandCenter];
-
- [[_blargh togglePlayPauseCommand] addTarget:self action:@selector(mpmediaplayerplaypauesss:)];
-}
-
-- (void)mpmediaplayerBS
-{
- MPRemoteCommandCenter *center = [MPRemoteCommandCenter sharedCommandCenter];
-
- [[center togglePlayPauseCommand] addTarget:self action:@selector(mpmediaplayerplaypauesss:)];
-// pauseCommand
-// playCommand
-// togglePlayPauseCommand
-// nextTrackCommand
-// previousTrackCommand
-}
-
-- (MPRemoteCommandHandlerStatus) mpmediaplayerplaypauesss: (MPRemoteCommandEvent*) event
-{
- NSLog(@"Played from MPMediaPlayer");
-
- return MPRemoteCommandHandlerStatusSuccess;
}
@end
diff --git a/DomeKey/HeadphoneKey.h b/DomeKey/HeadphoneKey.h
index 0ef6fe7..ad6f8dd 100644
--- a/DomeKey/HeadphoneKey.h
+++ b/DomeKey/HeadphoneKey.h
@@ -7,7 +7,6 @@
//
#import <Foundation/Foundation.h>
-#import <MediaPlayer/MediaPlayer.h>
#import <DDHidLib/DDHidAppleMikey.h>
#import "dome_key_map.h"