zoukankan      html  css  js  c++  java
  • delphi IOS BLE 代理

    代理方法

    centralManagerDidUpdateState:

    peripheralManagerDidUpdateState:代理方法。

    centralManager:willRestoreState

    peripheralManager:willRestoreState:代理方法

    - (void)centralManager:(CBCentralManager *)central willRestoreState:(NSDictionary *)state
    {
        NSArray *peripherals = state[CBCentralManagerRestoredStatePeripheralsKey];
    
        // TODO: ...
    }

    D:Program Files (x86)EmbarcaderoStudio17.0source tl etSystem.Mac.Bluetooth.pas
    D:Program Files (x86)EmbarcaderoStudio17.0source tlosxMacapi.Bluetooth.pas

    17.0source tl etSystem.Mac.Bluetooth.pas(3481):
        procedure centralManagerDidUpdateState(central: CBCentralManager); cdecl;
        [MethodName('centralManager:willRestoreState:')]

    procedure TInternalBluetoothLEManager.centralManagerDidUpdateState(central: CBCentralManager);


    delphi在System.Mac.Bluetooth.pas实现了centralManagerDidUpdateState方法

    procedure TInternalBluetoothLEManager.centralManagerDidUpdateState(central: CBCentralManager);
    begin
      if (central.state = CBCentralManagerStatePoweredOn) and FWaitingToDiscover then
      begin
         FWaitingToDiscover := False;
         central.scanForPeripheralsWithServices(FFilterUUIDList, FScanOptions);
      end;
    end;

    delphi也实现了 initWithDelegate方法

    procedure TInternalBluetoothLEManager.centralManagerWillRestoreState(central: CBCentralManager; dict: NSDictionary);
    begin
    
    end;
  • 相关阅读:
    BZOJ1001 BJOI2006 狼抓兔子
    NOI2015 程序自动分析
    高斯消元法
    [POJ] 3666 Making the Grade
    [CODEVS] 2185 最长公共上升子序列
    [模板] LIS
    [CF] 219D Choosing Capital for Treeland
    [POJ] 2823 Sliding Window
    [BZOJ] 1072 [SCOI2007]排列perm
    [POJ] 1094 Sorting It All Out
  • 原文地址:https://www.cnblogs.com/cb168/p/5118030.html
Copyright © 2011-2022 走看看