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 afirebase::database::Query orfirebase::database::DatabaseReference. Attach the listener to a location withQuery::AddChildListener() orDatabaseReference::AddChildListener() and the appropriate method will be triggered when changes occur.
Constructors and Destructors | |
|---|---|
~ChildListener() |
Public functions | |
|---|---|
OnCancelled(constError & error, const char *error_message)=0 | virtual voidThis 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(constDataSnapshot & snapshot, const char *previous_sibling_key)=0 | virtual voidThis method is triggered when a new child is added to the location to which this listener was added. |
OnChildChanged(constDataSnapshot & snapshot, const char *previous_sibling_key)=0 | virtual voidThis method is triggered when the data at a child location has changed. |
OnChildMoved(constDataSnapshot & snapshot, const char *previous_sibling_key)=0 | virtual voidThis method is triggered when a child location's priority changes. |
OnChildRemoved(constDataSnapshot & snapshot)=0 | virtual voidThis method is triggered when a child is removed from the location to which this listener was added. |
Public functions
OnCancelled
virtualvoidOnCancelled(constError&error,constchar*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
virtualvoidOnChildAdded(constDataSnapshot&snapshot,constchar*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
virtualvoidOnChildChanged(constDataSnapshot&snapshot,constchar*previous_sibling_key)=0
This method is triggered when the data at a child location has changed.
| Details | |||||
|---|---|---|---|---|---|
| Parameters |
|
OnChildMoved
virtualvoidOnChildMoved(constDataSnapshot&snapshot,constchar*previous_sibling_key)=0
This method is triggered when a child location's priority changes.
SeeDatabaseReference::SetPriority() for more information on priorities and ordering data.
| Details | |||||
|---|---|---|---|---|---|
| Parameters |
|
OnChildRemoved
virtualvoidOnChildRemoved(constDataSnapshot&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()
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-01-23 UTC.