C++程序  |  37行  |  996 B

// 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.

#ifndef CHROMEOS_DBUS_FAKE_SMS_CLIENT_H_
#define CHROMEOS_DBUS_FAKE_SMS_CLIENT_H_

#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
#include "chromeos/dbus/sms_client.h"

namespace chromeos {

class FakeSMSClient : public SMSClient {
 public:
  FakeSMSClient();
  virtual ~FakeSMSClient();

  virtual void Init(dbus::Bus* bus) OVERRIDE;

  virtual void GetAll(const std::string& service_name,
                      const dbus::ObjectPath& object_path,
                      const GetAllCallback& callback) OVERRIDE;

 private:
  void OnGetAll(base::DictionaryValue* sms, const GetAllCallback& callback);

  base::WeakPtrFactory<FakeSMSClient> weak_ptr_factory_;

  DISALLOW_COPY_AND_ASSIGN(FakeSMSClient);
};

}  // namespace chromeos

#endif  // CHROMEOS_DBUS_FAKE_SMS_CLIENT_H_