public class FtpUploader
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static NotificationIdRecycler |
_notificationId |
static java.lang.String |
PREF_lastFtpPort |
static java.lang.String |
PREF_lastFtpProto |
static java.lang.String |
PREF_lastFtpServer |
static java.lang.String |
PREF_lastFtpServerPath |
static java.lang.String |
PREF_lastFtpUsername |
protected static java.lang.String |
TAG |
Constructor and Description |
---|
FtpUploader(android.content.Context context,
android.content.SharedPreferences prefs) |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
void |
onRequestConnectionError(Request request,
RequestManager.ConnectionError ce) |
void |
onRequestCustomError(Request request,
android.os.Bundle resultData) |
void |
onRequestDataError(Request request) |
void |
onRequestFinished(Request request,
android.os.Bundle resultData) |
void |
upload(java.io.File file,
boolean binaryMode,
int notificationId,
java.lang.String passwd,
boolean skipDialog,
java.lang.String callbackAction,
android.os.Parcelable callbackExtra)
Upload specified file asynchronously
|
protected void |
upload(FtpStoreFileRequest request) |
void |
upload(int notificationId,
java.io.File file,
java.lang.String proto,
java.lang.String host,
int port,
java.lang.String serverPath,
java.lang.String user,
java.lang.String passwd,
boolean binaryMode,
java.lang.String callbackAction,
android.os.Parcelable callbackExtra)
Upload specified file asynchronously
|
protected static final java.lang.String TAG
public static final java.lang.String PREF_lastFtpProto
public static final java.lang.String PREF_lastFtpServer
public static final java.lang.String PREF_lastFtpPort
public static final java.lang.String PREF_lastFtpServerPath
public static final java.lang.String PREF_lastFtpUsername
public static final NotificationIdRecycler _notificationId
public FtpUploader(android.content.Context context, android.content.SharedPreferences prefs)
public void dispose()
public void upload(java.io.File file, boolean binaryMode, int notificationId, java.lang.String passwd, boolean skipDialog, java.lang.String callbackAction, android.os.Parcelable callbackExtra)
file
- the file to be uploaded.binaryMode
- switch to upload the file using binary mode.notificationId
- the notificationId to use when displaying the notificationskipDialog
- the dialog display for before the upload starts that gets additonal details.callbackAction
- the intent action to fire when the upload is complete.callbackExtra
- additional details to be part of the finish intent.public void upload(int notificationId, java.io.File file, java.lang.String proto, java.lang.String host, int port, java.lang.String serverPath, java.lang.String user, java.lang.String passwd, boolean binaryMode, java.lang.String callbackAction, android.os.Parcelable callbackExtra)
notificationId
- the notificationId to use when displaying the notificationfile
- the file to be uploaded.proto
- the protocol to use {ftp or sftp}host
- the host to useserverPath
- the server path to useuser
- the username to usebinaryMode
- switch to upload the file using binary mode.callbackAction
- the intent action to fire when the upload is complete.callbackExtra
- additional details to be part of the finish intent.protected void upload(FtpStoreFileRequest request)
public void onRequestFinished(Request request, android.os.Bundle resultData)
public void onRequestConnectionError(Request request, RequestManager.ConnectionError ce)
public void onRequestDataError(Request request)
public void onRequestCustomError(Request request, android.os.Bundle resultData)