summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-17 19:52:19 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-17 19:52:19 +0800
commit54ea1894dcfaed86478bab8d00385ae7b5cb2f03 (patch)
tree577aa1907a7913a60d667899c21be9160e661819
parent516938ade5b04a03423ca1a7632222510b212240 (diff)
Implement the user create function
-rw-r--r--client.cxx51
m---------librtclient0
-rw-r--r--qrtclient/client.hxx24
3 files changed, 75 insertions, 0 deletions
diff --git a/client.cxx b/client.cxx
index 2f30b49..b4c9b97 100644
--- a/client.cxx
+++ b/client.cxx
@@ -16,6 +16,57 @@ namespace RTClient {
if (user) emit logged(user);
}
+ void Client::userNew(QString const& name
+ , QString const& emailAddress
+ , QString const& realName
+ , QString const& nickName
+ , QString const& gecos
+ , int lang
+ , int timeZone
+ , QString const& contactInfo
+ , bool enabled
+ , bool privileged
+ , QString const& password
+ , QString const& comments
+ , QString const& signature
+ , QString const& organization
+ , QString const& address1
+ , QString const& address2
+ , QString const& city
+ , QString const& state
+ , QString const& zip
+ , QString const& country
+ , QString const& homePhone
+ , QString const& workPhone
+ , QString const& mobilePhone
+ , QString const& pagerPhone)
+ {
+ rtclient_user_new(name.toLatin1().constData()
+ , emailAddress.toLatin1().constData()
+ , realName.toLatin1().constData()
+ , nickName.toLatin1().constData()
+ , gecos.toLatin1().constData()
+ , static_cast<enum rt_lang>(lang)
+ , static_cast<enum rt_timezone>(timeZone)
+ , contactInfo.toLatin1().constData()
+ , enabled
+ , privileged
+ , password.toLatin1().constData()
+ , comments.toLatin1().constData()
+ , signature.toLatin1().constData()
+ , organization.toLatin1().constData()
+ , address1.toLatin1().constData()
+ , address2.toLatin1().constData()
+ , city.toLatin1().constData()
+ , state.toLatin1().constData()
+ , zip.toLatin1().constData()
+ , country.toLatin1().constData()
+ , homePhone.toLatin1().constData()
+ , workPhone.toLatin1().constData()
+ , mobilePhone.toLatin1().constData()
+ , pagerPhone.toLatin1().constData());
+ }
+
void Client::search(QString const& owner)
{
QString query{"Owner='"};
diff --git a/librtclient b/librtclient
-Subproject 6bba1f355362826f7eaa49e47b3486e8d107325
+Subproject a6be983c30fcf229c54b627e87491ea73c0c96f
diff --git a/qrtclient/client.hxx b/qrtclient/client.hxx
index e32e83b..f0b12d1 100644
--- a/qrtclient/client.hxx
+++ b/qrtclient/client.hxx
@@ -18,6 +18,30 @@ namespace RTClient {
public slots:
void logIn(QString const& name, QString const& password);
+ void userNew(QString const& name
+ , QString const& emailAddress
+ , QString const& realName
+ , QString const& nickName
+ , QString const& gecos
+ , int lang
+ , int timeZone
+ , QString const& contactInfo
+ , bool enabled
+ , bool privileged
+ , QString const& password
+ , QString const& comments
+ , QString const& signature
+ , QString const& organization
+ , QString const& address1
+ , QString const& address2
+ , QString const& city
+ , QString const& state
+ , QString const& zip
+ , QString const& country
+ , QString const& homePhone
+ , QString const& workPhone
+ , QString const& mobilePhone
+ , QString const& pagerPhone);
void search(QString const& owner);
signals: