Socket: Move protocol into the socket body (as private base class) and allow non...
[senf.git] / Socket / SocketHandle.hh
index 6cb2c4b..85a14b6 100644 (file)
@@ -1,9 +1,9 @@
-// $Id$
+// $Id:SocketHandle.hh 218 2007-03-20 14:39:32Z tho $
 //
 // Copyright (C) 2006
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-//     Stefan Bund <stefan.bund@fokus.fraunhofer.de>
+// 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
@@ -89,10 +89,14 @@ namespace senf {
         ///\name Structors and default members
         ///@{
 
+        // default default constructor
         // default copy constructor
         // default copy assignment
         // default destructor
 
+        // here to implement
+        SocketHandle();
+
         // conversion constructors
 
         template <class OtherPolicy>
@@ -112,7 +116,7 @@ namespace senf {
         void state(SocketStateMap & map, unsigned lod=0);
                                         ///< Inquire state information of socket handle
                                         /**< The map argument (a string to string mapping) will be
-                                             filled with information coverning the current state of
+                                             filled with information covering the current state of
                                              the socket. The information provided depends on the
                                              socket protocol. The amount of information returned can
                                              be controlled using the \p lod value.
@@ -122,8 +126,8 @@ namespace senf {
 
                                              \param map string to string mapping to be filled with
                                                  state information
-                                             \param lod level of detail requesten. The interpretation
-                                                 of this value is protocol specific
+                                             \param lod level of detail requested. The
+                                                 interpretation of this value is protocol specific
 
                                              \implementation This member will be re-implemented in
                                                  every derived class. This is very important since
@@ -135,12 +139,15 @@ namespace senf {
                                         /**< Formats the complete state map value and returns it as
                                              a single multi-line string.
 
+                                             \param lod level of detail requested. The
+                                                interpretation of this value is protocol specific
+                                             
                                              \implementation This member will be re-implemented in
                                                  every derived class. See the state()
                                                  documentation. */
 
     protected:
-        explicit SocketHandle(std::auto_ptr<SocketProtocol> protocol, bool isServer);
+        explicit SocketHandle(std::auto_ptr<SocketBody> body);
                                         ///< Initialize SocketHandle providing the protocol
                                         /**< \param protocol Protocol class of the protocol
                                                  implemented by this socket handle
@@ -162,8 +169,7 @@ namespace senf {
                                              \param isChecked has to be \c true
 
                                              \todo Answer, why the heck I need the \c isChecked
-                                                 parameter ??
-                                        */
+                                                 parameter ?? */
 
         SocketBody & body();            ///< Access socket body
                                         /**< This member replaces the corresponding FileHandle
@@ -231,7 +237,7 @@ namespace senf {
 
     /** \brief dynamically check cast validity
 
-        This function will check, wether the given cast is valid. This is the same as checking, that
+        This function will check, whether the given cast is valid. This is the same as checking, that
         dynamic_socket_cast does not throw.
 
         This member is needed, since there is no 'null' SocketHandle (comparable to a null pointer)
@@ -258,4 +264,6 @@ namespace senf {
 // c-file-style: "senf"
 // indent-tabs-mode: nil
 // ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// comment-column: 40
 // End: