summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authortastytea2020-01-08 10:54:59 +0100
committertastytea2020-01-08 11:07:16 +0100
commitbbd044582181bb6e6a64cb1dedcb813c51f5e0ce (patch)
tree9718da0834c9efa3de85a49cf99e34976ab2e7bd /include
parentb1c99e70b80d4d454dd132cb9a9a65a929f79e15 (diff)
downloadmastodonpp-bbd044582181bb6e6a64cb1dedcb813c51f5e0ce.tar
mastodonpp-bbd044582181bb6e6a64cb1dedcb813c51f5e0ce.tar.gz
mastodonpp-bbd044582181bb6e6a64cb1dedcb813c51f5e0ce.zip
Add sections about thread safety and text input to documentation.
Diffstat (limited to 'include')
-rw-r--r--include/mastodonpp.hpp25
1 files changed, 17 insertions, 8 deletions
diff --git a/include/mastodonpp.hpp b/include/mastodonpp.hpp
index 113ec0b..85f1214 100644
--- a/include/mastodonpp.hpp
+++ b/include/mastodonpp.hpp
@@ -45,7 +45,7 @@
*
* Or compile your code with `g++ $(pkg-config --cflags --libs mastodonpp)`.
*
- * @subsection Example
+ * @subsection example Example
*
* @code
* #include <mastodonpp/mastodonpp.hpp>
@@ -67,27 +67,36 @@
* }
* @endcode
*
+ * @subsection input Input
+ *
+ * All text input is expected to be UTF-8.
+ *
* @section exceptions Exceptions
*
* Any unrecoverable libcurl error will be thrown as a
* mastodonpp::CURLException. Network errors will **not** be thrown, but
* reported via the return value.
*
+ * @section thread_safety Thread safety
+ *
+ * The first time you construct an @link mastodonpp::Instance Instance @endlink
+ * or @link mastodonpp::Connection Connection @endlink, [curl_global_init()]
+ * (https://curl.haxx.se/libcurl/c/curl_global_init.html) is called. When the
+ * last @link mastodonpp::Instance Instance @endlink or @link
+ * mastodonpp::Connection Connection @endlink is destroyed,
+ * [curl_global_cleanup()]
+ * (https://curl.haxx.se/libcurl/c/curl_global_cleanup.html) is called. Both
+ * are not thread safe.
+ *
* @example example01_instance_info.cpp
*/
/*!
* @brief C++ wrapper for the Mastodon %API.
*
- * All text input is expected to be UTF-8.
- *
* @since 0.1.0
*/
namespace mastodonpp
-{
-
-
-
-} // namespace mastodonpp
+{} // namespace mastodonpp
#endif // MASTODONPP_HPP