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.
10 Copyright (C) 2008-2012, 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__
33 class BXEXPORT PppFilter
36 Data m_writeBuf
; // used for 0x7e handling
42 BXLOCAL
const Data
& GetBuffer() const; // not implemented, since
43 // Write can return either m_writeBuf or data, and
44 // so this would be useless and unsafe
46 BXLOCAL
void Filter(Data
&dest
, const Data
&src
, unsigned int destoffset
);
51 bool PppMode() const { return m_ppp_mode
; }
52 const Data
& Write(const Data
&data
);
53 Data
& Write(const Data
&data
, unsigned int prepend
);