blob: 852f3eaeddfc4f5c4f9c2c8a9cf0d722b1c0c5a5 [file] [log] [blame]
Vitaly Buka4615e0d2015-10-14 15:35:12 -07001// Copyright 2015 The Weave Authors. All rights reserved.
Christopher Wileyc900e482015-02-15 15:42:04 -08002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Vitaly Bukac3c6dab2015-10-01 19:41:02 -07005#include <weave/device.h>
Vitaly Buka7b382ac2015-08-03 13:50:01 -07006#include <weave/enum_to_string.h>
Alex Vakulenko4e4dfd42015-08-06 14:01:42 -07007#include <weave/export.h>
Vitaly Bukab055f152015-03-12 13:41:43 -07008
Vitaly Bukab6f015a2015-07-09 14:59:23 -07009namespace weave {
Christopher Wileyc900e482015-02-15 15:42:04 -080010
Vitaly Buka7197c1a2015-07-17 14:48:30 -070011namespace {
12
Vitaly Bukac3c6dab2015-10-01 19:41:02 -070013const EnumToStringMap<GcdState>::Map kMap[] = {
14 {GcdState::kUnconfigured, "unconfigured"},
15 {GcdState::kConnecting, "connecting"},
16 {GcdState::kConnected, "connected"},
17 {GcdState::kInvalidCredentials, "invalid_credentials"},
Vitaly Buka7197c1a2015-07-17 14:48:30 -070018};
19
20} // namespace
21
22template <>
Vitaly Bukac3c6dab2015-10-01 19:41:02 -070023LIBWEAVE_EXPORT EnumToStringMap<GcdState>::EnumToStringMap()
Vitaly Buka7197c1a2015-07-17 14:48:30 -070024 : EnumToStringMap(kMap) {}
Christopher Wileyc900e482015-02-15 15:42:04 -080025
Vitaly Bukab6f015a2015-07-09 14:59:23 -070026} // namespace weave