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_
10 #include "base/basictypes.h"
11 #include "base/callback.h"
12 #include "chromeos/chromeos_export.h"
13 #include "chromeos/dbus/dbus_client.h"
16 class DictionaryValue
;
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
{
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;
45 // Create() should be used instead.
49 DISALLOW_COPY_AND_ASSIGN(SMSClient
);
52 } // namespace chromeos
54 #endif // CHROMEOS_DBUS_SMS_CLIENT_H_