nl::Weave::Support

Summary

Typedefs

MessageNameFunct)(uint32_t inProfileId, uint8_t inMsgType) typedef
const char *(*
Typedef for a callback function that returns a human-readable NULL-terminated C string describing the message type associated with the specified profile identifier.
ProfileNameFunct)(uint32_t inProfileId) typedef
const char *(*
Typedef for a callback function that returns a human-readable NULL-terminated C string describing the profile with the specified profile identifier.
StatusReportFormatStringFunct)(uint32_t inProfileId, uint16_t inStatusCode) typedef
const char *(*
Typedef for a callback function that returns a human-readable NULL-terminated C string describing the status code associated with the specified profile identifier.

Variables

sProfileStringContextHead
Registry singly-linked list head pointer.

Functions

FindProfileStringContext(const ProfileStringContext & inContext)
Find a profile string support context matching the specified context, based on the profile identifier associated with the context.
FindProfileStringInfo(uint32_t inProfileId)
NL_DLL_EXPORT const ProfileStringInfo *
Find, if registered, the profile string support callbacks associated with the specified profile identifier.
InsertProfileStringContext(ProfileStringContext & inOutContext)
bool
Insert the specified profile string support context into the registry.
RegisterProfileStringInfo(ProfileStringContext & inOutContext)
NL_DLL_EXPORT WEAVE_ERROR
Register the provided profile string support callbacks.
RemoveProfileStringContext(ProfileStringContext & inOutContext)
bool
Remove the specified profile string support context from the registry.
UnregisterProfileStringInfo(ProfileStringContext & inOutContext)
NL_DLL_EXPORT WEAVE_ERROR
Unregister the provided profile string support callbacks.

Structs

nl::Weave::Support::ProfileStringContext

Context for registering and deregistering callbacks associated with the specified profile identifier for returning human-readable support strings associated with the profile.

nl::Weave::Support::ProfileStringInfo

Callbacks associated with the specified profile identifier for returning human-readable support strings associated with the profile.

Typedefs

MessageNameFunct

const char *(* MessageNameFunct)(uint32_t inProfileId, uint8_t inMsgType)

Typedef for a callback function that returns a human-readable NULL-terminated C string describing the message type associated with the specified profile identifier.

This callback, when registered, is invoked when a human-readable NULL-terminated C string is needed to describe the message type associated with the specified profile identifier.

Details
Parameters
[in] inProfileId
The profile identifier associated with the specified message type.
[in] inMsgType
The message type for which a human-readable descriptive string is sought.
Returns
a pointer to the NULL-terminated C string if a match is found; otherwise, NULL.

ProfileNameFunct

const char *(* ProfileNameFunct)(uint32_t inProfileId)

Typedef for a callback function that returns a human-readable NULL-terminated C string describing the profile with the specified profile identifier.

This callback, when registered, is invoked when a human-readable NULL-terminated C string is needed to describe the profile with the specified profile identifier.

Details
Parameters
[in] inProfileId
The profile identifier for which a human-readable descriptive string is sought.
Returns
a pointer to the NULL-terminated C string if a match is found; otherwise, NULL.

StatusReportFormatStringFunct

const char *(* StatusReportFormatStringFunct)(uint32_t inProfileId, uint16_t inStatusCode)

Typedef for a callback function that returns a human-readable NULL-terminated C string describing the status code associated with the specified profile identifier.

This callback, when registered, is invoked when a human-readable NULL-terminated C string is needed to describe the status code associated with the specified profile identifier.

Details
Parameters
[in] inProfileId
The profile identifier associated with the specified status code.
[in] inStatusCode
The status code for which a human-readable descriptive string is sought.
Returns
a pointer to the NULL-terminated C string if a match is found; otherwise, NULL.

Variables

sProfileStringContextHead

ProfileStringContext * sProfileStringContextHead

Registry singly-linked list head pointer.

Functions

FindProfileStringContext

ProfileStringContext * FindProfileStringContext(
  const ProfileStringContext & inContext
)

Find a profile string support context matching the specified context, based on the profile identifier associated with the context.

This function finds a profile string support context matching the specified context, based on the profile identifier associated with the context.

Details
Parameters
[in] inContext
A read-only reference to the profile string support context to find.
Returns
a read-only pointer to the profile string support context if found; otherwise, NULL.

FindProfileStringInfo

NL_DLL_EXPORT const ProfileStringInfo * FindProfileStringInfo(
  uint32_t inProfileId
)

Find, if registered, the profile string support callbacks associated with the specified profile identifier.

Details
Parameters
[in] inProfileId
The profile identifier to find string support callbacks for.
Returns
a read-only pointer to the profile string support callbacks if found; otherwise, NULL.
See also:
RegisterProfielStringInfo
UnregisterProfielStringInfo

InsertProfileStringContext

bool InsertProfileStringContext(
  ProfileStringContext & inOutContext
)

Insert the specified profile string support context into the registry.

This function inserts the specified profile string support context into the registry, if not already present, in sorted order, based on ascending profile identifier.

Details
Parameters
[in,out] inOutContext
A reference to the profile string support context that will be inserted into the registry. While the context is present in the registry, the mNext field may be modified as other contexts are inserted or removed.
Returns
true if the context was inserted; otherwise, false.

RegisterProfileStringInfo

NL_DLL_EXPORT WEAVE_ERROR RegisterProfileStringInfo(
  ProfileStringContext & inOutContext
)

Register the provided profile string support callbacks.

This function registers and makes available the provided profile string support callbacks.

Details
Parameters
[in,out] inOutContext
A reference to the profile string support context that will be registered and added to the registry. While the context is registered, the mNext field may be modified as other contexts are registered or unregistered.
Return Values
WEAVE_NO_ERROR
On success.
WEAVE_ERROR_PROFILE_STRING_CONTEXT_ALREADY_REGISTERED
If the context is already registered.
See also:
FindStringProfileInfo
UnregisterProfielStringInfo

RemoveProfileStringContext

bool RemoveProfileStringContext(
  ProfileStringContext & inOutContext
)

Remove the specified profile string support context from the registry.

This function removes the specified profile string support context from the registry, if present, based on the profile identifier.

Details
Parameters
[in,out] inOutContext
A reference to the profile string support context that will be removed, if present. When the context is removed, the mNext field may be modified.
Returns
true if the context was removed; otherwise, false.

UnregisterProfileStringInfo

NL_DLL_EXPORT WEAVE_ERROR UnregisterProfileStringInfo(
  ProfileStringContext & inOutContext
)

Unregister the provided profile string support callbacks.

This function unregisters and makes unavailable the provided profile string support callbacks.

Details
Parameters
[in,out] inOutContext
A reference to the profile string support context that will be unregistered, if registered, and removed from the registry. When the context is unregistered, the mNext field may be modified.
Return Values
WEAVE_NO_ERROR
On success.
WEAVE_ERROR_PROFILE_STRING_CONTEXT_NOT_REGISTERED
If the context is not registered.
See also:
FindStringProfileInfo
RegisterProfielStringInfo