X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FSocket%2FProtocols%2FBSDAddressingPolicy.hh;h=3c9802bf8d2f634bc689b087e1570ee282cbffdc;hb=72cc548dfc3fa72d14d4d8c1a178f162165e933a;hp=8ec831c5982525bf344f0beeffbfd6c5a8896ab8;hpb=601d1f509f5bb24df167a4dd5a20da67a0af9af8;p=senf.git diff --git a/senf/Socket/Protocols/BSDAddressingPolicy.hh b/senf/Socket/Protocols/BSDAddressingPolicy.hh index 8ec831c..3c9802b 100644 --- a/senf/Socket/Protocols/BSDAddressingPolicy.hh +++ b/senf/Socket/Protocols/BSDAddressingPolicy.hh @@ -2,23 +2,28 @@ // // Copyright (C) 2006 // 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 -// 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 /** \file \brief BSDAddressingPolicyMixin public header @@ -31,19 +36,18 @@ #define HH_SENF_Socket_Protocols_BSDAddressingPolicy_ 1 // Custom includes -#include "../SocketHandle.hh" -#include "../FileHandle.hh" -#include "../SocketPolicy.hh" -#include "../CommunicationPolicy.hh" +#include +#include +#include #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 - static void peer(SocketHandle handle, Address & addr, + static void peer(SocketHandle const & handle, Address & addr, typename IfCommunicationPolicyIs::type * = 0); # else template - static void peer(SocketHandle handle, Address & addr); + static void peer(SocketHandle 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 - static void connect(SocketHandle handle, Address const & addr, + static void connect(SocketHandle const & handle, Address const & addr, typename IfCommunicationPolicyIs::type * = 0); # else template - static void connect(SocketHandle handle, Address const & addr); + static void connect(SocketHandle 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"