Пример #1
0
 protected override void BeginInquiry(int maxDevices,
                                      AsyncCallback callback, object state,
                                      BluetoothClient.LiveDiscoveryCallback liveDiscoHandler, object liveDiscoState,
                                      DiscoDevsParams args)
 {
     throw new NotSupportedException();
 }
Пример #2
0
 //----
 protected override void BeginInquiry(int maxDevices, AsyncCallback callback, object state,
                                      BluetoothClient.LiveDiscoveryCallback liveDiscoHandler, object liveDiscoState,
                                      DiscoDevsParams args)
 {
     _factory.BeginInquiry(maxDevices, InquiryLength,
                           callback, state,
                           liveDiscoHandler, liveDiscoState, args);
 }
Пример #3
0
 //--------
 internal IAsyncResult BeginInquiry(int maxDevices, TimeSpan inquiryLength,
                                    AsyncCallback callback, object state,
                                    BluetoothClient.LiveDiscoveryCallback liveDiscoHandler, object liveDiscoState,
                                    DiscoDevsParams args)
 {
     return(_inquiryHandler.BeginInquiry(maxDevices, inquiryLength,
                                         callback, state,
                                         liveDiscoHandler, liveDiscoState, args));
 }
Пример #4
0
 //--------
 internal void DoBeginInquiry(int maxDevices, TimeSpan inquiryLength,
                              AsyncCallback callback, object state,
                              BluetoothClient.LiveDiscoveryCallback liveDiscoHandler, object liveDiscoState,
                              DiscoDevsParams args)
 {
     System.Threading.ThreadStart startInquiry = DoStartInquiry;
     base.BeginInquiry(maxDevices, inquiryLength, callback, state,
                       liveDiscoHandler, liveDiscoState,
                       startInquiry, args);
 }
Пример #5
0
        }//class

        internal IAsyncResult BeginInquiry(int maxDevices, TimeSpan inquiryLength,
                                           AsyncCallback callback, object state,
                                           BluetoothClient.LiveDiscoveryCallback liveDiscoHandler, object liveDiscoState,
                                           DiscoDevsParams args)
        {
            CancelAllQueryNames();
            return(_inquiryHandler.BeginInquiry(maxDevices, inquiryLength,
                                                callback, state,
                                                liveDiscoHandler, liveDiscoState,
                                                delegate() {
                BluetopiaError ret = Api.GAP_Perform_Inquiry(StackId,
                                                             StackConsts.GAP_Inquiry_Type.GeneralInquiry,
                                                             0, 0, checked ((uint)inquiryLength.Seconds),
                                                             checked ((uint)maxDevices),
                                                             _inquiryEventCallback, 0);
                BluetopiaUtils.CheckAndThrow(ret, "Btsdk_StartDeviceDiscovery");
            }, args));
        }
        //----
        //IAsyncResult IBluetoothClient.BeginDiscoverDevices(int maxDevices, bool authenticated, bool remembered, bool unknown, bool discoverableOnly, AsyncCallback callback, object state)
        protected override void BeginInquiry(int maxDevices, AsyncCallback callback, object state,
                                             BluetoothClient.LiveDiscoveryCallback liveDiscoHandler,
                                             object liveDiscoState, DiscoDevsParams args)
        {
            AndroidBthInquiry inq;

            lock (_lock) {
                if (_inquiry == null)
                {
                    _inquiry = _fcty.GetInquiry();
                }
                inq = _inquiry;
            }
            inq.DoBeginInquiry(maxDevices, InquiryLength,
                               callback, state,
                               liveDiscoHandler, liveDiscoState,
                               args);
        }
Пример #7
0
 //----
 protected override void BeginInquiry(int maxDevices, AsyncCallback callback, object state,
                                      InTheHand.Net.Sockets.BluetoothClient.LiveDiscoveryCallback liveDiscoHandler, object liveDiscoState,
                                      DiscoDevsParams args)
 {
     IAsyncResult ar = _factory.BeginInquiry(maxDevices, InquiryLength,
                                             callback, state,
                                             liveDiscoHandler, liveDiscoState, args);
     //} catch (BluetopiaSocketException ex) {
     //    if (ex.BluetopiaErrorCode == (int)BluetopiaError.INVALID_PARAMETER) {
     //        // Apparently means one is already in progress, so just
     //        // complete as if it returned no results.
     //        var ar = new AR_Inquiry(callback, state, args);
     //        var empty = new List<IBluetoothDeviceInfo>();
     //        ar.SetAsCompleted(empty, AsyncResultCompletion.MakeAsync);
     //        return;
     //    }
     //    throw;
     //}
 }
Пример #8
0
            internal IAsyncResult BeginInquiry(int maxDevices, TimeSpan inquiryLength,
                                               AsyncCallback callback, object state,
                                               BluetoothClient.LiveDiscoveryCallback liveDiscoHandler, object liveDiscoState,
                                               DiscoDevsParams args)
            {
                _fcty.SdkInit();
                _fcty.RegisterCallbacksOnce();
                //
                byte maxDurations;
                byte maxNum;

                CommonDiscoveryBluetoothClient.ConvertBthInquiryParams(maxDevices, inquiryLength, out maxNum, out maxDurations);
                return(BeginInquiry(maxDevices, inquiryLength,
                                    callback, state,
                                    liveDiscoHandler, liveDiscoState,
                                    delegate() {
                    BtSdkError ret = _fcty.Api.Btsdk_StartDeviceDiscovery(
                        AnyClass, maxNum, maxDurations);
                    BluesoleilUtils.CheckAndThrow(ret, "Btsdk_StartDeviceDiscovery");
                }, args));
            }
Пример #9
0
 protected override void BeginInquiry(int maxDevices, AsyncCallback callback, object state, InTheHand.Net.Sockets.BluetoothClient.LiveDiscoveryCallback liveDiscoHandler, object liveDiscoState, DiscoDevsParams args)
 {
     throw new NotImplementedException();
 }