Firebase Storage class
class Storage
Set the Firebase Storage URL
void url(const String &url)
Params:
url
- The Firebase Storage URL.
Perform the async task repeatedly. Should be places in main loop function.
void loop()
The bucketid is the Storage bucket Id of object to download. The object is the object in Storage bucket to download. The access token is the Firebase Storage's file access token which used only for priviledge file download access in non-authentication mode (NoAuth).
bool download(AsyncClientClass &aClient, const FirebaseStorage::Parent &parent, file_config_data &file)
Params:
aClient
- The async client.parent
- The FirebaseStorage::Parent object included Storage bucket Id, object and/or access token in its constructor.file
- The filesystem data (file_config_data) obtained from FileConfig class object.
Returns:
- Boolean value, indicates the success of the operation.
The bucketid is the Storage bucket Id of object to download. The object is the object in Storage bucket to download. The access token is the Firebase Storage's file access token which used only for priviledge file download access in non-authentication mode (NoAuth).
void download(AsyncClientClass &aClient, const FirebaseStorage::Parent &parent, file_config_data &file, AsyncResult &aResult)
Params:
aClient
- The async client.parent
- The FirebaseStorage::Parent object included Storage bucket Id, object and/or access token in its constructor.file
- The filesystem data (file_config_data) obtained from FileConfig class object.aResult
- The async result (AsyncResult).
The bucketid is the Storage bucket Id of object to download. The object is the object in Storage bucket to download. The access token is the Firebase Storage's file access token which used only for priviledge file download access in non-authentication mode (NoAuth).
void download(AsyncClientClass &aClient, const FirebaseStorage::Parent &parent, file_config_data &file, AsyncResultCallback cb, const String &uid = "")
Params:
aClient
- The async client.parent
- The FirebaseStorage::Parent object included Storage bucket Id, object and/or access token in its constructor.file
- The filesystem data (file_config_data) obtained from FileConfig class object.cb
- The async result callback (AsyncResultCallback).uid
- The user specified UID of async result (optional).
The bucketid is the Storage bucket Id of object to upload. The object is the object to be stored in the Storage bucket. The access token is the Firebase Storage's file access token which used only for priviledge file download access in non-authentication mode (NoAuth).
bool upload(AsyncClientClass &aClient, const FirebaseStorage::Parent &parent, file_config_data &file, const String &mime)
Params:
aClient
- The async client.parent
- The FirebaseStorage::Parent object included Storage bucket Id and object in its constructor.file
- The filesystem data (file_config_data) obtained from FileConfig class object.mime
- The file MIME type
Returns:
- Boolean value, indicates the success of the operation.
The bucketid is the Storage bucket Id of object to upload. The object is the object to be stored in the Storage bucket.
void upload(AsyncClientClass &aClient, const FirebaseStorage::Parent &parent, file_config_data &file, const String &mime, AsyncResult &aResult)
Params:
aClient
- The async client.parent
- The FirebaseStorage::Parent object included Storage bucket Id and object in its constructor.file
- The filesystem data (file_config_data) obtained from FileConfig class object.mime
- The file MIME typeaResult
- The async result (AsyncResult).
The bucketid is the Storage bucket Id of object to upload. The object is the object to be stored in the Storage bucket.
void upload(AsyncClientClass &aClient, const FirebaseStorage::Parent &parent, file_config_data &file, const String &mime, AsyncResultCallback cb, const String &uid = "")
Params:
aClient
- The async client.parent
- The FirebaseStorage::Parent object included Storage bucket Id, object and/or access token in its constructor.file
- The filesystem data (file_config_data) obtained from FileConfig class object.mime
- The file MIME typecb
- The async result callback (AsyncResultCallback).uid
- The user specified UID of async result (optional).
The bucketid is the Storage bucket Id of object to download. The object is the object in Storage bucket to download. The access token is the Firebase Storage's file access token which used only for priviledge file download access in non-authentication mode (NoAuth).
bool ota(AsyncClientClass &aClient, const FirebaseStorage::Parent &parent)
Params:
aClient
- The async client.parent
- The FirebaseStorage::Parent object included Storage bucket Id, object and/or access token in its constructor.
Returns:
- Boolean value, indicates the success of the operation.
The bucketid is the Storage bucket Id of object to download. The object is the object in Storage bucket to download. The access token is the Firebase Storage's file access token which used only for priviledge file download access in non-authentication mode (NoAuth).
void ota(AsyncClientClass &aClient, const FirebaseStorage::Parent &parent, AsyncResult &aResult)
Params:
aClient
- The async client.parent
- The FirebaseStorage::Parent object included Storage bucket Id, object and/or access token in its constructor.aResult
- The async result (AsyncResult).
The bucketid is the Storage bucket Id of object to download. The object is the object in Storage bucket to download. The access token is the Firebase Storage's file access token which used only for priviledge file download access in non-authentication mode (NoAuth).
void ota(AsyncClientClass &aClient, const FirebaseStorage::Parent &parent, AsyncResultCallback cb, const String &uid = "")
Params:
aClient
- The async client.parent
- The FirebaseStorage::Parent object included Storage bucket Id, object and/or access token in its constructor.cb
- The async result callback (AsyncResultCallback).uid
- The user specified UID of async result (optional).
The bucketid is the Storage bucket Id of object to get metadata. The object is the object in Storage bucket to get metadata. The access token is the Firebase Storage's file access token which used only for priviledge file download access in non-authentication mode (NoAuth).
String getMetadata(AsyncClientClass &aClient, const FirebaseStorage::Parent &parent)
Params:
aClient
- The async client.parent
- The FirebaseStorage::Parent object included Storage bucket Id and object in its constructor.
Returns:
String
- The response payload.
The bucketid is the Storage bucket Id of object to get metadata. The object is the object in Storage bucket to get metadata.
void getMetadata(AsyncClientClass &aClient, const FirebaseStorage::Parent &parent, AsyncResult &aResult)
Params:
aClient
- The async client.parent
- The FirebaseStorage::Parent object included Storage bucket Id and object in its constructor.aResult
- The async result (AsyncResult).
The bucketid is the Storage bucket Id of object to get metadata. The object is the object in Storage bucket to get metadata.
void getMetadata(AsyncClientClass &aClient, const FirebaseStorage::Parent &parent, AsyncResultCallback cb, const String &uid = "")
Params:
aClient
- The async client.parent
- The FirebaseStorage::Parent object included Storage bucket Id and object in its constructor.cb
- The async result callback (AsyncResultCallback).uid
- The user specified UID of async result (optional).
The bucketid is the Storage bucket Id to list all objects.
String list(AsyncClientClass &aClient, const FirebaseStorage::Parent &parent)
Params:
aClient
- The async client.parent
- The FirebaseStorage::Parent object included Storage bucket Id in its constructor.
Returns:
String
- The response payload.
The bucketid is the Storage bucket Id to list all objects.
void list(AsyncClientClass &aClient, const FirebaseStorage::Parent &parent, AsyncResult &aResult)
Params:
aClient
- The async client.parent
- The FirebaseStorage::Parent object included Storage bucket Id in its constructor.aResult
- The async result (AsyncResult).
The bucketid is the Storage bucket Id to list all objects.
void list(AsyncClientClass &aClient, const FirebaseStorage::Parent &parent, AsyncResultCallback cb, const String &uid = "")
Params:
aClient
- The async client.parent
- The FirebaseStorage::Parent object included Storage bucket Id in its constructor.cb
- The async result callback (AsyncResultCallback).uid
- The user specified UID of async result (optional).
The bucketid is the Storage bucket Id of object to delete. The object is the object in Storage bucket to delete.
bool deleteObject(AsyncClientClass &aClient, const FirebaseStorage::Parent &parent)
Params:
aClient
- The async client.parent
- The FirebaseStorage::Parent object included Storage bucket Id and object in its constructor.
Returns:
- Boolean value, indicates the success of the operation.
The bucketid is the Storage bucket Id of object to delete. The object is the object in Storage bucket to delete.
void deleteObject(AsyncClientClass &aClient, const FirebaseStorage::Parent &parent, AsyncResult &aResult)
Params:
aClient
- The async client.parent
- The FirebaseStorage::Parent object included Storage bucket Id and object in its constructor.aResult
- The async result (AsyncResult).
The bucketid is the Storage bucket Id of object to delete. The object is the object in Storage bucket to delete.
void deleteObject(AsyncClientClass &aClient, const FirebaseStorage::Parent &parent, AsyncResultCallback cb, const String &uid = "")
Params:
aClient
- The async client.parent
- The FirebaseStorage::Parent object included Storage bucket Id and object in its constructor.cb
- The async result callback (AsyncResultCallback).uid
- The user specified UID of async result (optional).
Set Arduino OTA Storage.
void setOTAStorage(OTAStorage &storage)
Params:
storage
- The ArduinoOTAStorage
class object.