switch to new MPL based Fraunhofer FOKUS Public License
[senf.git] / senf / Socket / Protocols / BSDAddressingPolicy.hh
index 8ec831c..3c9802b 100644 (file)
@@ -2,23 +2,28 @@
 //
 // Copyright (C) 2006
 // 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
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
+// The contents of this file are subject to the Fraunhofer FOKUS Public License
+// Version 1.0 (the "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at 
+// http://senf.berlios.de/license.html
 //
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
+// The Fraunhofer FOKUS Public License Version 1.0 is based on, 
+// but modifies the Mozilla Public License Version 1.1.
+// See the full license text for the amendments.
 //
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the
-// Free Software Foundation, Inc.,
-// 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+// Software distributed under the License is distributed on an "AS IS" basis, 
+// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 
+// for the specific language governing rights and limitations under the License.
+//
+// The Original Code is Fraunhofer FOKUS code.
+//
+// The Initial Developer of the Original Code is Fraunhofer-Gesellschaft e.V. 
+// (registered association), Hansastraße 27 c, 80686 Munich, Germany.
+// All Rights Reserved.
+//
+// Contributor(s):
+//   Stefan Bund <g0dil@berlios.de>
 
 /** \file
     \brief BSDAddressingPolicyMixin public header
 #define HH_SENF_Socket_Protocols_BSDAddressingPolicy_ 1
 
 // Custom includes
-#include "../SocketHandle.hh"
-#include "../FileHandle.hh"
-#include "../SocketPolicy.hh"
-#include "../CommunicationPolicy.hh"
+#include <senf/Socket/SocketHandle.hh>
+#include <senf/Socket/FileHandle.hh>
+#include <senf/Socket/CommunicationPolicy.hh>
 #include "BSDSocketAddress.hh"
 
 //#include "BSDAddressingPolicy.mpp"
-///////////////////////////////hh.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 
 namespace senf {
 
     /// \addtogroup policy_impl_group
-    /// @{
+    //\{
 
     /** \brief Non-template implementation class of BSDAddressingPolicyMixin template
 
@@ -51,10 +55,10 @@ namespace senf {
      */
     struct BSDAddressingPolicyMixinBase
     {
-        static void do_local(FileHandle handle, struct sockaddr * addr, socklen_t * len);
-        static void do_peer(FileHandle handle, struct sockaddr * addr, socklen_t * len);
-        static void do_bind(FileHandle handle, struct sockaddr const * addr, socklen_t len);
-        static void do_connect(FileHandle handle, struct sockaddr const * addr, socklen_t len);
+        static void do_local(FileHandle const & handle, struct sockaddr * addr, socklen_t * len);
+        static void do_peer(FileHandle const & handle, struct sockaddr * addr, socklen_t * len);
+        static void do_bind(FileHandle const & handle, struct sockaddr const * addr, socklen_t len);
+        static void do_connect(FileHandle const & handle, struct sockaddr const * addr, socklen_t len);
     };
 
     /** \brief Template for generic AddressingPolicy implementation based on the BSD socket API
@@ -87,11 +91,11 @@ namespace senf {
     {
 #       ifndef DOXYGEN
         template <class SPolicy>
-        static void peer(SocketHandle<SPolicy> handle, Address & addr,
+        static void peer(SocketHandle<SPolicy> const & handle, Address & addr,
                          typename IfCommunicationPolicyIs<SPolicy,ConnectedCommunicationPolicy>::type * = 0);
 #       else
         template <class SPolicy>
-        static void peer(SocketHandle<SPolicy> handle, Address & addr);
+        static void peer(SocketHandle<SPolicy> const & handle, Address & addr);
                                         ///< Return address of remote peer on connected sockets
                                         /**< This member is only available if the socket handles
                                              communication policy is ConnectedCommunicationPolicy.
@@ -99,18 +103,18 @@ namespace senf {
                                              \param[in] handle socket handle to get peer address of
                                              \param[out] addr address of remote peer */
 #       endif
-        static void local(FileHandle handle, Address & addr);
+        static void local(FileHandle const & handle, Address & addr);
                                         ///< Return local of socket
                                         /**< \param[in] handle socket handle to check
                                              \param[out] addr local socket address */
 
 #       ifndef DOXYGEN
         template <class SPolicy>
-        static void connect(SocketHandle<SPolicy> handle, Address const & addr,
+        static void connect(SocketHandle<SPolicy> const & handle, Address const & addr,
                             typename IfCommunicationPolicyIs<SPolicy,ConnectedCommunicationPolicy>::type * = 0);
 #       else
         template <class SPolicy>
-        static void connect(SocketHandle<SPolicy> handle, Address const & addr);
+        static void connect(SocketHandle<SPolicy> const & handle, Address const & addr);
                                         ///< Connect to remote host
                                         /**< This member is only available if the socket handles
                                              communication policy is ConnectedCommunicationPolicy.
@@ -119,13 +123,13 @@ namespace senf {
                                              \param[in] addr address of remote peer to connect
                                                  to */
 #       endif
-        static void bind(FileHandle handle, Address const & addr);
+        static void bind(FileHandle const & handle, Address const & addr);
                                         ///< Set local socket address
                                         /**< \param[in] handle socket handle
                                              \param[in] addr local socket address */
     };
 
-    /// @}
+    //\}
 
     struct BSDAddressingPolicy
         : public AddressingPolicyBase,
@@ -141,7 +145,7 @@ namespace senf {
 
 }
 
-///////////////////////////////hh.e////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 //#include "BSDAddressingPolicy.cci"
 //#include "BSDAddressingPolicy.ct"
 #include "BSDAddressingPolicy.cti"