4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Thorsten Horstmann <tho@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief DVBDemuxHandles public header */
26 #ifndef HH_SENF_Socket_Protocols_DVB_DVBDemuxHandles_
27 #define HH_SENF_Socket_Protocols_DVB_DVBDemuxHandles_ 1
30 #include "../../../Socket/FramingPolicy.hh"
31 #include "../../../Socket/CommunicationPolicy.hh"
32 #include "../../../Socket/ReadWritePolicy.hh"
33 #include "../../../Socket/ProtocolClientSocketHandle.hh"
34 #include "DVBDemuxSocketProtocol.hh"
36 //#include "DVBDemuxHandles.mpp"
37 #include <boost/enable_shared_from_this.hpp>
38 #include <boost/shared_ptr.hpp>
40 ///////////////////////////////hh.p////////////////////////////////////////
44 /// \addtogroup concrete_protocol_group
47 typedef MakeSocketPolicy<
49 DatagramFramingPolicy,
50 UnconnectedCommunicationPolicy,
53 >::policy DVBDemux_Policy; ///< Socket Policy for xxxx
57 class DVBPrococolWrapper :public boost::enable_shared_from_this<DVBPrococolWrapper> {
59 DVBPrococolWrapper(){}
60 virtual ~DVBPrococolWrapper(){}
63 class DVBSocketProtocol : public virtual SocketProtocol {
65 boost::shared_ptr<DVBPrococolWrapper> wrap_;
67 DVBSocketProtocol() {}
68 ~DVBSocketProtocol() {}
70 void addWrapper(boost::shared_ptr<DVBPrococolWrapper> wrap) {
75 SocketProtocol::close();
81 class DVBDemuxSectionSocketProtocol
82 : public ConcreteSocketProtocol<DVBDemux_Policy, DVBDemuxSectionSocketProtocol>,
83 public DVBDemuxSocketProtocol,
84 public DVBSocketProtocol
88 ///////////////////////////////////////////////////////////////////////////
94 void init_client(unsigned short adapter=0, unsigned short device=0) const; ///< xxx
95 /**< \note This member is implicitly called from the
96 ProtocolClientSocketHandle::ProtocolClientSocketHandle()
100 ///\name Abstract Interface Implementation
103 unsigned available() const;
107 void setSectionFilter(unsigned short int pid,
108 unsigned char filter= 0x3e,
109 unsigned int flags= DMX_IMMEDIATE_START | DMX_CHECK_CRC,
110 unsigned char mask = 0xff,
111 unsigned char mode =0x00,
112 unsigned int timeout =0x00) const;
116 typedef ProtocolClientSocketHandle<DVBDemuxSectionSocketProtocol> DVBDemuxSectionHandle;
118 // ----------------------------------------------------------------
122 class DVBDemuxPESSocketProtocol
123 : public ConcreteSocketProtocol<DVBDemux_Policy,DVBDemuxPESSocketProtocol>,
124 public DVBDemuxSocketProtocol,
125 public DVBSocketProtocol
128 ///////////////////////////////////////////////////////////////////////////
129 // internal interface
131 ///\name Constructors
134 void init_client(unsigned short adapter=0, unsigned short device=0) const; ///< xxx
135 /**< \note This member is implicitly called from the
136 ProtocolClientSocketHandle::ProtocolClientSocketHandle()
140 ///\name Abstract Interface Implementation
143 unsigned available() const;
147 void setPESFilter(unsigned short int pid, dmx_input_t input, dmx_output_t output, dmx_pes_type_t pesType, unsigned int flags)const;
150 typedef ProtocolClientSocketHandle<DVBDemuxPESSocketProtocol> DVBDemuxPESHandle;
153 // ----------------------------------------------------------------
158 class DVBDvrSocketProtocol
159 : public ConcreteSocketProtocol<DVBDemux_Policy, DVBDvrSocketProtocol>,
160 public DVBDemuxSocketProtocol
163 ///////////////////////////////////////////////////////////////////////////
164 // internal interface
166 ///\name Constructors
169 void init_client(unsigned short adapter=0, unsigned short device=0) const; ///< xxx
170 /**< \note This member is implicitly called from the
171 ProtocolClientSocketHandle::ProtocolClientSocketHandle()
175 ///\name Abstract Interface Implementation
178 unsigned available() const;
183 typedef ProtocolClientSocketHandle<DVBDvrSocketProtocol> DVBDvrHandle;
189 ///////////////////////////////hh.e////////////////////////////////////////
190 //#include "DVBDemuxHandles.cci"
191 //#include "DVBDemuxHandles.ct"
192 //#include "DVBDemuxHandles.cti"
199 // c-file-style: "senf"
200 // indent-tabs-mode: nil
201 // ispell-local-dictionary: "american"
202 // compile-command: "scons -u test"
203 // comment-column: 40