WVR_GetParameters¶
-
WVR_EXPORT uint32_t WVR_GetParameters(WVR_DeviceType type, const char * pchValue, char * retValue, uint32_t unBufferSize)
Function to get a parameter string from the device service.
- Return
- The number of bytes necessary to hold the string, including the trailing null. Returns 0 (and 0-length string) on failure.
- Version
- API Level 1
- Parameters
type
: Indicates what device type. (refer to WVR_DeviceType)pchValue
: Send the string to let the app communicate with the device service.retValue
: The buffer to store the parameter retrieved from the device service. unBufferSize should be the size of this buffer.unBufferSize
: The size of the buffer pointed to by pchValue.
How to use¶
Here is an example for the function:
#include <wvr/wvr_device.h>
char pchString[256] = "IsDeviceSupportCamera";
char retString[256] = { 0 };
uint32_t size;
//Get the result from the device service
size = WVR_GetParameters(WVR_DeviceType_HMD, pchString, retString, 256);
Device service needs to implement the getParameters function to get the string from the content app.