fixed some file headers to the new format
[senf.git] / Socket / FileHandle.cci
index 7016131..bcb6d50 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 //
 // Copyright (C) 2006
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-//     Stefan Bund <stefan.bund@fokus.fraunhofer.de>
+// Fraunhofer Institute for Open Communication Systems (FOKUS) 
+// Competence Center NETwork research (NET), St. Augustin, GERMANY 
+//     Stefan Bund <g0dil@berlios.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
@@ -28,7 +28,7 @@
 
 // Custom includes
 #include <errno.h>
-#include "Utils/Exception.hh"
+#include "../Utils/Exception.hh"
 
 #define prefix_ inline
 ///////////////////////////////cci.p///////////////////////////////////////
@@ -54,7 +54,7 @@ prefix_  senf::FileBody::~FileBody()
 prefix_ void senf::FileBody::close()
 {
     if (!valid())
-        throw SystemException(EBADF);
+        throwErrno(EBADF);
     v_close();
     fd_ = -1;
 }
@@ -67,6 +67,11 @@ prefix_ void senf::FileBody::terminate()
     }
 }
 
+prefix_ senf::FileHandle senf::FileBody::handle()
+{
+    return FileHandle(ptr(this));
+}
+
 prefix_ int senf::FileBody::fd()
     const
 {
@@ -194,6 +199,10 @@ prefix_  senf::FileHandle::FileHandle(std::auto_ptr<FileBody> body)
     : body_(body.release())
 {}
 
+prefix_ senf::FileHandle::FileHandle(FileBody::ptr body)
+    : body_(body)
+{}
+
 prefix_ senf::FileBody & senf::FileHandle::body()
 {
     BOOST_ASSERT(body_);