KReportDesignerItemCheckBox* KReportDesignerItemCheckBox::clone() { QDomDocument d; QDomElement e = d.createElement(QLatin1String("clone")); QDomNode n; buildXML(&d, &e); n = e.firstChild(); return new KReportDesignerItemCheckBox(n, designer(), 0); }
KoReportDesignerItemText* KoReportDesignerItemText::clone() { QDomDocument d; QDomElement e = d.createElement("clone");; QDomNode n; buildXML(d, e); n = e.firstChild(); return new KoReportDesignerItemText(n, designer(), 0); }
ReportEntityCheck* ReportEntityCheck::clone() { QDomDocument d; QDomElement e = d.createElement("clone");; QDomNode n; buildXML(d, e); n = e.firstChild(); return new ReportEntityCheck(n, designer(), 0); }
void handleXML(){ buildXML(); delay(10); server.send(200,"text/xml",XML); }
int sendMT(SMSmsg *msg, char *moURL) { int res; char postthis[4096]; chunk.size = 0; buildXML(msg, postthis); curl_easy_setopt(curl, CURLOPT_URL, moURL); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postthis); curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, strlen(postthis)); curl_easy_setopt(curl, CURLOPT_MAXCONNECTS, 10); curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10); res = curl_easy_perform(curl); debug("httpClient", 0, "curl params setted..."); if (res == 0) { long httpReturnCode; curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &httpReturnCode); if (httpReturnCode == 200) { int retParse = 0; char statusParse[11], ReturnMessage[256], errTextParse[256]; debug("httpClient", 0, "********************"); debug("httpClient", 0, "http return code: %ld", httpReturnCode); debug("httpClient", 0, "%s", (char *) chunk.memory); retParse = parseXML(chunk.memory, statusParse, ReturnMessage, errTextParse); //retParse = 0; msg->errCode = atoi(statusParse); sprintf(msg->errText, ReturnMessage); if (retParse != 0) { debug("httpClient", 0, "XML ERROR: %s", errTextParse); res = retParse; } else { if (strcmp(statusParse, "0") != 0) { debug("httpClient", 0, "Status ERROR: %s", statusParse); res = -1; } else { debug("httpClient", 0, "Status OK: %s", statusParse); res = 0; } } debug("httpClient", 0, "********************"); } else { res = httpReturnCode; debug("httpClient", 0, "********************"); debug("httpClient", 0, "HTTP ERROR"); debug("httpClient", 0, "http return code: %ld", httpReturnCode); debug("httpClient", 0, "%s", (char *) chunk.memory); debug("httpClient", 0, "********************"); } } else { // agregar un reinicio debug("httpClient", 0, "********************"); debug("httpClient", 0, "ERROR DMT: %s", errorBuffer); debug("httpClient", 0, "moURL: %s", moURL); debug("httpClient", 0, "phone: %s", msg->phone); debug("httpClient", 0, "text : %s", msg->text); debug("httpClient", 0, "********************"); msg->errCode=1050; sprintf(msg->errText, "Connection failed: Could not send the message"); } return res; }