nl::Weave::Profiles::DataManagement_Current::TraitSchemaEngine::ISetDataDelegate

This is an abstract class.

Summary

Inheritance

Direct Known Subclasses: nl::Weave::Profiles::DataManagement_Current::TraitDataSink

Public types

DataSinkEventType enum

Public functions

OnDataSinkEvent(DataSinkEventType aType, PropertyPathHandle aHandle)=0
virtual void
Signals to delegates when notable events occur while parsing dictionaries.
SetData(PropertyPathHandle aHandle, nl::Weave::TLV::TLVReader & aReader, bool aIsNull)=0
virtual WEAVE_ERROR
Given a path handle to a node, a TLV reader, and an indication of whether a null type was received, set the data in the callee.
SetLeafData(PropertyPathHandle aLeafHandle, nl::Weave::TLV::TLVReader & aReader)=0
virtual WEAVE_ERROR
Given a path handle to a leaf node and a TLV reader, set the leaf data in the callee.

Public types

DataSinkEventType

 DataSinkEventType

Public functions

OnDataSinkEvent

virtual void OnDataSinkEvent(
  DataSinkEventType aType,
  PropertyPathHandle aHandle
)=0

Signals to delegates when notable events occur while parsing dictionaries.

In all cases, a property path handle is provided that provides more context on what this event applies to.

For dictionary replace begin/ends, these handles are purely schema handles. For dictionary item added/modififed events, these handles are property path handles as they contain the dictionary key as well.

SetData

virtual WEAVE_ERROR SetData(
  PropertyPathHandle aHandle,
  nl::Weave::TLV::TLVReader & aReader,
  bool aIsNull
)=0

Given a path handle to a node, a TLV reader, and an indication of whether a null type was received, set the data in the callee.

TDM will only call this function for handles that are nullable, optional, ephemeral, or leafs. If aHandle is a non-leaf node and is nullified, TDM will not call SetData for its children.

Details
Parameters
[in] aHandle
The PropertyPathHandle in question.
[in,out] aReader
The TLV reader to read from.
[out] aIsNull
Is aHandle nullified?
Return Values
WEAVE_NO_ERROR
On success.
other
Was unable to read out data from the reader.

SetLeafData

virtual WEAVE_ERROR SetLeafData(
  PropertyPathHandle aLeafHandle,
  nl::Weave::TLV::TLVReader & aReader
)=0

Given a path handle to a leaf node and a TLV reader, set the leaf data in the callee.

Details
Return Values
WEAVE_NO_ERROR
On success.
other
Was unable to read out data from the reader.