diff options
author | jamuraa <jamuraa@chromium.org> | 2014-10-13 12:51:24 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-13 19:52:00 +0000 |
commit | bc2ad7606ae6fcd2d83f30154ea623cedc747cfc (patch) | |
tree | 9ede4b98189d53bffed36852778a3e735fbcdd95 /device | |
parent | 45bf27b1fad3672ac636a57298df085b9d9423a3 (diff) | |
download | chromium_src-bc2ad7606ae6fcd2d83f30154ea623cedc747cfc.zip chromium_src-bc2ad7606ae6fcd2d83f30154ea623cedc747cfc.tar.gz chromium_src-bc2ad7606ae6fcd2d83f30154ea623cedc747cfc.tar.bz2 |
Update constants to MACRO_STYLE
BUG=418696
Review URL: https://codereview.chromium.org/643213002
Cr-Commit-Position: refs/heads/master@{#299349}
Diffstat (limited to 'device')
4 files changed, 37 insertions, 37 deletions
diff --git a/device/bluetooth/bluetooth_gatt_characteristic.h b/device/bluetooth/bluetooth_gatt_characteristic.h index d6140a3..522c3d0 100644 --- a/device/bluetooth/bluetooth_gatt_characteristic.h +++ b/device/bluetooth/bluetooth_gatt_characteristic.h @@ -39,24 +39,24 @@ class BluetoothGattCharacteristic { // Values representing the possible properties of a characteristic, which // define how the characteristic can be used. Each of these properties serve // a role as defined in the Bluetooth Specification. - // |kPropertyExtendedProperties| is a special property that, if present, + // |PROPERTY_EXTENDED_PROPERTIES| is a special property that, if present, // indicates that there is a characteristic descriptor (namely the // "Characteristic Extended Properties Descriptor" with UUID 0x2900) that // contains additional properties pertaining to the characteristic. // The properties "ReliableWrite| and |WriteAuxiliaries| are retrieved from // that characteristic. enum Property { - kPropertyNone = 0, - kPropertyBroadcast = 1 << 0, - kPropertyRead = 1 << 1, - kPropertyWriteWithoutResponse = 1 << 2, - kPropertyWrite = 1 << 3, - kPropertyNotify = 1 << 4, - kPropertyIndicate = 1 << 5, - kPropertyAuthenticatedSignedWrites = 1 << 6, - kPropertyExtendedProperties = 1 << 7, - kPropertyReliableWrite = 1 << 8, - kPropertyWritableAuxiliaries = 1 << 9 + PROPERTY_NONE = 0, + PROPERTY_BROADCAST = 1 << 0, + PROPERTY_READ = 1 << 1, + PROPERTY_WRITE_WITHOUT_RESPONSE = 1 << 2, + PROPERTY_WRITE = 1 << 3, + PROPERTY_NOTIFY = 1 << 4, + PROPERTY_INDICATE = 1 << 5, + PROPERTY_AUTHENTICATED_SIGNED_WRITES = 1 << 6, + PROPERTY_EXTENDED_PROPERTIES = 1 << 7, + PROPERTY_RELIABLE_WRITE = 1 << 8, + PROPERTY_WRITABLE_AUXILIARIES = 1 << 9 }; typedef uint32 Properties; @@ -66,17 +66,17 @@ class BluetoothGattCharacteristic { // value permissions are left up to the higher-level profile. // // Attribute permissions are distinct from the characteristic properties. For - // example, a characteristic may have the property |kPropertyRead| to make + // example, a characteristic may have the property |PROPERTY_READ| to make // clients know that it is possible to read the characteristic value and have - // the permission |kPermissionReadEncrypted| to require a secure connection. + // the permission |PERMISSION_READ_ENCRYPTED| to require a secure connection. // It is up to the application to properly specify the permissions and // properties for a local characteristic. enum Permission { - kPermissionNone = 0, - kPermissionRead = 1 << 0, - kPermissionWrite = 1 << 1, - kPermissionReadEncrypted = 1 << 2, - kPermissionWriteEncrypted = 1 << 3 + PERMISSION_NONE = 0, + PERMISSION_READ = 1 << 0, + PERMISSION_WRITE = 1 << 1, + PERMISSION_READ_ENCRYPTED = 1 << 2, + PERMISSION_WRITE_ENCRYPTED = 1 << 3 }; typedef uint32 Permissions; @@ -106,11 +106,11 @@ class BluetoothGattCharacteristic { // BluetoothGattService instance, in which case the delegate will handle read // and write requests. // - // NOTE: Don't explicitly set |kPropertyExtendedProperties| in |properties|. + // NOTE: Don't explicitly set |PROPERTY_EXTENDED_PROPERTIES| in |properties|. // Instead, create and add a BluetoothGattDescriptor that represents the // "Characteristic Extended Properties" descriptor and this will automatically // set the correspoding bit in the characteristic's properties field. If - // |properties| has |kPropertyExtendedProperties| set, it will be ignored. + // |properties| has |PROPERTY_EXTENDED_PROPERTIES| set, it will be ignored. static BluetoothGattCharacteristic* Create(const BluetoothUUID& uuid, const std::vector<uint8>& value, Properties properties, diff --git a/device/bluetooth/bluetooth_gatt_chromeos_unittest.cc b/device/bluetooth/bluetooth_gatt_chromeos_unittest.cc index 636b467..19f110f 100644 --- a/device/bluetooth/bluetooth_gatt_chromeos_unittest.cc +++ b/device/bluetooth/bluetooth_gatt_chromeos_unittest.cc @@ -1045,19 +1045,19 @@ TEST_F(BluetoothGattChromeOSTest, GattCharacteristicProperties) { BluetoothGattCharacteristic *characteristic = service->GetCharacteristic( fake_bluetooth_gatt_characteristic_client_-> GetBodySensorLocationPath().value()); - EXPECT_EQ(BluetoothGattCharacteristic::kPropertyRead, + EXPECT_EQ(BluetoothGattCharacteristic::PROPERTY_READ, characteristic->GetProperties()); characteristic = service->GetCharacteristic( fake_bluetooth_gatt_characteristic_client_-> GetHeartRateControlPointPath().value()); - EXPECT_EQ(BluetoothGattCharacteristic::kPropertyWrite, + EXPECT_EQ(BluetoothGattCharacteristic::PROPERTY_WRITE, characteristic->GetProperties()); characteristic = service->GetCharacteristic( fake_bluetooth_gatt_characteristic_client_-> GetHeartRateMeasurementPath().value()); - EXPECT_EQ(BluetoothGattCharacteristic::kPropertyNotify, + EXPECT_EQ(BluetoothGattCharacteristic::PROPERTY_NOTIFY, characteristic->GetProperties()); } diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_chromeos.cc b/device/bluetooth/bluetooth_remote_gatt_characteristic_chromeos.cc index f477fa7..13a70ae 100644 --- a/device/bluetooth/bluetooth_remote_gatt_characteristic_chromeos.cc +++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_chromeos.cc @@ -112,31 +112,31 @@ BluetoothRemoteGattCharacteristicChromeOS::GetProperties() const { GetProperties(object_path_); DCHECK(properties); - Properties props = kPropertyNone; + Properties props = PROPERTY_NONE; const std::vector<std::string>& flags = properties->flags.value(); for (std::vector<std::string>::const_iterator iter = flags.begin(); iter != flags.end(); ++iter) { if (*iter == bluetooth_gatt_characteristic::kFlagBroadcast) - props |= kPropertyBroadcast; + props |= PROPERTY_BROADCAST; if (*iter == bluetooth_gatt_characteristic::kFlagRead) - props |= kPropertyRead; + props |= PROPERTY_READ; if (*iter == bluetooth_gatt_characteristic::kFlagWriteWithoutResponse) - props |= kPropertyWriteWithoutResponse; + props |= PROPERTY_WRITE_WITHOUT_RESPONSE; if (*iter == bluetooth_gatt_characteristic::kFlagWrite) - props |= kPropertyWrite; + props |= PROPERTY_WRITE; if (*iter == bluetooth_gatt_characteristic::kFlagNotify) - props |= kPropertyNotify; + props |= PROPERTY_NOTIFY; if (*iter == bluetooth_gatt_characteristic::kFlagIndicate) - props |= kPropertyIndicate; + props |= PROPERTY_INDICATE; if (*iter == bluetooth_gatt_characteristic::kFlagAuthenticatedSignedWrites) - props |= kPropertyAuthenticatedSignedWrites; + props |= PROPERTY_AUTHENTICATED_SIGNED_WRITES; if (*iter == bluetooth_gatt_characteristic::kFlagExtendedProperties) - props |= kPropertyExtendedProperties; + props |= PROPERTY_EXTENDED_PROPERTIES; if (*iter == bluetooth_gatt_characteristic::kFlagReliableWrite) - props |= kPropertyReliableWrite; + props |= PROPERTY_RELIABLE_WRITE; if (*iter == bluetooth_gatt_characteristic::kFlagWritableAuxiliaries) - props |= kPropertyWritableAuxiliaries; + props |= PROPERTY_WRITABLE_AUXILIARIES; } return props; @@ -146,7 +146,7 @@ device::BluetoothGattCharacteristic::Permissions BluetoothRemoteGattCharacteristicChromeOS::GetPermissions() const { // TODO(armansito): Once BlueZ defines the permissions, return the correct // values here. - return kPermissionNone; + return PERMISSION_NONE; } bool BluetoothRemoteGattCharacteristicChromeOS::IsNotifying() const { diff --git a/device/bluetooth/bluetooth_remote_gatt_descriptor_chromeos.cc b/device/bluetooth/bluetooth_remote_gatt_descriptor_chromeos.cc index c4f19a8..82a7f66 100644 --- a/device/bluetooth/bluetooth_remote_gatt_descriptor_chromeos.cc +++ b/device/bluetooth/bluetooth_remote_gatt_descriptor_chromeos.cc @@ -72,7 +72,7 @@ device::BluetoothGattCharacteristic::Permissions BluetoothRemoteGattDescriptorChromeOS::GetPermissions() const { // TODO(armansito): Once BlueZ defines the permissions, return the correct // values here. - return device::BluetoothGattCharacteristic::kPermissionNone; + return device::BluetoothGattCharacteristic::PERMISSION_NONE; } void BluetoothRemoteGattDescriptorChromeOS::ReadRemoteDescriptor( |