| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_URIBEACON_URI_ENCODER_H_ | 5 #ifndef DEVICE_BLUETOOTH_URIBEACON_URI_ENCODER_H_ |
| 6 #define DEVICE_BLUETOOTH_URIBEACON_URI_ENCODER_H_ | 6 #define DEVICE_BLUETOOTH_URIBEACON_URI_ENCODER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 #include <vector> | 11 #include <vector> |
| 10 | 12 |
| 11 #include "base/strings/string_piece.h" | 13 #include "base/strings/string_piece.h" |
| 12 | 14 |
| 13 namespace device { | 15 namespace device { |
| 14 | 16 |
| 15 // The following functions EncodeUriBeaconUri() and DecodeUriBeaconUri() helps | 17 // The following functions EncodeUriBeaconUri() and DecodeUriBeaconUri() helps |
| 16 // encoding/decoding URI with the UriBeacon encoding. | 18 // encoding/decoding URI with the UriBeacon encoding. |
| 17 // | 19 // |
| (...skipping 15 matching lines...) Expand all Loading... |
| 33 // specifications. |input| must be ASCII characters. | 35 // specifications. |input| must be ASCII characters. |
| 34 void EncodeUriBeaconUri(const std::string& input, std::vector<uint8_t>& output); | 36 void EncodeUriBeaconUri(const std::string& input, std::vector<uint8_t>& output); |
| 35 | 37 |
| 36 // Decodes the input string using URI encoding described in UriBeacon | 38 // Decodes the input string using URI encoding described in UriBeacon |
| 37 // specifications. | 39 // specifications. |
| 38 void DecodeUriBeaconUri(const std::vector<uint8_t>& input, std::string& output); | 40 void DecodeUriBeaconUri(const std::vector<uint8_t>& input, std::string& output); |
| 39 | 41 |
| 40 } // namespace device | 42 } // namespace device |
| 41 | 43 |
| 42 #endif | 44 #endif |
| OLD | NEW |