◆ fiftyoneDegreesEvidencePropertiesGetMethod
typedef uint32_t(* fiftyoneDegreesEvidencePropertiesGetMethod) (void *state, fiftyoneDegreesPropertyAvailable *property, fiftyoneDegreesEvidenceProperties *evidenceProperties) |
Populates the evidence properties structure with the indexes of the properties required by the property provided, and returns the number of property indexes which were added.
If the evidence properties structure is null, then this method returns the count but does not populate the structure.
- Parameters
-
- state - pointer to data which the method may need to use
- property - pointer to the property to get the evidence properties for
- evidenceProperties - pointer to the pre-allocated structure to populate with the evidence property indexes
- Returns
- the number of property indexes added to the structure. Or the number which would have been added were it not null
◆ fiftyoneDegreesPropertiesAvailable
Array of properties which are available in a data set.
◆ fiftyoneDegreesPropertiesGetMethod
typedef fiftyoneDegreesString*(* fiftyoneDegreesPropertiesGetMethod) (void *state, uint32_t index, fiftyoneDegreesCollectionItem *item) Returns a string for the property at the index provided or NULL if there is no property available at the index.
- Parameters
-
- state - resource used to obtain the string
- index - of the property
- item - used to obtain a handle to the string
- Returns
- pointer to the string or NULL if no property available
Function Documentation
◆ fiftyoneDegreesPropertiesCreate()
fiftyoneDegreesPropertiesAvailable* fiftyoneDegreesPropertiesCreate ( fiftyoneDegreesPropertiesRequired * properties, void * state, fiftyoneDegreesPropertiesGetMethod getPropertyMethod, fiftyoneDegreesEvidencePropertiesGetMethod getEvidencePropertiesMethod ) Creates a properties result instance for use with future property operations.
The resulting required properties will be provided in ascending order.
- Parameters
-
- properties - required to be available as either a separated list of property names, an array of property names or an existing properties results structure from another data set. Valid separators include pipe, comma and space. The fields are evaluated in order of existing, array and then string. the first field with a value is used.
- state - pointer to state used with the get method
- getPropertyMethod - method used to return the property name from a string collection
- getEvidencePropertiesMethod - method used to populate the evidence properties for a property
- Returns
- instance of a properties result for use with future properties methods
◆ fiftyoneDegreesPropertiesFree()
void fiftyoneDegreesPropertiesFree ( fiftyoneDegreesPropertiesAvailable * available ) Frees the memory and resources used by the properties results previously created using the fiftyoneDegreesPropertiesCreate method.
- Parameters
-
- available - properties instance to be freed
◆ fiftyoneDegreesPropertiesGetNameFromRequiredIndex()
fiftyoneDegreesString* fiftyoneDegreesPropertiesGetNameFromRequiredIndex ( fiftyoneDegreesPropertiesAvailable * available, int requiredPropertyIndex ) Gets the name as a string from the required property index.
- Parameters
-
- available - properties instance
- requiredPropertyIndex - index of the property in the required properties structure
- Returns
- string representation of the property
◆ fiftyoneDegreesPropertiesGetPropertyIndexFromName()
int fiftyoneDegreesPropertiesGetPropertyIndexFromName ( fiftyoneDegreesPropertiesAvailable * available, const char * propertyName ) Gets the index of the property in the source data structure from the name.
- Parameters
-
- available - properties instance
- propertyName - string containing the property name
- Returns
- 0 based index of the property in the source or -1 if not available
◆ fiftyoneDegreesPropertiesGetPropertyIndexFromRequiredIndex()
int fiftyoneDegreesPropertiesGetPropertyIndexFromRequiredIndex ( fiftyoneDegreesPropertiesAvailable * available, int requiredPropertyIndex ) Maps the required property index to the index in the source data structure.
- Parameters
-
- available - properties instance
- requiredPropertyIndex - index of the property in the required properties structure
- Returns
- 0 based index of the property in the source or -1 if not available
◆ fiftyoneDegreesPropertiesGetRequiredPropertyIndexFromName()
int fiftyoneDegreesPropertiesGetRequiredPropertyIndexFromName ( fiftyoneDegreesPropertiesAvailable * available, const char * propertyName ) Gets the required property index in the list of all required properties from the name.
- Parameters
-
- available - properties instance
- propertyName - string containing the property name
- Returns
- 0 based index of the property in the required properties or -1 if not available
- Examples
- Hash/StronglyTyped.c.
◆ fiftyoneDegreesPropertiesIsSetHeaderAvailable()
bool fiftyoneDegreesPropertiesIsSetHeaderAvailable ( fiftyoneDegreesPropertiesAvailable * available ) Check if the 'SetHeader' properties are included in the available required properties.
- Parameters
-
- available - properties instance
- Returns
- bool whether 'SetHeader' properties are included
Variable Documentation
◆ fiftyoneDegreesPropertiesDefault
EXTERNAL_VAR fiftyoneDegreesPropertiesRequired fiftyoneDegreesPropertiesDefault The default properties required to make all possible properties available.
Should be used to initialise a new instance of fiftyoneDegreesPropertiesRequired.
- Examples
- Hash/MatchMetrics.c, and Hash/StronglyTyped.c.