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