◆ fiftyoneDegreesEvidenceIterateMethod
| typedef bool(* fiftyoneDegreesEvidenceIterateMethod) (void *state, fiftyoneDegreesEvidenceKeyValuePair *pair) |
Callback method used to iterate evidence key value pairs.
- Parameters
-
- state - pointer provided to the iterator
- pair - evidence key value pair with the parsed value set
- Returns
- true if the iteration should continue otherwise false
Enumeration Type Documentation
◆ fiftyoneDegreesEvidencePrefix
Evidence prefixes used to determine the category a piece of evidence belongs to.
This will determine how the value is parsed.
Function Documentation
◆ fiftyoneDegreesEvidenceAddString()
EXTERNAL fiftyoneDegreesEvidenceKeyValuePair* fiftyoneDegreesEvidenceAddString ( fiftyoneDegreesEvidenceKeyValuePairArray * evidence, fiftyoneDegreesEvidencePrefix prefix, const char * field, const char * originalValue ) Adds a new entry to the evidence.
The memory associated with the field and original value parameters must not be freed until after the evidence collection has been freed. This method will NOT copy the values.
- Parameters
-
- evidence - pointer to the evidence array to add the entry to
- prefix - enum indicating the category the entry belongs to
- field - used as the key for the entry within its prefix
- originalValue - the value to be parsed
◆ fiftyoneDegreesEvidenceCreate()
EXTERNAL fiftyoneDegreesEvidenceKeyValuePairArray* fiftyoneDegreesEvidenceCreate ( uint32_t capacity ) Creates a new evidence array with the capacity requested.
- Parameters
-
- capacity - maximum number of evidence items
- Returns
- pointer to the newly created array
◆ fiftyoneDegreesEvidenceFree()
EXTERNAL void fiftyoneDegreesEvidenceFree ( fiftyoneDegreesEvidenceKeyValuePairArray * evidence ) Frees the memory used by an evidence array.
- Parameters
-
- evidence - pointer to the array to be freed
◆ fiftyoneDegreesEvidenceIterate()
EXTERNAL uint32_t fiftyoneDegreesEvidenceIterate ( fiftyoneDegreesEvidenceKeyValuePairArray * evidence, int prefixes, void * state, fiftyoneDegreesEvidenceIterateMethod callback ) Iterates over the evidence calling the callback method for any values that match the prefixes provided.
- Parameters
-
- evidence - key value pairs including prefixes
- prefixes - one or more prefix flags to return values for
- state - pointer passed to the callback method
- callback - method called when a matching prefix is found
- Returns
- the number of matching evidence keys iterated over
◆ fiftyoneDegreesEvidenceMapPrefix()
EXTERNAL fiftyoneDegreesEvidencePrefixMap* fiftyoneDegreesEvidenceMapPrefix ( const char * key ) Determines the evidence map prefix from the key.
- Parameters
-
- key - the evidence key including the evidence prefix .i.e. header
- Returns
- the prefix enumeration, or NULL if one does not exist
