97a2c398e2001317b845fd9725ddfe5c289e6312
[senf.git] / Socket / Protocols / DVB / DVBDemuxHandles.hh
1 // $Id$
2 //
3 // Copyright (C) 2007
4 // Fraunhofer Institute for Open Communication Systems (FOKUS) 
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY 
6 //     Thorsten Horstmann <tho@berlios.de>
7 //
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.
12 //
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.
17 //
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.
22
23 /** \file
24     \brief DVBDemuxHandles public header */
25
26 #ifndef HH_DVBDemuxHandles_
27 #define HH_DVBDemuxHandles_ 1
28
29 // Custom includes
30 #include "../../../Socket/FramingPolicy.hh"
31 #include "../../../Socket/CommunicationPolicy.hh"
32 #include "../../../Socket/ReadWritePolicy.hh"
33 #include "../../../Socket/ProtocolClientSocketHandle.hh"
34 #include "DVBDemuxProtocol.hh"
35
36 //#include "DVBDemuxHandles.mpp"
37 ///////////////////////////////hh.p////////////////////////////////////////
38
39 namespace senf {
40
41     /// \addtogroup concrete_protocol_group
42     /// @{
43
44     typedef MakeSocketPolicy<
45         NoAddressingPolicy,
46         DatagramFramingPolicy,
47         UnconnectedCommunicationPolicy,
48         ReadablePolicy,
49         NotWriteablePolicy
50         >::policy DVBDemux_Policy;   ///< Socket Policy for xxxx
51
52     /** \brief xxx
53      */
54     class DVBDemuxSectionProtocol
55         : public ConcreteSocketProtocol<DVBDemux_Policy, DVBDemuxSectionProtocol>,
56           public DVBDemuxProtocol
57     {
58     public:
59         ///////////////////////////////////////////////////////////////////////////
60         // internal interface
61
62         ///\name Constructors
63         ///@{
64
65         void init_client(unsigned short adapter=0, unsigned short device=0) const;       ///< xxx
66                                         /**< \note This member is implicitly called from the
67                                              ProtocolClientSocketHandle::ProtocolClientSocketHandle()
68                                              constructor */
69
70         ///@}
71         ///\name Abstract Interface Implementation
72         ///@{
73         
74         unsigned available() const;
75
76         ///@}
77         
78         void setSectionFilter(struct dmx_sct_filter_params *filter) const;    
79     };
80
81     typedef ProtocolClientSocketHandle<DVBDemuxSectionProtocol> DVBDemuxSectionHandle;
82     
83     // ----------------------------------------------------------------
84     
85     /** \brief xxx
86      */
87     class DVBDemuxPESProtocol
88         : public ConcreteSocketProtocol<DVBDemux_Policy,DVBDemuxPESProtocol>,
89           public DVBDemuxProtocol
90     {
91     public:
92         ///////////////////////////////////////////////////////////////////////////
93         // internal interface
94
95         ///\name Constructors
96         ///@{
97
98         void init_client(unsigned short adapter=0, unsigned short device=0) const;       ///< xxx
99                                         /**< \note This member is implicitly called from the
100                                              ProtocolClientSocketHandle::ProtocolClientSocketHandle()
101                                              constructor */
102
103         ///@}
104         ///\name Abstract Interface Implementation
105         ///@{
106         
107         unsigned available() const;
108
109         ///@}
110         
111         void setPESFilter(struct dmx_pes_filter_params *filter) const;    
112     };
113
114     typedef ProtocolClientSocketHandle<DVBDemuxPESProtocol> DVBDemuxPESHandle;
115
116     
117     // ----------------------------------------------------------------
118     
119     
120     /** \brief xxx
121          */
122     class DVBDvrProtocol
123         : public ConcreteSocketProtocol<DVBDemux_Policy, DVBDvrProtocol>,
124           public DVBDemuxProtocol
125     {
126     public:
127         ///////////////////////////////////////////////////////////////////////////
128         // internal interface
129
130         ///\name Constructors
131         ///@{
132
133         void init_client(unsigned short adapter=0, unsigned short device=0) const;       ///< xxx
134                                         /**< \note This member is implicitly called from the
135                                              ProtocolClientSocketHandle::ProtocolClientSocketHandle()
136                                              constructor */
137
138         ///@}
139         ///\name Abstract Interface Implementation
140         ///@{
141         
142         unsigned available() const;
143
144         ///@}
145      };
146
147      typedef ProtocolClientSocketHandle<DVBDvrProtocol> DVBDvrHandle;
148
149     ///@}
150     
151 }
152
153 ///////////////////////////////hh.e////////////////////////////////////////
154 //#include "DVBDemuxHandles.cci"
155 //#include "DVBDemuxHandles.ct"
156 //#include "DVBDemuxHandles.cti"
157 #endif
158
159 \f
160 // Local Variables:
161 // mode: c++
162 // fill-column: 100
163 // c-file-style: "senf"
164 // indent-tabs-mode: nil
165 // ispell-local-dictionary: "american"
166 // compile-command: "scons -u test"
167 // comment-column: 40
168 // End: