sharee.bike-App/LastenradBayern/TINK.Android/Services/BluetoothLock/Arendi/Central.cs

104 lines
3.1 KiB
C#
Raw Normal View History

2021-11-07 19:42:59 +01:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
#if ARENDI
using Arendi.BleLibrary;
using Arendi.BleLibrary.Adapter;
using Arendi.BleLibrary.Android;
using Arendi.BleLibrary.Local;
using Arendi.BleLibrary.Remote;
#endif
using Xamarin.Forms;
[assembly: Dependency(typeof(TINK.Droid.Services.BluetoothLock.Arendi.Central))]
namespace TINK.Droid.Services.BluetoothLock.Arendi
{
#if ARENDI
public class Central : ICentral
#else
public class Central
#endif
{
#if ARENDI
private bool disposedValue;
private static ICentral central = CentralFactory.GetCentral();
public global::Arendi.BleLibrary.Adapter.IAdapter Adapter => throw new NotImplementedException();
public BluetoothState BluetoothState => throw new NotImplementedException();
public ISecurityManager SecurityManager => throw new NotImplementedException();
public IBondManager BondManager => throw new NotImplementedException();
public IDictionary<string, string> SystemInformation => throw new NotImplementedException();
public event EventHandler<PeripheralDiscoveredEventArgs> PeripheralDiscovered;
public event EventHandler<BluetoothStateChangedEventArgs> BluetoothStateChanged;
public event EventHandler<EventArgs> SystemInformationUpdated;
public event EventHandler<FatalErrorEventArgs> FatalError;
public IPeripheral CreatePeripheralByUuid(Uuid uuid, string name = null)
=> central.CreatePeripheralByUuid(uuid, name);
public bool IsEnabled()
{
throw new NotImplementedException();
}
public void StartScan()
=> central.StartScan();
public void StartScan(string[] uuids)
{
throw new NotImplementedException();
}
public void StartScan(Uuid[] uuids)
{
throw new NotImplementedException();
}
public void StopScan()
=> central.StopScan();
protected virtual void Dispose(bool disposing)
{
if (!disposedValue)
{
if (disposing)
{
// TODO: dispose managed state (managed objects)
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
disposedValue = true;
}
}
// // TODO: override finalizer only if 'Dispose(bool disposing)' has code to free unmanaged resources
// ~Central()
// {
// // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
// Dispose(disposing: false);
// }
public void Dispose()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: true);
GC.SuppressFinalize(this);
}
#endif
}
}