Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: chromeos/dbus/gsm_sms_client.cc

Issue 10533006: Support the ModemManager1 interfaces for SMS messages (Closed) Base URL: http://git.chromium.org/git/chromium/src@master
Patch Set: Only deliver messages after call to RequestUpdate Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "chromeos/dbus/gsm_sms_client.h" 4 #include "chromeos/dbus/gsm_sms_client.h"
5 5
6 #include <map>
7 #include <utility>
8 #include <vector>
9
6 #include "base/bind.h" 10 #include "base/bind.h"
7 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
8 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop.h" 13 #include "base/message_loop.h"
10 #include "base/stringprintf.h" 14 #include "base/stringprintf.h"
11 #include "base/stl_util.h" 15 #include "base/stl_util.h"
12 #include "base/values.h" 16 #include "base/values.h"
13 #include "dbus/bus.h" 17 #include "dbus/bus.h"
14 #include "dbus/message.h" 18 #include "dbus/message.h"
15 #include "dbus/object_proxy.h" 19 #include "dbus/object_proxy.h"
16 #include "dbus/values_util.h" 20 #include "dbus/values_util.h"
17 #include "third_party/cros_system_api/dbus/service_constants.h" 21 #include "third_party/cros_system_api/dbus/service_constants.h"
18 22
19 namespace chromeos { 23 namespace chromeos {
20 24
21 namespace { 25 namespace {
22 26
23 // A class actually making method calls for SMS services, used by 27 // A class actually making method calls for SMS services, used by
24 // GsmSMSClietnImpl. 28 // GsmSMSClientImpl.
25 class SMSProxy { 29 class SMSProxy {
26 public: 30 public:
27 typedef GsmSMSClient::SmsReceivedHandler SmsReceivedHandler; 31 typedef GsmSMSClient::SmsReceivedHandler SmsReceivedHandler;
28 typedef GsmSMSClient::DeleteCallback DeleteCallback; 32 typedef GsmSMSClient::DeleteCallback DeleteCallback;
29 typedef GsmSMSClient::GetCallback GetCallback; 33 typedef GsmSMSClient::GetCallback GetCallback;
30 typedef GsmSMSClient::ListCallback ListCallback; 34 typedef GsmSMSClient::ListCallback ListCallback;
31 35
32 SMSProxy(dbus::Bus* bus, 36 SMSProxy(dbus::Bus* bus,
33 const std::string& service_name, 37 const std::string& service_name,
34 const dbus::ObjectPath& object_path) 38 const dbus::ObjectPath& object_path)
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 // static 357 // static
354 GsmSMSClient* GsmSMSClient::Create(DBusClientImplementationType type, 358 GsmSMSClient* GsmSMSClient::Create(DBusClientImplementationType type,
355 dbus::Bus* bus) { 359 dbus::Bus* bus) {
356 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) 360 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION)
357 return new GsmSMSClientImpl(bus); 361 return new GsmSMSClientImpl(bus);
358 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); 362 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type);
359 return new GsmSMSClientStubImpl(); 363 return new GsmSMSClientStubImpl();
360 } 364 }
361 365
362 } // namespace chromeos 366 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698