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