ОТКАЗ ОТ ОТВЕТСТВЕННОСТИ: Следующий ответ является чисто умозрительным
key_file
параметр SSHHook
предназначен для этой цели extra
args в Airflow
Connection
entry (web UI) Конечно, когда не предоставлены ни key_file
, ни учетные данные , то SSHHook
возвращается к к identityfile
для инициализации paramiko
клиента.
Также посмотрите, как SFTPHook
обрабатывает эту
It's possible by testing for a NULL audio route using AudioToolBox:
UInt32 routeSize = sizeof (CFStringRef);
CFStringRef route;
AudioSessionGetProperty (
kAudioSessionProperty_AudioRoute,
&routeSize,
&route
);
if (route == NULL) {
NSLog(@"Silent switch is on");
}
If route is NULL then there's no available audio outputs. If it's "Headset" or "Headphones" then the silent ringer switch could still be on. However, it will never be on when it's set to "Speaker".
You're probably best testing for this in your audio route change property listener, which is set below:
AudioSessionAddPropertyListener (
kAudioSessionProperty_AudioRouteChange,
audioRouteChangeListenerCallback,
self
);
Note: If you're doing anything funky like overriding audio routes, then this answer may not apply.
Setting up and tearing down an audio session in its entirety is probably beyond the scope of this answer.