diff options
author | Herbert Dürr <hdu@apache.org> | 2014-02-10 14:36:17 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-10 16:36:50 +0000 |
commit | 9d5841aa433ee325b702c3a8c4c8784052e09b3a (patch) | |
tree | f129b657bcf57be41b8e777ef837c889a46713e2 /apple_remote/source/RemoteControl.m | |
parent | handle icon_name property too (diff) | |
download | core-9d5841aa433ee325b702c3a8c4c8784052e09b3a.tar.gz core-9d5841aa433ee325b702c3a8c4c8784052e09b3a.zip |
Resolved: #i124201# mark debug-infos from the apple_remote...
module appropriately
to make the source of some log messages more clear
(cherry picked from commit fe4ae4735c5a5e2b2210e684e97228cd91174e4c)
Conflicts:
apple_remote/AppleRemote.m
apple_remote/source/HIDRemoteControlDevice.m
apple_remote/source/RemoteControl.m
apple_remote/source/RemoteControlContainer.m
Change-Id: Ie57114f4d2d67f258808d03e01dff8bc05ba9f2c
Diffstat (limited to 'apple_remote/source/RemoteControl.m')
-rw-r--r-- | apple_remote/source/RemoteControl.m | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/apple_remote/source/RemoteControl.m b/apple_remote/source/RemoteControl.m index 36f7ffecca2c..d43597d96c7d 100644 --- a/apple_remote/source/RemoteControl.m +++ b/apple_remote/source/RemoteControl.m @@ -52,7 +52,7 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier"; if ( (self = [super init]) ) { delegate = [_remoteControlDelegate retain]; #ifdef DEBUG - NSLog(@"RemoteControl initWithDelegate ok"); + NSLog( @"Apple RemoteControl initWithDelegate ok"); #endif } return self; @@ -65,7 +65,7 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier"; - (void) setListeningToRemote: (BOOL) value { #ifdef DEBUG - NSLog(@"setListeningToRemote ok"); + NSLog( @"Apple RemoteControl setListeningToRemote ok"); #endif (void)value; } @@ -75,13 +75,13 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier"; - (void) startListening: (id) sender { #ifdef DEBUG - NSLog(@"startListening ok"); + NSLog( @"Apple RemoteControl startListening ok"); #endif (void)sender; } - (void) stopListening: (id) sender { #ifdef DEBUG - NSLog(@"stopListening ok"); + NSLog( @"Apple RemoteControl stopListening ok"); #endif (void)sender; } @@ -95,7 +95,7 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier"; - (BOOL) sendsEventForButtonIdentifier: (RemoteControlEventIdentifier) identifier { #ifdef DEBUG - NSLog(@"sending event for button identifier \n"); + NSLog( @"Apple RemoteControl: sending event for button identifier\n"); #endif (void)identifier; return YES; @@ -111,17 +111,19 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier"; kTargetApplicationIdentifier /*targetBundleIdentifier -> does not appear, since the peer is nil*/, nil]; #ifdef DEBUG + NSLog( @"Apple Remote: sendDistributedNotification ..."); // Debug purpose: returns all the existing dictionary keys. - NSString *s; - NSEnumerator *e = [userInfo keyEnumerator]; - while ( (s = [e nextObject]) ) { - NSLog(@"key = %@ ",s); + NSEnumerator* itKey = [userInfo keyEnumerator]; + NSEnumerator* itVal = [userInfo objectEnumerator]; + for(;;) { + NSString* sKey = [itKey nextObject]; + NSString* sVal = [itVal nextObject]; + if( !sKey && !sVal) + break; + if( !sKey) sKey = @"nil"; + if( !sVal) sVal = @"nil"; + NSLog( @"\tARdict[\"%@\"] = \"%@\"",sKey,sVal); } - NSEnumerator *f = [userInfo objectEnumerator ]; - while ( (s = [f nextObject]) ) { - NSLog(@"value = %@ ",s); - } - NSLog(@"sendDistributedNotification ..."); #endif [[NSDistributedNotificationCenter defaultCenter] postNotificationName:notificationName @@ -133,13 +135,13 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier"; + (void) sendFinishedNotifcationForAppIdentifier: (NSString*) identifier { [self sendDistributedNotification:FINISHED_USING_REMOTE_CONTROL_NOTIFICATION targetBundleIdentifier:identifier]; #ifdef DEBUG - NSLog(@"sendFinishedNotifcationForAppIdentifier ..."); + NSLog( @"Apple RemoteControl: sendFinishedNotifcationForAppIdentifier ..."); #endif } + (void) sendRequestForRemoteControlNotification { [self sendDistributedNotification:REQUEST_FOR_REMOTE_CONTROL_NOTIFCATION targetBundleIdentifier:nil]; #ifdef DEBUG - NSLog(@"sendRequestForRemoteControlNotification ..."); + NSLog( @"Apple RemoteControl: sendRequestForRemoteControlNotification ..."); #endif } |