OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROMEOS_DBUS_SMS_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_SMS_CLIENT_H_ |
6 #define CHROMEOS_DBUS_SMS_CLIENT_H_ | 6 #define CHROMEOS_DBUS_SMS_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 // called from the origin thread (UI thread) which initializes the | 28 // called from the origin thread (UI thread) which initializes the |
29 // DBusThreadManager instance. | 29 // DBusThreadManager instance. |
30 class CHROMEOS_EXPORT SMSClient : public DBusClient { | 30 class CHROMEOS_EXPORT SMSClient : public DBusClient { |
31 public: | 31 public: |
32 typedef base::Callback<void(const base::DictionaryValue& sms)> GetAllCallback; | 32 typedef base::Callback<void(const base::DictionaryValue& sms)> GetAllCallback; |
33 | 33 |
34 virtual ~SMSClient(); | 34 virtual ~SMSClient(); |
35 | 35 |
36 // Factory function, creates a new instance and returns ownership. | 36 // Factory function, creates a new instance and returns ownership. |
37 // For normal usage, access the singleton via DBusThreadManager::Get(). | 37 // For normal usage, access the singleton via DBusThreadManager::Get(). |
38 static SMSClient* Create(DBusClientImplementationType type); | 38 static SMSClient* Create(); |
39 | 39 |
40 // Calls GetAll method. |callback| is called after the method call succeeds. | 40 // Calls GetAll method. |callback| is called after the method call succeeds. |
41 virtual void GetAll(const std::string& service_name, | 41 virtual void GetAll(const std::string& service_name, |
42 const dbus::ObjectPath& object_path, | 42 const dbus::ObjectPath& object_path, |
43 const GetAllCallback& callback) = 0; | 43 const GetAllCallback& callback) = 0; |
44 | 44 |
45 protected: | 45 protected: |
46 // Create() should be used instead. | 46 // Create() should be used instead. |
47 SMSClient(); | 47 SMSClient(); |
48 | 48 |
49 private: | 49 private: |
50 DISALLOW_COPY_AND_ASSIGN(SMSClient); | 50 DISALLOW_COPY_AND_ASSIGN(SMSClient); |
51 }; | 51 }; |
52 | 52 |
53 } // namespace chromeos | 53 } // namespace chromeos |
54 | 54 |
55 #endif // CHROMEOS_DBUS_SMS_CLIENT_H_ | 55 #endif // CHROMEOS_DBUS_SMS_CLIENT_H_ |
OLD | NEW |