diff -r 949823a0e5df -r e90e6ea44529 connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/pccsnative/ConnAPILibrary.java --- a/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/pccsnative/ConnAPILibrary.java Thu Feb 11 15:09:23 2010 -0600 +++ b/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/pccsnative/ConnAPILibrary.java Thu Feb 11 16:07:33 2010 -0600 @@ -25,9 +25,9 @@ import com.nokia.carbide.remoteconnections.discovery.pccs.Activator; import com.nokia.carbide.remoteconnections.discovery.pccs.Messages; -import com.nokia.carbide.remoteconnections.discovery.pccs.pccsnative.CONAPI_MEDIA.ByReference; +//import com.nokia.carbide.remoteconnections.discovery.pccs.pccsnative.CONAPI_MEDIA.ByReference; import com.sun.jna.Native; -import com.sun.jna.Pointer; +import com.sun.jna.WString; import com.sun.jna.ptr.IntByReference; public class ConnAPILibrary implements IConnAPILibrary { @@ -66,6 +66,8 @@ } } + // these calls are here just to satisfy the interface + // the real calls are marshalled through jna to the native library public int CFAPI_Initialize(int dwAPIVersion, IntByReference pdwParam) { // TODO Auto-generated method stub return 0; @@ -76,7 +78,7 @@ return 0; } - public int CONACloseDM(DMHANDLE mHDMHandle) { + public int CONACloseDM(APIHANDLE mHDMHandle) { // TODO Auto-generated method stub return 0; } @@ -86,23 +88,23 @@ return 0; } - public int CONAGetDeviceCount(DMHANDLE hDMHandle, IntByReference pdwCount) { + public int CONAGetDeviceCount(APIHANDLE hDMHandle, IntByReference pdwCount) { // TODO Auto-generated method stub return 0; } - public int CONAGetDevices(DMHANDLE hDMHandle, IntByReference pdwCount, + public int CONAGetDevices(APIHANDLE hDMHandle, IntByReference pdwCount, CONAPI_DEVICE[] pDevices) { // TODO Auto-generated method stub return 0; } - public int CONAOpenDM(LPDMHANDLE mHDMHandle) { + public int CONAOpenDM(LPAPIHANDLE mHDMHandle) { // TODO Auto-generated method stub return 0; } - public int CONARegisterNotifyCallback(DMHANDLE hDMHandle, int dwState, + public int CONARegisterNotifyCallback(APIHANDLE hDMHandle, int dwState, IConnAPIDeviceCallback pfnNotify) { // TODO Auto-generated method stub return 0; @@ -123,34 +125,33 @@ return 0; } - public int CONACloseMM(MCHANDLE hMCHandle) { + public int CONACloseMM(APIHANDLE hMCHandle) { // TODO Auto-generated method stub return 0; } - public int CONAMMFreeMediaStructures(int dwCountOfMedia, - CONAPI_MEDIA[] pMedia) { + public int CONAMMFreeMediaStructures(int dwCountOfMedia, CONAPI_MEDIA[] pMedia) { // TODO Auto-generated method stub return 0; } - public int CONAMMGetMedia(MCHANDLE hMCHandle, IntBuffer pdwCountOfMedia, - ByReference[] ppMedia) { + public int CONAMMGetMedia(APIHANDLE hMCHandle, IntBuffer pdwCountOfMedia, + CONAPI_MEDIA.ByReference[] ppMedia) { // TODO Auto-generated method stub return 0; } - public int CONAMMSetMedia(MCHANDLE hMCHandle, CONAPI_MEDIA[] pMedia) { + public int CONAMMSetMedia(APIHANDLE hMCHandle, CONAPI_MEDIA[] pMedia) { // TODO Auto-generated method stub return 0; } - public int CONAOpenMM(LPMCHANDLE phMCHandle, int dwValue) { + public int CONAOpenMM(LPAPIHANDLE phMCHandle, int dwValue) { // TODO Auto-generated method stub return 0; } - public int CONARegisterMMNotifyCallback(MCHANDLE hMCHandle, int dwState, + public int CONARegisterMMNotifyCallback(APIHANDLE hMCHandle, int dwState, IConnAPIMediaCallback pfnNotify) { // TODO Auto-generated method stub return 0; @@ -166,7 +167,7 @@ return 0; } - public int MCAPI_GetMediaInfo(MCHANDLE hMCHandle, ShortBuffer pstrMediaID, + public int MCAPI_GetMediaInfo(APIHANDLE hMCHandle, ShortBuffer pstrMediaID, CONAPI_MEDIA_INFO[] pMediaInfo) { // TODO Auto-generated method stub return 0; @@ -182,7 +183,7 @@ return 0; } - public int UPAPI_CloseUSBPersonality(UPHANDLE hUPHandle) { + public int UPAPI_CloseUSBPersonality(APIHANDLE hUPHandle) { // TODO Auto-generated method stub return 0; } @@ -200,7 +201,7 @@ } public int UPAPI_FreeStringDescriptor( - UP_STRING_DESCRIPTOR[] pStringDescriptor) { + UP_STRING_DESCRIPTOR pStringDescriptor) { // TODO Auto-generated method stub return 0; } @@ -210,23 +211,23 @@ return 0; } - public int UPAPI_GetConfigurationDescriptor(UPHANDLE hUPHandle, - ShortBuffer pstrDeviceId, + public int UPAPI_GetConfigurationDescriptor(APIHANDLE hUPHandle, + WString pstrDeviceId, UP_CONFIGURATION_DESCRIPTOR[] pConfigurationDescriptor) { // TODO Auto-generated method stub return 0; } - public int UPAPI_GetPersonalityDescriptors(UPHANDLE hUPHandle, - ShortBuffer pstrDeviceId, + public int UPAPI_GetPersonalityDescriptors(APIHANDLE hUPHandle, + WString pstrDeviceId, UP_PERSONALITY_DESCRIPTORS[] pPersonalityDescriptors) { // TODO Auto-generated method stub return 0; } - public int UPAPI_GetStringDescriptor(UPHANDLE hUPHandle, - ShortBuffer pstrDeviceId, int dwDescriptorIndex, int dwLanguageID, - UP_STRING_DESCRIPTOR[] pStringDescriptor) { + public int UPAPI_GetStringDescriptor(APIHANDLE hUPHandle, + WString pstrDeviceId, int dwDescriptorIndex, int dwLanguageID, + UP_STRING_DESCRIPTOR pStringDescriptor) { // TODO Auto-generated method stub return 0; } @@ -236,32 +237,32 @@ return 0; } - public int UPAPI_OpenUSBPersonality(int dwVendorId, LPUPHANDLE phUPHandle) { + public int UPAPI_OpenUSBPersonality(int dwVendorId, LPAPIHANDLE phUPHandle) { // TODO Auto-generated method stub return 0; } - public int UPAPI_QueryDeviceCount(UPHANDLE hUPHandle, + public int UPAPI_QueryDeviceCount(APIHANDLE hUPHandle, IntBuffer pdwDeviceCount) { // TODO Auto-generated method stub return 0; } - public int UPAPI_QueryDevices(Pointer hUPHandle, IntBuffer pdwDeviceCount, + public int UPAPI_QueryDevices(APIHANDLE hUPHandle, IntBuffer pdwDeviceCount, UP_DEVICE_DESCRIPTOR[] pDeviceDescriptor) { // TODO Auto-generated method stub return 0; } - public int UPAPI_SendCommandToDevice(UPHANDLE hUPHandle, - ShortBuffer pstrDeviceId, int dwDataDirection, + public int UPAPI_SendCommandToDevice(APIHANDLE hUPHandle, + WString pstrDeviceId, int dwDataDirection, UP_DATA_BUFFER[] pDataBuffer) { // TODO Auto-generated method stub return 0; } - public int UPAPI_SetPersonality(UPHANDLE hUPHandle, - ShortBuffer pstrDeviceId, int dwPersonalityCode) { + public int UPAPI_SetPersonality(APIHANDLE hUPHandle, + WString pstrDeviceId, int dwPersonalityCode) { // TODO Auto-generated method stub return 0; }