X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocols%2FUN%2FUNAddressing.hh;h=1116d1b655a0c9946a05c2bb19a3abb07f45c933;hb=01affde68cb93a334a2e6daabd2010b9a14b4553;hp=25b02d96bc5575ad7fa512c74c203888cc9b4383;hpb=745b3c63dc0a3d0c253568c12417421e8ebea125;p=senf.git diff --git a/Socket/Protocols/UN/UNAddressing.hh b/Socket/Protocols/UN/UNAddressing.hh index 25b02d9..1116d1b 100644 --- a/Socket/Protocols/UN/UNAddressing.hh +++ b/Socket/Protocols/UN/UNAddressing.hh @@ -1,6 +1,7 @@ -// $Id$ -// // Copyright (C) 2007 +// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) +// Kompetenzzentrum NETwork research (NET) +// David Wagner // // 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 @@ -35,6 +36,7 @@ #include "../../../Socket/ClientSocketHandle.hh" #include "../../../Socket/CommunicationPolicy.hh" #include "../../../Socket/Protocols/GenericAddressingPolicy.hh" +#include "../../../Utils/safe_bool.hh" #include "UNAddress.hh" //#include "UNAddressing.mpp" @@ -42,7 +44,7 @@ namespace senf { /** \brief Unix domain socket address - UNSocketAddress wraps the standard sockaddr_in datatype. It provides simple accessor methods + UNSocketAddress wraps the standard sockaddr_un datatype. It provides simple accessor methods to access the path. \implementation This implementation is based on sockaddr_un. @@ -50,7 +52,7 @@ namespace senf { \ingroup addr_group */ class UNSocketAddress - : public ComparableSafeBool + : public comparable_safe_bool { public: @@ -59,14 +61,13 @@ namespace senf { ///< Construct an address constant from given path static UNSocketAddress from_string(std::string const s); ///< Create UNSocketAddress from string static UNSocketAddress from_path(boost::filesystem::path const p); ///< Create UNSocketAddress from path - static std::string path(); ///< Return path as string - static sockaddr_un sockaddr(); - - struct sockaddr * sockaddr_p(); + std::string path() const ; ///< Return path as string + struct sockaddr_un sockaddr(); + struct sockaddr * sockaddr_p() ; struct sockaddr const * sockaddr_p() const; unsigned sockaddr_len() const; private: - static struct sockaddr_un sockAddr; + struct sockaddr_un sockAddr; }; /** \brief Write path os @@ -90,7 +91,6 @@ namespace senf { GenericAddressingPolicy which see for a detailed documentation. */ - struct UNAddressingPolicy : public AddressingPolicyBase, private GenericAddressingPolicy