C# Class SurfaceBluetooth.BluetoothMonitor

Provides continual Bluetooth discovery and events
Inheritance: IDisposable
Mostra file Open project: smalice/SurfaceWPFApp Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void
StartDiscovery ( ) : void

Starts the background discovery thread. Set the DiscoveryTime and IdleTime first to define the continuous discovery pattern.

StopDiscovery ( ) : void

Sets a flag to abort discovery on next cycle.

Private Methods

Method Description
AuthenticationHandler ( object o, InTheHand.Net.Bluetooth.BluetoothWin32AuthenticationEventArgs e ) : void
BluetoothMonitor ( ) : System
DiscoverThread ( ) : void
HwndBluetoothHook ( IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, bool &handled ) : IntPtr

Hook into the native message loop for the application to process WM_DEVICECHANGE messages.

InitializeEvents ( ) : void
OnDeviceArrived ( object o ) : void
OnDeviceLeft ( object o ) : void
RegisterDeviceNotification ( IntPtr hRecipient, DEV_BROADCAST_HANDLE &NotificationFilter, int Flags ) : IntPtr
UnregisterDeviceNotification ( IntPtr Handle ) : bool

Method Details

Dispose() public method

public Dispose ( ) : void
return void

StartDiscovery() public method

Starts the background discovery thread. Set the DiscoveryTime and IdleTime first to define the continuous discovery pattern.
public StartDiscovery ( ) : void
return void

StopDiscovery() public method

Sets a flag to abort discovery on next cycle.
public StopDiscovery ( ) : void
return void