firebase:: database:: ValueListener
This is an abstract class.
#include <listener.h>
Value listener interface.
Summary
Subclasses of this listener class can be used to receive events about data changes at a location. Attach the listener to a location using DatabaseReference::AddValueListener() or Query::AddValueListener(), and OnValueChanged() will be called once immediately, and again when the value changes.
Constructors and Destructors |
|
---|---|
~ValueListener()
|
Public functions |
|
---|---|
OnCancelled(const Error & error, const char *error_message)=0
|
virtual void
This method will be triggered in the event that this listener either failed at the server, or is removed as a result of the security and Firebase rules.
|
OnValueChanged(const DataSnapshot & snapshot)=0
|
virtual void
This method will be called with a snapshot of the data at this location each time that data changes.
|
Public functions
OnCancelled
virtual void OnCancelled( const Error & error, const char *error_message )=0
This method will be triggered in the event that this listener either failed at the server, or is removed as a result of the security and Firebase rules.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
OnValueChanged
virtual void OnValueChanged( const DataSnapshot & snapshot )=0
This method will be called with a snapshot of the data at this location each time that data changes.
Details | |||
---|---|---|---|
Parameters |
|
~ValueListener
virtual ~ValueListener()