summaryrefslogtreecommitdiff
path: root/apple_remote
diff options
context:
space:
mode:
authorStephan Bergmann <stephan.bergmann@allotropia.de>2024-03-20 14:23:40 +0100
committerStephan Bergmann <stephan.bergmann@allotropia.de>2024-03-21 16:30:59 +0100
commit9adcf67c9b164d019eebe45279bcaa91b0ce471a (patch)
tree5e323faf067516423e0552c9775d56cb3e5d1a44 /apple_remote
parent03ab46c8a189b751ed1acffd0b575fae584c1d00 (diff)
Drop C/C++ DEBUG macro
...(that was defined iff OSL_DEBUG_LEVEL >= 2) and replace its uses with OSL_DEBUG_LEVEL directly Change-Id: I807c15a02cc8ced9852287df0afb4808761d19d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165067 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'apple_remote')
-rw-r--r--apple_remote/source/AppleRemote.m2
-rw-r--r--apple_remote/source/GlobalKeyboardDevice.m2
-rw-r--r--apple_remote/source/RemoteControl.m16
-rw-r--r--apple_remote/source/RemoteControlContainer.m10
-rw-r--r--apple_remote/source/RemoteMainController.m14
5 files changed, 22 insertions, 22 deletions
diff --git a/apple_remote/source/AppleRemote.m b/apple_remote/source/AppleRemote.m
index fe50af4cc1be..ac062f28a4d5 100644
--- a/apple_remote/source/AppleRemote.m
+++ b/apple_remote/source/AppleRemote.m
@@ -48,7 +48,7 @@ static const char* AppleRemoteDeviceName = "AppleIRController";
- (void) setCookieMappingInDictionary: (NSMutableDictionary*) _cookieToButtonMapping {
// TODO : avoid such magics
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
NSLog( @"Apple Remote: setting 10.6 cookies" );
#endif
// 10.6.x Snow Leopard
diff --git a/apple_remote/source/GlobalKeyboardDevice.m b/apple_remote/source/GlobalKeyboardDevice.m
index cbd78f5b011c..a44f30f1ba55 100644
--- a/apple_remote/source/GlobalKeyboardDevice.m
+++ b/apple_remote/source/GlobalKeyboardDevice.m
@@ -111,7 +111,7 @@ static OSStatus hotKeyEventHandler(EventHandlerCallRef, EventRef, void*);
defaultsKey = @"playhold";
break;
default:
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
NSLog( @"Apple Remote: Unknown global keyboard defaults key for button identifier %d", remoteButtonIdentifier);
#endif
break;
diff --git a/apple_remote/source/RemoteControl.m b/apple_remote/source/RemoteControl.m
index 2d4021a910b1..e0dccb344331 100644
--- a/apple_remote/source/RemoteControl.m
+++ b/apple_remote/source/RemoteControl.m
@@ -51,7 +51,7 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier";
- (id) initWithDelegate: (id) _remoteControlDelegate {
if ( (self = [super init]) ) {
delegate = [_remoteControlDelegate retain];
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
NSLog( @"Apple RemoteControl initWithDelegate ok");
#endif
}
@@ -64,7 +64,7 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier";
}
- (void) setListeningToRemote: (BOOL) value {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
NSLog( @"Apple RemoteControl setListeningToRemote ok");
#endif
(void)value;
@@ -74,13 +74,13 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier";
}
- (void) startListening: (id) sender {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
NSLog( @"Apple RemoteControl startListening ok");
#endif
(void)sender;
}
- (void) stopListening: (id) sender {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
NSLog( @"Apple RemoteControl stopListening ok");
#endif
(void)sender;
@@ -94,7 +94,7 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier";
}
- (BOOL) sendsEventForButtonIdentifier: (RemoteControlEventIdentifier) identifier {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
NSLog( @"Apple RemoteControl: sending event for button identifier\n");
#endif
(void)identifier;
@@ -110,7 +110,7 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier";
targetIdentifier /*value = AppleIRController -> OK */,
kTargetApplicationIdentifier /*targetBundleIdentifier -> does not appear, since the peer is nil*/,
nil];
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
NSLog( @"Apple Remote: sendDistributedNotification ...");
// Debug purpose: returns all the existing dictionary keys.
NSEnumerator* itKey = [userInfo keyEnumerator];
@@ -134,13 +134,13 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier";
+ (void) sendFinishedNotificationForAppIdentifier: (NSString*) identifier {
[self sendDistributedNotification:FINISHED_USING_REMOTE_CONTROL_NOTIFICATION targetBundleIdentifier:identifier];
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
NSLog( @"Apple RemoteControl: sendFinishedNotificationForAppIdentifier ...");
#endif
}
+ (void) sendRequestForRemoteControlNotification {
[self sendDistributedNotification:REQUEST_FOR_REMOTE_CONTROL_NOTIFICATION targetBundleIdentifier:nil];
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
NSLog( @"Apple RemoteControl: sendRequestForRemoteControlNotification ...");
#endif
}
diff --git a/apple_remote/source/RemoteControlContainer.m b/apple_remote/source/RemoteControlContainer.m
index 14ecb36f1336..0c22ca26efa4 100644
--- a/apple_remote/source/RemoteControlContainer.m
+++ b/apple_remote/source/RemoteControlContainer.m
@@ -36,7 +36,7 @@
- (id) initWithDelegate: (id) _remoteControlDelegate {
if ( (self = [super initWithDelegate:_remoteControlDelegate]) ) {
remoteControls = [[NSMutableArray alloc] init];
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
NSLog( @"Apple Remote: ControlContainer initWithDelegate ok");
}
else {
@@ -61,7 +61,7 @@
[remoteControl addObserver: self forKeyPath:@"listeningToRemote" options:NSKeyValueObservingOptionNew context:nil];
toReturn = YES;
}
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
else {
NSLog( @"Apple Remote: ControlContainer instantiateAndAddRemoteControlDeviceWithClass failed");
toReturn = NO;
@@ -77,7 +77,7 @@
- (void) reset {
[self willChangeValueForKey:@"listeningToRemote"];
[self didChangeValueForKey:@"listeningToRemote"];
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
// debug purpose
NSLog( @"Apple Remote: reset... (after listening)");
#endif
@@ -107,7 +107,7 @@
}
- (void) startListening: (id) sender {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
NSLog(@"Apple Remote: start listening to events... ");
#endif
for(NSUInteger i=0; i < [remoteControls count]; i++) {
@@ -115,7 +115,7 @@
}
}
- (void) stopListening: (id) sender {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
NSLog(@"Apple Remote: stopListening to events... ");
#endif
for(NSUInteger i=0; i < [remoteControls count]; i++) {
diff --git a/apple_remote/source/RemoteMainController.m b/apple_remote/source/RemoteMainController.m
index 9e933a302880..5401b3d1dd6c 100644
--- a/apple_remote/source/RemoteMainController.m
+++ b/apple_remote/source/RemoteMainController.m
@@ -56,7 +56,7 @@
RemoteControlContainer* container = [[RemoteControlContainer alloc] initWithDelegate: remoteControlBehavior];
if ( [container instantiateAndAddRemoteControlDeviceWithClass: [AppleRemote class]] != 0 ) {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
NSLog(@"[container instantiateAndAddRemoteControlDeviceWithClass: [AppleRemote class]] successful");
}
else {
@@ -65,7 +65,7 @@
}
if ( [container instantiateAndAddRemoteControlDeviceWithClass: [GlobalKeyboardDevice class]] != 0 ) {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
NSLog(@"[container instantiateAndAddRemoteControlDeviceWithClass: [GlobalKeyboardDevice class]] successful");
}
else {
@@ -74,7 +74,7 @@
}
// to give the binding mechanism a chance to see the change of the attribute
[self setValue: container forKey: @"remoteControl"];
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
NSLog(@"AppleRemoteMainController init done");
#endif
}
@@ -105,13 +105,13 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
- (void) remoteButton: (RemoteControlEventIdentifier)buttonIdentifier pressedDown: (BOOL) pressedDown clickCount: (unsigned int)clickCount
{
(void)clickCount;
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
NSString* pressed = @"";
NSString* buttonName = nil;
#endif
if (pressedDown)
{
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
pressed = @"(AppleRemoteMainController: button pressed)";
switch(buttonIdentifier)
@@ -137,12 +137,12 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
}
else // not pressed
{
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
pressed = @"(AppleRemoteMainController: button released)";
#endif
}
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >= 2
//NSLog(@"Button %@ pressed %@", buttonName, pressed);
NSString* clickCountString = @"";
if (clickCount > 1) clickCountString = [NSString stringWithFormat: @"%d clicks", clickCount];