diff options
author | weitaosu@chromium.org <weitaosu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-11 01:01:53 +0000 |
---|---|---|
committer | weitaosu@chromium.org <weitaosu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-11 01:01:53 +0000 |
commit | 350b72fa14390581ad9e7d9487757f53d6d98465 (patch) | |
tree | fbc386fb2d94da6deb352fa75305c07b44f6076a /remoting/host/host_exit_codes.cc | |
parent | 88cfd137fffc5e2cc8ffbf92d6cae6922c2568ad (diff) | |
download | chromium_src-350b72fa14390581ad9e7d9487757f53d6d98465.zip chromium_src-350b72fa14390581ad9e7d9487757f53d6d98465.tar.gz chromium_src-350b72fa14390581ad9e7d9487757f53d6d98465.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
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210731
Review URL: https://chromiumcodereview.appspot.com/18075003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210995 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/host_exit_codes.cc')
-rw-r--r-- | remoting/host/host_exit_codes.cc | 28 |
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 |