这篇教程C++ xmpp_stanza_set_type函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中xmpp_stanza_set_type函数的典型用法代码示例。如果您正苦于以下问题:C++ xmpp_stanza_set_type函数的具体用法?C++ xmpp_stanza_set_type怎么用?C++ xmpp_stanza_set_type使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了xmpp_stanza_set_type函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: HandleRpcCall/** * This is called when someone sends a RPC method call * Checks for XML-RPC format validation and sends error if so otherwise it calls the * HandleServiceCall for finding the right service and creating the right structures * @return KEEP_THIS_HANDLER_ACTIVE */int HandleRpcCall(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * const userdata) { xmpp_stanza_t *reply; xmpp_stanza_t *xmlRpcReply; xmpp_ctx_t *ctx = (xmpp_ctx_t*) userdata; sdvp_from_t* from; sdvp_reply_params_t* replyParams = NULL; int formatInvalid; sdvpIdleCounter = 0; sdvpPingsSent = 0; reply = xmpp_stanza_new(ctx); xmpp_stanza_set_name(reply, "iq"); // TODO: Get the Group and get the jid from = _CreateFrom(xmpp_stanza_get_attribute(stanza, "from"), "TODO", "TODO"); syslog(LOG_DEBUG, "Received a RPC Method call from %s/n", from->name); formatInvalid = _CheckRpcFormat(stanza); if (formatInvalid) { // FIXME: Something here fails! syslog(LOG_WARNING, "Error in XML-RPC format/n"); sdvp_InitiateReplyParameters(&replyParams, 1); replyParams->params[0].strValue = strdup("Error in XML-RPC format/n"); replyParams->params[0].type = IEC_VISIBLE_STRING; xmpp_stanza_set_type(reply, "error"); // TODO: Create a type //HJP var her! xmlRpcReply = _CreateReply(ctx, SDVP_METHOD_UNDEFINED ,replyParams); xmpp_stanza_add_child(reply, xmlRpcReply); //HJP: stanza_add_child laver en kopi, s C++ xnGetStatusString函数代码示例 C++ xmpp_stanza_set_ns函数代码示例
|