changeset 613:0c7241258289

Docs: pet doxygen
author David Demelier <markand@malikania.fr>
date Fri, 15 Dec 2017 17:08:01 +0100
parents 420480ce53e0
children ebdc614db066
files libcommon/irccd/network_stream.hpp libcommon/irccd/options.hpp libirccd/irccd/daemon/command.hpp libirccd/irccd/daemon/dynlib_plugin.hpp libirccd/irccd/daemon/irc.hpp libirccd/irccd/daemon/logger.hpp libirccd/irccd/daemon/plugin.hpp libirccd/irccd/daemon/plugin_service.hpp libirccd/irccd/daemon/transport_client.hpp libirccdctl/irccd/ctl/basic_connection.hpp libirccdctl/irccd/ctl/connection.hpp libirccdctl/irccd/ctl/ip_connection.hpp
diffstat 12 files changed, 44 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/libcommon/irccd/network_stream.hpp	Fri Dec 15 16:35:49 2017 +0100
+++ b/libcommon/irccd/network_stream.hpp	Fri Dec 15 17:08:01 2017 +0100
@@ -20,7 +20,7 @@
 #define IRCCD_COMMON_NETWORK_STREAM_HPP
 
 /**
- * \file network_stream.cpp
+ * \file network_stream.hpp
  * \brief Base shared network stream.
  */
 
--- a/libcommon/irccd/options.hpp	Fri Dec 15 16:35:49 2017 +0100
+++ b/libcommon/irccd/options.hpp	Fri Dec 15 17:08:01 2017 +0100
@@ -49,7 +49,7 @@
     /**
      * Construct the exception.
      *
-     * \param arg the argument missing
+     * \param name the argument missing
      */
     inline invalid_option(std::string name)
         : name_(std::move(name))
--- a/libirccd/irccd/daemon/command.hpp	Fri Dec 15 16:35:49 2017 +0100
+++ b/libirccd/irccd/daemon/command.hpp	Fri Dec 15 17:08:01 2017 +0100
@@ -142,7 +142,7 @@
     /**
      * \copydoc command::exec
      */
-    void exec(irccd& irccd, transport_client& client, const nlohmann::json& request) override;
+    void exec(irccd& irccd, transport_client& client, const nlohmann::json& args) override;
 };
 
 /**
--- a/libirccd/irccd/daemon/dynlib_plugin.hpp	Fri Dec 15 16:35:49 2017 +0100
+++ b/libirccd/irccd/daemon/dynlib_plugin.hpp	Fri Dec 15 17:08:01 2017 +0100
@@ -20,7 +20,7 @@
 #define IRCCD_DAEMON_DYNLIB_PLUGIN_HPP
 
 /**
- * \file plugin-dynlib.hpp
+ * \file dynlib_plugin.hpp
  * \brief Native plugin implementation.
  */
 
@@ -148,10 +148,10 @@
     dynlib_plugin_loader(std::vector<std::string> directories = {}) noexcept;
 
     /**
-     * \copydoc plugin_loader::find
+     * \copydoc plugin_loader::open
      */
     std::shared_ptr<plugin> open(const std::string& id,
-                                 const std::string& path) noexcept override;
+                                 const std::string& file) noexcept override;
 };
 
 } // !irccd
--- a/libirccd/irccd/daemon/irc.hpp	Fri Dec 15 16:35:49 2017 +0100
+++ b/libirccd/irccd/daemon/irc.hpp	Fri Dec 15 17:08:01 2017 +0100
@@ -297,7 +297,7 @@
     /**
      * Parse a IRC message.
      *
-     * \param line the buffer content (without \r\n)
+     * \param line the buffer content (without `\r\n`)
      * \return the message (maybe empty if line is empty)
      */
     static message parse(const std::string& line);
@@ -315,8 +315,8 @@
     /**
      * Construct a user.
      *
-     * \param the nickname
-     * \param the hostname
+     * \param nick the nickname
+     * \param host the hostname
      */
     inline user(std::string nick, std::string host) noexcept
         : nick_(std::move(nick))
--- a/libirccd/irccd/daemon/logger.hpp	Fri Dec 15 16:35:49 2017 +0100
+++ b/libirccd/irccd/daemon/logger.hpp	Fri Dec 15 17:08:01 2017 +0100
@@ -145,7 +145,7 @@
      * \pre filter must not be null
      * \param filter the filter
      */
-    void set_filter(std::unique_ptr<logger_filter> newfilter) noexcept;
+    void set_filter(std::unique_ptr<logger_filter> filter) noexcept;
 
     /**
      * Get the stream for informational messages.
@@ -233,17 +233,17 @@
 class console_logger : public logger {
 protected:
     /**
-     * \copydoc logger::debug
+     * \copydoc logger::write_debug
      */
     void write_debug(const std::string& line) override;
 
     /**
-     * \copydoc logger::info
+     * \copydoc logger::write_info
      */
     void write_info(const std::string& line) override;
 
     /**
-     * \copydoc logger::warning
+     * \copydoc logger::write_warning
      */
     void write_warning(const std::string& line) override;
 };
