summaryrefslogtreecommitdiffstats
path: root/src/Common
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/Backends/NetworkUserBackend.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Common/Backends/NetworkUserBackend.cpp b/src/Common/Backends/NetworkUserBackend.cpp
index 20deba6..1e06a78 100644
--- a/src/Common/Backends/NetworkUserBackend.cpp
+++ b/src/Common/Backends/NetworkUserBackend.cpp
@@ -84,6 +84,8 @@ void NetworkUserBackend::UserUpdateRequest::sendRequest() {
}
boost::shared_ptr<const std::map<unsigned long, UserInfo> > NetworkUserBackend::getUserList(boost::posix_time::ptime *timestamp) throw(Core::Exception) {
+ application->getThreadManager()->detach();
+
boost::shared_ptr<SimpleUserRequest> request(new SimpleUserRequest(application, "ListUsers", timestamp));
application->getRequestManager()->sendRequest(connection, request);
@@ -119,6 +121,8 @@ boost::shared_ptr<const std::map<unsigned long, UserInfo> > NetworkUserBackend::
}
boost::shared_ptr<const UserInfo> NetworkUserBackend::getUserInfo(unsigned long uid, boost::posix_time::ptime *timestamp) throw(Core::Exception) {
+ application->getThreadManager()->detach();
+
boost::shared_ptr<IdUserRequest> request(new IdUserRequest(application, "GetUserInfo", "uid", uid, timestamp));
application->getRequestManager()->sendRequest(connection, request);
request->wait();
@@ -149,6 +153,8 @@ boost::shared_ptr<const UserInfo> NetworkUserBackend::getUserInfo(unsigned long
}
boost::shared_ptr<const UserInfo> NetworkUserBackend::getUserInfoByName(const std::string &name, boost::posix_time::ptime *timestamp) throw(Core::Exception) {
+ application->getThreadManager()->detach();
+
boost::shared_ptr<NameUserRequest> request(new NameUserRequest(application, "GetUserInfo", name, timestamp));
application->getRequestManager()->sendRequest(connection, request);
request->wait();
@@ -179,6 +185,8 @@ boost::shared_ptr<const UserInfo> NetworkUserBackend::getUserInfoByName(const st
}
boost::shared_ptr<const std::set<unsigned long> > NetworkUserBackend::getUserGroupList(unsigned long uid, boost::posix_time::ptime *timestamp) throw(Core::Exception) {
+ application->getThreadManager()->detach();
+
boost::shared_ptr<IdUserRequest> request(new IdUserRequest(application, "ListUserGroups", "uid", uid, timestamp));
application->getRequestManager()->sendRequest(connection, request);
request->wait();
@@ -209,6 +217,8 @@ boost::shared_ptr<const std::set<unsigned long> > NetworkUserBackend::getUserGro
}
boost::shared_ptr<const std::map<unsigned long, GroupInfo> > NetworkUserBackend::getGroupList(boost::posix_time::ptime *timestamp) throw(Core::Exception) {
+ application->getThreadManager()->detach();
+
boost::shared_ptr<SimpleUserRequest> request(new SimpleUserRequest(application, "ListGroups", timestamp));
application->getRequestManager()->sendRequest(connection, request);
request->wait();
@@ -240,6 +250,8 @@ boost::shared_ptr<const std::map<unsigned long, GroupInfo> > NetworkUserBackend:
}
boost::shared_ptr<const GroupInfo> NetworkUserBackend::getGroupInfo(unsigned long gid, boost::posix_time::ptime *timestamp) throw(Core::Exception) {
+ application->getThreadManager()->detach();
+
boost::shared_ptr<IdUserRequest> request(new IdUserRequest(application, "GetGroupInfo", "gid", gid, timestamp));
application->getRequestManager()->sendRequest(connection, request);
request->wait();
@@ -264,6 +276,8 @@ boost::shared_ptr<const GroupInfo> NetworkUserBackend::getGroupInfo(unsigned lon
}
boost::shared_ptr<const GroupInfo> NetworkUserBackend::getGroupInfoByName(const std::string &name, boost::posix_time::ptime *timestamp) throw(Core::Exception) {
+ application->getThreadManager()->detach();
+
boost::shared_ptr<NameUserRequest> request(new NameUserRequest(application, "GetGroupInfo", name, timestamp));
application->getRequestManager()->sendRequest(connection, request);
request->wait();
@@ -288,6 +302,8 @@ boost::shared_ptr<const GroupInfo> NetworkUserBackend::getGroupInfoByName(const
}
boost::shared_ptr<const std::set<unsigned long> > NetworkUserBackend::getGroupUserList(unsigned long gid, boost::posix_time::ptime *timestamp) throw(Core::Exception) {
+ application->getThreadManager()->detach();
+
boost::shared_ptr<IdUserRequest> request(new IdUserRequest(application, "ListGroupUsers", "gid", gid, timestamp));
application->getRequestManager()->sendRequest(connection, request);
request->wait();
@@ -318,6 +334,8 @@ boost::shared_ptr<const std::set<unsigned long> > NetworkUserBackend::getGroupUs
}
boost::shared_ptr<const std::multimap<unsigned long, unsigned long> > NetworkUserBackend::getFullUserGroupList(boost::posix_time::ptime *timestamp) throw(Core::Exception) {
+ application->getThreadManager()->detach();
+
boost::shared_ptr<SimpleUserRequest> request(new SimpleUserRequest(application, "GetFullUserGroupList", timestamp));
application->getRequestManager()->sendRequest(connection, request);
request->wait();
@@ -353,6 +371,8 @@ boost::shared_ptr<const std::multimap<unsigned long, unsigned long> > NetworkUse
void NetworkUserBackend::addUser(const UserInfo &userInfo) throw(Core::Exception) {
+ application->getThreadManager()->detach();
+
boost::shared_ptr<UserAddRequest> request(new UserAddRequest(application, userInfo));
application->getRequestManager()->sendRequest(connection, request);
request->wait();
@@ -363,6 +383,8 @@ void NetworkUserBackend::addUser(const UserInfo &userInfo) throw(Core::Exception
}
void NetworkUserBackend::updateUser(unsigned long uid, const Common::UserInfo &userInfo) throw(Core::Exception) {
+ application->getThreadManager()->detach();
+
boost::shared_ptr<UserUpdateRequest> request(new UserUpdateRequest(application, uid, userInfo));
application->getRequestManager()->sendRequest(connection, request);
request->wait();
@@ -373,6 +395,8 @@ void NetworkUserBackend::updateUser(unsigned long uid, const Common::UserInfo &u
}
void NetworkUserBackend::deleteUser(unsigned long uid) throw(Core::Exception) {
+ application->getThreadManager()->detach();
+
boost::shared_ptr<IdUserRequest> request(new IdUserRequest(application, "DeleteUser", "uid", uid));
application->getRequestManager()->sendRequest(connection, request);
request->wait();