1 /* 2 * Copyright (C) 2021-2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 /** 17 * @addtogroup Bluetooth 18 * @{ 19 * 20 * @brief Defines ble advertiser, peripheral deviceand central manager functions, 21 * including scan settings and filters, advertise settings and data etc. 22 * 23 * @since 6 24 */ 25 26 /** 27 * @file ble_data.h 28 * 29 * @brief Ble data class. 30 * 31 * @since 6 32 */ 33 34 #ifndef BLE_PARCEL_DATA_H 35 #define BLE_PARCEL_DATA_H 36 37 #include <map> 38 #include <vector> 39 40 #include "ble_service_data.h" 41 #include "bt_uuid.h" 42 #include "raw_address.h" 43 #include "securec.h" 44 45 namespace OHOS { 46 namespace bluetooth { 47 class AdvertiserData { 48 public: 49 /** 50 * @brief A constructor used to create a <b>BleAdvertiserData</b> instance. 51 * 52 * @since 6 53 */ AdvertiserData()54 AdvertiserData(){}; 55 56 /** 57 * @brief A destructor used to delete the <b>BleAdvertiserData</b> instance. 58 * 59 * @since 6 60 */ ~AdvertiserData()61 virtual ~AdvertiserData(){}; 62 GetManufacturerData()63 std::map<uint16_t, std::string> GetManufacturerData() const 64 { 65 return manufacturerSpecificData_; 66 } 67 68 /** 69 * @brief Get service data. 70 * 71 * @return Returns service data. 72 * @since 6 73 */ GetServiceData()74 std::map<Uuid, std::string> GetServiceData() const 75 { 76 return serviceData_; 77 } 78 79 /** 80 * @brief Get service uuids. 81 * 82 * @return Returns service uuids. 83 * @since 6 84 */ GetServiceUuids()85 std::vector<Uuid> GetServiceUuids() const 86 { 87 return serviceUuids_; 88 } 89 90 /** 91 * @brief Get advertiser flag. 92 * 93 * @return Returns advertiser flag. 94 * @since 6 95 */ GetAdvFlag()96 uint8_t GetAdvFlag() const 97 { 98 return advFlag_; 99 } 100 101 /** 102 * @brief Get payload. 103 * 104 * @return Returns payload. 105 * @since 6 106 */ GetPayload()107 std::string GetPayload() const 108 { 109 return payload_; 110 } 111 112 /** 113 * @brief Set advertiser flag. 114 * 115 * @param flag Advertiser flag. 116 * @since 6 117 */ SetAdvFlag(uint8_t flag)118 void SetAdvFlag(uint8_t flag) 119 { 120 advFlag_ = flag; 121 } 122 123 /** 124 * @brief Set payload data. 125 * 126 * @param Payload payload. 127 * @since 6 128 */ SetPayload(const std::string & payload)129 void SetPayload(const std::string &payload) 130 { 131 payload_ = payload; 132 } 133 134 /** 135 * @brief Add manufacture data. 136 * 137 * @param manufacturerId Manufacture Id which addad data. 138 * @since 6 139 */ AddManufacturerData(uint16_t manufacturerId,std::string data)140 void AddManufacturerData(uint16_t manufacturerId, std::string data) 141 { 142 manufacturerSpecificData_.insert(std::make_pair(manufacturerId, data)); 143 } 144 145 /** 146 * @brief Add service data. 147 * 148 * @param uuid Uuid of service data. 149 * @param serviceData Service data. 150 * @since 6 151 */ AddServiceData(bluetooth::Uuid uuid,std::string serviceData)152 void AddServiceData(bluetooth::Uuid uuid, std::string serviceData) 153 { 154 serviceData_.insert(std::make_pair(uuid, serviceData)); 155 } 156 157 /** 158 * @brief Add service uuid. 159 * 160 * @param serviceUuid Service uuid. 161 * @since 6 162 */ AddServiceUuid(const bluetooth::Uuid & serviceUuid)163 void AddServiceUuid(const bluetooth::Uuid &serviceUuid) 164 { 165 serviceUuids_.push_back(serviceUuid); 166 } 167 168 /** 169 * @brief Get whether the device name will be included in the advertisement packet. 170 * 171 * @return Returns includeDeviceName flag. 172 * @since 6 173 */ GetIncludeDeviceName()174 bool GetIncludeDeviceName() const 175 { 176 return includeDeviceName_; 177 } 178 179 /** 180 * @brief Set whether the device name will be included in the advertisement packet. 181 * 182 * @param flag includeDeviceName flag. 183 * @since 6 184 */ SetIncludeDeviceName(bool flag)185 void SetIncludeDeviceName(bool flag) 186 { 187 includeDeviceName_ = flag; 188 } 189 190 /** 191 * @brief Get whether the txpower will be included in the advertisement packet. 192 * 193 * @return Returns includeTxPower flag. 194 * @since 10 195 */ GetIncludeTxPower()196 bool GetIncludeTxPower() const 197 { 198 return includeTxPower_; 199 } 200 201 /** 202 * @brief Set whether the txpower will be included in the advertisement packet. 203 * 204 * @param flag includeTxPower flag. 205 * @since 10 206 */ SetIncludeTxPower(bool flag)207 void SetIncludeTxPower(bool flag) 208 { 209 includeTxPower_ = flag; 210 } 211 212 public: 213 std::vector<Uuid> serviceUuids_ {}; 214 std::map<uint16_t, std::string> manufacturerSpecificData_ {}; 215 std::map<Uuid, std::string> serviceData_ {}; 216 uint8_t advFlag_ {}; 217 std::string payload_ = ""; 218 bool includeDeviceName_ = false; 219 bool includeTxPower_ = false; 220 }; 221 222 /** 223 * @brief Represents advertise settings. 224 * 225 * @since 6 226 */ 227 class AdvertiserSettings { 228 public: 229 /** 230 * @brief A constructor used to create a <b>BleAdvertiseSettings</b> instance. 231 * 232 * @since 6 233 */ AdvertiserSettings()234 AdvertiserSettings(){}; 235 236 /** 237 * @brief A destructor used to delete the <b>BleAdvertiseSettings</b> instance. 238 * 239 * @since 6 240 */ ~AdvertiserSettings()241 virtual ~AdvertiserSettings(){}; 242 243 /** 244 * @brief Check if device service is connectable. 245 * 246 * @return Returns <b>true</b> if device service is connectable; 247 * returns <b>false</b> if device service is not connectable. 248 * @since 6 249 */ IsConnectable()250 bool IsConnectable() const 251 { 252 return connectable_; 253 } 254 255 /** 256 * @brief Check if advertiser is legacy mode. 257 * 258 * @return Returns <b>true</b> if advertiser is legacy mode; 259 * returns <b>false</b> if advertiser is not legacy mode. 260 * @since 6 261 */ IsLegacyMode()262 bool IsLegacyMode() const 263 { 264 return legacyMode_; 265 } 266 267 /** 268 * @brief Get advertise interval. 269 * 270 * @return Returns advertise interval. 271 * @since 6 272 */ GetInterval()273 int GetInterval() const 274 { 275 return interval_; 276 } 277 278 /** 279 * @brief Get Tx power. 280 * 281 * @return Returns Tx power. 282 * @since 6 283 */ GetTxPower()284 int8_t GetTxPower() const 285 { 286 return txPower_; 287 } 288 289 /** 290 * @brief Set connectable. 291 * 292 * @param connectable Whether it is connectable. 293 * @since 6 294 */ SetConnectable(bool connectable)295 void SetConnectable(bool connectable) 296 { 297 connectable_ = connectable; 298 } 299 300 /** 301 * @brief Set legacyMode. 302 * 303 * @param connectable Whether it is legacyMode. 304 * @since 6 305 */ SetLegacyMode(bool legacyMode)306 void SetLegacyMode(bool legacyMode) 307 { 308 legacyMode_ = legacyMode; 309 } 310 311 /** 312 * @brief Set advertise interval. 313 * 314 * @param interval Advertise interval. 315 * @since 6 316 */ SetInterval(uint16_t interval)317 void SetInterval(uint16_t interval) 318 { 319 interval_ = interval; 320 } 321 322 /** 323 * @brief Set Tx power. 324 * 325 * @param txPower Tx power. 326 * @since 6 327 */ SetTxPower(int8_t txPower)328 void SetTxPower(int8_t txPower) 329 { 330 txPower_ = txPower; 331 } 332 333 /** 334 * @brief Get primary phy. 335 * 336 * @return Returns primary phy. 337 * @since 6 338 */ GetPrimaryPhy()339 int GetPrimaryPhy() const 340 { 341 return primaryPhy_; 342 } 343 344 /** 345 * @brief Set primary phy. 346 * 347 * @param primaryPhy Primary phy. 348 * @since 6 349 */ SetPrimaryPhy(int primaryPhy)350 void SetPrimaryPhy(int primaryPhy) 351 { 352 primaryPhy_ = primaryPhy; 353 } 354 355 /** 356 * @brief Get second phy. 357 * 358 * @return Returns primary phy. 359 * @since 6 360 */ GetSecondaryPhy()361 int GetSecondaryPhy() const 362 { 363 return secondaryPhy_; 364 } 365 366 /** 367 * @brief Set second phy. 368 * 369 * @param secondaryPhy Second phy. 370 * @since 6 371 */ SetSecondaryPhy(int secondaryPhy)372 void SetSecondaryPhy(int secondaryPhy) 373 { 374 secondaryPhy_ = secondaryPhy; 375 } 376 377 /** 378 * @brief Get own address. 379 * 380 * @param addr Own address. 381 * @since 6 382 */ GetOwnAddr()383 std::array<uint8_t, RawAddress::BT_ADDRESS_BYTE_LEN> GetOwnAddr() const 384 { 385 return ownAddr_; 386 } 387 388 /** 389 * @brief Set own address. 390 * 391 * @param addr Own address. 392 * @since 6 393 */ SetOwnAddr(const std::array<uint8_t,RawAddress::BT_ADDRESS_BYTE_LEN> & addr)394 void SetOwnAddr(const std::array<uint8_t, RawAddress::BT_ADDRESS_BYTE_LEN>& addr) 395 { 396 ownAddr_ = addr; 397 } 398 399 /** 400 * @brief Get own address type. 401 * 402 * @return Returns own address type. 403 * @since 6 404 */ GetOwnAddrType()405 int8_t GetOwnAddrType() const 406 { 407 return ownAddrType_; 408 } 409 410 /** 411 * @brief Set own address type. 412 * 413 * @param addrType Own address type. 414 * @since 6 415 */ SetOwnAddrType(int8_t addrType)416 void SetOwnAddrType(int8_t addrType) 417 { 418 ownAddrType_ = addrType; 419 } 420 421 public: 422 bool connectable_ {}; 423 bool legacyMode_ {}; 424 uint16_t interval_ {}; 425 int8_t txPower_ {}; 426 int primaryPhy_ {}; 427 int secondaryPhy_ {}; 428 std::array<uint8_t, RawAddress::BT_ADDRESS_BYTE_LEN> ownAddr_ = {}; 429 int8_t ownAddrType_ = -1; 430 }; 431 432 class ScanResult { 433 public: 434 /** 435 * @brief A constructor used to create a <b>BleScanResult</b> instance. 436 * 437 * @since 6 438 */ ScanResult()439 ScanResult(){}; 440 441 explicit ScanResult(const BleScanResultImpl &other); 442 443 /** 444 * @brief A destructor used to delete the <b>BleScanResult</b> instance. 445 * 446 * @since 6 447 */ ~ScanResult()448 virtual ~ScanResult(){}; 449 450 /** 451 * @brief Get service uuids. 452 * 453 * @return Returns service uuids. 454 * @since 6 455 */ GetServiceUuids()456 std::vector<Uuid> GetServiceUuids() const 457 { 458 return serviceUuids_; 459 } 460 461 /** 462 * @brief Get manufacture data. 463 * 464 * @return Returns manufacture data. 465 * @since 6 466 */ GetManufacturerData()467 std::map<uint16_t, std::string> GetManufacturerData() const 468 { 469 return manufacturerSpecificData_; 470 } 471 472 /** 473 * @brief Get service data. 474 * 475 * @return Returns service data. 476 * @since 6 477 */ GetServiceData()478 std::map<Uuid, std::string> GetServiceData() const 479 { 480 return serviceData_; 481 } 482 483 /** 484 * @brief Get peripheral device. 485 * 486 * @return Returns peripheral device pointer. 487 * @since 6 488 */ GetPeripheralDevice()489 const RawAddress &GetPeripheralDevice() const 490 { 491 return addr_; 492 } 493 494 /** 495 * @brief Get peer device rssi. 496 * 497 * @return Returns peer device rssi. 498 * @since 6 499 */ GetRssi()500 int8_t GetRssi() const 501 { 502 return rssi_; 503 } 504 505 /** 506 * @brief Check if device is connectable. 507 * 508 * @return Returns <b>true</b> if device is connectable; 509 * returns <b>false</b> if device is not connectable. 510 * @since 6 511 */ IsConnectable()512 bool IsConnectable() const 513 { 514 return connectable_; 515 } 516 517 /** 518 * @brief Get advertiser flag. 519 * 520 * @return Returns advertiser flag. 521 * @since 6 522 */ GetAdvertiseFlag()523 uint8_t GetAdvertiseFlag() const 524 { 525 return advertiseFlag_; 526 } 527 528 /** 529 * @brief Add manufacture data. 530 * 531 * @param manufacturerId Manufacture Id which addad data. 532 * @since 6 533 */ AddManufacturerData(uint16_t manufacturerId,std::string data)534 void AddManufacturerData(uint16_t manufacturerId, std::string data) 535 { 536 manufacturerSpecificData_.insert(std::make_pair(manufacturerId, data)); 537 } 538 539 /** 540 * @brief Add service data. 541 * 542 * @param uuid Uuid of service data. 543 * @param serviceData Service data. 544 * @since 6 545 */ AddServiceData(Uuid uuid,std::string serviceData)546 void AddServiceData(Uuid uuid, std::string serviceData) 547 { 548 serviceData_.insert(std::make_pair(uuid, serviceData)); 549 } 550 551 /** 552 * @brief Add service uuid. 553 * 554 * @param serviceUuid Service uuid. 555 * @since 6 556 */ AddServiceUuid(const Uuid & serviceUuid)557 void AddServiceUuid(const Uuid &serviceUuid) 558 { 559 serviceUuids_.push_back(serviceUuid); 560 } 561 562 /** 563 * @brief Set peripheral device. 564 * 565 * @param device Remote device. 566 * @since 6 567 */ SetPeripheralDevice(const RawAddress & device)568 void SetPeripheralDevice(const RawAddress &device) 569 { 570 addr_ = device; 571 } 572 573 /** 574 * @brief Set peer device rssi. 575 * 576 * @param rssi Peer device rssi. 577 * @since 6 578 */ SetRssi(int8_t rssi)579 void SetRssi(int8_t rssi) 580 { 581 rssi_ = rssi; 582 } 583 584 /** 585 * @brief Set connectable. 586 * 587 * @param connectable Whether it is connectable. 588 * @since 6 589 */ SetConnectable(bool connectable)590 void SetConnectable(bool connectable) 591 { 592 connectable_ = connectable; 593 } 594 595 /** 596 * @brief Set advertiser flag. 597 * 598 * @param flag Advertiser flag. 599 * @since 6 600 */ SetAdvertiseFlag(uint8_t flag)601 void SetAdvertiseFlag(uint8_t flag) 602 { 603 advertiseFlag_ = flag; 604 } 605 SetPayload(const std::string & payload)606 void SetPayload(const std::string &payload) 607 { 608 payload_ = payload; 609 } 610 GetPayload()611 std::string GetPayload() const 612 { 613 return payload_; 614 } 615 SetName(const std::string & name)616 void SetName(const std::string &name) 617 { 618 name_ = name; 619 } 620 GetName(void)621 std::string GetName(void) const 622 { 623 return name_; 624 } 625 626 public: 627 std::vector<Uuid> serviceUuids_ {}; 628 std::map<uint16_t, std::string> manufacturerSpecificData_ {}; 629 std::map<Uuid, std::string> serviceData_ {}; 630 RawAddress addr_ {}; 631 int8_t rssi_ {}; 632 bool connectable_ {}; 633 uint8_t advertiseFlag_ {}; 634 std::string payload_ {}; 635 std::string name_ {}; 636 }; 637 638 /** 639 * @brief Represents Scan settings. 640 * 641 * @since 6 642 */ 643 class ScanSettings { 644 public: 645 /** 646 * @brief A constructor used to create a <b>BleScanSettings</b> instance. 647 * 648 * @since 6 649 */ ScanSettings()650 ScanSettings(){}; 651 652 /** 653 * @brief A destructor used to delete the <b>BleScanSettings</b> instance. 654 * 655 * @since 6 656 */ ~ScanSettings()657 virtual ~ScanSettings(){}; 658 659 /** 660 * @brief Set report delay time. 661 * 662 * @param reportDelayMillis Report delay time. 663 * @since 6 664 */ SetReportDelay(long reportDelayMillis)665 void SetReportDelay(long reportDelayMillis) 666 { 667 reportDelayMillis_ = reportDelayMillis; 668 } 669 670 /** 671 * @brief Get report delay time. 672 * 673 * @return Returns Report delay time. 674 * @since 6 675 */ GetReportDelayMillisValue()676 long GetReportDelayMillisValue() const 677 { 678 return reportDelayMillis_; 679 } 680 681 /** 682 * @brief Set scan mode. 683 * 684 * @param scanMode Scan mode. 685 * @return If the scanMode is invalid. 686 * @since 6 687 */ SetScanMode(int scanMode)688 void SetScanMode(int scanMode) 689 { 690 scanMode_ = scanMode; 691 } 692 693 /** 694 * @brief Get scan mode. 695 * 696 * @return Scan mode. 697 * @since 6 698 */ GetScanMode()699 int GetScanMode() const 700 { 701 return scanMode_; 702 } 703 704 /** 705 * @brief Set legacy flag. 706 * 707 * @param legacy Legacy value. 708 * @since 6 709 */ SetLegacy(bool legacy)710 void SetLegacy(bool legacy) 711 { 712 legacy_ = legacy; 713 } 714 715 /** 716 * @brief Get legacy flag. 717 * 718 * @return Legacy flag. 719 * @since 6 720 */ GetLegacy()721 bool GetLegacy() const 722 { 723 return legacy_; 724 } 725 726 /** 727 * @brief Set phy value. 728 * 729 * @param phy Phy value. 730 * @since 6 731 */ SetPhy(int phy)732 void SetPhy(int phy) 733 { 734 phy_ = phy; 735 } 736 737 /** 738 * @brief Get phy value. 739 * 740 * @return Phy value. 741 * @since 6 742 */ GetPhy()743 int GetPhy() const 744 { 745 return phy_; 746 } 747 748 public: 749 long reportDelayMillis_ = 0; 750 int scanMode_ = 0; 751 bool legacy_ = true; 752 int phy_ = 255; 753 }; 754 755 /** 756 * @brief Represents Scan filter. 757 * 758 */ 759 class ScanFilter { 760 public: 761 /** 762 * @brief A constructor used to create a <b>BleScanFilter</b> instance. 763 * 764 */ ScanFilter()765 ScanFilter() {} 766 767 /** 768 * @brief A destructor used to delete the <b>BleScanFilter</b> instance. 769 * 770 */ ~ScanFilter()771 virtual ~ScanFilter() {} 772 773 /** 774 * @brief Set device id. 775 * 776 * @param deviceId device id. 777 */ SetDeviceId(const std::string & deviceId)778 void SetDeviceId(const std::string &deviceId) 779 { 780 deviceId_ = deviceId; 781 } 782 783 /** 784 * @brief Get device id. 785 * 786 * @return Returns device id. 787 */ GetDeviceId()788 std::string GetDeviceId() const 789 { 790 return deviceId_; 791 } 792 SetName(const std::string & name)793 void SetName(const std::string &name) 794 { 795 name_ = name; 796 } 797 GetName()798 std::string GetName() const 799 { 800 return name_; 801 } 802 SetServiceUuid(const Uuid & uuid)803 void SetServiceUuid(const Uuid &uuid) 804 { 805 serviceUuid_ = uuid; 806 hasServiceUuid_ = true; 807 } 808 HasServiceUuid()809 bool HasServiceUuid() const 810 { 811 return hasServiceUuid_; 812 } 813 GetServiceUuid()814 Uuid GetServiceUuid() const 815 { 816 return serviceUuid_; 817 } 818 SetServiceUuidMask(const Uuid & serviceUuidMask)819 void SetServiceUuidMask(const Uuid &serviceUuidMask) 820 { 821 serviceUuidMask_ = serviceUuidMask; 822 hasServiceUuidMask_ = true; 823 } 824 HasServiceUuidMask()825 bool HasServiceUuidMask() const 826 { 827 return hasServiceUuidMask_; 828 } 829 GetServiceUuidMask()830 Uuid GetServiceUuidMask() const 831 { 832 return serviceUuidMask_; 833 } 834 SetServiceSolicitationUuid(const Uuid & serviceSolicitationUuid)835 void SetServiceSolicitationUuid(const Uuid &serviceSolicitationUuid) 836 { 837 serviceSolicitationUuid_ = serviceSolicitationUuid; 838 hasSolicitationUuid_ = true; 839 } 840 HasSolicitationUuid()841 bool HasSolicitationUuid() const 842 { 843 return hasSolicitationUuid_; 844 } 845 GetServiceSolicitationUuid()846 Uuid GetServiceSolicitationUuid() const 847 { 848 return serviceSolicitationUuid_; 849 } 850 SetServiceSolicitationUuidMask(const Uuid & serviceSolicitationUuidMask)851 void SetServiceSolicitationUuidMask(const Uuid &serviceSolicitationUuidMask) 852 { 853 serviceSolicitationUuidMask_ = serviceSolicitationUuidMask; 854 hasSolicitationUuidMask_ = true; 855 } 856 HasSolicitationUuidMask()857 bool HasSolicitationUuidMask() const 858 { 859 return hasSolicitationUuidMask_; 860 } 861 GetServiceSolicitationUuidMask()862 Uuid GetServiceSolicitationUuidMask() const 863 { 864 return serviceSolicitationUuidMask_; 865 } 866 SetServiceData(const std::vector<uint8_t> & serviceData)867 void SetServiceData(const std::vector<uint8_t> &serviceData) 868 { 869 serviceData_ = serviceData; 870 } 871 GetServiceData()872 std::vector<uint8_t> GetServiceData() const 873 { 874 return serviceData_; 875 } 876 SetServiceDataMask(const std::vector<uint8_t> & serviceDataMask)877 void SetServiceDataMask(const std::vector<uint8_t> &serviceDataMask) 878 { 879 serviceDataMask_ = serviceDataMask; 880 } 881 GetServiceDataMask()882 std::vector<uint8_t> GetServiceDataMask() const 883 { 884 return serviceDataMask_; 885 } 886 SetManufacturerId(uint16_t manufacturerId)887 void SetManufacturerId(uint16_t manufacturerId) 888 { 889 manufacturerId_ = manufacturerId; 890 } 891 GetManufacturerId()892 uint16_t GetManufacturerId() const 893 { 894 return manufacturerId_; 895 } 896 SetManufactureData(const std::vector<uint8_t> & manufactureData)897 void SetManufactureData(const std::vector<uint8_t> &manufactureData) 898 { 899 manufactureData_ = manufactureData; 900 } 901 GetManufactureData()902 std::vector<uint8_t> GetManufactureData() const 903 { 904 return manufactureData_; 905 } 906 SetManufactureDataMask(const std::vector<uint8_t> & manufactureDataMask)907 void SetManufactureDataMask(const std::vector<uint8_t> &manufactureDataMask) 908 { 909 manufactureDataMask_ = manufactureDataMask; 910 } 911 GetManufactureDataMask()912 std::vector<uint8_t> GetManufactureDataMask() const 913 { 914 return manufactureDataMask_; 915 } 916 917 public: 918 std::string deviceId_; 919 std::string name_; 920 921 Uuid serviceUuid_; 922 Uuid serviceUuidMask_; 923 Uuid serviceSolicitationUuid_; 924 Uuid serviceSolicitationUuidMask_; 925 bool hasServiceUuid_ = false; 926 bool hasServiceUuidMask_ = false; 927 bool hasSolicitationUuid_ = false; 928 bool hasSolicitationUuidMask_ = false; 929 930 std::vector<uint8_t> serviceData_; 931 std::vector<uint8_t> serviceDataMask_; 932 933 uint16_t manufacturerId_ = 0; 934 std::vector<uint8_t> manufactureData_; 935 std::vector<uint8_t> manufactureDataMask_; 936 }; 937 } // namespace bluetooth 938 } // namespace OHOS 939 940 #endif /// BLE_PARCEL_DATA_H 941