OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROMEOS_DBUS_FAKE_NFC_TAG_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_FAKE_NFC_TAG_CLIENT_H_ |
6 #define CHROMEOS_DBUS_FAKE_NFC_TAG_CLIENT_H_ | 6 #define CHROMEOS_DBUS_FAKE_NFC_TAG_CLIENT_H_ |
7 | 7 |
8 #include "base/observer_list.h" | 8 #include "base/observer_list.h" |
9 #include "chromeos/chromeos_export.h" | 9 #include "chromeos/chromeos_export.h" |
10 #include "chromeos/dbus/nfc_client_helpers.h" | 10 #include "chromeos/dbus/nfc_client_helpers.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 // The default simulation timeout interval. | 22 // The default simulation timeout interval. |
23 static const int kDefaultSimulationTimeoutMilliseconds; | 23 static const int kDefaultSimulationTimeoutMilliseconds; |
24 | 24 |
25 struct Properties : public NfcTagClient::Properties { | 25 struct Properties : public NfcTagClient::Properties { |
26 explicit Properties(const PropertyChangedCallback& callback); | 26 explicit Properties(const PropertyChangedCallback& callback); |
27 virtual ~Properties(); | 27 virtual ~Properties(); |
28 | 28 |
29 // dbus::PropertySet overrides. | 29 // dbus::PropertySet overrides. |
30 virtual void Get(dbus::PropertyBase* property, | 30 virtual void Get(dbus::PropertyBase* property, |
31 dbus::PropertySet::GetCallback callback) OVERRIDE; | 31 dbus::PropertySet::GetCallback callback) override; |
32 virtual void GetAll() OVERRIDE; | 32 virtual void GetAll() override; |
33 virtual void Set(dbus::PropertyBase* property, | 33 virtual void Set(dbus::PropertyBase* property, |
34 dbus::PropertySet::SetCallback callback) OVERRIDE; | 34 dbus::PropertySet::SetCallback callback) override; |
35 }; | 35 }; |
36 | 36 |
37 FakeNfcTagClient(); | 37 FakeNfcTagClient(); |
38 virtual ~FakeNfcTagClient(); | 38 virtual ~FakeNfcTagClient(); |
39 | 39 |
40 // NfcTagClient overrides. | 40 // NfcTagClient overrides. |
41 virtual void Init(dbus::Bus* bus) OVERRIDE; | 41 virtual void Init(dbus::Bus* bus) override; |
42 virtual void AddObserver(Observer* observer) OVERRIDE; | 42 virtual void AddObserver(Observer* observer) override; |
43 virtual void RemoveObserver(Observer* observer) OVERRIDE; | 43 virtual void RemoveObserver(Observer* observer) override; |
44 virtual std::vector<dbus::ObjectPath> GetTagsForAdapter( | 44 virtual std::vector<dbus::ObjectPath> GetTagsForAdapter( |
45 const dbus::ObjectPath& adapter_path) OVERRIDE; | 45 const dbus::ObjectPath& adapter_path) override; |
46 virtual Properties* GetProperties( | 46 virtual Properties* GetProperties( |
47 const dbus::ObjectPath& object_path) OVERRIDE; | 47 const dbus::ObjectPath& object_path) override; |
48 virtual void Write( | 48 virtual void Write( |
49 const dbus::ObjectPath& object_path, | 49 const dbus::ObjectPath& object_path, |
50 const base::DictionaryValue& attributes, | 50 const base::DictionaryValue& attributes, |
51 const base::Closure& callback, | 51 const base::Closure& callback, |
52 const nfc_client_helpers::ErrorCallback& error_callback) OVERRIDE; | 52 const nfc_client_helpers::ErrorCallback& error_callback) override; |
53 | 53 |
54 // Simulates the appearance of a tag. The fake tag will show up after | 54 // Simulates the appearance of a tag. The fake tag will show up after |
55 // exactly |visibility_delay| milliseconds. |visibility_delay| must have a | 55 // exactly |visibility_delay| milliseconds. |visibility_delay| must have a |
56 // non-negative value. The side-effects of this method | 56 // non-negative value. The side-effects of this method |
57 // occur asynchronously, i.e. even with an argument of 0, the pairing will not | 57 // occur asynchronously, i.e. even with an argument of 0, the pairing will not |
58 // take place until after this method has returned. | 58 // take place until after this method has returned. |
59 void BeginPairingSimulation(int visibility_delay); | 59 void BeginPairingSimulation(int visibility_delay); |
60 | 60 |
61 // If tag pairing was previously started, simulates the disappearance of | 61 // If tag pairing was previously started, simulates the disappearance of |
62 // the tag. Any tag object presented and their records will disappear | 62 // the tag. Any tag object presented and their records will disappear |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // If non-negative, the tag will disappear this many milliseconds after | 114 // If non-negative, the tag will disappear this many milliseconds after |
115 // its records have been exposed. | 115 // its records have been exposed. |
116 int simulation_timeout_; | 116 int simulation_timeout_; |
117 | 117 |
118 DISALLOW_COPY_AND_ASSIGN(FakeNfcTagClient); | 118 DISALLOW_COPY_AND_ASSIGN(FakeNfcTagClient); |
119 }; | 119 }; |
120 | 120 |
121 } // namespace chromeos | 121 } // namespace chromeos |
122 | 122 |
123 #endif // CHROMEOS_DBUS_FAKE_NFC_TAG_CLIENT_H_ | 123 #endif // CHROMEOS_DBUS_FAKE_NFC_TAG_CLIENT_H_ |
OLD | NEW |