예제 #1
0
void
PA_DeviceControl::Teardown()
{
	CFNotificationCenterRemoveObserver(center, this,
					   CFSTR("scanDevices"),
					   CFSTR("PAHP_Device"));

	CFNotificationCenterRemoveObserver(center, this,
					   CFSTR("setConfiguration"),
					   CFSTR("PAHP_Device"));

	CFNotificationCenterRemoveObserver(center, this,
					   CFSTR("updateStreamVolume"),
					   CFSTR("PAHP_LevelControl"));

	CFNotificationCenterRemoveObserver(center, this,
					   CFSTR("updateMuteVolume"),
					   CFSTR("PAHP_LevelControl"));
}
void	CACFDistributedNotification::RemoveObserver(const void* inObserver, CFStringRef inName)
{
#if	!TARGET_OS_IPHONE
	CFNotificationCenterRef theCenter = CFNotificationCenterGetDistributedCenter();
#else
	CFNotificationCenterRef theCenter = CFNotificationCenterGetDarwinNotifyCenter();
#endif
	 
	CFNotificationCenterRemoveObserver(theCenter, inObserver, inName, NULL);
}
void
RemoveSkypeDelegate(void)
{
	if (delegate && delegate->clientApplicationName)
	{
		CFNotificationCenterRef center = CFNotificationCenterGetDistributedCenter();
			
		CFNotificationCenterRemoveObserver(
			center,
			delegate->clientApplicationName,
			CFSTR("SKSkypeAPINotification"),
			NULL);

		CFNotificationCenterRemoveObserver(
			center,
			delegate->clientApplicationName,
			CFSTR("SKSkypeWillQuit"),
			NULL);

		CFNotificationCenterRemoveObserver(
			center,
			delegate->clientApplicationName,
			CFSTR("SKSkypeBecameAvailable"),
			NULL);

		CFNotificationCenterRemoveObserver(
			center,
			delegate->clientApplicationName,
			CFSTR("SKAvailabilityUpdate"),
			NULL);

		CFNotificationCenterRemoveObserver(
			center,
			delegate->clientApplicationName,
			CFSTR("SKSkypeAttachResponse"),
			NULL);
	}
	delegate = NULL;
}
예제 #4
0
ITunesController::~ITunesController()
{
	CFNotificationCenterRef center = CFNotificationCenterGetDistributedCenter();
	CFNotificationCenterRemoveObserver(center, this, CFSTR("com.apple.iTunes.playerInfo"), NULL);
}
예제 #5
0
KGlobalAccelImpl::~KGlobalAccelImpl()
{
    DisposeEventHandlerUPP(hotKeyEventHandler);
    CFNotificationCenterRemoveObserver(CFNotificationCenterGetDistributedCenter(), this, NULL, NULL);
    delete refs;
}