This module contains XSO models for stream-level elements which are not stanzas.
XSO representing a stream error.
The text content of the stream error.
The RFC 6120 stream error condition.
XSO for collecting the supported stream features the remote advertises.
To register a stream feature, use register_child() with the features descriptor. A more fancy way to do the same thing is to use the as_feature_class() classmethod as decorator for your feature XSO class.
Adding new feature classes:
Querying features:
Obtain the first feature XSO which matches the FeatureClass. If no such XSO is contained in the StreamFeatures instance stream_features, KeyError is raised.
Replace the stream features belonging to the given FeatureClass with the feature XSO.
If the FeatureClass does not match the type of the feature XSO, a TypeError is raised.
It is legal to leave the FeatureClass out by specifying ... instead. In that case, the class is auto-detected from the feature object assigned.
If any feature of the given FeatureClass type is in the stream_features, they are all removed.
Otherwise, KeyError is raised, to stay consistent with other mapping-like types.