Skip to content

Commit

Permalink
adding missing win32 stub, cross-compile proper case fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zuckschwerdt committed Mar 4, 2009
1 parent 4b66e67 commit 8177c89
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
34 changes: 22 additions & 12 deletions obexftp/bt_kit.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,19 +241,22 @@ int btkit_browse(const char *src, const char *addr, int svclass)
{
unsigned int ret;
WSAQUERYSET querySet;
char addressAsString[20];
char addressAsString[20]; // "(XX:XX:XX:XX:XX:XX)"
DWORD addressSize = sizeof(addressAsString);
snprintf(addressAsString, 20, "(%s)", addr);

/*
if (0 == WSAAddressToString(lpSockaddr, sizeof(bdaddr_t), NULL, addressAsString, &addressSize)) {
printf("search address: %s\n", addressAsString);
}
*/

memset(&querySet, 0, sizeof(querySet));
querySet.dwSize = sizeof(querySet);
querySet.dwNameSpace = NS_BTH;
// querySet.lpServiceClassId = RFCOMM;
querySet.lpszContext = addressAsString;

if (0 == WSAAddressToString(lpSockaddr, sizeof(bdaddr_t), NULL, addressAsString, &addressSize)) {
printf("search address: %s\n", addressAsString);
}

HANDLE hLookup;
DWORD flags = LUP_NOCONTAINERS | LUP_FLUSHCACHE | LUP_RETURN_ADDR | LUP_RES_SERVICE
| LUP_RETURN_NAME | LUP_RETURN_TYPE | LUP_RETURN_BLOB;
Expand Down Expand Up @@ -287,6 +290,20 @@ int btkit_browse(const char *src, const char *addr, int svclass)
return 0;
}


int btkit_register_obex(int UNUSED(svclass), int UNUSED(channel))
{
DEBUG(1, "Implement this stub.");
return -1;
}


int btkit_unregister_service(int UNUSED(svclass))
{
DEBUG(1, "Implement this stub.");
return -1;
}

#else /* _WIN32 */

#ifdef HAVE_SDPLIB /* should switch on OS here */
Expand Down Expand Up @@ -428,13 +445,6 @@ static int browse_sdp_uuid(sdp_session_t *sess, uuid_t *uuid)
\param addr the bluetooth address of the device to query
\return the channel on which the service runs
*/
// Win32 note:
// WSALookupServiceBegin( WSAQUERYSET with
// dwNameSpace = NS_BTH
// lpServiceClassId = RFCOMM
// lpszContext = WSAAddressToString )
// WSALookupServiceNext
// WSALookupServiceEnd
int btkit_browse(const char *src, const char *addr, int svclass)
{
int res = -1;
Expand Down
2 changes: 1 addition & 1 deletion obexftp/unicode.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <string.h>

#ifdef _WIN32 /* no need for iconv */
#include <Windows.h> /* pulls in Winnls.h */
#include <windows.h> /* pulls in Winnls.h */
#else
#ifdef HAVE_ICONV
#include <iconv.h>
Expand Down

0 comments on commit 8177c89

Please sign in to comment.