Skip to content

Commit

Permalink
docs: fix a bunch of broken Doxygen links
Browse files Browse the repository at this point in the history
  • Loading branch information
cwaldren-ld committed Dec 26, 2023
1 parent 34cafc6 commit 13e9a89
Show file tree
Hide file tree
Showing 10 changed files with 186 additions and 128 deletions.
24 changes: 14 additions & 10 deletions libs/common/include/launchdarkly/bindings/c/array_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,40 +18,44 @@ typedef struct _LDArrayBuilder* LDArrayBuilder;
* @return The new array builder.
*
*/
LD_EXPORT(LDArrayBuilder) LDArrayBuilder_New();
LD_EXPORT(LDArrayBuilder)
LDArrayBuilder_New();

/**
* Free an array builder. This should only be done for a builder which
* has not been built. Calling LDArrayBuilder_Build on an array builder
* transfers consumes the array builder.
* has not been built. Calling @ref LDArrayBuilder_Build on an array builder
* consumes the array builder.
*
* @param array_builder The builder to free.
*/
LD_EXPORT(void) LDArrayBuilder_Free(LDArrayBuilder array_builder);
LD_EXPORT(void)
LDArrayBuilder_Free(LDArrayBuilder array_builder);

/**
* Add a value to an array builder.
*
* After calling this method the provider LDValue is consumed. It should not
* be accessed, and the caller doesn't need to call LDValue_Free.
* After calling this method the provider @ref LDValue is consumed. It should
* not be accessed, and the caller doesn't need to call @ref LDValue_Free.
*
* @param array_builder The array builder to add the value to. Must not be
* NULL.
* @param val The value to add. Must not be NULL.
*/
LD_EXPORT(void) LDArrayBuilder_Add(LDArrayBuilder array_builder, LDValue val);
LD_EXPORT(void)
LDArrayBuilder_Add(LDArrayBuilder array_builder, LDValue val);

/**
* Construct an LDValue from an array builder.
* Construct an @ref LDValue from an array builder.
*
* After calling this method the array builder is consumed. It should not be
* used and the caller does not need to call LDArrayBuilder_Free.
* used and the caller does not need to call @ref LDArrayBuilder_Free.
*
* @param array_builder The array builder to build an LDValue from. Must not be
* NULL.
* @return The built LDValue. Must not be NULL.
*/
LD_EXPORT(LDValue) LDArrayBuilder_Build(LDArrayBuilder array_builder);
LD_EXPORT(LDValue)
LDArrayBuilder_Build(LDArrayBuilder array_builder);

