public class Uploader extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Uploader.UploadResult
The type Upload result.
|
class |
Uploader.UploadTask
The type Upload task.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
FILE_CANCELED
The constant FILE_CANCELED.
|
static int |
FILE_COMPLETED
The constant FILE_COMPLETED.
|
static int |
FILE_IN_PROGRESS
The constant FILE_IN_PROGRESS.
|
static int |
FILE_QUEUED
The constant FILE_QUEUED.
|
| Constructor and Description |
|---|
Uploader(TelegramApi api)
Instantiates a new Uploader.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelTask(int taskId)
Cancel task.
|
TelegramApi |
getApi()
Gets api.
|
int |
getTaskState(int taskId)
Gets task state.
|
Uploader.UploadResult |
getUploadResult(int taskId)
Gets upload result.
|
int |
requestTask(String srcFile,
UploadListener listener)
Request task.
|
void |
waitForTask(int taskId)
Wait for task.
|
public static final int FILE_QUEUED
public static final int FILE_IN_PROGRESS
public static final int FILE_COMPLETED
public static final int FILE_CANCELED
public Uploader(TelegramApi api)
api - the apipublic TelegramApi getApi()
public void cancelTask(int taskId)
taskId - the task idpublic int getTaskState(int taskId)
taskId - the task idpublic void waitForTask(int taskId)
taskId - the task idpublic Uploader.UploadResult getUploadResult(int taskId)
taskId - the task idpublic int requestTask(String srcFile, UploadListener listener)
srcFile - the src filelistener - the listenerCopyright © 2016. All rights reserved.