--- a/javacommons/gcfprotocols/socket/socket/src/socketconnectionjni.cpp Fri Jul 09 16:35:45 2010 +0300
+++ b/javacommons/gcfprotocols/socket/socket/src/socketconnectionjni.cpp Fri Jul 23 12:27:20 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;
+}