Go to the source code of this file.
|  | 
| typedef struct _LDContext * | LDContext | 
|  | 
| typedef struct _LDContext_PrivateAttributesIter * | LDContext_PrivateAttributesIter | 
|  | 
◆ LDContext_CanonicalKey()
      
        
          | LDContext_CanonicalKey | ( | LDContext | context | ) |  | 
      
 
Get the canonical key for the context. 
- Parameters
- 
  
    | context | The context. Must not be NULL. |  
 
- Returns
- Canonical key. Only valid for the lifetime of this context. 
 
 
◆ LDContext_Errors()
      
        
          | LDContext_Errors | ( | LDContext | context | ) |  | 
      
 
If the context is not valid, then get a string containing the reason the context is not valid.
The lifetime of the returned string is tied to the LDContext.
- Parameters
- 
  
    | context | The context to check for validity. Must not be NULL. |  
 
- Returns
- A string explaining why the context is not valid. 
 
 
◆ LDContext_Free()
      
        
          | LDContext_Free | ( | LDContext | context | ) |  | 
      
 
Free the context.
- Parameters
- 
  
    | context | The context to free. |  
 
 
 
◆ LDContext_Get()
      
        
          | LDContext_Get | ( | LDContext | context, | 
        
          |  |  | char const * | kind, | 
        
          |  |  | char const * | ref | 
        
          |  | ) |  |  | 
      
 
Get an attribute value by kind and attribute reference. If the kind is not present, or the attribute not present in the kind, then a null pointer will be returned.
The lifetime of the LDValue is tied to the LDContext it was accessed from. Do not access a returned LDValue from a context after the context has been freed.
- Parameters
- 
  
    | context | The context to get an attribute from. Must not be NULL. |  | kind | The kind within the context to get the attribute from. Must not be NULL. |  | ref | An attribute reference representing the attribute to get. Must not be NULL. |  
 
- Returns
- The attribute value or a NULL pointer. 
 
 
◆ LDContext_PrivateAttributesIter_End()
      
        
          | LDContext_PrivateAttributesIter_End | ( | LDContext_PrivateAttributesIter | iter | ) |  | 
      
 
Check if the iterator is at the end.
- Parameters
- 
  
    | iter | The iterator to check. Must not be NULL. |  
 
- Returns
- True if the iterator is at the end. 
 
 
◆ LDContext_PrivateAttributesIter_Free()
      
        
          | LDContext_PrivateAttributesIter_Free | ( | LDContext_PrivateAttributesIter | iter | ) |  | 
      
 
Destroy the iterator.
- Parameters
- 
  
    | iter | The iterator to destroy. |  
 
 
 
◆ LDContext_PrivateAttributesIter_New()
      
        
          | LDContext_PrivateAttributesIter_New | ( | LDContext | context, | 
        
          |  |  | char const * | kind | 
        
          |  | ) |  |  | 
      
 
Create an iterator which iterates over the private attributes for the context kind. If there is no such context kind, then a null pointer will be returned.
The iterator must be destroyed with LDContext_PrivateAttributesIter_Free.
An iterator must not be used after the associated Context has been freed.
- Parameters
- 
  
    | context | The context containing the kind. Must not be NULL. |  | kind | The kind to iterate private attributes for. Must not be NULL. |  
 
- Returns
- A private attributes iterator. 
 
 
◆ LDContext_PrivateAttributesIter_Next()
      
        
          | LDContext_PrivateAttributesIter_Next | ( | LDContext_PrivateAttributesIter | iter | ) |  | 
      
 
Move the iterator to the next item.
- Parameters
- 
  
    | iter | The iterator to increment. Must not be NULL. |  
 
 
 
◆ LDContext_PrivateAttributesIter_Value()
      
        
          | LDContext_PrivateAttributesIter_Value | ( | LDContext_PrivateAttributesIter | iter | ) |  | 
      
 
Get the value pointed to by the iterator.
The lifetime of the returned value is the same as the Context.
- Parameters
- 
  
    | iter | The iterator to get a value for. Must not be NULL. |  
 
- Returns
- The attribute reference as a string. 
 
 
◆ LDContext_Valid()
      
        
          | LDContext_Valid | ( | LDContext | context | ) |  | 
      
 
Check if the context is valid.
- Parameters
- 
  
    | context | The context to check. Must not be NULL. |  
 
- Returns
- True if the context is valid.