Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1082)

Side by Side Diff: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.h

Issue 1966893003: IDL changes for BLE GATT server support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_ API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_ API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_ API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_ API_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 21 matching lines...) Expand all
32 } 32 }
33 namespace CreateDescriptor { 33 namespace CreateDescriptor {
34 struct Params; 34 struct Params;
35 } 35 }
36 namespace RegisterService { 36 namespace RegisterService {
37 struct Params; 37 struct Params;
38 } 38 }
39 namespace UnregisterService { 39 namespace UnregisterService {
40 struct Params; 40 struct Params;
41 } 41 }
42 namespace NotifyCharacteristicValueChanged {
43 struct Params;
44 }
45 namespace RemoveService {
46 struct Params;
47 }
42 namespace SendRequestResponse { 48 namespace SendRequestResponse {
43 struct Params; 49 struct Params;
44 } 50 }
45 } // namespace bluetooth_low_energy 51 } // namespace bluetooth_low_energy
46 } // namespace api 52 } // namespace api
47 53
48 // The profile-keyed service that manages the bluetoothLowEnergy extension API. 54 // The profile-keyed service that manages the bluetoothLowEnergy extension API.
49 class BluetoothLowEnergyAPI : public BrowserContextKeyedAPI { 55 class BluetoothLowEnergyAPI : public BrowserContextKeyedAPI {
50 public: 56 public:
51 static BrowserContextKeyedAPIFactory<BluetoothLowEnergyAPI>* 57 static BrowserContextKeyedAPIFactory<BluetoothLowEnergyAPI>*
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.createCharacteristic", 511 DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.createCharacteristic",
506 BLUETOOTHLOWENERGY_CREATECHARACTERISTIC); 512 BLUETOOTHLOWENERGY_CREATECHARACTERISTIC);
507 513
508 protected: 514 protected:
509 ~BluetoothLowEnergyCreateCharacteristicFunction() override {} 515 ~BluetoothLowEnergyCreateCharacteristicFunction() override {}
510 516
511 // BluetoothLowEnergyPeripheralExtensionFunction override. 517 // BluetoothLowEnergyPeripheralExtensionFunction override.
512 void DoWork() override; 518 void DoWork() override;
513 }; 519 };
514 520
521 class BluetoothLowEnergyNotifyCharacteristicValueChangedFunction
522 : public BLEPeripheralExtensionFunction<
523 extensions::api::bluetooth_low_energy::
524 NotifyCharacteristicValueChanged::Params> {
525 public:
526 DECLARE_EXTENSION_FUNCTION(
527 "bluetoothLowEnergy.notifyCharacteristicValueChanged",
528 BLUETOOTHLOWENERGY_NOTIFYCHARACTERISTICVALUECHANGED);
529
530 protected:
531 ~BluetoothLowEnergyNotifyCharacteristicValueChangedFunction() override {}
532
533 // BluetoothLowEnergyPeripheralExtensionFunction override.
534 void DoWork() override;
535 };
536
515 class BluetoothLowEnergyCreateDescriptorFunction 537 class BluetoothLowEnergyCreateDescriptorFunction
516 : public BLEPeripheralExtensionFunction< 538 : public BLEPeripheralExtensionFunction<
517 extensions::api::bluetooth_low_energy::CreateDescriptor::Params> { 539 extensions::api::bluetooth_low_energy::CreateDescriptor::Params> {
518 public: 540 public:
519 DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.createDescriptor", 541 DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.createDescriptor",
520 BLUETOOTHLOWENERGY_CREATEDESCRIPTOR); 542 BLUETOOTHLOWENERGY_CREATEDESCRIPTOR);
521 543
522 protected: 544 protected:
523 ~BluetoothLowEnergyCreateDescriptorFunction() override {} 545 ~BluetoothLowEnergyCreateDescriptorFunction() override {}
524 546
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 // BluetoothLowEnergyPeripheralExtensionFunction override. 579 // BluetoothLowEnergyPeripheralExtensionFunction override.
558 void DoWork() override; 580 void DoWork() override;
559 581
560 private: 582 private:
561 // Success and error callbacks, called by 583 // Success and error callbacks, called by
562 // BluetoothLowEnergyEventRouter::RegisterService. 584 // BluetoothLowEnergyEventRouter::RegisterService.
563 void SuccessCallback(); 585 void SuccessCallback();
564 void ErrorCallback(BluetoothLowEnergyEventRouter::Status status); 586 void ErrorCallback(BluetoothLowEnergyEventRouter::Status status);
565 }; 587 };
566 588
589 class BluetoothLowEnergyRemoveServiceFunction
590 : public BLEPeripheralExtensionFunction<
591 extensions::api::bluetooth_low_energy::RemoveService::Params> {
592 public:
593 DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.removeService",
594 BLUETOOTHLOWENERGY_REMOVESERVICE);
595
596 protected:
597 ~BluetoothLowEnergyRemoveServiceFunction() override {}
598
599 // BluetoothLowEnergyPeripheralExtensionFunction override.
600 void DoWork() override;
601 };
602
567 class BluetoothLowEnergySendRequestResponseFunction 603 class BluetoothLowEnergySendRequestResponseFunction
568 : public BLEPeripheralExtensionFunction< 604 : public BLEPeripheralExtensionFunction<
569 extensions::api::bluetooth_low_energy::SendRequestResponse::Params> { 605 extensions::api::bluetooth_low_energy::SendRequestResponse::Params> {
570 public: 606 public:
571 DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.sendRequestResponse", 607 DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.sendRequestResponse",
572 BLUETOOTHLOWENERGY_SENDREQUESTRESPONSE); 608 BLUETOOTHLOWENERGY_SENDREQUESTRESPONSE);
573 609
574 protected: 610 protected:
575 ~BluetoothLowEnergySendRequestResponseFunction() override {} 611 ~BluetoothLowEnergySendRequestResponseFunction() override {}
576 612
577 // BluetoothLowEnergyPeripheralExtensionFunction override. 613 // BluetoothLowEnergyPeripheralExtensionFunction override.
578 void DoWork() override; 614 void DoWork() override;
579 }; 615 };
580 616
581 } // namespace api 617 } // namespace api
582 } // namespace extensions 618 } // namespace extensions
583 619
584 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENER GY_API_H_ 620 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENER GY_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698