C++ Server-Side SDK
LaunchDarkly SDK
|
Go to the source code of this file.
Typedefs | |
typedef struct _LDAllFlagsState * | LDAllFlagsState |
Enumerations | |
enum | LDAllFlagsState_Options { LD_ALLFLAGSSTATE_DEFAULT = 0 , LD_ALLFLAGSSTATE_INCLUDE_REASONS = (1 << 0) , LD_ALLFLAGSSTATE_DETAILS_ONLY_FOR_TRACKED_FLAGS = (1 << 1) , LD_ALLFLAGSSTATE_CLIENT_SIDE_ONLY = (1 << 2) } |
Functions | |
LDAllFlagsState_Free (LDAllFlagsState state) | |
LDAllFlagsState_Valid (LDAllFlagsState state) | |
LDAllFlagsState_SerializeJSON (LDAllFlagsState state) | |
LDAllFlagsState_Value (LDAllFlagsState state, char const *flag_key) | |
LDAllFlagsState_Map (LDAllFlagsState state) | |
Defines options that may be used with LDServerSDK_AllFlagsState. To obtain default behavior, pass LD_ALLFLAGSSTATE_DEFAULT
.
It is possible to combine multiple options by ORing them together.
Example:
LDAllFlagsState_Free | ( | LDAllFlagsState | state | ) |
Frees an LDAllFlagsState.
state | The state to free. |
LDAllFlagsState_Map | ( | LDAllFlagsState | state | ) |
Returns an object-type LDValue where the keys are flag keys and the values are the flag values for the LDContext used to generate this state.
The LDValue is owned by the caller and must be freed. This may cause a large heap allocation. If you're interested in bootstrapping a client-side SDK, this is not the right method: see LDAllFlagsState_SerializeJSON.
state | An LDAllFlagsState. Must not be NULL. |
LDAllFlagsState_SerializeJSON | ( | LDAllFlagsState | state | ) |
Serializes the LDAllFlagsState to a JSON string.
This JSON is suitable for bootstrapping a client-side SDK.
state | The LDAllFlagState to serialize. Must not be NULL. |
LDAllFlagsState_Valid | ( | LDAllFlagsState | state | ) |
True if the LDAllFlagsState is valid. False if there was an error, such as the data source being unavailable.
An invalid LDAllFlagsState can still be serialized successfully to a JSON string.
state | The LDAllFlagState to check for validity. Must not be NULL. |
LDAllFlagsState_Value | ( | LDAllFlagsState | state, |
char const * | flag_key | ||
) |
Returns the flag value for the context used to generate this LDAllFlagsState.
In order to avoid copying when a large value is accessed, the returned LDValue is a reference and NOT DIRECTLY OWNED by the caller. Its lifetime is managed by the parent LDAllFlagsState object.
WARNING! Do not free the returned LDValue. Do not in any way access the returned LDValue after the LDAllFlagsState has been freed.
If the flag has no value, returns an LDValue of type LDValueType_Null.
To obtain a caller-owned copy of the LDValue not subject to these restrictions, call LDValue_NewValue on the result.
state | An LDAllFlagsState. Must not be NULL. |
flag_key | Key of the flag. Must not be NULL. |