[Session restore] Rename group name Enabled to Restore.
[chromium-blink-merge.git] / chromeos / dbus / sms_client.h
blobacc6b7ef5036d644ed7bef470a92e03e1cbeacf5
1 // Copyright (c) 2012 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_SMS_CLIENT_H_
6 #define CHROMEOS_DBUS_SMS_CLIENT_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/callback.h"
12 #include "chromeos/chromeos_export.h"
13 #include "chromeos/dbus/dbus_client.h"
15 namespace base {
16 class DictionaryValue;
19 namespace dbus {
20 class ObjectPath;
23 namespace chromeos {
25 // SMSMessageClient is used to communicate with the
26 // org.freedesktop.ModemManager1.SMS service. All methods should be
27 // called from the origin thread (UI thread) which initializes the
28 // DBusThreadManager instance.
29 class CHROMEOS_EXPORT SMSClient : public DBusClient {
30 public:
31 typedef base::Callback<void(const base::DictionaryValue& sms)> GetAllCallback;
33 ~SMSClient() override;
35 // Factory function, creates a new instance and returns ownership.
36 // For normal usage, access the singleton via DBusThreadManager::Get().
37 static SMSClient* Create();
39 // Calls GetAll method. |callback| is called after the method call succeeds.
40 virtual void GetAll(const std::string& service_name,
41 const dbus::ObjectPath& object_path,
42 const GetAllCallback& callback) = 0;
44 protected:
45 // Create() should be used instead.
46 SMSClient();
48 private:
49 DISALLOW_COPY_AND_ASSIGN(SMSClient);
52 } // namespace chromeos
54 #endif // CHROMEOS_DBUS_SMS_CLIENT_H_