Skip to content

Latest commit

 

History

History
248 lines (137 loc) · 3.71 KB

async_result.md

File metadata and controls

248 lines (137 loc) · 3.71 KB

AsyncResult

Description

The async result class.

class AsyncResult
  1. 🔹 const char *c_str()

Get the pointer to the internal response payload string buffer.

const char *c_str()

Returns:

  • const char * - The pointer to internal response payload string.
  1. 🔹 String payload() const

Get the copy of server response payload string.

String payload() const

Returns:

  • String - The copy of payload string.
  1. 🔹 String path() const

Get the path of the resource of the request.

String path() const

Returns:

  • String - The path of the resource of the request.
  1. 🔹 String etag() const

Get the Etag of the server response headers.

String etag() const

Params:

  • String - The ETag of response header.
  1. 🔹 String uid() const

Get the unique identifier of async task.

String uid() const

Returns:

  • String - The UID of async task.
  1. 🔹 String debug()

Get the debug information.

String debug()

Returns:

  • String - The debug information.
  1. 🔹 void clear()

Clear the async result.

void clear()
  1. 🔹 RealtimeDatabaseResult &to()

Get the reference to the internal RealtimeDatabaseResult object.

RealtimeDatabaseResult &to()

Returns:

  • RealtimeDatabaseResult & - The reference to the internal RealtimeDatabaseResult object.
  1. 🔹 int available()

Get the number of bytes of available response payload.

int available()

Returns:

  • int - The number of bytes available.
  1. 🔹 app_event_t &appEvent()

Get the reference of internal app event information.

app_event_t &appEvent()

Returns:

  • app_event_t & - The reference of internal app event.
  1. 🔹 bool uploadProgress()

Check if file/BLOB upload information is available.

bool uploadProgress()

Returns:

  • bool - Returns true if upload information is available.
  1. 🔹 upload_data_t uploadInfo() const

Get the file/BLOB upload information.

upload_data_t uploadInfo() const

Returns:

  • upload_data_t - The file/BLOB upload information.
  1. 🔹 bool downloadProgress()

Check if the file/BLOB download information is availablle.

bool downloadProgress()

Returns:

  • bool - Returns true if download information is available.
  1. 🔹 download_data_t downloadInfo() const

Get the file/BLOB download information.

download_data_t downloadInfo() const

Returns:

  • download_data_t - The file/BLOB download information.
  1. 🔹 bool isOTA() const

Check if the result is from OTA download task.

bool isOTA() const

Returns:

  • bool - Returns true if the result is from OTA download task.
  1. 🔹 bool isError()

Check if the error occurred in async task.

bool isError()

Returns:

  • bool - Returns true if error occurred.
  1. 🔹 bool isDebug()

Check if the debug information in available.

bool isDebug()

Returns:

  • bool - Returns true if debug information in available.
  1. 🔹 bool isEvent()

Check if the app event information in available.

bool isEvent()

Returns:

  • bool - Returns true if app event information in available.
  1. 🔹 FirebaseError &error()

Get the reference of internal FirebaseError object.

FirebaseError &error()

Returns:

  • FirebaseError & - The internal FirebaseError object.