Wasabi ExpressPlay SDK for Embedded Systems
1.23.0
|
A hierarchical typed elements collection data structure. More...
Typedefs | |
typedef struct SHI_Attribute | SHI_Attribute |
SHI_Attribute objects represent named values that can be arranged in a tree structure. More... | |
A hierarchical typed elements collection data structure.
typedef struct SHI_Attribute SHI_Attribute |
SHI_Attribute objects represent named values that can be arranged in a tree structure.
An attribute has a name (possibly empty), a type, flags, and a value. Attributes of type SHI_ATTRIBUTE_TYPE_LIST also have children. All other types do not.
SHI_PUBLIC_API SHI_Result SHI_Attribute_GetChildByIndex | ( | SHI_Attribute * | self, |
SHI_Ordinal | indx, | ||
SHI_Attribute ** | child | ||
) |
Gets a child of this attribute by index.
If this attribute has fewer attributes than the index minus one, this method returns SHI_ERROR_NO_SUCH_ITEM. The child object must be released before this attribute is released.
self | The SHI_Attribute whose child will be returned. |
indx | The index of the child. |
child | Address of a SHI_Attribute pointer that will be set to refer to a SHI_Attribute object containing the child. |
SHI_PUBLIC_API SHI_Result SHI_Attribute_GetChildByName | ( | SHI_Attribute * | self, |
const char * | name, | ||
SHI_Attribute ** | child | ||
) |
Gets a child of this attribute by name.
If this attribute does not have a child by that name, this method returns SHI_ERROR_NO_SUCH_ITEM. The child object must be released before this attribute is released.
self | The SHI_Attribute whose child will be returned. |
name | The child name. |
child | Address of a SHI_Attribute pointer that will be set to refer to a SHI_Attribute object containing the child. |
SHI_PUBLIC_API SHI_Cardinal SHI_Attribute_GetChildCount | ( | SHI_Attribute * | self | ) |
Returns the number of children of this attribute.
Only attributes of type SHI_ATTRIBUTE_TYPE_LIST can have children. For all other types, this method returns 0.
self | The SHI_Attribute whose number of children will be returned. |
SHI_PUBLIC_API SHI_Flags SHI_Attribute_GetFlags | ( | SHI_Attribute * | self | ) |
Returns the flags of this attribute.
The flags are a combination of zero or more bit flags. The possible bit flag values are defined as the constants named SHI_ATTRIBUTE_FLAG_...
self | The SHI_Attribute whose flags will be returned. |
SHI_PUBLIC_API const char* SHI_Attribute_GetName | ( | SHI_Attribute * | self | ) |
Returns the name of this attribute.
If the attribute has no name, this returns an empty string.
self | The SHI_Attribute whose name will be returned. |
SHI_PUBLIC_API SHI_AttributeType SHI_Attribute_GetType | ( | SHI_Attribute * | self | ) |
Returns the type of this attribute.
self | The SHI_Attribute whose type will be returned. |
SHI_PUBLIC_API SHI_Result SHI_Attribute_GetValue | ( | SHI_Attribute * | self, |
SHI_AttributeValue * | value | ||
) |
Gets the value of this attribute.
For attributes of type SHI_ATTRIBUTE_TYPE_LIST or SHI_ATTRIBUTE_TYPE_UNKNOWN, this method returns SHI_ERROR_NOT_SUPPORTED and the contents of the value are undefined when this attribute is released.
self | The SHI_Attribute whose value will be returned. |
value | A pointer to a SHI_AttributeValue struct into which this method will return the value. |
SHI_PUBLIC_API SHI_Result SHI_Attribute_Release | ( | SHI_Attribute * | self | ) |
Releases this attribute object.
The object may no longer be used after this method returns. All objects obtained from method calls to this object must be released before this object is released. Any names obtained from the SHI_Attribute_GetName() method and any values returned from the SHI_Attribute_GetValue() method are also invalidated by a call to this method.
self | The SHI_Attribute to release. |