Move include files in debian packge into 'senf' subdirectory
[senf.git] / Socket / Protocols / DVB / DVBFrontendHandle.cc
index 0799ec3..a90eca4 100644 (file)
@@ -3,7 +3,7 @@
 // Copyright (C) 2007
 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-//     Stefan Bund <stefan.bund@fokus.fraunhofer.de>
+//     Thorsten Horstmann <thorsten.horstmann@fokus.fraunhofer.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
 //#include "DVBFrontendHandle.ih"
 
 // Custom includes
-#include <sys/types.h>
+#include <boost/format.hpp>
 #include <sys/socket.h>
-#include <iostream>
-#include <string>
 #include <sys/ioctl.h>
-#include <linux/sockios.h>
-#include <stdio.h>
 #include <fcntl.h>
-#include "Socket/SocketHandle.hh"
-
-#include "Utils/Exception.hh"
+#include "../../../Utils/Exception.hh"
 
 //#include "DVBFrontendHandle.mpp"
 #define prefix_
 ///////////////////////////////////////////////////////////////////////////
 // senf::DVBFrontendHandle
 
-prefix_ void senf::DVBFrontendProtocol::init_client()
+prefix_ void senf::DVBFrontendProtocol::init_client(uint8_t adapter, boost::uint8_t device)
     const
 {
-    int fd = open("/dev/dvb/adapter0/frontend0", O_RDONLY | O_NONBLOCK);
+    std::string devFrontend = str( boost::format(
+            "/dev/dvb/adapter%d/frontend%d") % adapter % device);
+    int fd = open(devFrontend.c_str(), O_RDONLY | O_NONBLOCK);
     if (fd < 0)
         throw SystemException(errno);
     body().fd(fd);