iModemList.h
1 #ifndef IMODEMLIST_H_
2 #define IMODEMLIST_H_
3 
4 #include <boost/system/error_code.hpp>
5 #include <list>
6 
7 #include "iModem.h"
8 
9 namespace dpyModem {
10 
16 {
17 public:
21  virtual void listEvent(boost::shared_ptr<IModem> modem, dpyModem::ListEvent event) = 0;
22 
26  virtual ~ListObserver()
27  {
28  }
29 };
30 }
31 
38 {
39 private:
40  std::vector<dpyModem::ListObserver*> mObserversList;
41 protected:
42  virtual ~IModemList();
43 
44  boost::system::error_code subscribe(dpyModem::ListObserver* observer);
45  boost::system::error_code unsubscribe(dpyModem::ListObserver* observer);
46 
47  virtual boost::system::error_code getModems(std::list<boost::shared_ptr<IModem>>& list) = 0;
48 };
49 
50 #endif /* IMODEMLIST_H_ */
Deepsy Modem namespace that includes the different enums, structs or method signatures that should be...
ListEvent
Definition: iModem.h:15
List Observer class.
Definition: iModemList.h:15
virtual ~ListObserver()
Destructor.
Definition: iModemList.h:26
Interface for Modem List.
Definition: iModemList.h:37
virtual void listEvent(boost::shared_ptr< IModem > modem, dpyModem::ListEvent event)=0