Index: chromeos/dbus/modem_messaging_client.h |
diff --git a/chromeos/dbus/gsm_sms_client.h b/chromeos/dbus/modem_messaging_client.h |
similarity index 61% |
copy from chromeos/dbus/gsm_sms_client.h |
copy to chromeos/dbus/modem_messaging_client.h |
index 537b4e463f118a61ebb4921cabbd1018fa863e3e..45227070387572e859db767696d34e667dbbb0c5 100644 |
--- a/chromeos/dbus/gsm_sms_client.h |
+++ b/chromeos/dbus/modem_messaging_client.h |
@@ -2,22 +2,18 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROMEOS_DBUS_GSM_SMS_CLIENT_H_ |
-#define CHROMEOS_DBUS_GSM_SMS_CLIENT_H_ |
+#ifndef CHROMEOS_DBUS_MODEM_MESSAGING_CLIENT_H_ |
+#define CHROMEOS_DBUS_MODEM_MESSAGING_CLIENT_H_ |
#pragma once |
#include <string> |
+#include <vector> |
#include "base/basictypes.h" |
#include "base/callback.h" |
#include "chromeos/chromeos_export.h" |
#include "chromeos/dbus/dbus_client_implementation_type.h" |
-namespace base { |
-class DictionaryValue; |
-class ListValue; |
-} |
- |
namespace dbus { |
class Bus; |
class ObjectPath; |
@@ -25,45 +21,40 @@ class ObjectPath; |
namespace chromeos { |
-// GsmSMSClient is used to communicate with |
-// org.freedesktop.ModemManager.Modem.Gsm.SMS service. |
-// All methods should be called from the origin thread (UI thread) which |
+// ModemMessagingClient is used to communicate with the |
+// org.freedesktop.ModemManager1.Modem.Messaging service. All methods |
+// should be called from the origin thread (UI thread) which |
// initializes the DBusThreadManager instance. |
-class CHROMEOS_EXPORT GsmSMSClient { |
+class CHROMEOS_EXPORT ModemMessagingClient { |
public: |
- typedef base::Callback<void(uint32 index, bool complete)> SmsReceivedHandler; |
typedef base::Callback<void()> DeleteCallback; |
- typedef base::Callback<void(const base::DictionaryValue& sms)> GetCallback; |
- typedef base::Callback<void(const base::ListValue& result)> ListCallback; |
+ typedef base::Callback<void(const dbus::ObjectPath& message_path, |
+ bool complete)> SmsReceivedHandler; |
+ typedef base::Callback<void(const std::vector<dbus::ObjectPath>& paths)> |
+ ListCallback; |
- virtual ~GsmSMSClient(); |
+ virtual ~ModemMessagingClient(); |
// Factory function, creates a new instance and returns ownership. |
// For normal usage, access the singleton via DBusThreadManager::Get(). |
- static GsmSMSClient* Create(DBusClientImplementationType type, |
- dbus::Bus* bus); |
+ static ModemMessagingClient* Create(DBusClientImplementationType type, |
+ dbus::Bus* bus); |
- // Sets DataPlansUpdate signal handler. |
+ // Sets SmsReceived signal handler. |
virtual void SetSmsReceivedHandler(const std::string& service_name, |
const dbus::ObjectPath& object_path, |
const SmsReceivedHandler& handler) = 0; |
- // Resets DataPlansUpdate signal handler. |
+ // Resets SmsReceived signal handler. |
virtual void ResetSmsReceivedHandler(const std::string& service_name, |
const dbus::ObjectPath& object_path) = 0; |
// Calls Delete method. |callback| is called after the method call succeeds. |
virtual void Delete(const std::string& service_name, |
const dbus::ObjectPath& object_path, |
- uint32 index, |
+ const dbus::ObjectPath& sms_path, |
const DeleteCallback& callback) = 0; |
- // Calls Get method. |callback| is called after the method call succeeds. |
- virtual void Get(const std::string& service_name, |
- const dbus::ObjectPath& object_path, |
- uint32 index, |
- const GetCallback& callback) = 0; |
- |
// Calls List method. |callback| is called after the method call succeeds. |
virtual void List(const std::string& service_name, |
const dbus::ObjectPath& object_path, |
@@ -76,12 +67,12 @@ class CHROMEOS_EXPORT GsmSMSClient { |
protected: |
// Create() should be used instead. |
- GsmSMSClient(); |
+ ModemMessagingClient(); |
private: |
- DISALLOW_COPY_AND_ASSIGN(GsmSMSClient); |
+ DISALLOW_COPY_AND_ASSIGN(ModemMessagingClient); |
}; |
} // namespace chromeos |
-#endif // CHROMEOS_DBUS_GSM_SMS_CLIENT_H_ |
+#endif // CHROMEOS_DBUS_MODEM_MESSAGING_CLIENT_H_ |