@@ -258,17 +258,17 @@
 
 protected:
     /**
-     * \copydoc logger::debug
+     * \copydoc logger::write_debug
      */
     void write_debug(const std::string& line) override;
 
     /**
-     * \copydoc logger::info
+     * \copydoc logger::write_info
      */
     void write_info(const std::string& line) override;
 
     /**
-     * \copydoc logger::warning
+     * \copydoc logger::write_warning
      */
     void write_warning(const std::string& line) override;
 
@@ -290,17 +290,17 @@
 class silent_logger : public logger {
 protected:
     /**
-     * \copydoc logger::debug
+     * \copydoc logger::write_debug
      */
     void write_debug(const std::string& line) override;
 
     /**
-     * \copydoc logger::info
+     * \copydoc logger::write_info
      */
     void write_info(const std::string& line) override;
 
     /**
-     * \copydoc logger::warning
+     * \copydoc logger::write_warning
      */
     void write_warning(const std::string& line) override;
 };
@@ -313,17 +313,17 @@
 class syslog_logger : public logger {
 protected:
     /**
-     * \copydoc logger::debug
+     * \copydoc logger::write_debug
      */
     void write_debug(const std::string& line) override;
 
     /**
-     * \copydoc logger::info
+     * \copydoc logger::write_info
      */
     void write_info(const std::string& line) override;
 
     /**
-     * \copydoc logger::warning
+     * \copydoc logger::write_warning
      */
     void write_warning(const std::string& line) override;
 
--- a/libirccd/irccd/daemon/plugin.hpp	Fri Dec 15 16:35:49 2017 +0100
+++ b/libirccd/irccd/daemon/plugin.hpp	Fri Dec 15 17:08:01 2017 +0100
@@ -484,7 +484,7 @@
     /**
      * Set directories where to search plugins.
      *
-     * \param dirs the directories
+     * \param directories the directories
      */
     inline void set_directories(std::vector<std::string> directories)
     {
@@ -510,7 +510,8 @@
      * The implementation must test if the plugin is suitable for opening, by
      * testing extension for example.
      *
-     * \param file the file
+     * \param id the plugin identifier
+     * \param file the file path
      */
     virtual std::shared_ptr<plugin> open(const std::string& id,
                                          const std::string& file) = 0;
--- a/libirccd/irccd/daemon/plugin_service.hpp	Fri Dec 15 16:35:49 2017 +0100
+++ b/libirccd/irccd/daemon/plugin_service.hpp	Fri Dec 15 17:08:01 2017 +0100
@@ -188,7 +188,7 @@
      *
      * \pre plugin != nullptr
      * \param plugin the plugin
-     * \param func the plugin member function (pointer to member)
+     * \param fn the plugin member function (pointer to member)
      * \param args the arguments to pass
      */
     template <typename Func, typename... Args>
@@ -210,7 +210,7 @@
      * Overloaded function.
      *
      * \param name the plugin name
-     * \param func the plugin member function (pointer to member)
+     * \param fn the plugin member function (pointer to member)
      * \param args the arguments to pass
      */
     template <typename Func, typename... Args>
--- a/libirccd/irccd/daemon/transport_client.hpp	Fri Dec 15 16:35:49 2017 +0100
+++ b/libirccd/irccd/daemon/transport_client.hpp	Fri Dec 15 17:08:01 2017 +0100
@@ -170,6 +170,7 @@
      *
      * \pre code is not 0
      * \param code the error code
+     * \param cname the command name
      * \param handler the optional handler
      */
     void error(boost::system::error_code code,
--- a/libirccdctl/irccd/ctl/basic_connection.hpp	Fri Dec 15 16:35:49 2017 +0100
+++ b/libirccdctl/irccd/ctl/basic_connection.hpp	Fri Dec 15 17:08:01 2017 +0100
@@ -56,9 +56,11 @@
     }
 
     /**
-     * \copydoc connection::is_active
+     * Tells if the stream has pending actions.
+     *
+     * \return true if receiving/sending
      */
-    bool is_active() const noexcept override
+    bool is_active() const noexcept
     {
         return stream_.is_active();
     }
--- a/libirccdctl/irccd/ctl/connection.hpp	Fri Dec 15 16:35:49 2017 +0100
+++ b/libirccdctl/irccd/ctl/connection.hpp	Fri Dec 15 17:08:01 2017 +0100
@@ -56,8 +56,19 @@
      */
     virtual void connect(connect_t handler) = 0;
 
+    /**
+     * Receive from irccd.
+     *
+     * \param handler the completion handler
+     */
     virtual void recv(network_recv_handler handler) = 0;
 
+    /**
+     * Send to irccd.
+     *
+     * \param json the json object
+     * \param handler the completion handler
+     */
     virtual void send(nlohmann::json json, network_send_handler handler) = 0;
 };
 
--- a/libirccdctl/irccd/ctl/ip_connection.hpp	Fri Dec 15 16:35:49 2017 +0100
+++ b/libirccdctl/irccd/ctl/ip_connection.hpp	Fri Dec 15 17:08:01 2017 +0100
@@ -56,7 +56,7 @@
      * \param service the io service
      * \param host the host
      * \param port the port number
-     * \param extra args (except service) to pass to the socket constructor
+     * \param args extra arguments (except service) to pass to the socket constructor
      */
     template <typename... Args>
     inline basic_ip_connection(boost::asio::io_service& service, std::string host, std::uint16_t port, Args&&... args)