#ifdef __cplusplus
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ struct LDLogBackend {
* backend into configuration.
* @param backend Backend to initialize.
*/
LD_EXPORT(void) LDLogBackend_Init(struct LDLogBackend* backend);
LD_EXPORT(void)
LDLogBackend_Init(struct LDLogBackend* backend);

/**
* Creates a new builder for LaunchDarkly's default logger.
Expand All @@ -63,14 +64,16 @@ LD_EXPORT(void) LDLogBackend_Init(struct LDLogBackend* backend);
* builder, must be manually freed with LDLoggingBasicBuilder_Free.
* @return New builder.
*/
LD_EXPORT(LDLoggingBasicBuilder) LDLoggingBasicBuilder_New();
LD_EXPORT(LDLoggingBasicBuilder)
LDLoggingBasicBuilder_New();

/**
* Frees a basic logging builder. Do not call if the builder was consumed by
* the config builder.
* @param b Builder to free.
*/
LD_EXPORT(void) LDLoggingBasicBuilder_Free(LDLoggingBasicBuilder b);
LD_EXPORT(void)
LDLoggingBasicBuilder_Free(LDLoggingBasicBuilder b);

/**
* Sets the enabled log level. The default level is LD_LOG_INFO.
Expand Down Expand Up @@ -99,14 +102,16 @@ LDLoggingBasicBuilder_Tag(LDLoggingBasicBuilder b, char const* tag);
* builder, must be manually freed with LDLoggingCustomBuilder_Free.
* @return New builder.
*/
LD_EXPORT(LDLoggingCustomBuilder) LDLoggingCustomBuilder_New();
LD_EXPORT(LDLoggingCustomBuilder)
LDLoggingCustomBuilder_New();

/**
* Frees a custom logging builder. Do not call if the builder was consumed by
* the config builder.
* @param b Builder to free.
*/
LD_EXPORT(void) LDLoggingCustomBuilder_Free(LDLoggingCustomBuilder b);
LD_EXPORT(void)
LDLoggingCustomBuilder_Free(LDLoggingCustomBuilder b);

/**
* Sets a custom log backend.
Expand Down
9 changes: 6 additions & 3 deletions libs/common/include/launchdarkly/bindings/c/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ LDContext_CanonicalKey(LDContext context);
* @param context The context to check. Must not be NULL.
* @return True if the context is valid.
*/
LD_EXPORT(bool) LDContext_Valid(LDContext context);
LD_EXPORT(bool)
LDContext_Valid(LDContext context);

/**
* Free the context.
*
* @param context The context to free.
*/
LD_EXPORT(void) LDContext_Free(LDContext context);
LD_EXPORT(void)
LDContext_Free(LDContext context);

/**
* Get an attribute value by kind and attribute reference. If the kind is
Expand Down Expand Up @@ -68,7 +70,8 @@ LDContext_Get(LDContext context, char const* kind, char const* ref);
* @param context The context to check for validity. Must not be NULL.
* @return A string explaining why the context is not valid.
*/
LD_EXPORT(char const*) LDContext_Errors(LDContext context);
LD_EXPORT(char const*)
LDContext_Errors(LDContext context);

/**
* Create an iterator which iterates over the private attributes for the
Expand Down
51 changes: 30 additions & 21 deletions libs/common/include/launchdarkly/bindings/c/context_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,31 @@ typedef struct _LDContextBuilder* LDContextBuilder;
* Create a new context builder.
* @return A new context builder instance.
*/
LD_EXPORT(LDContextBuilder) LDContextBuilder_New();
LD_EXPORT(LDContextBuilder)
LDContextBuilder_New();

/**
* Free a context builder.
*
* This method only needs to be used when not building
* the context. If you use LDContextBuilder_Build, then the builder will
* be consumed, and you do not need to call LDContextBuilder_Free.
* the context. If you use @ref LDContextBuilder_Build, then the builder will
* be consumed, and you do not need to call @ref LDContextBuilder_Free.
* @param builder The builder to free.
*/
LD_EXPORT(void) LDContextBuilder_Free(LDContextBuilder builder);
LD_EXPORT(void)
LDContextBuilder_Free(LDContextBuilder builder);

/**
* Construct a context from a context builder.
*
* When building a context using LDContextBuilder_Build the builder will be
* consumed and you do not need to call LDContextBuilder_Free.
* When building a context using @ref LDContextBuilder_Build the builder will be
* consumed and you do not need to call @ref LDContextBuilder_Free.
*
* @param builder The builder to build a context from. Must not be NULL.
* @return The built context.
*/
LD_EXPORT(LDContext) LDContextBuilder_Build(LDContextBuilder builder);
LD_EXPORT(LDContext)
LDContextBuilder_Build(LDContextBuilder builder);

/**
* Add a kind instance to the context builder. The kind will have the specified
Expand All @@ -52,7 +55,7 @@ LD_EXPORT(LDContext) LDContextBuilder_Build(LDContextBuilder builder);
*
* You must first add the kind to the context builder before setting attributes.
*
* If you call LDContextBuilder_AddKind a second time, with an already specified
* If you call this a second time, with an already specified
* kind, but a different key, then the key for that kind will be updated.
*
* @param builder The builder to add the kind to. Must not be NULL.
Expand All @@ -67,11 +70,11 @@ LDContextBuilder_AddKind(LDContextBuilder builder,
/**
* Add or update a top-level attribute in the specified kind.
*
* Adding a LDValue to the builder will consume that value.
* Adding a @ref LDValue to the builder will consume that value.
* You should not access the value after adding it to the builder, and you
* do not need to call LDValue_Free on the value.
* do not need to call @ref LDValue_Free on the value.
*
* @param builder. The builder. Must not be NULL.
* @param builder The builder. Must not be NULL.
* @param kind The kind to add the attribute to. Must not be NULL.
* @param attr_name The name of the attribute to add. Must not be NULL.
* @param val The value of the attribute to add. Must not be NULL.
Expand All @@ -84,18 +87,20 @@ LDContextBuilder_Attributes_Set(LDContextBuilder builder,

/**
* Add or update a private attribute. Once an attribute has been set as private
* using LDContextBuilder_Attributes_SetPrivate it will remain private.
* A subsequent call to LDContextBuilder_Attributes_Set, for the same attribute,
* will not remove the private status.
* using this method it will remain private.
*
* A subsequent call to @ref LDContextBuilder_Attributes_Set, for the same
* attribute, will not remove the private status.
*
* This method cannot be used to set the key, kind, name, or anonymous
* This method cannot be used to set the `key`, `kind`, `name`, or `anonymous`
* property of a context.
*
* Adding a LDValue to the builder will consume that value.
* Adding a @ref LDValue to the builder will consume that value.
*
* You should not access the value after adding it to the builder, and you
* do not need to call LDValue_Free on the value. This method is just a
* do not need to call @ref LDValue_Free on the value. This method is just a
* convenience which also adds the attribute to the private attributes list,
* as if using LDContextBuilder_Attributes_AddPrivateAttribute.
* as if using @ref LDContextBuilder_Attributes_AddPrivateAttribute.
*
* @param builder The builder. Must not be NULL.
* @param kind The kind to set the private attribute for. Must not be NULL.
Expand All @@ -111,7 +116,7 @@ LDContextBuilder_Attributes_SetPrivate(LDContextBuilder builder,
/**
* Set the name attribute for the specified kind.
*
* You can search for contexts on the Contexts page by name.
* You can search for contexts on the LaunchDarkly Contexts page by name.
*
* This method will make a copy of the name string, and the caller remains
* responsible for the original name string.
Expand Down Expand Up @@ -164,8 +169,12 @@ LDContextBuilder_Attributes_SetAnonymous(LDContextBuilder builder,
* This action only affects analytics events that involve this particular
* context. To mark some (or all) context attributes as private for all
* contexts, use the overall configuration for the SDK. See
* LDClientConfigBuilder_Events_AllAttributesPrivate and
* LDClientConfigBuilder_Events_PrivateAttribute.
* - @ref LDServerConfigBuilder_Events_AllAttributesPrivate
* - @ref LDClientConfigBuilder_Events_AllAttributesPrivate
*
* and
* - @ref LDServerConfigBuilder_Events_PrivateAttribute
* - @ref LDClientConfigBuilder_Events_PrivateAttribute
*
* The attributes "kind" and "key", and the "_meta" attributes cannot be
* made private.
Expand Down
7 changes: 4 additions & 3 deletions libs/common/include/launchdarkly/bindings/c/flag_listener.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,16 @@ struct LDFlagListener {

/**
* Initializes a flag listener. Must be called before passing the listener
* to LDClientSDK_FlagNotifier_OnFlagChange.
* to @ref LDClientSDK_FlagNotifier_OnFlagChange.
*
* Create the struct, initialize the struct, set the FlagChanged handler
* and optionally UserData, and then pass the struct to
* LDClientSDK_FlagNotifier_OnFlagChange.
* @ref LDClientSDK_FlagNotifier_OnFlagChange.
*
* @param listener Listener to initialize.
*/
LD_EXPORT(void) LDFlagListener_Init(struct LDFlagListener* listener);
LD_EXPORT(void)
LDFlagListener_Init(struct LDFlagListener* listener);

#ifdef __cplusplus
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ LDListenerConnection_Disconnect(LDListenerConnection connection);
*
* @param connection The LDListenerConnection to free.
*/
LD_EXPORT(void) LDListenerConnection_Free(LDListenerConnection connection);
LD_EXPORT(void)
LDListenerConnection_Free(LDListenerConnection connection);

#ifdef __cplusplus
}
Expand Down
5 changes: 5 additions & 0 deletions libs/common/include/launchdarkly/bindings/c/memory_routines.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ extern "C" { // only need to export C interface if
// used by C++ source code
#endif

/**
* Frees a string returned from the SDK.
* @param string The string to free.
* @return void
*/
LD_EXPORT(void)
LDMemory_FreeString(char* string);

Expand Down
23 changes: 13 additions & 10 deletions libs/common/include/launchdarkly/bindings/c/object_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,25 @@ typedef struct _LDObjectBuilder* LDObjectBuilder;
* @return The new object builder.
*
*/
LD_EXPORT(LDObjectBuilder) LDObjectBuilder_New();
LD_EXPORT(LDObjectBuilder)
LDObjectBuilder_New();

/**
* Free an object builder. This should only be done for a builder which
* has not been built. Calling LDArrayBuilder_Build on an array builder
* consumes the array builder.
* has not been built. Calling @ref LDObjectBuilder_Build on an object builder
* consumes the object builder.
*
* @param builder The builder to free.
*/
LD_EXPORT(void) LDObjectBuilder_Free(LDObjectBuilder builder);
LD_EXPORT(void)
LDObjectBuilder_Free(LDObjectBuilder builder);

/**
* Add a key-value pair to the object builder.
*
* After calling this method the provider LDValue is consumed. It should not
* be accessed, and the caller doesn't need to call LDValue_Free. The key will
* be copied.
* After calling this method the provider @ref LDValue is consumed. It should
* not be accessed, and the caller doesn't need to call @ref LDValue_Free. The
* key will be copied.
*
* @param builder The object builder to add the value to.
* @param key The key for the value being added. Must not be NULL.
Expand All @@ -44,15 +46,16 @@ LD_EXPORT(void)
LDObjectBuilder_Add(LDObjectBuilder builder, char const* key, LDValue val);

/**
* Construct an LDValue from an object builder.
* Construct an @ref LDValue from an object builder.
*
* After calling this method the object builder is consumed. It should not be
* used and the caller does not need to call LDObjectBuilder_Free.
* used and the caller does not need to call @ref LDObjectBuilder_Free.
*
* @param builder The object builder to build an LDValue from. Must not be NULL.
* @return The built LDValue.
*/
LD_EXPORT(LDValue) LDObjectBuilder_Build(LDObjectBuilder builder);
LD_EXPORT(LDValue)
LDObjectBuilder_Build(LDObjectBuilder builder);

#ifdef __cplusplus
}
Expand Down
20 changes: 12 additions & 8 deletions libs/common/include/launchdarkly/bindings/c/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,35 @@ typedef struct _LDStatus* LDStatus;
/**
* Returns a string representing the error stored in an LDStatus, or
* NULL if the result indicates success.
* @param error Result to inspect.
* @param res Result to inspect.
* @return String or NULL. The returned string is valid only while the LDStatus
* is alive.
*/
LD_EXPORT(char const*) LDStatus_Error(LDStatus res);
LD_EXPORT(char const*)
LDStatus_Error(LDStatus res);

/**
* Checks if a result indicates success.
* @param result Result to inspect.
* @param res Result to inspect.
* @return True if the result indicates success.
*/
LD_EXPORT(bool) LDStatus_Ok(LDStatus res);
LD_EXPORT(bool)
LDStatus_Ok(LDStatus res);

/**
* Frees an LDStatus. It is only necessary to call LDStatus_Free if LDStatus_Ok
* returns false.
* Frees an LDStatus. It is only necessary to call if
* @ref LDStatus_Ok returns false.
* @param res Result to free.
*/
LD_EXPORT(void) LDStatus_Free(LDStatus res);
LD_EXPORT(void)
LDStatus_Free(LDStatus res);

/**
* Returns a status representing success.
* @return Successful status.
*/
LD_EXPORT(LDStatus) LDStatus_Success(void);
LD_EXPORT(LDStatus)
LDStatus_Success(void);

#ifdef __cplusplus
}
Expand Down
Loading

0 comments on commit 13e9a89

Please sign in to comment.