Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
fe4ae473
Kaydet (Commit)
fe4ae473
authored
Şub 10, 2014
tarafından
Herbert Dürr
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#i124201# mark debug-infos from the apple_remote module appropriately
to make the source of some log messages more clear
üst
6aeaaaed
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
37 deletions
+39
-37
AppleRemote.m
apple_remote/AppleRemote.m
+3
-3
GlobalKeyboardDevice.m
apple_remote/GlobalKeyboardDevice.m
+1
-1
HIDRemoteControlDevice.m
apple_remote/HIDRemoteControlDevice.m
+8
-8
RemoteControl.m
apple_remote/RemoteControl.m
+18
-16
RemoteControlContainer.m
apple_remote/RemoteControlContainer.m
+6
-6
RemoteMainController.m
apple_remote/RemoteMainController.m
+3
-3
No files found.
apple_remote/AppleRemote.m
Dosyayı görüntüle @
fe4ae473
...
...
@@ -59,7 +59,7 @@ const char* AppleRemoteDeviceName = "AppleIRController";
if
(
floor
(
NSAppKitVersionNumber
)
<=
NSAppKitVersionNumber10_4
)
{
#ifdef DEBUG
NSLog
(
@"setting 10.4 cookies"
);
NSLog
(
@"
Apple Remote:
setting 10.4 cookies"
);
#endif
// 10.4.x Tiger
...
...
@@ -78,7 +78,7 @@ const char* AppleRemoteDeviceName = "AppleIRController";
else
if
(
floor
(
NSAppKitVersionNumber
)
<=
NSAppKitVersionNumber10_5
)
{
#ifdef DEBUG
NSLog
(
@"setting 10.5 cookies"
);
NSLog
(
@"
Apple Remote:
setting 10.5 cookies"
);
#endif
// 10.5.x Leopard
[
_cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonPlus
]
forKey
:
@"31_29_28_19_18_"
];
...
...
@@ -96,7 +96,7 @@ const char* AppleRemoteDeviceName = "AppleIRController";
else
{
#ifdef DEBUG
NSLog
(
@"
setting
10.6 cookies"
);
NSLog
(
@"
Apple Remote: setting OSX>=
10.6 cookies"
);
#endif
// 10.6.x Snow Leopard
[
_cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonPlus
]
forKey
:
@"33_31_30_21_20_2_"
];
...
...
apple_remote/GlobalKeyboardDevice.m
Dosyayı görüntüle @
fe4ae473
...
...
@@ -111,7 +111,7 @@ static OSStatus hotKeyEventHandler(EventHandlerCallRef, EventRef, void*);
break
;
default
:
#ifdef DEBUG
NSLog
(
@"Unknown global keyboard defaults key for remote
button identifier %d"
,
remoteButtonIdentifier
);
NSLog
(
@"Apple Remote: Unknown global keyboard defaults key for
button identifier %d"
,
remoteButtonIdentifier
);
#endif
break
;
}
...
...
apple_remote/HIDRemoteControlDevice.m
Dosyayı görüntüle @
fe4ae473
...
...
@@ -274,7 +274,7 @@ cleanup:
/*
if (previousRemainingCookieString) {
cookieString = [previousRemainingCookieString stringByAppendingString: cookieString];
NSLog(
@"
New cookie string is %@", cookieString);
NSLog(
@"Apple Remote:
New cookie string is %@", cookieString);
[previousRemainingCookieString release], previousRemainingCookieString=nil;
}*/
if
(
cookieString
==
nil
||
[
cookieString
length
]
==
0
)
return
;
...
...
@@ -310,7 +310,7 @@ cleanup:
[
self
handleEventWithCookieString
:
lastSubCookieString
sumOfValues
:
0
];
}
if
([
cookieString
length
]
>
0
)
{
NSLog
(
@"
Unknown button for cookiestring %@"
,
cookieString
);
NSLog
(
@"Apple Remote:
Unknown button for cookiestring %@"
,
cookieString
);
}
}
}
...
...
@@ -331,7 +331,7 @@ Will be called for any event of any type (cookie) to which we subscribe
*/
static
void
QueueCallbackFunction
(
void
*
target
,
IOReturn
result
,
void
*
refcon
,
void
*
sender
)
{
if
(
target
<
0
)
{
NSLog
(
@"
QueueCallbackFunction called with invalid target!"
);
NSLog
(
@"Apple Remote:
QueueCallbackFunction called with invalid target!"
);
return
;
}
NSAutoreleasePool
*
pool
=
[[
NSAutoreleasePool
alloc
]
init
];
...
...
@@ -373,7 +373,7 @@ static void QueueCallbackFunction(void* target, IOReturn result, void* refcon,
ioReturnValue
=
IOObjectGetClass
(
hidDevice
,
className
);
if
(
ioReturnValue
!=
kIOReturnSuccess
)
{
NSLog
(
@"Error: Failed to get
class name."
);
NSLog
(
@"Apple Remote: Error: Failed to get RemoteControlDevice
class name."
);
return
NULL
;
}
...
...
@@ -388,7 +388,7 @@ static void QueueCallbackFunction(void* target, IOReturn result, void* refcon,
plugInResult
=
(
*
plugInInterface
)
->
QueryInterface
(
plugInInterface
,
CFUUIDGetUUIDBytes
(
kIOHIDDeviceInterfaceID
),
(
LPVOID
)
&
hidDeviceInterface
);
if
(
plugInResult
!=
S_OK
)
{
NSLog
(
@"
Error: Couldn't create HID class device interface"
);
NSLog
(
@"Apple Remote:
Error: Couldn't create HID class device interface"
);
}
// Release
if
(
plugInInterface
)
(
*
plugInInterface
)
->
Release
(
plugInInterface
);
...
...
@@ -481,13 +481,13 @@ static void QueueCallbackFunction(void* target, IOReturn result, void* refcon,
(
*
queue
)
->
start
(
queue
);
return
YES
;
}
else
{
NSLog
(
@"
Error when setting event callback"
);
NSLog
(
@"Apple Remote:
Error when setting event callback"
);
}
}
else
{
NSLog
(
@"
Error when creating async event source"
);
NSLog
(
@"Apple Remote:
Error when creating async event source"
);
}
}
else
{
NSLog
(
@"
Error when opening device"
);
NSLog
(
@"Apple Remote:
Error when opening device"
);
}
}
else
if
(
ioReturnValue
==
kIOReturnExclusiveAccess
)
{
// the device is used exclusive by another application
...
...
apple_remote/RemoteControl.m
Dosyayı görüntüle @
fe4ae473
...
...
@@ -51,7 +51,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
;
...
...
@@ -64,7 +64,7 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier";
-
(
void
)
setListeningToRemote
:
(
BOOL
)
value
{
#ifdef DEBUG
NSLog
(
@"
setListeningToRemote ok"
);
NSLog
(
@"Apple RemoteControl
setListeningToRemote ok"
);
#endif
}
-
(
BOOL
)
isListeningToRemote
{
...
...
@@ -73,12 +73,12 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier";
-
(
void
)
startListening
:
(
id
)
sender
{
#ifdef DEBUG
NSLog
(
@"
startListening ok"
);
NSLog
(
@"Apple RemoteControl
startListening ok"
);
#endif
}
-
(
void
)
stopListening
:
(
id
)
sender
{
#ifdef DEBUG
NSLog
(
@"
stopListening ok"
);
NSLog
(
@"Apple RemoteControl
stopListening ok"
);
#endif
}
...
...
@@ -90,7 +90,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
return
YES
;
}
...
...
@@ -105,17 +105,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
(
@"
\t
ARdict[
\"
%@
\"
] =
\"
%@
\"
"
,
sKey
,
sVal
);
}
NSEnumerator
*
f
=
[
userInfo
objectEnumerator
];
while
(
(
s
=
[
f
nextObject
])
)
{
NSLog
(
@"value = %@ "
,
s
);
}
NSLog
(
@"sendDistributedNotification ..."
);
#endif
[[
NSDistributedNotificationCenter
defaultCenter
]
postNotificationName
:
notificationName
...
...
@@ -127,13 +129,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
}
...
...
apple_remote/RemoteControlContainer.m
Dosyayı görüntüle @
fe4ae473
...
...
@@ -36,10 +36,10 @@
if
(
(
self
=
[
super
initWithDelegate
:
_remoteControlDelegate
])
)
{
remoteControls
=
[[
NSMutableArray
alloc
]
init
];
#ifdef DEBUG
NSLog
(
@"Remote
ControlContainer initWithDelegate ok"
);
NSLog
(
@"Apple Remote:
ControlContainer initWithDelegate ok"
);
}
else
{
NSLog
(
@"
RemoteControlContainer initWithDelegate failed"
);
NSLog
(
@"Apple Remote:
RemoteControlContainer initWithDelegate failed"
);
#endif
}
...
...
@@ -62,7 +62,7 @@
}
#ifdef DEBUG
else
{
NSLog
(
@"Remote
ControlContainer instantiateAndAddRemoteControlDeviceWithClass failed"
);
NSLog
(
@"Apple Remote:
ControlContainer instantiateAndAddRemoteControlDeviceWithClass failed"
);
toReturn
=
NO
;
}
#endif
...
...
@@ -78,7 +78,7 @@
[
self
didChangeValueForKey
:
@"listeningToRemote"
];
#ifdef DEBUG
// debug purpose
NSLog
(
@"reset... (after listening to remote
)"
);
NSLog
(
@"Apple Remote: reset... (after listening
)"
);
#endif
}
...
...
@@ -105,7 +105,7 @@
-
(
void
)
startListening
:
(
id
)
sender
{
#ifdef DEBUG
NSLog
(
@"
startL
istening to events... "
);
NSLog
(
@"
Apple Remote: start l
istening to events... "
);
#endif
int
i
;
for
(
i
=
0
;
i
<
[
remoteControls
count
];
i
++
)
{
...
...
@@ -114,7 +114,7 @@
}
-
(
void
)
stopListening
:
(
id
)
sender
{
#ifdef DEBUG
NSLog
(
@"stopListening to events... "
);
NSLog
(
@"
Apple Remote:
stopListening to events... "
);
#endif
int
i
;
for
(
i
=
0
;
i
<
[
remoteControls
count
];
i
++
)
{
...
...
apple_remote/RemoteMainController.m
Dosyayı görüntüle @
fe4ae473
...
...
@@ -105,7 +105,7 @@
#endif
if
(
pressedDown
)
{
pressed
=
@"(pressed)"
;
pressed
=
@"(
AppleRemoteMainController: button
pressed)"
;
#ifdef DEBUG
switch
(
buttonIdentifier
)
...
...
@@ -124,14 +124,14 @@
case
kRemoteButtonMenu_Hold
:
buttonName
=
@"Menu (long)"
;
break
;
// MEDIA_COMMAND_MENU_HOLD
case
kRemoteControl_Switched
:
buttonName
=
@"Remote Control Switched"
;
break
;
default
:
NSLog
(
@"
Unmapped event for button %d"
,
buttonIdentifier
);
break
;
default
:
NSLog
(
@"AppleRemoteMainController:
Unmapped event for button %d"
,
buttonIdentifier
);
break
;
}
#endif
[
self
postTheEvent
:
buttonIdentifier
modifierFlags
:
0
];
}
else
// not pressed
{
pressed
=
@"(released)"
;
pressed
=
@"(
AppleRemoteMainController: button
released)"
;
}
#ifdef DEBUG
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment