OCStackResult JniOcResource::get(JNIEnv* env, const QueryParamsMap &queryParametersMap, jobject jListener)
{
- JniOnGetListener::Ptr onGetListener = addOnGetListener(env, jListener);
+ JniOnGetListener *onGetListener = addOnGetListener(env, jListener);
- GetCallback getCallback = std::bind([](
+ GetCallback getCallback = [onGetListener](
const HeaderOptions& opts,
const OCRepresentation& rep,
- const int eCode,
- std::weak_ptr<JniOnGetListener> weak_ref)
+ const int eCode)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->onGetCallback(opts, rep, eCode);
- }
- }, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, onGetListener);
+ onGetListener->onGetCallback(opts, rep, eCode);
+ };
return m_sharedResource->get(queryParametersMap, getCallback);
}
OCStackResult JniOcResource::get(JNIEnv* env, const QueryParamsMap &queryParametersMap, jobject jListener,
QualityOfService QoS)
{
- JniOnGetListener::Ptr onGetListener = addOnGetListener(env, jListener);
+ JniOnGetListener *onGetListener = addOnGetListener(env, jListener);
- GetCallback getCallback = std::bind([](
- const HeaderOptions& opts,
- const OCRepresentation& rep,
- const int eCode,
- std::weak_ptr<JniOnGetListener> weak_ref)
+ GetCallback getCallback = [onGetListener](const HeaderOptions& opts, const OCRepresentation& rep,
+ const int eCode)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->onGetCallback(opts, rep, eCode);
- }
- }, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, onGetListener);
+ onGetListener->onGetCallback(opts, rep, eCode);
+ };
return m_sharedResource->get(queryParametersMap, getCallback, QoS);
}
const QueryParamsMap &queryParametersMap,
jobject jListener)
{
- JniOnGetListener::Ptr onGetListener = addOnGetListener(env, jListener);
+ JniOnGetListener *onGetListener = addOnGetListener(env, jListener);
- GetCallback getCallback = std::bind([](
- const HeaderOptions& opts,
- const OCRepresentation& rep,
- const int eCode,
- std::weak_ptr<JniOnGetListener> weak_ref)
+ GetCallback getCallback = [onGetListener](const HeaderOptions& opts,
+ const OCRepresentation& rep, const int eCode)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->onGetCallback(opts, rep, eCode);
- }
- }, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, onGetListener);
+ onGetListener->onGetCallback(opts, rep, eCode);
+ };
- return m_sharedResource->get(resourceType, resourceInterface, queryParametersMap, getCallback);
+ return m_sharedResource->get(resourceType, resourceInterface, queryParametersMap,
+ getCallback);
}
OCStackResult JniOcResource::get(JNIEnv* env, const std::string &resourceType,
const std::string &resourceInterface, const QueryParamsMap &queryParametersMap,
jobject jListener, QualityOfService QoS)
{
- JniOnGetListener::Ptr onGetListener = addOnGetListener(env, jListener);
+ JniOnGetListener *onGetListener = addOnGetListener(env, jListener);
- GetCallback getCallback = std::bind([](
- const HeaderOptions& opts,
- const OCRepresentation& rep,
- const int eCode,
- std::weak_ptr<JniOnGetListener> weak_ref)
+ GetCallback getCallback = [onGetListener](const HeaderOptions& opts,
+ const OCRepresentation& rep, const int eCode)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->onGetCallback(opts, rep, eCode);
- }
- }, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, onGetListener);
+ onGetListener->onGetCallback(opts, rep, eCode);
+ };
- return m_sharedResource->get(resourceType, resourceInterface, queryParametersMap, getCallback, QoS);
+ return m_sharedResource->get(resourceType, resourceInterface, queryParametersMap,
+ getCallback, QoS);
}
OCStackResult JniOcResource::put(JNIEnv* env, const OCRepresentation &representation,
const QueryParamsMap &queryParametersMap, jobject jListener)
{
- JniOnPutListener::Ptr onPutListener = addOnPutListener(env, jListener);
+ JniOnPutListener *onPutListener = addOnPutListener(env, jListener);
- PutCallback putCallback = std::bind([](
- const HeaderOptions& opts,
- const OCRepresentation& rep,
- const int eCode,
- std::weak_ptr<JniOnPutListener> weak_ref)
+ PutCallback putCallback = [onPutListener](const HeaderOptions& opts,
+ const OCRepresentation& rep, const int eCode)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->onPutCallback(opts, rep, eCode);
- }
- }, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, onPutListener);
+ onPutListener->onPutCallback(opts, rep, eCode);
+ };
return m_sharedResource->put(representation, queryParametersMap, putCallback);
}
OCStackResult JniOcResource::put(JNIEnv* env, const OCRepresentation &representation,
const QueryParamsMap &queryParametersMap, jobject jListener, QualityOfService QoS)
{
- JniOnPutListener::Ptr onPutListener = addOnPutListener(env, jListener);
+ JniOnPutListener *onPutListener = addOnPutListener(env, jListener);
- PutCallback putCallback = std::bind([](
- const HeaderOptions& opts,
- const OCRepresentation& rep,
- const int eCode,
- std::weak_ptr<JniOnPutListener> weak_ref)
+ PutCallback putCallback = [onPutListener](const HeaderOptions& opts,
+ const OCRepresentation& rep, const int eCode)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->onPutCallback(opts, rep, eCode);
- }
- }, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, onPutListener);
+ onPutListener->onPutCallback(opts, rep, eCode);
+ };
return m_sharedResource->put(representation, queryParametersMap, putCallback, QoS);
}
const std::string &resourceInterface, const OCRepresentation &representation,
const QueryParamsMap &queryParametersMap, jobject jListener)
{
- JniOnPutListener::Ptr onPutListener = addOnPutListener(env, jListener);
+ JniOnPutListener *onPutListener = addOnPutListener(env, jListener);
- PutCallback putCallback = std::bind([](
- const HeaderOptions& opts,
- const OCRepresentation& rep,
- const int eCode,
- std::weak_ptr<JniOnPutListener> weak_ref)
+ PutCallback putCallback = [onPutListener](const HeaderOptions& opts,
+ const OCRepresentation& rep, const int eCode)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->onPutCallback(opts, rep, eCode);
- }
- }, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, onPutListener);
+ onPutListener->onPutCallback(opts, rep, eCode);
+ };
return m_sharedResource->put(resourceType, resourceInterface, representation,
- queryParametersMap, putCallback);
+ queryParametersMap, putCallback);
}
OCStackResult JniOcResource::put(JNIEnv* env, const std::string &resourceType,
const std::string &resourceInterface, const OCRepresentation &representation,
const QueryParamsMap &queryParametersMap, jobject jListener, QualityOfService QoS)
{
- JniOnPutListener::Ptr onPutListener = addOnPutListener(env, jListener);
+ JniOnPutListener *onPutListener = addOnPutListener(env, jListener);
- PutCallback putCallback = std::bind( [](
- const HeaderOptions& opts,
- const OCRepresentation& rep,
- const int eCode,
- std::weak_ptr<JniOnPutListener> weak_ref)
+ PutCallback putCallback = [onPutListener](const HeaderOptions& opts,
+ const OCRepresentation& rep, const int eCode)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->onPutCallback(opts, rep, eCode);
- }
- }, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, onPutListener);
+ onPutListener->onPutCallback(opts, rep, eCode);
+ };
return m_sharedResource->put(resourceType, resourceInterface, representation,
- queryParametersMap, putCallback, QoS);
+ queryParametersMap, putCallback, QoS);
}
OCStackResult JniOcResource::post(JNIEnv* env, const OCRepresentation &representation,
const QueryParamsMap &queryParametersMap, jobject jListener)
{
- JniOnPostListener::Ptr onPostListener = addOnPostListener(env, jListener);
+ JniOnPostListener *onPostListener = addOnPostListener(env, jListener);
- PostCallback postCallback = std::bind([](
- const HeaderOptions& opts,
- const OCRepresentation& rep,
- const int eCode,
- std::weak_ptr<JniOnPostListener> weak_ref)
+ PostCallback postCallback = [onPostListener](const HeaderOptions& opts,
+ const OCRepresentation& rep, const int eCode)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->onPostCallback(opts, rep, eCode);
- }
- }, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, onPostListener);
+ onPostListener->onPostCallback(opts, rep, eCode);
+ };
return m_sharedResource->post(representation, queryParametersMap, postCallback);
}
OCStackResult JniOcResource::post(JNIEnv* env, const OCRepresentation &representation,
const QueryParamsMap &queryParametersMap, jobject jListener, QualityOfService QoS)
{
- JniOnPostListener::Ptr onPostListener = addOnPostListener(env, jListener);
+ JniOnPostListener *onPostListener = addOnPostListener(env, jListener);
- PostCallback postCallback = std::bind([](
- const HeaderOptions& opts,
- const OCRepresentation& rep,
- const int eCode,
- std::weak_ptr<JniOnPostListener> weak_ref)
+ PostCallback postCallback = [onPostListener](const HeaderOptions& opts,
+ const OCRepresentation& rep, const int eCode)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->onPostCallback(opts, rep, eCode);
- }
- }, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, onPostListener);
+ onPostListener->onPostCallback(opts, rep, eCode);
+ };
return m_sharedResource->post(representation, queryParametersMap, postCallback, QoS);
}
const std::string &resourceInterface, const OCRepresentation &representation,
const QueryParamsMap &queryParametersMap, jobject jListener)
{
- JniOnPostListener::Ptr onPostListener = addOnPostListener(env, jListener);
+ JniOnPostListener *onPostListener = addOnPostListener(env, jListener);
- PostCallback postCallback = std::bind([](
- const HeaderOptions& opts,
- const OCRepresentation& rep,
- const int eCode,
- std::weak_ptr<JniOnPostListener> weak_ref)
+ PostCallback postCallback = [onPostListener](const HeaderOptions& opts,
+ const OCRepresentation& rep, const int eCode)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->onPostCallback(opts, rep, eCode);
- }
- }, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, onPostListener);
+ onPostListener->onPostCallback(opts, rep, eCode);
+ };
return m_sharedResource->post(resourceType, resourceInterface, representation,
- queryParametersMap, postCallback);
+ queryParametersMap, postCallback);
}
OCStackResult JniOcResource::post(JNIEnv* env, const std::string &resourceType,
const std::string &resourceInterface, const OCRepresentation &representation,
const QueryParamsMap &queryParametersMap, jobject jListener, QualityOfService QoS)
{
- JniOnPostListener::Ptr onPostListener = addOnPostListener(env, jListener);
+ JniOnPostListener *onPostListener = addOnPostListener(env, jListener);
- PostCallback postCallback = std::bind([](
- const HeaderOptions& opts,
- const OCRepresentation& rep,
- const int eCode,
- std::weak_ptr<JniOnPostListener> weak_ref)
+ PostCallback postCallback = [onPostListener](const HeaderOptions& opts,
+ const OCRepresentation& rep, const int eCode)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->onPostCallback(opts, rep, eCode);
- }
- }, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, onPostListener);
+ onPostListener->onPostCallback(opts, rep, eCode);
+ };
return m_sharedResource->post(resourceType, resourceInterface, representation,
- queryParametersMap, postCallback, QoS);
+ queryParametersMap, postCallback, QoS);
}
OCStackResult JniOcResource::deleteResource(JNIEnv* env, jobject jListener)
{
- JniOnDeleteListener::Ptr onDeleteListener = addOnDeleteListener(env, jListener);
+ JniOnDeleteListener *onDeleteListener = addOnDeleteListener(env, jListener);
- DeleteCallback deleteCallback = std::bind([](
- const HeaderOptions& opts,
- const int eCode,
- std::weak_ptr<JniOnDeleteListener> weak_ref)
+ DeleteCallback deleteCallback = [onDeleteListener](const HeaderOptions& opts,
+ const int eCode)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->onDeleteCallback(opts, eCode);
- }
- }, std::placeholders::_1, std::placeholders::_2, onDeleteListener);
+ onDeleteListener->onDeleteCallback(opts, eCode);
+ };
return m_sharedResource->deleteResource(deleteCallback);
}
OCStackResult JniOcResource::deleteResource(JNIEnv* env, jobject jListener, QualityOfService QoS)
{
- JniOnDeleteListener::Ptr onDeleteListener = addOnDeleteListener(env, jListener);
+ JniOnDeleteListener *onDeleteListener = addOnDeleteListener(env, jListener);
- DeleteCallback deleteCallback = std::bind([](
- const HeaderOptions& opts,
- const int eCode,
- std::weak_ptr<JniOnDeleteListener> weak_ref)
+ DeleteCallback deleteCallback = [onDeleteListener](const HeaderOptions& opts, const int eCode)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->onDeleteCallback(opts, eCode);
- }
- }, std::placeholders::_1, std::placeholders::_2, onDeleteListener);
+ onDeleteListener->onDeleteCallback(opts, eCode);
+ };
return m_sharedResource->deleteResource(deleteCallback, QoS);
}
OCStackResult JniOcResource::observe(JNIEnv* env, ObserveType observeType,
const QueryParamsMap &queryParametersMap, jobject jListener)
{
- JniOnObserveListener::Ptr onObserveListener = addOnObserveListener(env, jListener);
+ JniOnObserveListener *onObserveListener = addOnObserveListener(env, jListener);
- ObserveCallback observeCallback = std::bind([](
- const HeaderOptions& opts,
- const OCRepresentation& rep,
- const int& eCode,
- const int& sequenceNumber,
- std::weak_ptr<JniOnObserveListener> weak_ref)
+ ObserveCallback observeCallback = [onObserveListener](const HeaderOptions& opts,
+ const OCRepresentation& rep, const int& eCode, const int& sequenceNumber)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->onObserveCallback(opts, rep, eCode, sequenceNumber);
- }
- }, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3,
- std::placeholders::_4, onObserveListener);
+ onObserveListener->onObserveCallback(opts, rep, eCode, sequenceNumber);
+ };
return m_sharedResource->observe(observeType, queryParametersMap, observeCallback);
}
OCStackResult JniOcResource::observe(JNIEnv* env, ObserveType observeType,
const QueryParamsMap &queryParametersMap, jobject jListener, QualityOfService QoS)
{
- JniOnObserveListener::Ptr onObserveListener = addOnObserveListener(env, jListener);
+ JniOnObserveListener *onObserveListener = addOnObserveListener(env, jListener);
- ObserveCallback observeCallback = std::bind([](
- const HeaderOptions& opts,
- const OCRepresentation& rep,
- const int& eCode,
- const int& sequenceNumber,
- std::weak_ptr<JniOnObserveListener> weak_ref)
+ ObserveCallback observeCallback = [onObserveListener](const HeaderOptions& opts,
+ const OCRepresentation& rep, const int& eCode, const int& sequenceNumber)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->onObserveCallback(opts, rep, eCode, sequenceNumber);
- }
- }, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3,
- std::placeholders::_4, onObserveListener);
+ onObserveListener->onObserveCallback(opts, rep, eCode, sequenceNumber);
+ };
return m_sharedResource->observe(observeType, queryParametersMap, observeCallback, QoS);
}
return m_sharedResource->deviceName();
}
-JniOnGetListener::Ptr JniOcResource::addOnGetListener(JNIEnv* env, jobject jListener)
+JniOnGetListener* JniOcResource::addOnGetListener(JNIEnv* env, jobject jListener)
{
return this->m_onGetManager.addListener(env, jListener, this);
}
-JniOnPutListener::Ptr JniOcResource::addOnPutListener(JNIEnv* env, jobject jListener)
+JniOnPutListener* JniOcResource::addOnPutListener(JNIEnv* env, jobject jListener)
{
return this->m_onPutManager.addListener(env, jListener, this);
}
-JniOnPostListener::Ptr JniOcResource::addOnPostListener(JNIEnv* env, jobject jListener)
+JniOnPostListener* JniOcResource::addOnPostListener(JNIEnv* env, jobject jListener)
{
return this->m_onPostManager.addListener(env, jListener, this);
}
-JniOnDeleteListener::Ptr JniOcResource::addOnDeleteListener(JNIEnv* env, jobject jListener)
+JniOnDeleteListener* JniOcResource::addOnDeleteListener(JNIEnv* env, jobject jListener)
{
return this->m_onDeleteManager.addListener(env, jListener, this);
}
-JniOnObserveListener::Ptr JniOcResource::addOnObserveListener(JNIEnv* env, jobject jListener)
+JniOnObserveListener* JniOcResource::addOnObserveListener(JNIEnv* env, jobject jListener)
{
return this->m_onObserveManager.addListener(env, jListener, this);
}
}
#ifdef WITH_MQ
-std::shared_ptr<JniOnMQTopicFoundListener> JniOcResource::addOnTopicFoundListener(JNIEnv* env, jobject jListener)
+JniOnMQTopicFoundListener* JniOcResource::addOnTopicFoundListener(JNIEnv* env, jobject jListener)
{
return this->m_onFoundTopicResourceManager.addListener(env, jListener, this);
}
this->m_onFoundTopicResourceManager.removeListener(env, jListener);
}
-std::shared_ptr<JniOnMQSubscribeListener> JniOcResource::addOnMQTopicSubscribeListener(JNIEnv* env, jobject jListener)
+JniOnMQSubscribeListener* JniOcResource::addOnMQTopicSubscribeListener(JNIEnv* env, jobject jListener)
{
return this->m_onSubcribeTopicManager.addListener(env, jListener, this);
}
OCStackResult JniOcResource::discoveryMQTopics(JNIEnv* env,
const QueryParamsMap &queryParametersMap, jobject jListener, QualityOfService QoS)
{
- std::shared_ptr<JniOnMQTopicFoundListener> onTopicFoundListener = addOnTopicFoundListener(env, jListener);
+ JniOnMQTopicFoundListener *onTopicFoundListener = addOnTopicFoundListener(env, jListener);
- MQTopicCallback findCallback = std::bind([](const int& eCode,
- const std::string& uri,
- std::shared_ptr<OCResource> resource
- std::weak_ptr<JniOnMQTopicFoundListener> weak_ref)
+ MQTopicCallback findCallback = [onTopicFoundListener](const int& eCode,
+ const std::string& uri, std::shared_ptr<OCResource> resource)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->foundTopicCallback(eCode, uri, resource);
- }
- }, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, onTopicFoundListener);
+ onTopicFoundListener->foundTopicCallback(eCode, uri, resource);
+ };
return m_sharedResource->discoveryMQTopics(queryParametersMap, findCallback, QoS);
}
const OCRepresentation &representation, const std::string &targetUri,
const QueryParamsMap &queryParametersMap, jobject jListener, QualityOfService QoS)
{
- std::shared_ptr<JniOnMQTopicFoundListener> onTopicCreatedListener = addOnTopicFoundListener(env, jListener);
+ JniOnMQTopicFoundListener *onTopicCreatedListener = addOnTopicFoundListener(env, jListener);
- MQTopicCallback createCallback = std::bind([](const int& eCode,
- const std::string& uri,
- std::shared_ptr<OCResource> resource,
- std::weak_ptr<JniOnMQTopicFoundListener> weak_ref)
+ MQTopicCallback createCallback = [onTopicCreatedListener](const int& eCode,
+ const std::string& uri, std::shared_ptr<OCResource> resource)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->createdTopicCallback(eCode, uri, resource);
- }
- }, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, onTopicCreatedListener);
+ onTopicCreatedListener->createdTopicCallback(eCode, uri, resource);
+ };
return m_sharedResource->createMQTopic(representation, targetUri,
queryParametersMap,
OCStackResult JniOcResource::subscribeMQTopic(JNIEnv* env,
const QueryParamsMap &queryParametersMap, jobject jListener, QualityOfService QoS)
{
- std::shared_ptr<JniOnMQSubscribeListener> onSubscribeListener = addOnMQTopicSubscribeListener(env, jListener);
+ JniOnMQSubscribeListener *onSubscribeListener = addOnMQTopicSubscribeListener(env, jListener);
- ObserveCallback subscribeCallback = std::bind([](const HeaderOptions& opts,
- const OCRepresentation& rep,
- const int& eCode,
- const int& sequenceNumber,
- std::weak_ptr<JniOnMQSubscribeListener> weak_ref)
+ ObserveCallback subscribeCallback = [onSubscribeListener](const HeaderOptions& opts,
+ const OCRepresentation& rep, const int& eCode, const int& sequenceNumber)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->onSubscribeCallback(opts, rep, eCode, sequenceNumber);
- }
- }, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3,
- std::placeholders::_4, onSubscribeListener);
+ onSubscribeListener->onSubscribeCallback(opts, rep, eCode, sequenceNumber);
+ };
return m_sharedResource->subscribeMQTopic(ObserveType::Observe, queryParametersMap,
subscribeCallback, QoS);
OCStackResult JniOcResource::requestMQPublish(JNIEnv* env,
const QueryParamsMap &queryParametersMap, jobject jListener, QualityOfService QoS)
{
- JniOnPostListener::Ptr onPostListener = addOnPostListener(env, jListener);
+ JniOnPostListener *onPostListener = addOnPostListener(env, jListener);
- PostCallback postCallback = std::bind([](const HeaderOptions& opts,
- const OCRepresentation& rep,
- const int eCode,
- std::weak_ptr<JniOnPostListener> weak_ref)
+ PostCallback postCallback = [onPostListener](const HeaderOptions& opts,
+ const OCRepresentation& rep, const int eCode)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- listener->onPostCallback(opts, rep, eCode);
- }
- }, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, onPostListener);
+ onPostListener->onPostCallback(opts, rep, eCode);
+ };
return m_sharedResource->requestMQPublish(queryParametersMap, postCallback, QoS);
}
OCStackResult JniOcResource::publishMQTopic(JNIEnv* env, const OCRepresentation &representation,
const QueryParamsMap &queryParametersMap, jobject jListener, QualityOfService QoS)
{
- JniOnPostListener::Ptr onPostListener = addOnPostListener(env, jListener);
+ JniOnPostListener *onPostListener = addOnPostListener(env, jListener);
- PostCallback postCallback = std::bind([](const HeaderOptions& opts,
- const OCRepresentation& rep,
- const int eCode,
- std::weak_ptr<JniOnPostListener> weak_ref)
+ PostCallback postCallback = [onPostListener](const HeaderOptions& opts,
+ const OCRepresentation& rep, const int eCode)
{
- auto listener = weak_ref.lock();
- if (listener)
- {
- onPostListener->onPostCallback(opts, rep, eCode);
- }
- }, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, onPostListener);
+ onPostListener->onPostCallback(opts, rep, eCode);
+ };
return m_sharedResource->publishMQTopic(representation, queryParametersMap,
postCallback, QoS);