/** * @brief Returns the kind of the message (i.e. category + method). * * @param message * * @retval */ const char * LSMessageGetKind(LSMessage *message) { if (!message) return NULL; if (message->kindAllocated) return message->kindAllocated; const char *category = LSMessageGetCategory(message); const char *method = LSMessageGetMethod(message); message->kindAllocated = _LSMessageGetKindHelper(category,method); return message->kindAllocated; }
/** * @brief Posts a message to all in subscription '/category/method'. * This is equivalent to: * LSSubscriptionReply(sh, '/category/method', payload, lserror) * * @deprecated Please use LSSubscriptionReply() instead. * * @param sh * @param category * @param method * @param payload * @param lserror * * @retval */ bool LSSubscriptionPost(LSHandle *sh, const char *category, const char *method, const char *payload, LSError *lserror) { LSHANDLE_VALIDATE(sh); bool retVal = false; char *key = _LSMessageGetKindHelper(category, method); retVal = LSSubscriptionReply(sh, key, payload, lserror); g_free(key); return retVal; }