Wasabi ExpressPlay SDK for Desktop Systems
1.10
|
An indexed collection of typed name/value pairs. More...
Typedefs | |
typedef struct SHI_Properties | SHI_Properties |
A SHI_Properties object represents a list of name/value pairs. More... | |
Functions | |
SHI_PUBLIC_API SHI_Result | SHI_Properties_GetProperty (SHI_Properties *self, const char *name, SHI_DataType type, SHI_Data **property) |
Gets the value of a property. More... | |
SHI_PUBLIC_API SHI_Result | SHI_Properties_SetProperty (SHI_Properties *self, const char *name, SHI_DataType type, const SHI_DataValue *value) |
Sets the value of a property. More... | |
SHI_PUBLIC_API SHI_Cardinal | SHI_Properties_GetPropertyCount (SHI_Properties *self) |
Gets the number of properties in the list. More... | |
SHI_PUBLIC_API SHI_Result | SHI_Properties_GetPropertyNames (SHI_Properties *self, SHI_Data **names) |
Gets an array containing the names of all the properties in the list. More... | |
An indexed collection of typed name/value pairs.
typedef struct SHI_Properties SHI_Properties |
A SHI_Properties object represents a list of name/value pairs.
The list may contain read-only properties and/or read-write properties. Read-only properties cannot be set. Read-write properties can be set/updated by calling the SHI_Properties_SetProperty method.
SHI_PUBLIC_API SHI_Result SHI_Properties_GetProperty | ( | SHI_Properties * | self, |
const char * | name, | ||
SHI_DataType | type, | ||
SHI_Data ** | property | ||
) |
Gets the value of a property.
If this method succeeds, the SHI_Data object returned must be released before the property list is released. If no property with the specified name exists in the list, or if a property with that name exists, but with a different data type than the specified type, this method returns SHI_ERROR_NO_SUCH_ITEM.
self | The SHI_Properties from which a property value will be obtained. |
name | Name of the property. |
type | Data type of the property. If the type is unknown, this parameter can be set to SHI_DATA_TYPE_UNKNOWN. |
property | Address of a SHI_Data pointer that will be set to refer to a SHI_Data object containing the property. If this pointer is NULL, no property is returned. (This may be used to test whether or not a certain property exists, without obtaining its value.) |
SHI_PUBLIC_API SHI_Cardinal SHI_Properties_GetPropertyCount | ( | SHI_Properties * | self | ) |
Gets the number of properties in the list.
self | The SHI_Properties list. |
SHI_PUBLIC_API SHI_Result SHI_Properties_GetPropertyNames | ( | SHI_Properties * | self, |
SHI_Data ** | names | ||
) |
Gets an array containing the names of all the properties in the list.
The SHI_Data object returned must be released before this list is released.
self | The SHI_Properties whose property names will be returned. |
names | Address of a SHI_Data pointer that will be set to refer to a SHI_Data object containing the list of names. The SHI_Data will be set to have value type SHI_DATA_TYPE_ARRAY. The elements in the array are of type SHI_DATA_TYPE_STRING. |
SHI_PUBLIC_API SHI_Result SHI_Properties_SetProperty | ( | SHI_Properties * | self, |
const char * | name, | ||
SHI_DataType | type, | ||
const SHI_DataValue * | value | ||
) |
Sets the value of a property.
This method returns SHI_ERROR_NO_SUCH_ITEM if no property with the specified name exists in the list, or if a property with that name exists, but with a different data type than the specified type. This method fails with error code SHI_ERROR_NOT_SUPPORTED if the property list is read-only, or if the value of the property with the specified name is read-only.
self | The SHI_Properties for which a property value will be set. |
name | Name of the property. |
type | Data type of the property. |
value | Pointer to a SHI_DataValue to be used to set the property value. |