Пример #1
0
        //Not implemented in dbus-sharp
        private void printAdapterProperties()
        {
            BluetoothInterface hci     = interfaceList[0];
            IAdapter           adapter = hci.adapter;

            Console.WriteLine("Name: {0}, Address: {1}, Discovering: {2}",
                              adapter.GetName(hci.path), adapter.GetAddress(hci.path), adapter.GetDiscovering(hci.path));
            Console.WriteLine("AddressType: {0}, Alias: {1}, Class: {2}, Powered: {3}, Discoverable: {4}",
                              adapter.GetAddressType(hci.path), adapter.GetAlias(hci.path), adapter.GetClass(hci.path),
                              adapter.GetPowered(hci.path), adapter.GetDiscoverable(hci.path));
            Console.WriteLine("DiscoverableTimeout: {0}, Pairable: {1}, PairableTimeout: {2}, Modalias: {3}",
                              adapter.GetDiscoverableTimeout(hci.path), adapter.GetPairable(hci.path),
                              adapter.GetPairableTimeout(hci.path), adapter.GetModalias(hci.path));
            Console.WriteLine("UUIDs: {0}", adapter.GetUUIDs(hci.path));
        }