firebase:: database:: ChildListener
This is an abstract class.
#include <listener.h>
Child listener interface.
Summary
Subclasses of this listener class can be used to receive events about changes in the child locations of a firebase::database::Query or firebase::database::DatabaseReference. Attach the listener to a location with Query::AddChildListener() or DatabaseReference::AddChildListener() and the appropriate method will be triggered when changes occur.
Constructors and Destructors |
|
---|---|
~ChildListener()
|
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.
|
OnChildAdded(const DataSnapshot & snapshot, const char *previous_sibling_key)=0
|
virtual void
This method is triggered when a new child is added to the location to which this listener was added.
|
OnChildChanged(const DataSnapshot & snapshot, const char *previous_sibling_key)=0
|
virtual void
This method is triggered when the data at a child location has changed.
|
OnChildMoved(const DataSnapshot & snapshot, const char *previous_sibling_key)=0
|
virtual void
This method is triggered when a child location's priority changes.
|
OnChildRemoved(const DataSnapshot & snapshot)=0
|
virtual void
This method is triggered when a child is removed from the location to which this listener was added.
|
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 |
|
OnChildAdded
virtual void OnChildAdded( const DataSnapshot & snapshot, const char *previous_sibling_key )=0
This method is triggered when a new child is added to the location to which this listener was added.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
OnChildChanged
virtual void OnChildChanged( const DataSnapshot & snapshot, const char *previous_sibling_key )=0
This method is triggered when the data at a child location has changed.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
OnChildMoved
virtual void OnChildMoved( const DataSnapshot & snapshot, const char *previous_sibling_key )=0
This method is triggered when a child location's priority changes.
See DatabaseReference::SetPriority() for more information on priorities and ordering data.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
OnChildRemoved
virtual void OnChildRemoved( const DataSnapshot & snapshot )=0
This method is triggered when a child is removed from the location to which this listener was added.
Details | |||
---|---|---|---|
Parameters |
|
~ChildListener
virtual ~ChildListener()