diff -r e5618cc85d74 -r 6c158198356e javacommons/gcfprotocols/socket/socket/src/socketconnectionjni.cpp --- a/javacommons/gcfprotocols/socket/socket/src/socketconnectionjni.cpp Thu Jul 15 18:31:06 2010 +0300 +++ b/javacommons/gcfprotocols/socket/socket/src/socketconnectionjni.cpp Thu Aug 19 09:48:13 2010 +0300 @@ -17,8 +17,10 @@ #include "com_nokia_mj_impl_socket_SocketConnectionImpl.h" +#include "com_nokia_mj_impl_properties_socket_SocketDynamicPropertyHandler.h" #include "nativesocketconnection.h" - +#include "socketlocalhostinfo.h" +#include "logger.h" using namespace java; @@ -141,3 +143,13 @@ NativeSocketConnection* nativeConn = reinterpret_cast(aNativePeerHandle); delete nativeConn; } + +JNIEXPORT jstring JNICALL Java_com_nokia_mj_impl_properties_socket_SocketDynamicPropertyHandler__1getLocalhostname +(JNIEnv *aJni, jclass) +{ + char* addr; + addr = SocketLocalHostInfo::getLocalHostName(); + jstring jnistring = aJni->NewStringUTF(addr); + delete[] addr; + return jnistring; +}