summaryrefslogtreecommitdiffstats
path: root/remoting/host/host_exit_codes.cc
diff options
context:
space:
mode:
authorweitaosu@chromium.org <weitaosu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-10 03:57:06 +0000
committerweitaosu@chromium.org <weitaosu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-10 03:57:06 +0000
commit929fb4e415bec4565b9eea7254f5ac019c7648b5 (patch)
tree6eaf066b57413f021ebc2fdaaf35abf494721a8b /remoting/host/host_exit_codes.cc
parent47b37a6c0e164891bfa3993687cd3cc3edd113c6 (diff)
downloadchromium_src-929fb4e415bec4565b9eea7254f5ac019c7648b5.zip
chromium_src-929fb4e415bec4565b9eea7254f5ac019c7648b5.tar.gz
chromium_src-929fb4e415bec4565b9eea7254f5ac019c7648b5.tar.bz2
Host offline status reporting.
This is change #1 of the Host offline status reporting work: 1. Define the structure of the offline status message. 2. The host sends the offline status message if the underlying XMPP connection is live. BUG=247245 Review URL: https://chromiumcodereview.appspot.com/18075003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210731 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/host_exit_codes.cc')
-rw-r--r--remoting/host/host_exit_codes.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/remoting/host/host_exit_codes.cc b/remoting/host/host_exit_codes.cc
new file mode 100644
index 0000000..4e206a5
--- /dev/null
+++ b/remoting/host/host_exit_codes.cc
@@ -0,0 +1,28 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "remoting/host/host_exit_codes.h"
+
+#include "remoting/protocol/name_value_map.h"
+
+using remoting::protocol::NameMapElement;
+
+namespace remoting {
+
+const NameMapElement<HostExitCodes> kHostExitCodeStrings[] = {
+ { kSuccessExitCode, "SUCCESS_EXIT" },
+ { kInitializationFailed, "INITIALIZATION_FAILED" },
+ { kInvalidHostConfigurationExitCode, "INVALID_HOST_CONFIGURATION" },
+ { kInvalidHostIdExitCode, "INVALID_HOST_ID" },
+ { kInvalidOauthCredentialsExitCode, "INVALID_OAUTH_CREDENTIALS" },
+ { kInvalidHostDomainExitCode, "INVALID_HOST_DOMAIN" },
+ { kLoginScreenNotSupportedExitCode, "LOGIN_SCREEN_NOT_SUPPORTED" },
+ { kUsernameMismatchExitCode, "USERNAME_MISMATCH" },
+};
+
+const char* ExitCodeToString(HostExitCodes exit_code) {
+ return ValueToName(kHostExitCodeStrings, exit_code);
+}
+
+} // namespace remoting