VERSION DATE AUTHOR DESCRIPTION
6 13.05.2007 Antti Maatta Experiments with OBEX authentication. No results. Flags to obexOpenSession.
5 11.04.2007 Antti Maatta Fixed mis-spelled response code constants, obexUtilSetPath return value,
added SYNC service GUIDS, Warning level 3 no warnings, use secure versions of some functions.
4 05.04.2007 Antti Maatta Timeout sets Session to disconnected state
3 20.03.2007 Antti Maatta First somewhat usable version.
2 02.03.2007 Antti Maatta Added new packet management functions.
1 20.02.2007 Antti Maatta Initial draft.
int sendFile(wchar_t* localFilename, wchar_t* remoteFileName, char* contentType, BluetoothAddress* remoteAddress )
{
BTConnection* connection = NULL;
ObexPacket* request = NULL;
ObexPacket* response = NULL;
ObexSession* session = NULL;
int ret;
OBEX_UUID serviceFtp = SERVICE_OBEX_FTP;
OBEX_UUID serviceObex = SERVICE_OBEX;
if ( (ret = createBTConnection( &connection, NULL, remoteAddress, &serviceObex, 0 )) != OBEX_ERROR_SUCCESS )
{
return ret;
}
if ( (ret = obexSessionOpen( &session, connection, NULL, NULL, &serviceFtp, NULL, NULL )) != OBEX_ERROR_SUCCESS )
{
ret = closeBTConnection(connection);
return ret;
}
ret = obexUtilPushFromFile( session, localFilename, remoteFileName, contentType );
obexSessionClose(session);
closeBTConnection(connection);
return 0;
}