4 #import <Foundation/Foundation.h>
5 #import <BluetoothManager/BluetoothManager.h>
6 #import <SpringBoard/SBBluetoothController.h>
8 static unsigned connectedDevices_;
10 @interface SBBluetoothController (_WinterBoard)
11 - (void) wb_noteDevicesChanged;
14 @implementation SBBluetoothController (WinterBoard)
16 - (void) noteDevicesChanged {
17 if (NSArray *devices = [[BluetoothManager sharedInstance] pairedDevices]) {
18 connectedDevices_ = 0;
19 for (int i = 0, e = [devices count]; i != e; ++i)
20 if ([[devices objectAtIndex:i] connected])
22 if (connectedDevices_ == 0)
23 unlink("/tmp/neuter");
25 close(open("/tmp/neuter", O_CREAT | O_TRUNC | O_WRONLY, 644));
28 [self wb_noteDevicesChanged];