X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FFileHandle.cci;h=4ace14c3be2921d9fda8659b5a3b7fc8cd6e1fb2;hb=c778649a04a9835ecaad9108b9613832d76c2d15;hp=62b93049e743d0cfc20a904128671bbf05560c8a;hpb=34378cabd0ef59515f60b8e535d50fd5488c84e2;p=senf.git diff --git a/Socket/FileHandle.cci b/Socket/FileHandle.cci index 62b9304..4ace14c 100644 --- a/Socket/FileHandle.cci +++ b/Socket/FileHandle.cci @@ -1,9 +1,9 @@ // $Id$ // // Copyright (C) 2006 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) -// Stefan Bund +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Stefan Bund // // 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 @@ -27,6 +27,7 @@ //#include "FileHandle.ih" // Custom includes +#include "../Utils/senfassert.hh" #include #include "../Utils/Exception.hh" @@ -67,6 +68,11 @@ prefix_ void senf::FileBody::terminate() } } +prefix_ senf::FileHandle senf::FileBody::handle() +{ + return FileHandle(ptr(this)); +} + prefix_ int senf::FileBody::fd() const { @@ -194,16 +200,20 @@ prefix_ senf::FileHandle::FileHandle(std::auto_ptr body) : body_(body.release()) {} +prefix_ senf::FileHandle::FileHandle(FileBody::ptr body) + : body_(body) +{} + prefix_ senf::FileBody & senf::FileHandle::body() { - BOOST_ASSERT(body_); + SENF_ASSERT(body_); return *body_; } prefix_ senf::FileBody const & senf::FileHandle::body() const { - BOOST_ASSERT(body_); + SENF_ASSERT(body_); return *body_; }