C Server-Side SDK
LaunchDarkly SDK
flag_state.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <launchdarkly/boolean.h>
9 #include <launchdarkly/export.h>
10 
11 
13 struct LDAllFlagsState;
14 
20 LD_EXPORT(LDBoolean) LDAllFlagsStateValid(struct LDAllFlagsState *flags);
21 
24 LD_EXPORT(void) LDAllFlagsStateFree(struct LDAllFlagsState *flags);
25 
30 
37 LD_EXPORT(struct LDDetails*) LDAllFlagsStateGetDetails(struct LDAllFlagsState* flags, const char* key);
38 
45 LD_EXPORT(struct LDJSON*) LDAllFlagsStateGetValue(struct LDAllFlagsState* flags, const char* key);
46 
56 LD_EXPORT(struct LDJSON*) LDAllFlagsStateToValuesMap(struct LDAllFlagsState* flags);
57 
63  LD_INCLUDE_REASON = (1 << 0),
69 };
LDAllFlagsStateSerializeJSON
char * LDAllFlagsStateSerializeJSON(struct LDAllFlagsState *flags)
Serializes flag data to JSON.
LD_CLIENT_SIDE_ONLY
@ LD_CLIENT_SIDE_ONLY
Include only flags marked for use with the client-side SDK. By default, all flags are included.
Definition: flag_state.h:68
boolean.h
A custom c89 boolean type.
LD_ALLFLAGS_DEFAULT
@ LD_ALLFLAGS_DEFAULT
Definition: flag_state.h:61
LDAllFlagsState
struct LDAllFlagsState * LDAllFlagsState(struct LDClient *const client, const struct LDUser *const user, unsigned int options)
AllFlagsState returns an object that encapsulates the state of all feature flags for a given user....
LDAllFlagsStateFree
void LDAllFlagsStateFree(struct LDAllFlagsState *flags)
Frees memory associated with LDAllFlagsState.
LDAllFlagsStateGetDetails
struct LDDetails * LDAllFlagsStateGetDetails(struct LDAllFlagsState *flags, const char *key)
Returns evaluation details for an individual feature flag at the time the state was recorded.
LD_EXPORT
#define LD_EXPORT(x)
Used to ensure only intended symbols are exported in the binaries.
Definition: export.h:10
LDDetails
Definition: variations.h:91
LDAllFlagsStateValid
LDBoolean LDAllFlagsStateValid(struct LDAllFlagsState *flags)
Check if a call to LDAllFlagsState succeeded.
LDAllFlagsStateToValuesMap
struct LDJSON * LDAllFlagsStateToValuesMap(struct LDAllFlagsState *flags)
Returns a JSON map of flag keys to flag values.
LD_INCLUDE_REASON
@ LD_INCLUDE_REASON
Include evaluation reasons in the state object. By default, they are not.
Definition: flag_state.h:63
LD_DETAILS_ONLY_FOR_TRACKED_FLAGS
@ LD_DETAILS_ONLY_FOR_TRACKED_FLAGS
Include detailed flag metadata only for flags with event tracking or debugging turned on....
Definition: flag_state.h:66
LDAllFlagsStateOption
LDAllFlagsStateOption
Options for use in LDAllFlagsState.
Definition: flag_state.h:59
LDAllFlagsStateGetValue
struct LDJSON * LDAllFlagsStateGetValue(struct LDAllFlagsState *flags, const char *key)
Returns the JSON value of an individual feature flag at the time the state was recorded.
export.h
Public. Configuration of exported symbols.