Exemple #1
0
        private BthDevice Add(byte lsb, byte msb, string name)
        {
            BthDevice connection = null;

            if (_connected.Count < 4)
            {
                if (name == "Wireless Controller")
                {
                    connection = new BthDs4(this, _localMac, lsb, msb);
                }
                else
                {
                    connection = new BthDs3(this, _localMac, lsb, msb);
                }

                _connected[connection.HciHandle] = connection;
            }

            return(connection);
        }
Exemple #2
0
        private BthDevice Add(byte lsb, byte msb, string name)
        {
            BthDevice connection = null;

            if (_connected.Count < 4)
            {
                // TODO: weak check, maybe improve in future
                if (name.Equals(BthDs4.GenuineProductName, StringComparison.OrdinalIgnoreCase))
                {
                    connection = new BthDs4(this, _localMac, lsb, msb);
                }
                else
                {
                    connection = new BthDs3(this, _localMac, lsb, msb);
                }

                _connected[connection.HciHandle] = connection;
            }

            return(connection);
        }