API Reference | developer.brewmp.com API Reference | developer.brewmp.com


API Reference


Brew Release
Brew MP 1.0.2
See Also
IAsyncFSResult IOBEXAuthentication IFileSystem2 IPort1 Usage example: ===== To get the associated authentication object: IAsyncFS_QueryInterface (piAsyncFS, AEEIID_IOBEXAuthentication, (void**)&pMe->piAuth); // prepare for authentication initiated by server IOBEXAuthentication_OnRequest (pMe->piAuth, piAuthReqSig); // prepare to authenticate server if (FALSE != bAuthenticateServer) { IOBEXAuthentication_OnResponse (pMe->piAuth, piAuthRespSig); IOBEXAuthentication_Config ( pMe->piAuth, MIBENUM_CHARSET_US_ASCII, (uint8*)pszRealm, STRLEN (pszRealm), bUserIdRequired, bAllowFullAccess, bValidOnce); // TRUE means valid until reconfigured } ===== To prepare to access FTP server: // Configure for communication with FTP server: IAsyncFS_Config (piAsyncFS, piFSLocal, // an IFileSystem2 object "bdaddr=00A0C6041234;scn=4;", //server address & channel 5); // connection goes down after 5 seconds of inactivity ===== To browse folders on the server: IAsyncFS_LsDir (piAsyncFS, "", // current folder &piResult); // result object // when result comes back SUCCESS, get the folder listing port object if (AEE_SUCCESS == IAsyncFSResult_GetFolderListing (piResult, &piPort1)) { // Extract folder listing via IPort1_Read() // The folder listing will be an XML representation such as shown // in the following example taken from IrOBEX document: } ===== To create "newFolder" off of root folder on the server: IAsyncFS_MkDir (piAsyncFS, "newFolder", &piResult); // if success, "newFolder" becomes current folder on server ===== To put a file called "file1.txt" into subfolder "newFolder": IAsyncFS_Put (piAsyncFS, "fs:/~/file1.txt", // source - local "file1.txt", // destination - remote &piResult); ===== To put a subfolder called "newPictures" to root folder on server : // first change back to root folder IAsyncFS_ChDir (piAsyncFS, "", // ".." would also work in this case &piResult); // then when result for ChDir comes back successful, put the folder IAsyncFS_PutDir (piAsyncFS, "fs:/~/newPictures", // source - local "newPictures", // destination - remote &piResult); ===== To get "existingFile.txt" from child "oldFolder" of root folder: // first change to subfolder "oldFolder" IAsyncFS_ChDir (piAsyncFS, "oldFolder", &piResult); // then when result for ChDir comes back successful, get the file IAsyncFS_Get (piAsyncFS, "fs:/~/existingFile.txt, // destination - local "existingFile.txt", // source - remote &piResult); ===== To remove "existingFile.txt": IAsyncFS_Unlink (piAsyncFS, "existingFile.txt", // source &piResult); ===== To remove "oldFolder": // first change back to root folder // then when result for ChDir comes back successful, remove the subfolder IAsyncFS_RmDir (piAsyncFS, "oldFolder", &piResult); ===== To get a subfolder called "new" from subfolder "myMusic": // first change to subfolder "myMusic" // then when result for ChDir comes back successfull, get subfolder "new" IAsyncFS_GetDir (piAsyncFS, "fs:/~/myMusic, // destination - local "new", // source - remote &piResult);
  • The following APIs are unimplemented for BT FTP:
  • IAsyncFS_Access()
  • IAsyncFS_Stat()
  • IAsyncFS_StatVFS()
  • IAsyncFS_Rename()
  • IAsyncFS_Truncate()
  • IAsyncFS_Open()
  • IAsyncFS_Copy()
  • IAsyncFS_CopyDir()
The BTFTPClient class implements the IAsyncFS interface for file access over Bluetooth FTP. This implementation supports client role for Bluetooth File Transfer Profile (FTP) version 1.1
Default Interface Name
Other Interfaces