Vitaly Buka | 4615e0d | 2015-10-14 15:35:12 -0700 | [diff] [blame] | 1 | // Copyright 2015 The Weave Authors. All rights reserved. |
Christopher Wiley | c900e48 | 2015-02-15 15:42:04 -0800 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Vitaly Buka | c3c6dab | 2015-10-01 19:41:02 -0700 | [diff] [blame] | 5 | #include <weave/device.h> |
Vitaly Buka | 7b382ac | 2015-08-03 13:50:01 -0700 | [diff] [blame] | 6 | #include <weave/enum_to_string.h> |
Alex Vakulenko | 4e4dfd4 | 2015-08-06 14:01:42 -0700 | [diff] [blame] | 7 | #include <weave/export.h> |
Vitaly Buka | b055f15 | 2015-03-12 13:41:43 -0700 | [diff] [blame] | 8 | |
Vitaly Buka | b6f015a | 2015-07-09 14:59:23 -0700 | [diff] [blame] | 9 | namespace weave { |
Christopher Wiley | c900e48 | 2015-02-15 15:42:04 -0800 | [diff] [blame] | 10 | |
Vitaly Buka | 7197c1a | 2015-07-17 14:48:30 -0700 | [diff] [blame] | 11 | namespace { |
| 12 | |
Vitaly Buka | c3c6dab | 2015-10-01 19:41:02 -0700 | [diff] [blame] | 13 | const EnumToStringMap<GcdState>::Map kMap[] = { |
| 14 | {GcdState::kUnconfigured, "unconfigured"}, |
| 15 | {GcdState::kConnecting, "connecting"}, |
| 16 | {GcdState::kConnected, "connected"}, |
| 17 | {GcdState::kInvalidCredentials, "invalid_credentials"}, |
Vitaly Buka | 7197c1a | 2015-07-17 14:48:30 -0700 | [diff] [blame] | 18 | }; |
| 19 | |
| 20 | } // namespace |
| 21 | |
| 22 | template <> |
Vitaly Buka | c3c6dab | 2015-10-01 19:41:02 -0700 | [diff] [blame] | 23 | LIBWEAVE_EXPORT EnumToStringMap<GcdState>::EnumToStringMap() |
Vitaly Buka | 7197c1a | 2015-07-17 14:48:30 -0700 | [diff] [blame] | 24 | : EnumToStringMap(kMap) {} |
Christopher Wiley | c900e48 | 2015-02-15 15:42:04 -0800 | [diff] [blame] | 25 | |
Vitaly Buka | b6f015a | 2015-07-09 14:59:23 -0700 | [diff] [blame] | 26 | } // namespace weave |