- add sources.
[platform/framework/web/crosswalk.git] / src / chromeos / dbus / fake_nfc_device_client.h
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.
4
5 #ifndef CHROMEOS_DBUS_FAKE_NFC_DEVICE_CLIENT_H_
6 #define CHROMEOS_DBUS_FAKE_NFC_DEVICE_CLIENT_H_
7
8 #include "chromeos/chromeos_export.h"
9 #include "chromeos/dbus/nfc_client_helpers.h"
10 #include "chromeos/dbus/nfc_device_client.h"
11
12 namespace chromeos {
13
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
18 // layer.
19 class CHROMEOS_EXPORT FakeNfcDeviceClient : public NfcDeviceClient {
20  public:
21   struct Properties : public NfcDeviceClient::Properties {
22     explicit Properties(const PropertyChangedCallback& callback);
23     virtual ~Properties();
24
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;
31   };
32
33   FakeNfcDeviceClient();
34   virtual ~FakeNfcDeviceClient();
35
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;
42   virtual void Push(
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;
47
48  private:
49   DISALLOW_COPY_AND_ASSIGN(FakeNfcDeviceClient);
50 };
51
52 }  // namespace chromeos
53
54 #endif  // CHROMEOS_DBUS_FAKE_NFC_DEVICE_CLIENT_H_