Packets: Completely restructured #includes, introduced central Packets.hh file
[senf.git] / Socket / DVBDemuxProtocol.cc
1 // $Id: DVBProtocol.cc 321 2007-07-19 09:00:23Z tho $
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 xxx
25  */
26
27 #include "DVBDemuxProtocol.hh"
28 //#include "DVBDemuxProtocol.ih"
29
30 // Custom includes
31 #include <sys/socket.h>
32 #include <iostream>
33 #include <string>
34 #include <sys/ioctl.h>
35 #include <linux/sockios.h>
36 #include "SocketHandle.hh"
37
38 //#include "DVBDemuxProtocol.mpp"
39 #define prefix_
40 ///////////////////////////////cc.p////////////////////////////////////////
41
42
43
44 prefix_ void senf::DVBDemuxProtocol::setBufferSize(unsigned long size)
45     const
46 {
47     if (::ioctl(body().fd(), DMX_SET_BUFFER_SIZE, size) < 0)
48         throw SystemException(errno);
49 }
50
51 prefix_ void senf::DVBDemuxProtocol::startFiltering()
52     const
53 {
54     if (::ioctl(body().fd(), DMX_START) < 0)
55         throw SystemException(errno);
56 }
57
58 prefix_ void senf::DVBDemuxProtocol::stopFiltering()
59     const
60 {
61     if (::ioctl(body().fd(), DMX_STOP) < 0)
62         throw SystemException(errno);
63 }
64
65 prefix_ bool senf::DVBDemuxProtocol::eof()
66     const
67 {
68     return false;
69 }
70
71 ///////////////////////////////cc.e////////////////////////////////////////
72 #undef prefix_
73 //#include "DVBDemuxProtocol.mpp"
74
75 \f
76 // Local Variables:
77 // mode: c++
78 // fill-column: 100
79 // c-file-style: "senf"
80 // indent-tabs-mode: nil
81 // ispell-local-dictionary: "american"
82 // compile-command: "scons -u test"
83 // comment-column: 40
84 // End: