#include "JniOcResourceResponse.h"
#include "JniUtils.h"
+using namespace OC;
+
JniEntityHandler::JniEntityHandler(JNIEnv *env, jobject entityHandler)
{
m_jListener = env->NewGlobalRef(entityHandler);
#include "JniOnDeleteListener.h"
#include "JniOnObserveListener.h"
-using namespace OC;
-
class JniOcAccountManager
{
public:
#include "JniCreateAciIdListener.h"
#include <mutex>
-
-using namespace OC;
-
#ifndef _Included_org_iotivity_base_OcCloudProvisioning
#define _Included_org_iotivity_base_OcCloudProvisioning
class JniOcCloudProvisioning
#ifndef _Included_org_iotivity_base_OcDirectPairDevice
#define _Included_org_iotivity_base_OcDirectPairDevice
-using namespace OC;
-
class JniOcDirectPairDevice
{
public:
- JniOcDirectPairDevice(std::shared_ptr<OCDirectPairing> directPairingDevice);
+ JniOcDirectPairDevice(std::shared_ptr<OC::OCDirectPairing> directPairingDevice);
~JniOcDirectPairDevice();
static JniOcDirectPairDevice* getJniOcDirectPairDevicePtr(JNIEnv *env, jobject thiz);
static jintArray JconvertIntVectorToJavaList(JNIEnv *env, std::vector<OCPrm_t> &vector);
- std::shared_ptr<OCDirectPairing> getPtr();
+ std::shared_ptr<OC::OCDirectPairing> getPtr();
std::string getHost();
std::vector<OCPrm_t> getPairingMethods();
OCConnectivityType connectivityType();
private:
- std::shared_ptr<OCDirectPairing> m_sharedDirectPairDevice;
+ std::shared_ptr<OC::OCDirectPairing> m_sharedDirectPairDevice;
};
/* DO NOT EDIT THIS FILE BEYOND THIS LINE - it is machine generated */
#endif
using namespace OC;
+using namespace OC::OCPlatform;
JniOnResourceFoundListener* AddOnResourceFoundListener(JNIEnv* env, jobject jListener)
{
JniOnResourceFoundListener *onResFoundListener = AddOnResourceFoundListener(env, jListener);
- FindCallback findCallback = [onResFoundListener](std::shared_ptr<OCResource> resource)
+ FindCallback findCallback = [onResFoundListener](std::shared_ptr<OC::OCResource> resource)
{
onResFoundListener->foundResourceCallback(resource);
};
}
JniOnResourceFoundListener *onResFoundListener = AddOnResourceFoundListener(env, jListener);
- FindCallback findCallback = [onResFoundListener](std::shared_ptr<OCResource> resource)
+ FindCallback findCallback = [onResFoundListener](std::shared_ptr<OC::OCResource> resource)
{
onResFoundListener->foundResourceCallback(resource);
};
std::vector<std::string> interfaces;
JniUtils::convertJavaStrArrToStrVector(env, jInterfaceArray, interfaces);
- std::shared_ptr<OCResource> resource = OCPlatform::constructResourceObject(
+ std::shared_ptr<OC::OCResource> resource = OCPlatform::constructResourceObject(
host,
uri,
static_cast<OCConnectivityType>(jConnectivityType),
#ifndef _Included_org_iotivity_base_OcPlatform
#define _Included_org_iotivity_base_OcPlatform
-using namespace OC;
-
JniOnResourceFoundListener* AddOnResourceFoundListener(JNIEnv* env, jobject jListener);
void RemoveOnResourceFoundListener(JNIEnv* env, jobject jListener);
#include "JniOcPresenceHandle.h"
#include "OCPlatform.h"
+using namespace OC::OCPlatform;
+
JniOcPresenceHandle::JniOcPresenceHandle(JniOnPresenceListener* jniListener, OCPresenceHandle presenceHandle)
: m_jniListener(jniListener), m_presenceHandle(presenceHandle), m_jniObserveListener(nullptr)
{
#ifndef _Included_org_iotivity_base_OcPresenceHandle
#define _Included_org_iotivity_base_OcPresenceHandle
-using namespace OC::OCPlatform;
-
class JniOcPresenceHandle
{
public:
- JniOcPresenceHandle(JniOnPresenceListener* jniListener, OCPresenceHandle presenceHandle);
- JniOcPresenceHandle(JniOnObserveListener* jniListener, OCPresenceHandle presenceHandle);
+ JniOcPresenceHandle(JniOnPresenceListener* jniListener, OC::OCPlatform::OCPresenceHandle presenceHandle);
+ JniOcPresenceHandle(JniOnObserveListener* jniListener, OC::OCPlatform::OCPresenceHandle presenceHandle);
~JniOcPresenceHandle();
JniOcPresenceHandle(const JniOcPresenceHandle &) = delete;
void operator=(const JniOcPresenceHandle &) = delete;
static JniOcPresenceHandle* getJniOcPresenceHandlePtr(JNIEnv *env, jobject thiz);
- OCPresenceHandle getOCPresenceHandle();
+ OC::OCPlatform::OCPresenceHandle getOCPresenceHandle();
JniOnPresenceListener* getJniOnPresenceListener();
JniOnObserveListener* getJniOnObserveListener();
private:
JniOnPresenceListener* m_jniListener;
JniOnObserveListener* m_jniObserveListener;
- OCPresenceHandle m_presenceHandle;
+ OC::OCPlatform::OCPresenceHandle m_presenceHandle;
};
#ifdef __cplusplus
#ifndef _Included_org_iotivity_base_OcProvisioning
#define _Included_org_iotivity_base_OcProvisioning
-using namespace OC;
-
/* DO NOT EDIT THIS FILE - it is machine generated */
/* Header for class org_iotivity_base_OcProvisioning */
#ifndef _Included_org_iotivity_base_RDClient
#define _Included_org_iotivity_base_RDClient
-using namespace OC;
-
void RemoveOnPublishResourceListener(JNIEnv* env, jobject jListener);
JniOnPublishResourceListener* AddOnPublishResourceListener(JNIEnv* env, jobject jListener);
#ifndef _Included_org_iotivity_base_OcRepresentation
#define _Included_org_iotivity_base_OcRepresentation
-using namespace OC;
-
class JniOcRepresentation
{
public:
- static OCRepresentation* getOCRepresentationPtr(JNIEnv *env, jobject thiz);
+ static OC::OCRepresentation* getOCRepresentationPtr(JNIEnv *env, jobject thiz);
};
struct JObjectConverter : boost::static_visitor < jobject >
{
}
- jobject operator()(const NullType&) const
+ jobject operator()(const OC::NullType&) const
{
return nullptr;
}
}
jobject operator()(const OC::OCRepresentation& val) const
{
- OCRepresentation * rep = new OCRepresentation(val);
+ OC::OCRepresentation * rep = new OC::OCRepresentation(val);
jlong handle = reinterpret_cast<jlong>(rep);
jobject jRepresentation = env->NewObject(
g_cls_OcRepresentation,
}
for (jsize i = 0; i < len; ++i)
{
- OCRepresentation* rep = new OCRepresentation(val[i]);
+ OC::OCRepresentation* rep = new OC::OCRepresentation(val[i]);
jlong handle = reinterpret_cast<jlong>(rep);
jobject jRepresentation = env->NewObject(g_cls_OcRepresentation, g_mid_OcRepresentation_N_ctor_bool,
handle, true);
}
for (jsize j = 0; j < lenInner; ++j)
{
- OCRepresentation* rep = new OCRepresentation(val[i][j]);
+ OC::OCRepresentation* rep = new OC::OCRepresentation(val[i][j]);
jlong handle = reinterpret_cast<jlong>(rep);
jobject jRepresentation = env->NewObject(g_cls_OcRepresentation, g_mid_OcRepresentation_N_ctor_bool,
handle, true);
}
for (jsize j = 0; j < lenInner; ++j)
{
- OCRepresentation* rep = new OCRepresentation(val[k][i][j]);
+ OC::OCRepresentation* rep = new OC::OCRepresentation(val[k][i][j]);
jlong handle = reinterpret_cast<jlong>(rep);
jobject jRepresentation = env->NewObject(g_cls_OcRepresentation, g_mid_OcRepresentation_N_ctor_bool,
handle, true);
#include "JniOcRepresentation.h"
#include "JniUtils.h"
+using namespace OC;
+
JniOcResource::JniOcResource(std::shared_ptr<OCResource> resource)
: m_sharedResource(resource)
{
#ifndef _Included_org_iotivity_base_OcResource
#define _Included_org_iotivity_base_OcResource
-using namespace OC;
-
class JniOcResource
{
public:
- JniOcResource(std::shared_ptr<OCResource> resource);
+ JniOcResource(std::shared_ptr<OC::OCResource> resource);
~JniOcResource();
- OCStackResult get(JNIEnv* env, const QueryParamsMap &queryParametersMap, jobject jListener);
- OCStackResult get(JNIEnv* env, const QueryParamsMap &queryParametersMap, jobject jListener,
- QualityOfService QoS);
+ OCStackResult get(JNIEnv* env, const OC::QueryParamsMap &queryParametersMap, jobject jListener);
+ OCStackResult get(JNIEnv* env, const OC::QueryParamsMap &queryParametersMap, jobject jListener,
+ OC::QualityOfService QoS);
OCStackResult get(JNIEnv* env, const std::string &resourceType, const std::string &resourceInterface,
- const QueryParamsMap &queryParametersMap, jobject jListener);
+ const OC::QueryParamsMap &queryParametersMap, jobject jListener);
OCStackResult get(JNIEnv* env, const std::string &resourceType, const std::string &resourceInterface,
- const QueryParamsMap &queryParametersMap, jobject jListener, QualityOfService QoS);
+ const OC::QueryParamsMap &queryParametersMap, jobject jListener, OC::QualityOfService QoS);
- OCStackResult put(JNIEnv* env, const OCRepresentation &representation, const QueryParamsMap &queryParametersMap,
+ OCStackResult put(JNIEnv* env, const OC::OCRepresentation &representation, const OC::QueryParamsMap &queryParametersMap,
jobject jListener);
- OCStackResult put(JNIEnv* env, const OCRepresentation &representation, const QueryParamsMap &queryParametersMap,
- jobject jListener, QualityOfService QoS);
+ OCStackResult put(JNIEnv* env, const OC::OCRepresentation &representation, const OC::QueryParamsMap &queryParametersMap,
+ jobject jListener, OC::QualityOfService QoS);
OCStackResult put(JNIEnv* env, const std::string &resourceType, const std::string &resourceInterface,
- const OCRepresentation &representation, const QueryParamsMap &queryParametersMap, jobject jListener);
+ const OC::OCRepresentation &representation, const OC::QueryParamsMap &queryParametersMap, jobject jListener);
OCStackResult put(JNIEnv* env, const std::string &resourceType, const std::string &resourceInterface,
- const OCRepresentation &representation, const QueryParamsMap &queryParametersMap, jobject jListener, QualityOfService QoS);
+ const OC::OCRepresentation &representation, const OC::QueryParamsMap &queryParametersMap, jobject jListener, OC::QualityOfService QoS);
- OCStackResult post(JNIEnv* env, const OCRepresentation &representation, const QueryParamsMap &queryParametersMap,
+ OCStackResult post(JNIEnv* env, const OC::OCRepresentation &representation, const OC::QueryParamsMap &queryParametersMap,
jobject jListener);
- OCStackResult post(JNIEnv* env, const OCRepresentation &representation, const QueryParamsMap &queryParametersMap,
- jobject jListener, QualityOfService QoS);
+ OCStackResult post(JNIEnv* env, const OC::OCRepresentation &representation, const OC::QueryParamsMap &queryParametersMap,
+ jobject jListener, OC::QualityOfService QoS);
OCStackResult post(JNIEnv* env, const std::string &resourceType, const std::string &resourceInterface,
- const OCRepresentation &representation, const QueryParamsMap &queryParametersMap, jobject jListener);
+ const OC::OCRepresentation &representation, const OC::QueryParamsMap &queryParametersMap, jobject jListener);
OCStackResult post(JNIEnv* env, const std::string &resourceType, const std::string &resourceInterface,
- const OCRepresentation &representation, const QueryParamsMap &queryParametersMap, jobject jListener, QualityOfService QoS);
+ const OC::OCRepresentation &representation, const OC::QueryParamsMap &queryParametersMap, jobject jListener, OC::QualityOfService QoS);
OCStackResult deleteResource(JNIEnv* env, jobject jListener);
- OCStackResult deleteResource(JNIEnv* env, jobject jListener, QualityOfService QoS);
+ OCStackResult deleteResource(JNIEnv* env, jobject jListener, OC::QualityOfService QoS);
- OCStackResult observe(JNIEnv* env, ObserveType observeType, const QueryParamsMap &queryParametersMap,
+ OCStackResult observe(JNIEnv* env, OC::ObserveType observeType, const OC::QueryParamsMap &queryParametersMap,
jobject jListener);
- OCStackResult observe(JNIEnv* env, ObserveType observeType, const QueryParamsMap &queryParametersMap,
- jobject jListener, QualityOfService qos);
+ OCStackResult observe(JNIEnv* env, OC::ObserveType observeType, const OC::QueryParamsMap &queryParametersMap,
+ jobject jListener, OC::QualityOfService qos);
OCStackResult cancelObserve(JNIEnv* env);
- OCStackResult cancelObserve(JNIEnv* env, QualityOfService qos);
+ OCStackResult cancelObserve(JNIEnv* env, OC::QualityOfService qos);
- void setHeaderOptions(const HeaderOptions &headerOptions);
+ void setHeaderOptions(const OC::HeaderOptions &headerOptions);
void unsetHeaderOptions();
std::string host();
std::vector< std::string > getAllHosts() const;
bool isObservable();
std::vector< std::string > getResourceTypes() const;
std::vector< std::string > getResourceInterfaces(void) const;
- OCResourceIdentifier uniqueIdentifier() const;
+ OC::OCResourceIdentifier uniqueIdentifier() const;
std::string sid() const;
JniOnGetListener* addOnGetListener(JNIEnv* env, jobject jListener);
void removeOnDeleteListener(JNIEnv* env, jobject jListener);
void removeOnObserveListener(JNIEnv* env, jobject jListener);
- std::shared_ptr<OCResource> getOCResource();
+ std::shared_ptr<OC::OCResource> getOCResource();
static JniOcResource* getJniOcResourcePtr(JNIEnv *env, jobject thiz);
void removeOnMQTopicSubscribeListener(JNIEnv* env, jobject jListener);
OCStackResult discoveryMQTopics(JNIEnv* env, const QueryParamsMap &queryParametersMap,
- jobject jListener, QualityOfService QoS);
- OCStackResult createMQTopic(JNIEnv* env, const OCRepresentation &representation,
+ jobject jListener, OC::QualityOfService QoS);
+ OCStackResult createMQTopic(JNIEnv* env, const OC::OCRepresentation &representation,
const std::string &targetUri,
const QueryParamsMap &queryParametersMap,
- jobject jListener, QualityOfService QoS);
+ jobject jListener, OC::QualityOfService QoS);
#endif
#ifdef MQ_SUBSCRIBER
OCStackResult subscribeMQTopic(JNIEnv* env, const QueryParamsMap &queryParametersMap,
- jobject jListener, QualityOfService QoS);
- OCStackResult unsubscribeMQTopic(QualityOfService QoS);
+ jobject jListener, OC::QualityOfService QoS);
+ OCStackResult unsubscribeMQTopic(OC::QualityOfService QoS);
OCStackResult requestMQPublish(JNIEnv* env, const QueryParamsMap &queryParametersMap,
- jobject jListener, QualityOfService QoS);
+ jobject jListener, OC::QualityOfService QoS);
#endif
#ifdef MQ_PUBLISHER
- OCStackResult publishMQTopic(JNIEnv* env, const OCRepresentation &representation,
+ OCStackResult publishMQTopic(JNIEnv* env, const OC::OCRepresentation &representation,
const QueryParamsMap &queryParametersMap,
- jobject jListener, QualityOfService QoS);
+ jobject jListener, OC::QualityOfService QoS);
#endif
private:
JniListenerManager<JniOnMQSubscribeListener> m_onSubcribeTopicManager;
#endif
- std::shared_ptr<OCResource> m_sharedResource;
+ std::shared_ptr<OC::OCResource> m_sharedResource;
};
/* DO NOT EDIT THIS FILE BEYOND THIS LINE - it is machine generated */
#ifndef _Included_org_iotivity_base_OcResourceRequest
#define _Included_org_iotivity_base_OcResourceRequest
-using namespace OC;
-
class JniOcResourceRequest
{
public:
- JniOcResourceRequest(const std::shared_ptr<OCResourceRequest> resourceRequest);
+ JniOcResourceRequest(const std::shared_ptr<OC::OCResourceRequest> resourceRequest);
~JniOcResourceRequest();
std::string getRequestType();
- const QueryParamsMap& getQueryParameters() const;
+ const OC::QueryParamsMap& getQueryParameters() const;
int getRequestHandlerFlag() const;
- const OCRepresentation& getResourceRepresentation() const;
+ const OC::OCRepresentation& getResourceRepresentation() const;
- const ObservationInfo& getObservationInfo() const;
+ const OC::ObservationInfo& getObservationInfo() const;
void setResourceUri(const std::string resourceUri);
std::string getResourceUri(void);
- const HeaderOptions& getHeaderOptions() const;
+ const OC::HeaderOptions& getHeaderOptions() const;
const OCRequestHandle& getRequestHandle() const;
(JNIEnv *env, jobject thiz);
private:
- std::shared_ptr<OCResourceRequest> m_request;
+ std::shared_ptr<OC::OCResourceRequest> m_request;
};
#ifdef __cplusplus
#ifdef __cplusplus
}
#endif
-#endif
\ No newline at end of file
+#endif
#ifndef _Included_org_iotivity_base_OcResourceResponse
#define _Included_org_iotivity_base_OcResourceResponse
-using namespace OC;
-
class JniOcResourceResponse
{
public:
- JniOcResourceResponse(std::shared_ptr<OCResourceResponse> resourceResponse);
+ JniOcResourceResponse(std::shared_ptr<OC::OCResourceResponse> resourceResponse);
~JniOcResourceResponse();
std::string getNewResourceUri(void);
void setNewResourceUri(const std::string newResourceUri);
- void setHeaderOptions(const HeaderOptions& headerOptions);
+ void setHeaderOptions(const OC::HeaderOptions& headerOptions);
void setRequestHandle(const OCRequestHandle& requestHandle);
void setResourceHandle(const OCResourceHandle& resourceHandle);
void setResponseResult(const OCEntityHandlerResult& responseResult);
- void setResourceRepresentation(OCRepresentation& rep, std::string interfaceStr);
- void setResourceRepresentation(OCRepresentation& rep);
- std::shared_ptr<OCResourceResponse> getOCResourceResponse();
+ void setResourceRepresentation(OC::OCRepresentation& rep, std::string interfaceStr);
+ void setResourceRepresentation(OC::OCRepresentation& rep);
+ std::shared_ptr<OC::OCResourceResponse> getOCResourceResponse();
static JniOcResourceResponse* getJniOcResourceResponsePtr(JNIEnv *env, jobject thiz);
private:
- std::shared_ptr<OCResourceResponse> m_response;
+ std::shared_ptr<OC::OCResourceResponse> m_response;
};
#ifdef __cplusplus
#include "aclresource.h"
#include "oic_malloc.h"
#include "oic_string.h"
+
namespace PH = std::placeholders;
+using namespace OC;
JniOcSecureResource::JniOcSecureResource(std::shared_ptr<OCSecureResource> device)
: m_sharedSecureResource(device)
#ifndef _Included_org_iotivity_base_OcSecureResource
#define _Included_org_iotivity_base_OcSecureResource
-using namespace OC;
-
class JniOcSecureResource
{
public:
- JniOcSecureResource(std::shared_ptr<OCSecureResource> secureresource);
+ JniOcSecureResource(std::shared_ptr<OC::OCSecureResource> secureresource);
~JniOcSecureResource();
static JniOcSecureResource* getJniOcSecureResourcePtr(JNIEnv *env, jobject thiz);
std::string getIpAddr(void);
int getDeviceStatus(void);
bool getOwnedStatus(void);
- OCSecureResource* getDevicePtr();
+ OC::OCSecureResource* getDevicePtr();
JniProvisionResultListner* AddProvisionResultListener(JNIEnv* env, jobject jListener);
void RemoveProvisionResultListener(JNIEnv* env, jobject jListener);
OCStackResult doOwnershipTransfer(JNIEnv* env, jobject jListener);
- OCStackResult getLinkedDevices(JNIEnv *env, UuidList_t &uuidList);
+ OCStackResult getLinkedDevices(JNIEnv *env, OC::UuidList_t &uuidList);
OCStackResult provisionACL(JNIEnv* env, jobject acl, jobject jListener);
OCStackResult provisionPairwiseDevices(JNIEnv* env, jint type, jint keySize,
jobject acl1, jobject device2, jobject acl2, jobject jListener);
std::map<jobject, std::pair<JniProvisionResultListner*, int>> resultMap;
std::mutex resultMapLock;
- std::shared_ptr<OCSecureResource> m_sharedSecureResource;
+ std::shared_ptr<OC::OCSecureResource> m_sharedSecureResource;
};
/* DO NOT EDIT THIS FILE BEYOND THIS LINE - it is machine generated */
#include <stdio.h>
#include <string>
#include "octypes.h"
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
namespace OC
{
#include "JniOcAccountManager.h"
#endif
+using namespace OC;
+
JniOnDeleteListener::JniOnDeleteListener(JNIEnv *env, jobject jListener, JniOcResource* owner)
: m_ownerResource(owner)
{
#ifndef _Included_org_iotivity_base_OcResource_OnDeleteListener
#define _Included_org_iotivity_base_OcResource_OnDeleteListener
-using namespace OC;
-
class JniOcResource;
#ifdef WITH_CLOUD
class JniOcAccountManager;
#endif
~JniOnDeleteListener();
- void onDeleteCallback(const HeaderOptions&, const int eCode);
+ void onDeleteCallback(const OC::HeaderOptions&, const int eCode);
private:
jweak m_jwListener;
#ifndef _Included_org_iotivity_base_OcPlatform_OnDeleteResourceListener
#define _Included_org_iotivity_base_OcPlatform_OnDeleteResourceListener
-using namespace OC;
-
class JniOnDeleteResourceListener
{
public:
#include "JniOnDeviceInfoListener.h"
#include "JniOcRepresentation.h"
+using namespace OC;
+
JniOnDeviceInfoListener::JniOnDeviceInfoListener(JNIEnv *env, jobject jListener,
RemoveListenerCallback removeListenerCallback)
{
#include "JniOcAccountManager.h"
#endif
+using namespace OC;
+
JniOnGetListener::JniOnGetListener(JNIEnv *env, jobject jListener, JniOcResource* owner)
: m_ownerResource(owner)
{
#ifndef _Included_org_iotivity_base_OcResource_OnGetListener
#define _Included_org_iotivity_base_OcResource_OnGetListener
-using namespace OC;
-
class JniOcResource;
#ifdef WITH_CLOUD
class JniOcAccountManager;
JniOnGetListener(JNIEnv *env, jobject listener, JniOcAccountManager* resource);
#endif
~JniOnGetListener();
- void onGetCallback(const HeaderOptions& headerOptions, const OCRepresentation& rep, const int eCode);
+ void onGetCallback(const OC::HeaderOptions& headerOptions, const OC::OCRepresentation& rep, const int eCode);
private:
jweak m_jwListener;
#ifndef _Included_org_iotivity_base_OcResource_OnMQSubscribeListener
#define _Included_org_iotivity_base_OcResource_OnMQSubscribeListener
-using namespace OC;
-
class JniOcResource;
class JniOnMQSubscribeListener
#ifndef _Included_org_iotivity_base_OcResource_JniOnMQTopicFoundListener
#define _Included_org_iotivity_base_OcResource_JniOnMQTopicFoundListener
-using namespace OC;
-
class JniOcResource;
class JniOnMQTopicFoundListener
#include "JniOcAccountManager.h"
#endif
+using namespace OC;
+
#define CA_OBSERVE_MAX_SEQUENCE_NUMBER 0xFFFFFF
JniOnObserveListener::JniOnObserveListener(JNIEnv *env, jobject jListener, JniOcResource* owner)
#ifndef _Included_org_iotivity_base_OcResource_OnObserveListener
#define _Included_org_iotivity_base_OcResource_OnObserveListener
-using namespace OC;
-
class JniOcResource;
#ifdef WITH_CLOUD
class JniOcAccountManager;
JniOnObserveListener(JNIEnv *env, jobject jListener, JniOcAccountManager* owner);
#endif
~JniOnObserveListener();
- void onObserveCallback(const HeaderOptions headerOptions, const OCRepresentation& rep,
+ void onObserveCallback(const OC::HeaderOptions headerOptions, const OC::OCRepresentation& rep,
const int& eCode, const int& sequenceNumber);
jweak getJWListener();
private:
#include "JniOnPlatformInfoListener.h"
#include "JniOcRepresentation.h"
+using namespace OC;
+
JniOnPlatformInfoListener::JniOnPlatformInfoListener(JNIEnv *env, jobject jListener,
RemoveListenerCallback removeListenerCallback)
{
#include "JniOcAccountManager.h"
#endif
+using namespace OC;
+
JniOnPostListener::JniOnPostListener(JNIEnv *env, jobject jListener, JniOcResource* owner)
: m_ownerResource(owner)
{
#ifndef _Included_org_iotivity_base_OcResource_OnPostListener
#define _Included_org_iotivity_base_OcResource_OnPostListener
-using namespace OC;
-
class JniOcResource;
#ifdef WITH_CLOUD
class JniOcAccountManager;
#endif
~JniOnPostListener();
- void onPostCallback(const HeaderOptions& headerOptions, const OCRepresentation& rep, const int eCode);
+ void onPostCallback(const OC::HeaderOptions& headerOptions, const OC::OCRepresentation& rep, const int eCode);
private:
jweak m_jwListener;
******************************************************************/
#include "JniOnPublishResourceListener.h"
+using namespace OC;
+
JniOnPublishResourceListener::JniOnPublishResourceListener(JNIEnv *env, jobject jListener,
RemoveListenerCallback removeListenerCallback)
{
#ifndef _Included_org_iotivity_base_OcPlatform_OnPublishResourceListener
#define _Included_org_iotivity_base_OcPlatform_OnPublishResourceListener
-using namespace OC;
-
class JniOnPublishResourceListener
{
public:
JniOnPublishResourceListener(JNIEnv *env, jobject listener,
RemoveListenerCallback removeListenerCallback);
~JniOnPublishResourceListener();
- void onPublishResourceCallback(const OCRepresentation& rep, const int eCode);
+ void onPublishResourceCallback(const OC::OCRepresentation& rep, const int eCode);
private:
RemoveListenerCallback m_removeListenerCallback;
jweak m_jwListener;
#include "JniOcRepresentation.h"
#include "JniUtils.h"
+using namespace OC;
+
JniOnPutListener::JniOnPutListener(JNIEnv *env, jobject jListener, JniOcResource* owner)
: m_ownerResource(owner)
{
#ifndef _Included_org_iotivity_base_OcResource_OnPutListener
#define _Included_org_iotivity_base_OcResource_OnPutListener
-using namespace OC;
-
class JniOcResource;
class JniOnPutListener
JniOnPutListener(JNIEnv *env, jobject jListener, JniOcResource* resource);
~JniOnPutListener();
- void onPutCallback(const HeaderOptions& headerOptions, const OCRepresentation& rep, const int eCode);
+ void onPutCallback(const OC::HeaderOptions& headerOptions, const OC::OCRepresentation& rep, const int eCode);
private:
jweak m_jwListener;
#include "JniOcSecureResource.h"
#include "JniSecureUtils.h"
+using namespace OC;
+
JniProvisionResultListner::JniProvisionResultListner(JNIEnv *env, jobject jListener,
RemoveCallback removeProvisionResultListener)
{
#include "srmutility.h"
#include "base64.h"
+using namespace OC;
+
jobject JniSecureUtils::convertProvisionresultVectorToJavaList(JNIEnv *env, const OC::PMResultList_t *result)
{
jobject jResultList = env->NewObject(g_cls_LinkedList, g_mid_LinkedList_ctor);
#include "JniOcRepresentation.h"
#include "JniOcResource.h"
+using namespace OC;
+
jobject JniUtils::convertStrVectorToJavaStrList(JNIEnv *env, std::vector<std::string> &vector)
{
jobject jList = env->NewObject(g_cls_LinkedList, g_mid_LinkedList_ctor);