org.bluez.obex.FileTransfer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bluez-dbus Show documentation
Show all versions of bluez-dbus Show documentation
Java native bluetooth library which uses bluez via dbus (linux only)
package org.bluez.obex;
import java.util.Map;
import org.bluez.datatypes.TwoTuple;
import org.bluez.exceptions.BluezFailedException;
import org.bluez.exceptions.BluezInvalidArgumentsException;
import org.freedesktop.dbus.DBusPath;
import org.freedesktop.dbus.interfaces.DBusInterface;
import org.freedesktop.dbus.types.Variant;
/**
* File generated - 2018-07-25.
* Based on bluez Documentation: obex-api.txt.
*
* Service: org.bluez.obex
* Interface: org.bluez.obex.FileTransfer
*
* Object path:
* [Session object path]
*
*/
public interface FileTransfer extends DBusInterface {
/**
* From bluez documentation:
*
* Change the current folder of the remote device.
*
*
* @param _folder
*
* @throws BluezInvalidArgumentsException when argument is invalid
* @throws BluezFailedException on failure
*/
void ChangeFolder(String _folder) throws BluezInvalidArgumentsException, BluezFailedException;
/**
* From bluez documentation:
*
* Create a new folder in the remote device.
*
*
* @param _folder
*
* @throws BluezInvalidArgumentsException when argument is invalid
* @throws BluezFailedException on failure
*/
void CreateFolder(String _folder) throws BluezInvalidArgumentsException, BluezFailedException;
/**
* From bluez documentation:
*
* Returns a dictionary containing information about
* the current folder content.
*
* The following keys are defined:
*
* string Name : Object name in UTF-8 format
* string Type : Either "folder" or "file"
* uint64 Size : Object size or number of items in
* folder
* string Permission : Group, owner and other
* permission
* uint64 Modified : Last change
* uint64 Accessed : Last access
* uint64 Created : Creation date
*
*
* @throws BluezFailedException on failure
*/
Map>[] ListFolder() throws BluezFailedException;
/**
* From bluez documentation:
*
* Copy the source file (from remote device) to the
* target file (on local filesystem).
*
* If an empty target file is given, a name will be
* automatically calculated for the temporary file.
*
* The returned path represents the newly created transfer,
* which should be used to find out if the content has been
* successfully transferred or if the operation fails.
*
* The properties of this transfer are also returned along
* with the object path, to avoid a call to GetProperties.
*
*
* @param _targetfile
* @param _sourcefile
*
* @throws BluezInvalidArgumentsException when argument is invalid
* @throws BluezFailedException on failure
*/
TwoTuple>> GetFile(String _targetfile, String _sourcefile) throws BluezInvalidArgumentsException, BluezFailedException;
/**
* From bluez documentation:
*
* Copy the source file (from local filesystem) to the
* target file (on remote device).
*
* The returned path represents the newly created transfer,
* which should be used to find out if the content has been
* successfully transferred or if the operation fails.
*
* The properties of this transfer are also returned along
* with the object path, to avoid a call to GetProperties.
*
*
* @param _sourcefile
* @param _targetfile
*
* @throws BluezInvalidArgumentsException when argument is invalid
* @throws BluezFailedException on failure
*/
TwoTuple>> PutFile(String _sourcefile, String _targetfile) throws BluezInvalidArgumentsException, BluezFailedException;
/**
* From bluez documentation:
*
* Copy a file within the remote device from source file
* to target file.
*
*
* @param _sourcefile
* @param _targetfile
*
* @throws BluezInvalidArgumentsException when argument is invalid
* @throws BluezFailedException on failure
*/
void CopyFile(String _sourcefile, String _targetfile) throws BluezInvalidArgumentsException, BluezFailedException;
/**
* From bluez documentation:
*
* Move a file within the remote device from source file
* to the target file.
*
*
* @param _sourcefile
* @param _targetfile
*
* @throws BluezInvalidArgumentsException when argument is invalid
* @throws BluezFailedException on failure
*/
void MoveFile(String _sourcefile, String _targetfile) throws BluezInvalidArgumentsException, BluezFailedException;
/**
* From bluez documentation:
*
* Deletes the specified file/folder.
*
*
* @param _file
*
* @throws BluezInvalidArgumentsException when argument is invalid
* @throws BluezFailedException on failure
*/
void Delete(String _file) throws BluezInvalidArgumentsException, BluezFailedException;
}