b210c89548b97f95bafa2292a013ab5357135c1b
[senf.git] / Socket / Protocols / UN / UNProtocol.hh
1 // Copyright (C) 2007 
2 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
3 // Kompetenzzentrum NETwork research (NET)
4 //     David Wagner <david.wagner@fokus.fraunhofer.de>
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the
18 // Free Software Foundation, Inc.,
19 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
20
21 /** \file
22     \brief UNProtocol public header */
23
24 #ifndef HH_UNProtocol_
25 #define HH_UNProtocol_ 1
26
27 // Custom includes
28 #include "../../../Socket/SocketProtocol.hh"
29 #include "UNAddressing.hh"
30 #include "../../../Socket/ClientSocketHandle.hh"
31 #include "../../../Socket/CommunicationPolicy.hh"
32
33 //#include "UNProtocol.mpp"
34 ///////////////////////////////hh.p////////////////////////////////////////
35
36 namespace senf {
37
38     /// \addtogroup protocol_facets_group
39     /// @{
40
41     /** \brief Protocol facet providing Unix Domain Addressing related API
42
43         This protocol facet introduces all the socket api protocol members which are related to Unix 
44         Domain addressing.
45
46         \todo connect() is only available on stream sockets. We want to access bind() and connect()
47         via the ClientSocketHandle -> see SocketProtocol todo point
48      */
49     class UNProtocol
50         : public virtual SocketProtocol
51     {
52     public:
53         void connect(UNSocketAddress const & address) const; ///< Connect to a  unix domain socket 
54                                         /**< \todo make this obsolete by allowing access to the
55                                              ClientSocketHandle from ConcreateSocketProtocol
56                                              \param[in] address Address to connect to */
57         void bind(UNSocketAddress const & address) const; ///< Set local socket address (path)
58                                         /**< \todo make this obsolete by allowing access to the
59                                              ClientSocketHandle from ConcreateSocketProtocol
60                                              \param[in] address Address to set */
61     };
62 }
63
64 ///////////////////////////////hh.e////////////////////////////////////////
65 //#include "UNProtocol.cci"
66 //#include "UNProtocol.ct"
67 //#include "UNProtocol.cti"
68 #endif
69
70 \f
71 // Local Variables:
72 // mode: c++
73 // fill-column: 100
74 // comment-column: 40
75 // c-file-style: "senf"
76 // indent-tabs-mode: nil
77 // ispell-local-dictionary: "american"
78 // compile-command: "scons -u test"
79 // End: