C Client-Side SDK
LaunchDarkly SDK
config.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <launchdarkly/boolean.h>
9 #include <launchdarkly/export.h>
10 #include <launchdarkly/json.h>
11 
13 struct LDConfig;
14 
19 LD_EXPORT(struct LDConfig *) LDConfigNew(const char *const mobileKey);
20 
22 LD_EXPORT(void)
24  struct LDConfig *const config, const LDBoolean allPrivate);
25 
28 LD_EXPORT(void)
30  struct LDConfig *const config, const int millis);
31 
34 LD_EXPORT(LDBoolean)
35 LDConfigSetAppURI(struct LDConfig *const config, const char *const uri);
36 
40 LD_EXPORT(void)
42  struct LDConfig *const config, const int millis);
43 
45 LD_EXPORT(void)
47  struct LDConfig *const config, const int millis);
48 
50 LD_EXPORT(void)
52  struct LDConfig *const config, const LDBoolean disable);
53 
56 LD_EXPORT(void)
57 LDConfigSetEventsCapacity(struct LDConfig *const config, const int capacity);
58 
61 LD_EXPORT(void)
63  struct LDConfig *const config, const int millis);
64 
67 LD_EXPORT(LDBoolean)
68 LDConfigSetEventsURI(struct LDConfig *const config, const char *const uri);
69 
72 LD_EXPORT(LDBoolean)
73 LDConfigSetMobileKey(struct LDConfig *const config, const char *const key);
74 
77 LD_EXPORT(void)
78 LDConfigSetOffline(struct LDConfig *const config, const LDBoolean offline);
79 
85 LD_EXPORT(void)
86 LDConfigSetStreaming(struct LDConfig *const config, const LDBoolean streaming);
87 
90 LD_EXPORT(void)
92  struct LDConfig *const config, const int millis);
93 
96 LD_EXPORT(LDBoolean)
97 LDConfigSetStreamURI(struct LDConfig *const config, const char *const uri);
98 
105 LD_EXPORT(LDBoolean)
106 LDConfigSetProxyURI(struct LDConfig *const config, const char *const uri);
107 
115 LD_EXPORT(void)
116 LDConfigSetVerifyPeer(struct LDConfig *const config, const LDBoolean enabled);
117 
120 LD_EXPORT(void)
121 LDConfigSetUseReport(struct LDConfig *const config, const LDBoolean report);
122 
125 LD_EXPORT(void)
127  struct LDConfig *const config, const LDBoolean reasons);
128 
130 LD_EXPORT(void)
132  struct LDConfig *const config, struct LDJSON *attributes);
133 
140 LD_EXPORT(LDBoolean)
142  struct LDConfig *const config,
143  const char *const name,
144  const char *const key);
145 
152 LD_EXPORT(LDBoolean)
154  struct LDConfig *const config, const char *const certFile);
155 
158 LD_EXPORT(void)
160  struct LDConfig *const config, const LDBoolean inlineUsers);
161 
165 LD_EXPORT(void)
166 LDConfigAutoAliasOptOut(struct LDConfig *const config, const LDBoolean optOut);
167 
171 LD_EXPORT(void)
172 LDConfigSetRequestTimeoutMillis(struct LDConfig *const config, const int millis);
173 
178 LD_EXPORT(void) LDConfigFree(struct LDConfig *const config);
LDConfigSetUseEvaluationReasons
void LDConfigSetUseEvaluationReasons(struct LDConfig *const config, const LDBoolean reasons)
Decide whether the client should fetch feature flag evaluation explanations from LaunchDarkly.
LDConfigSetInlineUsersInEvents
void LDConfigSetInlineUsersInEvents(struct LDConfig *const config, const LDBoolean inlineUsers)
Determines if an entire user object, or only the user key should be included in events....
LDConfigSetPollingIntervalMillis
void LDConfigSetPollingIntervalMillis(struct LDConfig *const config, const int millis)
Only relevant when streaming is disabled (set to false). Sets the interval between feature flag updat...
LDConfigSetConnectionTimeoutMillis
void LDConfigSetConnectionTimeoutMillis(struct LDConfig *const config, const int millis)
Sets the timeout in milliseconds when connecting to LaunchDarkly.
boolean.h
A custom c89 boolean type.
LDConfigSetSSLCertificateAuthority
LDBoolean LDConfigSetSSLCertificateAuthority(struct LDConfig *const config, const char *const certFile)
Set the path to the SSL certificate bundle used for peer authentication.
LDConfigSetStreaming
void LDConfigSetStreaming(struct LDConfig *const config, const LDBoolean streaming)
Enables or disables real-time streaming flag updates.
LDConfigSetConnectionTimeoutMillies
void LDConfigSetConnectionTimeoutMillies(struct LDConfig *const config, const int millis)
Sets the timeout in milliseconds when connecting to LaunchDarkly.
LDConfigFree
void LDConfigFree(struct LDConfig *const config)
Free an existing LDConfig instance.
LDConfigSetAppURI
LDBoolean LDConfigSetAppURI(struct LDConfig *const config, const char *const uri)
Sets the interval in milliseconds between polls for flag updates when your app is in the background.
LDConfigSetStreamURI
LDBoolean LDConfigSetStreamURI(struct LDConfig *const config, const char *const uri)
Set the stream uri for connecting to the flag update stream. You probably don't need to set this unle...
LDConfigNew
struct LDConfig * LDConfigNew(const char *const mobileKey)
Creates a new default configuration. mobileKey is required.
LDConfigSetOffline
void LDConfigSetOffline(struct LDConfig *const config, const LDBoolean offline)
Configures the client for offline mode. In offline mode, no external network connections are made.
LDConfigSetVerifyPeer
void LDConfigSetVerifyPeer(struct LDConfig *const config, const LDBoolean enabled)
Set whether to verify the authenticity of the peer's certificate on network requests.
LD_EXPORT
#define LD_EXPORT(x)
Used to ensure only intended symbols are exported in the binaries.
Definition: export.h:10
LDConfigSetPrivateAttributes
void LDConfigSetPrivateAttributes(struct LDConfig *const config, struct LDJSON *attributes)
Private attribute list which will not be recorded for all users.
LDConfigSetMobileKey
LDBoolean LDConfigSetMobileKey(struct LDConfig *const config, const char *const key)
Sets the key for authenticating with LaunchDarkly. This is required unless you're using the client in...
LDConfigSetUseReport
void LDConfigSetUseReport(struct LDConfig *const config, const LDBoolean report)
Determines whether the REPORT or GET verb is used for calls to LaunchDarkly. Do not use unless advise...
LDConfigSetEventsFlushIntervalMillis
void LDConfigSetEventsFlushIntervalMillis(struct LDConfig *const config, const int millis)
Sets the maximum amount of time in milliseconds to wait in between sending analytics events to Launch...
LDConfigAutoAliasOptOut
void LDConfigAutoAliasOptOut(struct LDConfig *const config, const LDBoolean optOut)
Determines if Identify should automatically generate alias events. When true LDClientIdentify will no...
LDConfigSetProxyURI
LDBoolean LDConfigSetProxyURI(struct LDConfig *const config, const char *const uri)
Set the proxy server used for connecting to LaunchDarkly.
LDConfigSetEventsURI
LDBoolean LDConfigSetEventsURI(struct LDConfig *const config, const char *const uri)
Set the events uri for sending analytics to LaunchDarkly. You probably don't need to set this unless ...
LDConfigSetAllAttributesPrivate
void LDConfigSetAllAttributesPrivate(struct LDConfig *const config, const LDBoolean allPrivate)
Marks all user attributes private.
LDConfigAddSecondaryMobileKey
LDBoolean LDConfigAddSecondaryMobileKey(struct LDConfig *const config, const char *const name, const char *const key)
Add another mobile key to the list of secondary environments.
json.h
Public API Interface for JSON usage.
LDConfigSetDisableBackgroundUpdating
void LDConfigSetDisableBackgroundUpdating(struct LDConfig *const config, const LDBoolean disable)
Enable or disable background updating.
LDConfigSetEventsCapacity
void LDConfigSetEventsCapacity(struct LDConfig *const config, const int capacity)
Sets the max number of events to queue before sending them to LaunchDarkly.
LDConfigSetRequestTimeoutMillis
void LDConfigSetRequestTimeoutMillis(struct LDConfig *const config, const int millis)
Sets the timeout, in milliseconds, for requests to LaunchDarkly. Applies to polling requests and send...
LDConfigSetBackgroundPollingIntervalMillis
void LDConfigSetBackgroundPollingIntervalMillis(struct LDConfig *const config, const int millis)
Sets the interval in milliseconds between polls for flag updates when your app is in the background.
export.h
Public. Configuration of exported symbols.