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

Side by Side Diff: components/physical_web/eddystone/eddystone_encoder.h

Issue 2731273004: Add Platform Independent Eddystone Encoder (Closed)
Patch Set: Matts Nits Part 2 Created 3 years, 9 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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_PHYSICAL_WEB_EDDYSTONE_EDDYSTONE_ENCODER_H_
6 #define COMPONENTS_PHYSICAL_WEB_EDDYSTONE_EDDYSTONE_ENCODER_H_
7
8 #include <string>
9 #include <vector>
10
11 namespace physical_web {
12 const int kEmptyURL = -1;
13 const int kInvalidURL = -2;
mattreynolds 2017/03/09 23:39:48 In C++, use "Url" when including an initialism in
iankc 2017/03/10 22:28:45 Done.
14 const int kInvalidFormat = -3;
15 const int kNullEncodedUrl = -4;
16 /*
17 * EncodeUrl takes a URL in the form of a std::string and
18 * a pointer to a uint8_t vector to populate with the eddystone
19 * encoding of the URL.
20 * Returns:
21 * kEmptyURL If the URL parameter is empty.
22 * kInvalidURL If the URL parameter is not a valid Url.
23 * kInvalidFormat If the URL parameter is not a standard HTTPS or HTTP URL.
24 * kNullEncodedUrl If the encoded_url vector is NULL.
25 * Length of encoded URL.
26 * Eddystone spec can be found here:
27 * https://github.com/google/eddystone/blob/master/protocol-specification.md
28 */
29 int EncodeUrl(const std::string& url, std::vector<uint8_t>* encoded_url);
30 }
31
32 #endif // COMPONENTS_PHYSICAL_WEB_EDDYSTONE_EDDYSTONE_ENCODER_H_
OLDNEW
« no previous file with comments | « components/physical_web/eddystone/BUILD.gn ('k') | components/physical_web/eddystone/eddystone_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698