Esempio n. 1
0
/*
* Class:     org_iotivity_base_OcRepresentation
* Method:    getHost
* Signature: ()Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_org_iotivity_base_OcRepresentation_getHost
(JNIEnv *env, jobject thiz)
{
    LOGD("OcRepresentation_getHost");
    OCRepresentation *rep = JniOcRepresentation::getOCRepresentationPtr(env, thiz);
    if (!rep)
    {
        return nullptr;
    }

    std::string uri(rep->getHost());
    return env->NewStringUTF(uri.c_str());
}
void GrovepiSensorResource::put(OCRepresentation& recv_rep)
{
	string host = recv_rep.getHost();
	cout << debugInfo << "from " << host << ", Un-supported request PUT for sensor" << endl;
}