Moved PPP filter logic into its own class
[barry.git] / src / pppfilter.h
blobfa3fdce00f7a35c9b2a9ebf2d461491b2d6b05c1
1 ///
2 /// \file pppfilter.h
3 /// Data filter class, to morph PPP data into something that
4 /// the Blackberry / Rogers / ISP can handle.
5 /// This logic is based partly on XmBlackBerry's
6 /// gprs_protocol_fix.c program.
7 ///
9 /*
10 Copyright (C) 2008, Net Direct Inc. (http://www.netdirect.ca/)
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 See the GNU General Public License in the COPYING file at the
22 root directory of this project for more details.
25 #ifndef __BARRY_M_PPPFILTER_H__
26 #define __BARRY_M_PPPFILTER_H__
28 #include "dll.h"
29 #include "data.h"
31 namespace Barry {
33 class BXEXPORT PppFilter
35 private:
36 Data m_writeBuf; // used for 0x7e handling
38 // write flags
39 bool m_ppp_mode;
40 unsigned char m_last;
42 public:
43 PppFilter();
44 const Data& Write(const Data &data);
47 } // namespace Barry
49 #endif