firebase:: database:: DisconnectionHandler
#include <disconnection.h>
Allows you to register server-side actions to occur when the client disconnects.
Summary
Each method you call (with the exception of Cancel) will queue up an action on the data that will be performed by the server in the event the client disconnects. To reset this queue, call Cancel().
A DisconnectionHandler is associated with a specific location in the database, as they are obtained by calling DatabaseReference::OnDisconnect().
Constructors and Destructors |
|
---|---|
~DisconnectionHandler()
|
Public functions |
|
---|---|
Cancel()
|
Future< void >
Cancel any Disconnection operations that are queued up by this handler.
|
CancelLastResult()
|
Future< void >
Get the result of the most recent call to Cancel().
|
RemoveValue()
|
Future< void >
Remove the value at the current location when the client disconnects.
|
RemoveValueLastResult()
|
Future< void >
Get the result of the most recent call to RemoveValue().
|
SetValue(Variant value)
|
Future< void >
Set the value of the data at the current location when the client disconnects.
|
SetValueAndPriority(Variant value, Variant priority)
|
Future< void >
Set the value and priority of the data at the current location when the client disconnects.
|
SetValueAndPriorityLastResult()
|
Future< void >
Get the result of the most recent call to SetValueAndPriority().
|
SetValueLastResult()
|
Future< void >
Get the result of the most recent call to SetValue().
|
UpdateChildren(Variant values)
|
Future< void >
Updates the specified child keys to the given values when the client disconnects.
|
UpdateChildren(const std::map< std::string, Variant > & values)
|
Future< void >
Updates the specified child keys to the given values when the client disconnects.
|
UpdateChildrenLastResult()
|
Future< void >
Gets the result of the most recent call to either version of UpdateChildren().
|
Public functions
Cancel
Future< void > Cancel()
Cancel any Disconnection operations that are queued up by this handler.
When the Future returns, if its Error is kErrorNone, the queue has been cleared on the server.
Details | |
---|---|
Returns |
CancelLastResult
Future< void > CancelLastResult()
RemoveValue
Future< void > RemoveValue()
Remove the value at the current location when the client disconnects.
When the Future returns, if its Error is kErrorNone, the RemoveValue operation has been successfully queued up on the server.
Details | |
---|---|
Returns |
RemoveValueLastResult
Future< void > RemoveValueLastResult()
Get the result of the most recent call to RemoveValue().
Details | |
---|---|
Returns |
Result of the most recent call to RemoveValue().
|
SetValue
Future< void > SetValue( Variant value )
Set the value of the data at the current location when the client disconnects.
When the Future returns, if its Error is kErrorNone, the SetValue operation has been successfully queued up on the server.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
SetValueAndPriority
Future< void > SetValueAndPriority( Variant value, Variant priority )
Set the value and priority of the data at the current location when the client disconnects.
When the Future returns, if its Error is kErrorNone, the SetValue operation has been successfully queued up on the server.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
SetValueAndPriorityLastResult
Future< void > SetValueAndPriorityLastResult()
Get the result of the most recent call to SetValueAndPriority().
Details | |
---|---|
Returns |
Result of the most recent call to SetValueAndPriority().
|
SetValueLastResult
Future< void > SetValueLastResult()
Get the result of the most recent call to SetValue().
Details | |
---|---|
Returns |
Result of the most recent call to SetValue().
|
UpdateChildren
Future< void > UpdateChildren( Variant values )
Updates the specified child keys to the given values when the client disconnects.
When the Future returns, if its Error is kErrorNone, the UpdateChildren operation has been successfully queued up by the server.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
UpdateChildren
Future< void > UpdateChildren( const std::map< std::string, Variant > & values )
Updates the specified child keys to the given values when the client disconnects.
When the Future returns, if its Error is kErrorNone, the UpdateChildren operation has been successfully queued up by the server.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
UpdateChildrenLastResult
Future< void > UpdateChildrenLastResult()
Gets the result of the most recent call to either version of UpdateChildren().
Details | |
---|---|
Returns |
Result of the most recent call to UpdateChildren().
|
~DisconnectionHandler
~DisconnectionHandler()