diff --git a/global/resource_management/include/resourcemanager/ohresmgr.h b/global/resource_management/include/resourcemanager/ohresmgr.h index ea4c2b7aed217284d8a526b4481503398aea92ea..3012ac34dc3b7c0d1ef63e63bcccdb86cd8a39eb 100644 --- a/global/resource_management/include/resourcemanager/ohresmgr.h +++ b/global/resource_management/include/resourcemanager/ohresmgr.h @@ -410,10 +410,29 @@ ResourceManager_ErrorCode OH_ResourceManager_GetLocalesData(const NativeResource {@link ERROR_CODE_SYSTEM_RES_MANAGER_GET_FAILED} 9001009 - If failed to access the system resource. {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory. * @since 12 + * @deprecated since 20 + * @useinstead OH_ResourceManager_GetResourceConfiguration */ ResourceManager_ErrorCode OH_ResourceManager_GetConfiguration(const NativeResourceManager *mgr, ResourceManager_Configuration *configuration); +/** + * @brief Obtains the device configuration. + * + * You need to call the OH_ResourceManager_ReleaseConfiguration() method to release the memory. + * If you use malloc to create a ResourceManager_Configuration object, you also need to call free to release it. + * + * @param mgr Indicates the pointer to {@link NativeResourceManager} + * {@link OH_ResourceManager_InitNativeResourceManager}. + * @param configuration the result write to ResourceManager_Configuration. + * @return {@link SUCCESS} 0 - Success. + {@link ERROR_CODE_SYSTEM_RES_MANAGER_GET_FAILED} 9001009 - If failed to access the system resource. + {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory. + * @since 20 + */ +ResourceManager_ErrorCode OH_ResourceManager_GetResourceConfiguration(const NativeResourceManager *mgr, + ResourceManager_Configuration *configuration); + /** * @brief Release the device configuration. * @param configuration the object need to release.