1 // Copyright 2014 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.
5 #ifndef COMPONENTS_PROXIMITY_AUTH_REMOTE_STATUS_UPDATE_H
6 #define COMPONENTS_PROXIMITY_AUTH_REMOTE_STATUS_UPDATE_H
8 #include "base/memory/scoped_ptr.h"
11 class DictionaryValue
;
14 namespace proximity_auth
{
16 // Corresponds to the possible values for the 'user_presence' status update
21 USER_PRESENCE_UNKNOWN
,
24 // Corresponds to the possible values for the 'secure_screen_lock' status update
26 enum SecureScreenLockState
{
27 SECURE_SCREEN_LOCK_ENABLED
,
28 SECURE_SCREEN_LOCK_DISABLED
,
29 SECURE_SCREEN_LOCK_STATE_UNKNOWN
,
32 // Corresponds to the possible values for the 'trust_agent' status update field.
33 enum TrustAgentState
{
36 TRUST_AGENT_UNSUPPORTED
,
39 // Represents a 'status_update' message received from the remote device.
40 struct RemoteStatusUpdate
{
41 // Parses a dictionary value into a RemoteStatusUpdate. Returns a null pointer
42 // if the serialized dictionary value is not valid.
43 static scoped_ptr
<RemoteStatusUpdate
> Deserialize(
44 const base::DictionaryValue
& serialized_value
);
46 UserPresence user_presence
;
47 SecureScreenLockState secure_screen_lock_state
;
48 TrustAgentState trust_agent_state
;
51 } // namespace proximity_auth
53 #endif // COMPONENTS_PROXIMITY_AUTH_REMOTE_STATUS_UPDATE_H