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
3 // found in the LICENSE file.
5 #ifndef CHROMEOS_DBUS_FAKE_NFC_DEVICE_CLIENT_H_
6 #define CHROMEOS_DBUS_FAKE_NFC_DEVICE_CLIENT_H_
8 #include "chromeos/chromeos_export.h"
9 #include "chromeos/dbus/nfc_client_helpers.h"
10 #include "chromeos/dbus/nfc_device_client.h"
14 // FakeNfcDeviceClient simulates the behavior of the NFC device objects
15 // and is used both in test cases in place of a mock and on the Linux desktop.
16 // TODO(armansito): For now, this doesn't do anything. Implement fake
17 // behavior in conjunction with unit tests while implementing the src/device
19 class CHROMEOS_EXPORT FakeNfcDeviceClient : public NfcDeviceClient {
21 struct Properties : public NfcDeviceClient::Properties {
22 explicit Properties(const PropertyChangedCallback& callback);
23 virtual ~Properties();
25 // dbus::PropertySet overrides.
26 virtual void Get(dbus::PropertyBase* property,
27 dbus::PropertySet::GetCallback callback) OVERRIDE;
28 virtual void GetAll() OVERRIDE;
29 virtual void Set(dbus::PropertyBase* property,
30 dbus::PropertySet::SetCallback callback) OVERRIDE;
33 FakeNfcDeviceClient();
34 virtual ~FakeNfcDeviceClient();
36 // NfcDeviceClient overrides.
37 virtual void Init(dbus::Bus* bus) OVERRIDE;
38 virtual void AddObserver(Observer* observer) OVERRIDE;
39 virtual void RemoveObserver(Observer* observer) OVERRIDE;
40 virtual Properties* GetProperties(
41 const dbus::ObjectPath& object_path) OVERRIDE;
43 const dbus::ObjectPath& object_path,
44 const std::map<std::string, std::string>& attributes,
45 const base::Closure& callback,
46 const nfc_client_helpers::ErrorCallback& error_callback) OVERRIDE;
49 DISALLOW_COPY_AND_ASSIGN(FakeNfcDeviceClient);
52 } // namespace chromeos
54 #endif // CHROMEOS_DBUS_FAKE_NFC_DEVICE_CLIENT_H_