Commit a4237b30 authored by Soemin Tjong's avatar Soemin Tjong Committed by Dave Thaler

Define OC_CALL (call convention for public APIs).

Set to __stdcall for WIN32.
Add to IPCA public APIs.
Other public APIs will be updated in separate commit.

Change-Id: I3201b7088eeb2227d2681847d20172825fbf4cae
Signed-off-by: default avatarSoemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18169Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarDan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: default avatarWay Vadhanasin <wayvad@microsoft.com>
Reviewed-by: default avatarMike Fenelon <mike.fenelon@microsoft.com>
Reviewed-by: default avatarDave Thaler <dthaler@microsoft.com>
parent fb7c3631
This diff is collapsed.
......@@ -38,8 +38,10 @@
// Forward decls.
extern bool RediscoverElevator();
extern void ResourceChangeNotificationCallback(IPCAStatus result, void* context,
IPCAPropertyBagHandle propertyBagHandle);
extern void IPCA_CALL ResourceChangeNotificationCallback(
IPCAStatus result,
void* context,
IPCAPropertyBagHandle propertyBagHandle);
// Key is device id. Value is pointer to OCFDevice.
std::map<std::string, OCFDevice::Ptr> g_OCFDeviceList;
......@@ -85,8 +87,10 @@ IPCAStatus RequestObserve()
}
// Callback from IPCAObserveResource().
void ResourceChangeNotificationCallback(IPCAStatus result, void* context,
IPCAPropertyBagHandle propertyBagHandle)
void IPCA_CALL ResourceChangeNotificationCallback(
IPCAStatus result,
void* context,
IPCAPropertyBagHandle propertyBagHandle)
{
UNREFERENCED_PARAMETER(context);
......@@ -138,9 +142,10 @@ void ResourceChangeNotificationCallback(IPCAStatus result, void* context,
std::mutex g_getPropertiesCbMutex;
std::condition_variable g_getPropertiesCompleteCV;
void GetPropertiesCallback(IPCAStatus result,
void* context,
IPCAPropertyBagHandle propertyBagHandle)
void IPCA_CALL GetPropertiesCallback(
IPCAStatus result,
void* context,
IPCAPropertyBagHandle propertyBagHandle)
{
UNREFERENCED_PARAMETER(context);
......@@ -189,9 +194,10 @@ void GetPropertiesCallback(IPCAStatus result,
// IPCASetProperties() completion callback.
std::mutex g_setPropertiesCbMutex;
std::condition_variable g_setPropertiesCompleteCV;
void SetPropertiesCallback(IPCAStatus result,
void* context,
IPCAPropertyBagHandle propertyBagHandle)
void IPCA_CALL SetPropertiesCallback(
IPCAStatus result,
void* context,
IPCAPropertyBagHandle propertyBagHandle)
{
UNREFERENCED_PARAMETER(context);
UNREFERENCED_PARAMETER(propertyBagHandle);
......@@ -212,9 +218,10 @@ void SetPropertiesCallback(IPCAStatus result,
// Callback when device is discovered.
std::mutex g_deviceDiscoveredCbMutex;
std::condition_variable g_deviceDiscoveredCV;
void DiscoverDevicesCallback(void* context,
IPCADeviceStatus deviceStatus,
const IPCADiscoveredDeviceInfo* deviceInfo)
void IPCA_CALL DiscoverDevicesCallback(
void* context,
IPCADeviceStatus deviceStatus,
const IPCADiscoveredDeviceInfo* deviceInfo)
{
UNREFERENCED_PARAMETER(context);
......@@ -556,13 +563,13 @@ bool RediscoverElevator()
return true;
}
IPCAStatus PwdInputCallback(
void* context,
const IPCADeviceInfo* deviceInformation,
const IPCAPlatformInfo* platformInformation,
IPCAOwnershipTransferType type,
char* passwordBuffer,
size_t passwordBufferSize)
IPCAStatus IPCA_CALL PwdInputCallback(
void* context,
const IPCADeviceInfo* deviceInformation,
const IPCAPlatformInfo* platformInformation,
IPCAOwnershipTransferType type,
char* passwordBuffer,
size_t passwordBufferSize)
{
UNREFERENCED_PARAMETER(passwordBufferSize);
UNREFERENCED_PARAMETER(type);
......@@ -586,12 +593,12 @@ IPCAStatus PwdInputCallback(
return IPCA_OK;
}
IPCAStatus PwdDisplayCallback(
void* context,
const IPCADeviceInfo* deviceInformation,
const IPCAPlatformInfo* platformInformation,
IPCAOwnershipTransferType type,
const char* password)
IPCAStatus IPCA_CALL PwdDisplayCallback(
void* context,
const IPCADeviceInfo* deviceInformation,
const IPCAPlatformInfo* platformInformation,
IPCAOwnershipTransferType type,
const char* password)
{
UNREFERENCED_PARAMETER(context);
UNREFERENCED_PARAMETER(deviceInformation);
......@@ -608,7 +615,7 @@ IPCAStatus PwdDisplayCallback(
return IPCA_OK;
}
void AuthCompletionCallback(IPCAStatus completionStatus, void* context)
void IPCA_CALL AuthCompletionCallback(IPCAStatus completionStatus, void* context)
{
UNREFERENCED_PARAMETER(context);
std::cout << "AuthCompletionCallback(). Completion status is: " << completionStatus;
......
......@@ -137,9 +137,10 @@ IPCAPlatformInfo* OCFDevice::GetPlatformInfo()
return m_platformInfo;
}
void C_GetPropertiesCallback(IPCAStatus result,
void* context,
IPCAPropertyBagHandle propertyBagHandle)
void IPCA_CALL C_GetPropertiesCallback(
IPCAStatus result,
void* context,
IPCAPropertyBagHandle propertyBagHandle)
{
std::lock_guard<std::recursive_mutex> lock(g_globalMutex);
......@@ -511,9 +512,10 @@ void OCFDevice::GetDeviceDetails(std::string deviceName, const char** deviceUris
std::map<std::string, OCFDevice::Ptr> g_OCFDeviceList;
// Callback when device is discovered.
void DiscoverDevicesCallback(void* context,
IPCADeviceStatus deviceStatus,
const IPCADiscoveredDeviceInfo* deviceInfo)
void IPCA_CALL DiscoverDevicesCallback(
void* context,
IPCADeviceStatus deviceStatus,
const IPCADiscoveredDeviceInfo* deviceInfo)
{
UNREFERENCED_PARAMETER(context);
......@@ -559,12 +561,13 @@ void DiscoverDevicesCallback(void* context,
ocfDevice->DisplayDevice();
}
IPCAStatus IPCA_CALL PasswordInputCallback(void* context,
const IPCADeviceInfo* deviceInformation,
const IPCAPlatformInfo* platformInformation,
IPCAOwnershipTransferType type,
char* passwordBuffer,
size_t passwordBufferSize)
IPCAStatus IPCA_CALL PasswordInputCallback(
void* context,
const IPCADeviceInfo* deviceInformation,
const IPCAPlatformInfo* platformInformation,
IPCAOwnershipTransferType type,
char* passwordBuffer,
size_t passwordBufferSize)
{
UNREFERENCED_PARAMETER(context);
UNREFERENCED_PARAMETER(deviceInformation);
......@@ -579,11 +582,12 @@ IPCAStatus IPCA_CALL PasswordInputCallback(void* context,
return IPCA_FAIL;
}
IPCAStatus IPCA_CALL PasswordDisplayCallback(void* context,
const IPCADeviceInfo* deviceInformation,
const IPCAPlatformInfo* platformInformation,
IPCAOwnershipTransferType type,
const char* password)
IPCAStatus IPCA_CALL PasswordDisplayCallback(
void* context,
const IPCADeviceInfo* deviceInformation,
const IPCAPlatformInfo* platformInformation,
IPCAOwnershipTransferType type,
const char* password)
{
UNREFERENCED_PARAMETER(context);
UNREFERENCED_PARAMETER(deviceInformation);
......
......@@ -79,9 +79,10 @@ struct CallbackInfo
};
// Represent IPCAResourceChangeCallback, IPCAGetPropertiesComplete, IPCASetPropertiesComplete.
typedef void (IPCA_CALL *GenericAppCallback)(IPCAStatus result,
void* context,
IPCAPropertyBagHandle propertyBagHandle);
typedef void (IPCA_CALL *GenericAppCallback)(
IPCAStatus result,
void* context,
IPCAPropertyBagHandle propertyBagHandle);
// One Callback object per App. One app per IPCAOpen().
class Callback
......
......@@ -31,7 +31,8 @@ std::mutex g_ipcaAppMutex;
bool g_unitTestMode = false;
IPCAStatus IPCA_CALL IPCAOpen(const IPCAAppInfo* ipcaAppInfo,
IPCAStatus IPCA_CALL IPCAOpen(
const IPCAAppInfo* ipcaAppInfo,
IPCAVersion ipcaVersion,
IPCAAppHandle* ipcaAppHandle)
{
......@@ -88,20 +89,22 @@ void IPCA_CALL IPCAClose(IPCAAppHandle ipcaAppHandle)
g_app = nullptr;
}
IPCAStatus IPCA_CALL IPCADiscoverDevices(IPCAAppHandle ipcaAppHandle,
IPCADiscoverDeviceCallback callback,
void* context,
const char* const* resourceTypeList,
int resourceTypeCount,
IPCAHandle* handle)
IPCAStatus IPCA_CALL IPCADiscoverDevices(
IPCAAppHandle ipcaAppHandle,
IPCADiscoverDeviceCallback callback,
void* context,
const char* const* resourceTypeList,
int resourceTypeCount,
IPCAHandle* handle)
{
App* app = reinterpret_cast<App*>(ipcaAppHandle);
return app->DiscoverDevices(callback, context, resourceTypeList, resourceTypeCount, handle);
}
IPCAStatus IPCA_CALL IPCAOpenDevice(IPCAAppHandle ipcaAppHandle,
const char* deviceId,
IPCADeviceHandle* deviceHandle)
IPCAStatus IPCA_CALL IPCAOpenDevice(
IPCAAppHandle ipcaAppHandle,
const char* deviceId,
IPCADeviceHandle* deviceHandle)
{
App* app = reinterpret_cast<App*>(ipcaAppHandle);
return app->OpenDevice(deviceId, deviceHandle);
......@@ -114,29 +117,31 @@ void IPCA_CALL IPCACloseDevice(IPCADeviceHandle deviceHandle)
app->CloseDevice(deviceHandle);
}
IPCAStatus IPCAGetDeviceInfo(IPCADeviceHandle deviceHandle, IPCADeviceInfo** deviceInfo)
IPCAStatus IPCA_CALL IPCAGetDeviceInfo(IPCADeviceHandle deviceHandle, IPCADeviceInfo** deviceInfo)
{
DeviceWrapper* deviceWrapper = reinterpret_cast<DeviceWrapper*>(deviceHandle);
return deviceWrapper->device->GetDeviceInfo(deviceInfo);
}
void IPCAFreeDeviceInfo(IPCADeviceInfo* deviceInfo)
void IPCA_CALL IPCAFreeDeviceInfo(IPCADeviceInfo* deviceInfo)
{
OCFFramework::FreeDeviceInfo(deviceInfo);
}
IPCAStatus IPCAGetPlatformInfo(IPCADeviceHandle deviceHandle, IPCAPlatformInfo** platformInfo)
IPCAStatus IPCA_CALL IPCAGetPlatformInfo(IPCADeviceHandle deviceHandle,
IPCAPlatformInfo** platformInfo)
{
DeviceWrapper* deviceWrapper = reinterpret_cast<DeviceWrapper*>(deviceHandle);
return deviceWrapper->device->GetPlatformInfo(platformInfo);
}
void IPCAFreePlatformInfo(IPCAPlatformInfo* platformInfo)
void IPCA_CALL IPCAFreePlatformInfo(IPCAPlatformInfo* platformInfo)
{
OCFFramework::FreePlatformInfo(platformInfo);
}
IPCAStatus IPCA_CALL IPCAGetResources(IPCADeviceHandle deviceHandle,
IPCAStatus IPCA_CALL IPCAGetResources(
IPCADeviceHandle deviceHandle,
const char* resourceInterface,
const char* resourceType,
char*** resourcePathList,
......@@ -246,14 +251,15 @@ IPCAStatus IPCA_CALL IPCAObserveResource(IPCADeviceHandle deviceHandle,
handle);
}
IPCAStatus IPCA_CALL IPCACreateResource(IPCADeviceHandle deviceHandle,
IPCACreateResourceComplete createResourceCb,
void* context,
const char* resourcePath,
const char* resourceInterface,
const char* resourceType,
IPCAPropertyBagHandle propertyBagHandle,
IPCAHandle* handle)
IPCAStatus IPCA_CALL IPCACreateResource(
IPCADeviceHandle deviceHandle,
IPCACreateResourceComplete createResourceCb,
void* context,
const char* resourcePath,
const char* resourceInterface,
const char* resourceType,
IPCAPropertyBagHandle propertyBagHandle,
IPCAHandle* handle)
{
DeviceWrapper* deviceWrapper = reinterpret_cast<DeviceWrapper*>(deviceHandle);
return deviceWrapper->app->CreateResource(
......@@ -267,11 +273,12 @@ IPCAStatus IPCA_CALL IPCACreateResource(IPCADeviceHandle deviceHandle,
handle);
}
IPCAStatus IPCA_CALL IPCADeleteResource(IPCADeviceHandle deviceHandle,
IPCADeleteResourceComplete deleteResourceCb,
void* context,
const char* resourcePath,
IPCAHandle* handle)
IPCAStatus IPCA_CALL IPCADeleteResource(
IPCADeviceHandle deviceHandle,
IPCADeleteResourceComplete deleteResourceCb,
void* context,
const char* resourcePath,
IPCAHandle* handle)
{
DeviceWrapper* deviceWrapper = reinterpret_cast<DeviceWrapper*>(deviceHandle);
return deviceWrapper->app->DeleteResource(
......@@ -298,7 +305,10 @@ typedef struct
IPCAStatus result;
} AsyncContext;
void AsyncCallback(IPCAStatus result, void* context, IPCAPropertyBagHandle propertyBagHandle)
void IPCA_CALL AsyncCallback(
IPCAStatus result,
void* context,
IPCAPropertyBagHandle propertyBagHandle)
{
OC_UNUSED(propertyBagHandle);
......@@ -393,20 +403,22 @@ IPCAStatus IPCA_CALL IPCAReboot(IPCADeviceHandle deviceHandle)
return status;
}
IPCAStatus IPCA_CALL IPCASetPasswordCallbacks(IPCAAppHandle ipcaAppHandle,
IPCAProvidePasswordCallback inputCallback,
IPCADisplayPasswordCallback displayCallback,
void* context)
IPCAStatus IPCA_CALL IPCASetPasswordCallbacks(
IPCAAppHandle ipcaAppHandle,
IPCAProvidePasswordCallback inputCallback,
IPCADisplayPasswordCallback displayCallback,
void* context)
{
App* app = reinterpret_cast<App*>(ipcaAppHandle);
return app->SetPasswordCallbacks(inputCallback, displayCallback, context);
}
IPCAStatus IPCA_CALL IPCARequestAccess(IPCADeviceHandle deviceHandle,
const char* resourcePath,
IPCARequestAccessCompletionCallback completionCallback,
void* context,
IPCAHandle* handle)
IPCAStatus IPCA_CALL IPCARequestAccess(
IPCADeviceHandle deviceHandle,
const char* resourcePath,
IPCARequestAccessCompletionCallback completionCallback,
void* context,
IPCAHandle* handle)
{
DeviceWrapper* deviceWrapper = reinterpret_cast<DeviceWrapper*>(deviceHandle);
return deviceWrapper->app->RequestAccess(
......
......@@ -25,7 +25,7 @@
#define TAG "IPCA_Variant"
IPCAStatus IPCAPropertyBagCreate(IPCAPropertyBagHandle* propertyBagHandle)
IPCAStatus IPCA_CALL IPCAPropertyBagCreate(IPCAPropertyBagHandle* propertyBagHandle)
{
OC::OCRepresentation* rep = new OC::OCRepresentation();
......@@ -38,13 +38,16 @@ IPCAStatus IPCAPropertyBagCreate(IPCAPropertyBagHandle* propertyBagHandle)
return IPCA_OK;
}
void IPCAPropertyBagDestroy(IPCAPropertyBagHandle propertyBagHandle)
void IPCA_CALL IPCAPropertyBagDestroy(IPCAPropertyBagHandle propertyBagHandle)
{
delete(reinterpret_cast<OC::OCRepresentation*>(propertyBagHandle));
}
template <typename _T>
IPCAStatus IPCAPropertySetValue(IPCAPropertyBagHandle propertyBagHandle, const char* key, _T value)
IPCAStatus IPCA_CALL IPCAPropertySetValue(
IPCAPropertyBagHandle propertyBagHandle,
const char* key,
_T value)
{
if (propertyBagHandle == nullptr)
{
......@@ -64,38 +67,43 @@ IPCAStatus IPCAPropertySetValue(IPCAPropertyBagHandle propertyBagHandle, const c
}
}
IPCAStatus IPCAPropertyBagSetValueInt(IPCAPropertyBagHandle propertyBagHandle,
const char* key,
int value)
IPCAStatus IPCA_CALL IPCAPropertyBagSetValueInt(
IPCAPropertyBagHandle propertyBagHandle,
const char* key,
int value)
{
return IPCAPropertySetValue(propertyBagHandle, key, value);
}
IPCAStatus IPCAPropertyBagSetValueDouble(IPCAPropertyBagHandle propertyBagHandle,
const char* key,
double value)
IPCAStatus IPCA_CALL IPCAPropertyBagSetValueDouble(
IPCAPropertyBagHandle propertyBagHandle,
const char* key,
double value)
{
return IPCAPropertySetValue(propertyBagHandle, key, value);
}
IPCAStatus IPCAPropertyBagSetValueBool(IPCAPropertyBagHandle propertyBagHandle,
const char* key,
bool value)
IPCAStatus IPCA_CALL IPCAPropertyBagSetValueBool(
IPCAPropertyBagHandle propertyBagHandle,
const char* key,
bool value)
{
return IPCAPropertySetValue(propertyBagHandle, key, value);
}
IPCAStatus IPCAPropertyBagSetValueString(IPCAPropertyBagHandle propertyBagHandle,
const char* key,
const char* value)
IPCAStatus IPCA_CALL IPCAPropertyBagSetValueString(
IPCAPropertyBagHandle propertyBagHandle,
const char* key,
const char* value)
{
std::string valueString = value;
return IPCAPropertySetValue(propertyBagHandle, key, valueString);
}
IPCAStatus IPCAPropertyBagSetValuePropertyBag(IPCAPropertyBagHandle propertyBagHandle,
const char* key,
const IPCAPropertyBagHandle value)
IPCAStatus IPCA_CALL IPCAPropertyBagSetValuePropertyBag(
IPCAPropertyBagHandle propertyBagHandle,
const char* key,
const IPCAPropertyBagHandle value)
{
if (propertyBagHandle == nullptr)
{
......@@ -118,10 +126,11 @@ IPCAStatus IPCAPropertyBagSetValuePropertyBag(IPCAPropertyBagHandle propertyBagH
}
template <typename _T>
IPCAStatus IPCAPropertyBagSetValueArray(IPCAPropertyBagHandle propertyBagHandle,
const char* key,
const _T* valueArray,
size_t arrayCount)
IPCAStatus IPCA_CALL IPCAPropertyBagSetValueArray(
IPCAPropertyBagHandle propertyBagHandle,
const char* key,
const _T* valueArray,
size_t arrayCount)
{
if (propertyBagHandle == nullptr)
{
......@@ -149,35 +158,39 @@ IPCAStatus IPCAPropertyBagSetValueArray(IPCAPropertyBagHandle propertyBagHandle,
}
}
IPCAStatus IPCAPropertyBagSetValueIntArray(IPCAPropertyBagHandle propertyBagHandle,
const char* key,
const int* valueArray,
size_t arrayCount)
IPCAStatus IPCA_CALL IPCAPropertyBagSetValueIntArray(
IPCAPropertyBagHandle propertyBagHandle,
const char* key,
const int* valueArray,
size_t arrayCount)
{
return IPCAPropertyBagSetValueArray(propertyBagHandle, key, valueArray, arrayCount);
}
IPCAStatus IPCAPropertyBagSetValueDoubleArray(IPCAPropertyBagHandle propertyBagHandle,
const char* key,
const double* valueArray,
size_t arrayCount)
IPCAStatus IPCA_CALL IPCAPropertyBagSetValueDoubleArray(
IPCAPropertyBagHandle propertyBagHandle,
const char* key,
const double* valueArray,
size_t arrayCount)
{
return IPCAPropertyBagSetValueArray(propertyBagHandle, key, valueArray, arrayCount);
}
IPCAStatus IPCAPropertyBagSetValueBoolArray(IPCAPropertyBagHandle propertyBagHandle,
const char* key,
const bool* valueArray,
size_t arrayCount)
IPCAStatus IPCA_CALL IPCAPropertyBagSetValueBoolArray(
IPCAPropertyBagHandle propertyBagHandle,
const char* key,
const bool* valueArray,
size_t arrayCount)
{
return IPCAPropertyBagSetValueArray(propertyBagHandle, key, valueArray, arrayCount);
}
IPCAStatus IPCAPropertyBagSetValueStringArray(IPCAPropertyBagHandle propertyBagHandle,
const char* key,
const char** valueArray,
size_t arrayCount)
IPCAStatus IPCA_CALL IPCAPropertyBagSetValueStringArray(
IPCAPropertyBagHandle propertyBagHandle,
const char* key,
const char** valueArray,
size_t arrayCount)
{
if (propertyBagHandle == nullptr)
{
......@@ -205,10 +218,11 @@ IPCAStatus IPCAPropertyBagSetValueStringArray(IPCAPropertyBagHandle propertyBagH
}
}
IPCAStatus IPCAPropertyBagSetValuePropertyBagArray(IPCAPropertyBagHandle propertyBagHandle,
const char* key,
const IPCAPropertyBagHandle* valueArray,
size_t valueCount)
IPCAStatus IPCA_CALL IPCAPropertyBagSetValuePropertyBagArray(
IPCAPropertyBagHandle propertyBagHandle,
const char* key,
const IPCAPropertyBagHandle* valueArray,
size_t valueCount)
{
if (propertyBagHandle == nullptr)
{
......@@ -238,7 +252,10 @@ IPCAStatus IPCAPropertyBagSetValuePropertyBagArray(IPCAPropertyBagHandle propert
}
template <typename _T>
IPCAStatus AllocateAndCopyTypeVectorToArrayOfType(std::vector<_T> array, _T** dest, size_t* count)
IPCAStatus IPCA_CALL AllocateAndCopyTypeVectorToArrayOfType(
std::vector<_T> array,
_T** dest,
size_t* count)
{
_T* buffer;
size_t arraySize = array.size();
......@@ -262,9 +279,10 @@ IPCAStatus AllocateAndCopyTypeVectorToArrayOfType(std::vector<_T> array, _T** de
}
template <typename _T>
IPCAStatus IPCAPropertyBagGetValueArray(IPCAPropertyBagHandle propertyBagHandle,
const char* key, _T** value,
size_t* valueCount)
IPCAStatus IPCA_CALL IPCAPropertyBagGetValueArray(
IPCAPropertyBagHandle propertyBagHandle,
const char* key, _T** value,
size_t* valueCount)
{
if (propertyBagHandle == nullptr)
{
......@@ -281,49 +299,53 @@ IPCAStatus IPCAPropertyBagGetValueArray(IPCAPropertyBagHandle propertyBagHandle,
return AllocateAndCopyTypeVectorToArrayOfType(array, value, valueCount);
}
IPCAStatus IPCAPropertyBagGetValueIntArray(IPCAPropertyBagHandle propertyBagHandle,
const char* key,
int** value,
size_t* valueCount)
IPCAStatus IPCA_CALL IPCAPropertyBagGetValueIntArray(
IPCAPropertyBagHandle propertyBagHandle,
const char* key,
int** value,
size_t* valueCount)
{
return IPCAPropertyBagGetValueArray(propertyBagHandle, key, value, valueCount);
}
void IPCAPropertyBagFreeIntArray(int* valueArray)
void IPCA_CALL IPCAPropertyBagFreeIntArray(int* valueArray)
{
OICFree((void*)valueArray);
}
IPCAStatus IPCAPropertyBagGetValueDoubleArray(IPCAPropertyBagHandle propertyBagHandle,
const char* key,
double** value,
size_t* valueCount)
IPCAStatus IPCA_CALL IPCAPropertyBagGetValueDoubleArray(
IPCAPropertyBagHandle propertyBagHandle,
const char* key,
double** value,
size_t* valueCount)
{
return IPCAPropertyBagGetValueArray(propertyBagHandle, key, value, valueCount);
}
void IPCAPropertyBagFreeDoubleArray(double* valueArray)
void IPCA_CALL IPCAPropertyBagFreeDoubleArray(double* valueArray)
{
OICFree((void*)valueArray);
}
IPCAStatus IPCAPropertyBagGetValueBoolArray(IPCAPropertyBagHandle propertyBagHandle,
const char* key,
bool** value,
size_t* valueCount)
IPCAStatus IPCA_CALL IPCAPropertyBagGetValueBoolArray(
IPCAPropertyBagHandle propertyBagHandle,
const char* key,
bool** value,
size_t* valueCount)
{
return IPCAPropertyBagGetValueArray(propertyBagHandle, key, value, valueCount);
}
void IPCAPropertyBagFreeBoolArray(bool* valueArray)
void IPCA_CALL IPCAPropertyBagFreeBoolArray(bool* valueArray)
{
OICFree((void*)valueArray);
}
IPCAStatus IPCAPropertyBagGetValueStringArray(IPCAPropertyBagHandle propertyBagHandle,
const char* key,
char*** value,
size_t* valueCount)
IPCAStatus IPCA_CALL IPCAPropertyBagGetValueStringArray(
IPCAPropertyBagHandle propertyBagHandle,
const char* key,
char*** value,
size_t* valueCount)
{
if (propertyBagHandle == nullptr)
{
......@@ -341,15 +363,16 @@ IPCAStatus IPCAPropertyBagGetValueStringArray(IPCAPropertyBagHandle propertyBagH
return AllocateAndCopyStringVectorToArrayOfCharPointers(array, value, valueCount);
}
void IPCAPropertyBagFreeStringArray(char** valueArray, size_t valueCount)
void IPCA_CALL IPCAPropertyBagFreeStringArray(char** valueArray, size_t valueCount)
{
FreeArrayOfCharPointers(valueArray, valueCount);
}