| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 DEVICE_BLUETOOTH_BLUETOOTH_UTILS_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_UTILS_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_UTILS_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_UTILS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 // Permit sufficient comparison to allow a UUID to be used as a key in a | 68 // Permit sufficient comparison to allow a UUID to be used as a key in a |
| 69 // std::map. | 69 // std::map. |
| 70 bool operator<(const UUID& uuid) const; | 70 bool operator<(const UUID& uuid) const; |
| 71 | 71 |
| 72 // Equality operators. | 72 // Equality operators. |
| 73 bool operator==(const UUID& uuid) const; | 73 bool operator==(const UUID& uuid) const; |
| 74 bool operator!=(const UUID& uuid) const; | 74 bool operator!=(const UUID& uuid) const; |
| 75 | 75 |
| 76 private: | 76 private: |
| 77 UUID(); | |
| 78 | |
| 79 // String representation of the UUID that was used during construction. For | 77 // String representation of the UUID that was used during construction. For |
| 80 // the supported sizes, this representation can have the following formats: | 78 // the supported sizes, this representation can have the following formats: |
| 81 // - 16 bit: XXXX | 79 // - 16 bit: XXXX |
| 82 // - 32 bit: XXXXXXXX | 80 // - 32 bit: XXXXXXXX |
| 83 // - 128 bit: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | 81 // - 128 bit: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
| 84 Format format_; | 82 Format format_; |
| 85 std::string value_; | 83 std::string value_; |
| 86 | 84 |
| 87 // The 128-bit string representation of the UUID. | 85 // The 128-bit string representation of the UUID. |
| 88 std::string canonical_value_; | 86 std::string canonical_value_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 99 // 0xXXXX | 97 // 0xXXXX |
| 100 // XXXXXXXX | 98 // XXXXXXXX |
| 101 // 0xXXXXXXXX | 99 // 0xXXXXXXXX |
| 102 // XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | 100 // XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
| 103 std::string CanonicalUuid(std::string uuid); | 101 std::string CanonicalUuid(std::string uuid); |
| 104 | 102 |
| 105 } // namespace bluetooth_utils | 103 } // namespace bluetooth_utils |
| 106 } // namespace device | 104 } // namespace device |
| 107 | 105 |
| 108 #endif // DEVICE_BLUETOOTH_BLUETOOTH_UTILS_H_ | 106 #endif // DEVICE_BLUETOOTH_BLUETOOTH_UTILS_H_ |
| OLD | NEW |