summaryrefslogtreecommitdiff
path: root/server/include/utilities.h
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2016-01-20 05:35:09 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2016-01-20 05:35:09 +0300
commit09a905e401df451f12673d75dc8d4d72ee73b7c9 (patch)
tree75e620ca41dd673f9286f3351f2982c2bbfc51e1 /server/include/utilities.h
parentbb8cd8a9ff7d80046cc2c7d41742c74d8f811c62 (diff)
server:
very basic implementation of download_state_changed event api call for plugins started work on thread safety (plugins may and will be multithreaded, so api for plugins should be thread safe)
Diffstat (limited to 'server/include/utilities.h')
-rw-r--r--server/include/utilities.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/server/include/utilities.h b/server/include/utilities.h
index 40eb38f..3e77f89 100644
--- a/server/include/utilities.h
+++ b/server/include/utilities.h
@@ -25,6 +25,7 @@
#include <string>
#include <memory>
+
//TODO: use glib's xdg api instead ?
std::string replace_home_var(const std::string &path);
@@ -35,6 +36,21 @@ std::shared_ptr<char*> pack_msg(server_msg *msg, int *size);
std::string random_string(int length);
std::string generate_auth_token();
+#include <boost/thread/lockable_adapter.hpp>
+#include <boost/thread/mutex.hpp>
+
+template <typename CONTAINER>
+class lockable_container : public boost::basic_lockable_adapter<boost::mutex>, public CONTAINER
+{
+
+};
+
+/*template <typename CONTAINER>
+class lockable_container_child : public lockable_container <CONTAINER>
+{
+ //code
+}; */
+
#endif // UTILITIES_H_INCLUDED