From b3ae55ed10733d353a6a2c0ce6ee01caf063d5e3 Mon Sep 17 00:00:00 2001 From: Chris Frey Date: Thu, 15 May 2008 17:56:21 -0400 Subject: [PATCH] Added pure virtual Modem base class Added pure virtual Modem base class for common modem-oriented API in m_ipmodem.h and m_serial.h (only Open and Write so far) --- ChangeLog | 2 ++ src/Makefile.am | 1 + src/modem.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 src/modem.h diff --git a/ChangeLog b/ChangeLog index bee22f14..e89768b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ Release: version 0.13 - 2008/05/?? copying, and clarified why there is no GetBuffer() - added ProbeResult::HasIpModem() to determine whether IpModem endpoints are available + - added pure virtual Modem base class for common + modem-oriented API (only Open and Write so far) 2008/05/10 - modified the planned version numbering scheme in doc/VersionNotes, so that a 1.0 is possible, with 1.50 as the devel series diff --git a/src/Makefile.am b/src/Makefile.am index ce41271c..512f20b0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -76,6 +76,7 @@ include_barry_HEADERS = barry.h \ probe.h \ protocol.h \ record.h \ + modem.h \ r_calendar.h \ r_contact.h \ r_folder.h \ diff --git a/src/modem.h b/src/modem.h new file mode 100644 index 00000000..aee2715f --- /dev/null +++ b/src/modem.h @@ -0,0 +1,44 @@ +/// +/// \file modem.h +/// Modem API base class for the various serial/modem +/// modes available on the Blackberry. +/// + +/* + Copyright (C) 2008, Net Direct Inc. (http://www.netdirect.ca/) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the GNU General Public License in the COPYING file at the + root directory of this project for more details. +*/ + +#ifndef __BARRY_MODEM_H__ +#define __BARRY_MODEM_H__ + +#include "dll.h" + +namespace Barry { + +class Data; + +class BXEXPORT Modem +{ +public: + virtual ~Modem() {} + + virtual void Open(const char *password = 0) = 0; + virtual void Write(const Data &data, int timeout = -1) = 0; +}; + +} + +#endif + -- 2.11.4.GIT