javacommons/gcfprotocols/socket/socket/src/socketconnectionjni.cpp
branchRCL_3
changeset 60 6c158198356e
parent 19 04becd199f91
child 83 26b2b12093af
--- 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<NativeSocketConnection* >(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;
+}