コード例 #1
0
 protected override void BeginInquiry(int maxDevices,
                                      AsyncCallback callback, object state,
                                      BluetoothClient.LiveDiscoveryCallback liveDiscoHandler, object liveDiscoState,
                                      DiscoDevsParams args)
 {
     throw new NotSupportedException();
 }
コード例 #2
0
ファイル: BluesoleilClient.cs プロジェクト: zhubin-12/32feet
 //----
 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
ファイル: BluesoleilFactory.cs プロジェクト: zhubin-12/32feet
 //--------
 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
ファイル: AndroidBthInquiry.cs プロジェクト: zhubin-12/32feet
 //--------
 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));
        }
コード例 #6
0
        //----
        //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
ファイル: BluetopiaClient.cs プロジェクト: zhubin-12/32feet
 //----
 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
ファイル: BluesoleilFactory.cs プロジェクト: zhubin-12/32feet
            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
ファイル: NullBtCli.cs プロジェクト: zhubin-12/32feet
 protected override void BeginInquiry(int maxDevices, AsyncCallback callback, object state, InTheHand.Net.Sockets.BluetoothClient.LiveDiscoveryCallback liveDiscoHandler, object liveDiscoState, DiscoDevsParams args)
 {
     throw new NotImplementedException();
 }