1 // Copyright (c) 2011 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 CHROME_BROWSER_CHROMEOS_SMS_OBSERVER_H_
6 #define CHROME_BROWSER_CHROMEOS_SMS_OBSERVER_H_
12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h"
14 #include "chrome/browser/chromeos/cros/network_library.h"
23 // Performs monitoring of incoming SMS and shows system notifications.
24 class SmsObserver
: public NetworkLibrary::NetworkManagerObserver
{
26 explicit SmsObserver(Profile
* profile
);
27 virtual ~SmsObserver();
30 typedef std::map
<std::string
, SMSHandler
*> ObserversMap
;
32 // NetworkLibrary:NetworkManagerObserver implementation:
33 virtual void OnNetworkManagerChanged(NetworkLibrary
* obj
) OVERRIDE
;
35 static void StaticCallback(void* object
,
36 const char* modem_device_path
,
39 void OnNewMessage(const char* modem_device_path
, const SMS
* message
);
41 void UpdateObservers(NetworkLibrary
* library
);
45 ObserversMap observers_
;
47 DISALLOW_COPY_AND_ASSIGN(SmsObserver
);
50 } // namespace chromeos
52 #endif // CHROME_BROWSER_CHROMEOS_SMS_OBSERVER_H_