Stay organized with collections
Save and categorize content based on your preferences.
firebase::storage::Listener
This is an abstract class.
#include <listener.h>
Base class used to receive pause and progress events on a running read or write operation.
Summary
Subclasses of this listener class can be used to receive events about data transfer progress a location. Attach the listener to a location using StorageReference::GetBytes(), StorageReference::GetFile(), StorageReference::PutBytes(), and StorageReference::PutFile(); then OnPaused() will be called whenever the Read or Write operation is paused, and OnProgress() will be called periodically as the transfer makes progress.
Public functions
OnPaused
virtual void OnPaused(
Controller *controller
)=0
The operation was paused.
Details |
Parameters |
controller
|
A controller that can be used to check the status and make changes to the ongoing operation.
|
|
OnProgress
virtual void OnProgress(
Controller *controller
)=0
There has been progress event.
Details |
Parameters |
controller
|
A controller that can be used to check the status and make changes to the ongoing operation.
|
|
~Listener
virtual ~Listener()
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-01-23 UTC.
[null,null,["Last updated 2024-01-23 UTC."],[],[],null,["firebase::storage::Listener\n\n\n**This is an abstract class.**\n\n\n`#include \u003clistener.h\u003e`\n\nBase class used to receive pause and progress events on a running read or write operation.\n\nSummary\n\nSubclasses of this listener class can be used to receive events about data transfer progress a location. Attach the listener to a location using [StorageReference::GetBytes()](/docs/reference/cpp/class/firebase/storage/storage-reference#classfirebase_1_1storage_1_1_storage_reference_1a900b03399d3d879771d241cd70d455ff), [StorageReference::GetFile()](/docs/reference/cpp/class/firebase/storage/storage-reference#classfirebase_1_1storage_1_1_storage_reference_1a2909f324048c6e74c11d699b7c33fb9e), [StorageReference::PutBytes()](/docs/reference/cpp/class/firebase/storage/storage-reference#classfirebase_1_1storage_1_1_storage_reference_1af31e70df99a05baec43a785ccffa78c0), and [StorageReference::PutFile()](/docs/reference/cpp/class/firebase/storage/storage-reference#classfirebase_1_1storage_1_1_storage_reference_1aaea029ebb63c744f6f6c1623e25af4f5); then [OnPaused()](/docs/reference/cpp/class/firebase/storage/listener#classfirebase_1_1storage_1_1_listener_1a002fd09bad9d749588407387bc7a0527) will be called whenever the Read or Write operation is paused, and [OnProgress()](/docs/reference/cpp/class/firebase/storage/listener#classfirebase_1_1storage_1_1_listener_1a3049e5cceb71b018b34d9170e4948fef) will be called periodically as the transfer makes progress.\n\nPublic functions \n\nListener \n\n```c++\n Listener()\n``` \nConstructor. \n\nOnPaused \n\n```c++\nvirtual void OnPaused(\n Controller *controller\n)=0\n``` \nThe operation was paused.\n\n\u003cbr /\u003e\n\nOnProgress \n\n```c++\nvirtual void OnProgress(\n Controller *controller\n)=0\n``` \nThere has been progress event.\n\n\u003cbr /\u003e\n\n\\~Listener \n\n```c++\nvirtual ~Listener()\n``` \nVirtual destructor."]]