]> Dogcows Code - chaz/yoink/blobdiff - src/moof/service.hh
the massive refactoring effort
[chaz/yoink] / src / moof / service.hh
similarity index 68%
rename from src/Moof/Service.hh
rename to src/moof/service.hh
index 570a2309e270cb235a7abe7e1b8819d12a7264a6..6db1d964b1e47a76c0cfc2c77af0fb9962a8f374 100644 (file)
@@ -9,27 +9,27 @@
 *
 **************************************************************************/
 
+#ifndef _MOOF_SERVICE_HH_
+#define _MOOF_SERVICE_HH_
+
 /**
- * \file Service.hh
+ * \file service.hh
  * Classes for publishing and finding network services.
  */
 
-#ifndef _MOOF_SERVICE_HH_
-#define _MOOF_SERVICE_HH_
-
 #include <map>
 
-#include <Moof/Math.hh>
-#include <Moof/Socket.hh>
+#include <moof/math.hh>
+#include <moof/socket.hh>
 
 
-namespace Mf {
+namespace moof {
 
 
 /**
  * Class representing a network service.
  */
-class Service
+class service
 {
 public:
 
@@ -40,7 +40,7 @@ public:
         * \param name The service name.
         * \param text The service information.
         */
-       Service(const SocketAddress& address,
+       service(const socket::address& address,
                        const std::string& type,
                        const std::string& name,
                        const std::string& text);
@@ -52,7 +52,7 @@ public:
         * \param name The service name.
         * \param text The service information.
         */
-       Service(const SocketAddress& address,
+       service(const socket::address& address,
                        const std::string& name,
                        const std::string& text);
 
@@ -72,9 +72,9 @@ public:
         * Get the host address.
         * \return The address.
         */
-       const SocketAddress& address() const
+       const socket::address& address() const
        {
-               return mAddress;
+               return address_;
        }
 
        /**
@@ -83,7 +83,7 @@ public:
         */
        const std::string& type() const
        {
-               return mType;
+               return type_;
        }
 
        /**
@@ -92,7 +92,7 @@ public:
         */
        const std::string& name() const
        {
-               return mName;
+               return name_;
        }
 
        /**
@@ -101,27 +101,27 @@ public:
         */
        const std::string& text() const
        {
-               return mText;
+               return text_;
        }
 
 
-       ~Service();
+       ~service();
 
 
 private:
 
-       int handlePacket(SocketMultiplexer& mux,
-                                        Packet& packet,
-                                        const SocketAddress& address);
+       int handle_packet(socket_multiplexer& mux,
+                                        packet& packet,
+                                        const socket::address& address);
 
-       SocketAddress   mAddress;
-       std::string             mType;
-       std::string             mName;
-       std::string             mText;
+       socket::address address_;
+       std::string             type_;
+       std::string             name_;
+       std::string             text_;
 };
 
 
-class ServiceFinder
+class service_finder
 {
 public:
 
@@ -130,35 +130,35 @@ public:
         * address.
         * \address The address.
         */
-       explicit ServiceFinder(const SocketAddress& address);
+       explicit service_finder(const socket::address& address);
 
        /**
         * Construct a service finder to find services of a certain type.
         * \param type The type of the service.
         * \param sockType The type of socket.
         */
-       explicit ServiceFinder(const std::string& type,
-                                                  int sockType = SOCK_STREAM);
+       explicit service_finder(const std::string& type,
+                                                       int sockType = SOCK_STREAM);
 
 
-       const std::map<std::string,Service>& services() const
+       const std::map<std::string,service>& services() const
        {
-               return mServices;
+               return services_;
        }
 
 
 private:
 
-       int handlePacket(SocketMultiplexer& mux,
-                                        Packet& packet,
-                                        const SocketAddress& address);
+       int handle_packet(socket_multiplexer& mux,
+                                         packet& packet,
+                                         const socket::address& address);
 
-       std::string                                             mType;
-       std::map<std::string,Service>   mServices;
+       std::string                                             type_;
+       std::map<std::string,service>   services_;
 };
 
 
-} // namespace Mf
+} // namespace moof
 
 #endif // _MOOF_SERVICE_HH_
 
This page took 0.026751 seconds and 4 git commands to generate.