Fix a type mismatch on Windows caused by r201738.
[chromium-blink-merge.git] / chromeos / dbus / sms_client.h
blobf405bad8bdfcd71e22f2b2d160f02a39f339be1d
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_implementation_type.h"
15 namespace base {
16 class DictionaryValue;
19 namespace dbus {
20 class Bus;
21 class ObjectPath;
24 namespace chromeos {
26 // SMSMessageClient is used to communicate with the
27 // org.freedesktop.ModemManager1.SMS service. All methods should be
28 // called from the origin thread (UI thread) which initializes the
29 // DBusThreadManager instance.
30 class CHROMEOS_EXPORT SMSClient {
31 public:
32 typedef base::Callback<void(const base::DictionaryValue& sms)> GetAllCallback;
34 virtual ~SMSClient();
36 // Factory function, creates a new instance and returns ownership.
37 // For normal usage, access the singleton via DBusThreadManager::Get().
38 static SMSClient* Create(DBusClientImplementationType type,
39 dbus::Bus* bus);
41 // Calls GetAll method. |callback| is called after the method call succeeds.
42 virtual void GetAll(const std::string& service_name,
43 const dbus::ObjectPath& object_path,
44 const GetAllCallback& callback) = 0;
46 protected:
47 // Create() should be used instead.
48 SMSClient();
50 private:
51 DISALLOW_COPY_AND_ASSIGN(SMSClient);
54 } // namespace chromeos
56 #endif // CHROMEOS_DBUS_SMS_CLIENT_H_