+#ifdef WITH_MQ
+OCStackResult NSProviderPublishTopic(OCRepPayload * payload, OCClientResponseHandler response)
+{
+ NS_LOG(DEBUG, "NSProviderPublishTopic - IN");
+ OCCallbackData cbData;
+ memset(&cbData, 0, sizeof(OCCallbackData));
+ cbData.cb = response;
+ cbData.cd = NULL;
+ cbData.context = NULL;
+
+ NSMQServerInfo * serverInfo = NSGetMQServerInfo();
+
+ if (!serverInfo)
+ {
+ NS_LOG(DEBUG, "serverInfo is not NULL");
+ NS_LOG_V(DEBUG, "serverInfo->serverUri = %s", serverInfo->serverUri);
+ }
+
+ NS_LOG(DEBUG, "NSProviderPublishTopic - OUT");
+
+ return OCDoResource(NULL, OC_REST_POST, serverInfo->serverUri, serverInfo->devAddr,
+ (OCPayload *)payload, CT_ADAPTER_TCP, OC_LOW_QOS, &cbData, NULL, 0);
+}
+#endif
+