API Reference | developer.brewmp.com API Reference | developer.brewmp.com


API Reference


Brew Release
Brew MP 1.0.2
See Also
Error Codes ISettings ISettings_Set
This method retrieves the value of the setting specified by the key from the ISettings object. The value is returned as a NULL-terminated string. Depending on the implementation of the ISettings object, the key may be a simple identifier, a URI, or something else entirely.
This method always returns the total size of the buffer required for the complete setting value plus a terminating NULL character in the valueLenReq parameter. If this method is called with a non-0 valueLen it will fill the specified buffer with as much of the setting value that will fit and NULL-terminate the result. The caller is responsible for providing a valid buffer and an accurate buffer size in this case.
On return, the caller must verify that the setting value was properly retrieved by checking that no error code was returned. The caller may also wish to verify that the complete value was returned in the buffer by comparing the value passed in for valueLen with the value returned in the valueLenReq parameter.
[in] A pointer to the ISettings object.
[in] A NULL-terminated string representing the setting to be retrieved.
[out] If nValueLen is set to 0, this parameter is ignored. Otherwise, this buffer is filled with as much of the requested data as will fit, along with a NULL for termination.
[in] The total size (in bytes) of the value buffer, or 0 to query for required buffer size only.
[out] On return, valueLenReq is set to the buffer size required to allow the complete value and terminating NULL character to be stored. May also be NULL if the caller doesn't care to know.
  •    int ISettings_Get(ISettings *_me, 
                         const char *key, 
                         char *value, 
                         int valueLen, 
                         int *valueLenReq);
  • AEE_SUCCESS : On success. AEE_EBADITEM : The requested setting does not exist. AEE_EUNSUPPORTED : The operation isn't supported by the implementation. AEE_EPRIVLEVEL : The caller does not have sufficient privileges for this operation. Error code : Otherwise.
Side Effect
  • None
This function should be called once with nValueLen set to 0 to determine the required amount of space to buffer the setting value. The caller should then allocate the required amount of memory and call this function again to retrieve the value.