- {
- sc.SetChgUserCallback(RecvSetUserAnswer, &cbdata);
- res = sc.ChgUser(str.c_str());
- }
+ printf("%s\n", data.reason.c_str());
+return true;
+}
+//-----------------------------------------------------------------------------
+bool ProcessSendMessage(const std::string & server, uint16_t port,
+ const std::string & login, const std::string & password,
+ const std::string & requestString)
+{
+SERVCONF sc;
+
+sc.SetServer(server.c_str());
+sc.SetPort(port);
+sc.SetAdmLogin(login.c_str());
+sc.SetAdmPassword(password.c_str());
+
+ResultData data;
+sc.SetSendMessageCallback(SendMessageCallback, &data);
+int res = sc.SendMessage(requestString.c_str());