• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /**
17  * @addtogroup resourcemanager
18  * @{
19  *
20  * @brief Provides the c interface to obtain resources, and relies on librawfile.z.so when used.
21  *
22  * @since 12
23  */
24 
25 /**
26  * @file ohresmgr.h
27  *
28  * @brief Provides the implementation of the interface.
29  * @syscap SystemCapability.Global.ResourceManager
30  * @library libohresmgr.so
31  * @since 12
32  */
33 #ifndef GLOBAL_OH_RESMGR_H
34 #define GLOBAL_OH_RESMGR_H
35 
36 #include "resmgr_common.h"
37 #include "raw_file_manager.h"
38 #include "native/node/native_drawable_descriptor.h"
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 /**
45  * @brief Obtains the Base64 code of the image resource.
46  *
47  * Obtains the Base64 code of the image resource corresponding to the specified resource ID.
48  *
49  * @param mgr Indicates the pointer to {@link NativeResourceManager}
50  * {@link OH_ResourceManager_InitNativeResourceManager}.
51  * @param resId Indicates the resource ID.
52  * @param resultValue the result write to resultValue.
53  * @param resultLen the media length write to resultLen.
54  * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
55  * to use the density of current system dpi.
56  * @return {@link SUCCESS} 0 - Success.
57  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes:
58  *         1.Incorrect parameter types; 2.Parameter verification failed.
59            {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID.
60            {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID.
61            {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
62  * @since 12
63  */
64 ResourceManager_ErrorCode OH_ResourceManager_GetMediaBase64(const NativeResourceManager *mgr, uint32_t resId,
65     char **resultValue, uint64_t *resultLen, uint32_t density = 0);
66 
67 /**
68  * @brief Obtains the Base64 code of the image resource.
69  *
70  * Obtains the Base64 code of the image resource corresponding to the specified resource ID.
71  *
72  * @param mgr Indicates the pointer to {@link NativeResourceManager}
73  * {@link OH_ResourceManager_InitNativeResourceManager}.
74  * @param resId Indicates the resource ID.
75  * @param resultValue the result write to resultValue.
76  * @param resultLen the media length write to resultLen.
77  * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
78  * to use the density of current system dpi. If this attribute is not required, set this parameter to 0.
79  * @return {@link SUCCESS} 0 - Success.
80  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes:
81  *         1.Incorrect parameter types; 2.Parameter verification failed.
82            {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID.
83            {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID.
84            {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
85  * @since 12
86  */
87 ResourceManager_ErrorCode OH_ResourceManager_GetMediaBase64Data(const NativeResourceManager *mgr, uint32_t resId,
88     char **resultValue, uint64_t *resultLen, uint32_t density);
89 
90 /**
91  * @brief Obtains the Base64 code of the image resource.
92  *
93  * Obtains the Base64 code of the image resource corresponding to the specified resource name.
94  *
95  * @param mgr Indicates the pointer to {@link NativeResourceManager}
96  * {@link OH_ResourceManager_InitNativeResourceManager}.
97  * @param resName Indicates the resource name.
98  * @param resultValue the result write to resultValue.
99  * @param resultLen the media length write to resultLen.
100  * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
101  * to use the density of current system dpi.
102  * @return {@link SUCCESS} 0 - Success.
103  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes:
104  *         1.Incorrect parameter types; 2.Parameter verification failed.
105            {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name.
106            {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name.
107            {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
108  * @since 12
109  */
110 ResourceManager_ErrorCode OH_ResourceManager_GetMediaBase64ByName(const NativeResourceManager *mgr,
111     const char *resName, char **resultValue, uint64_t *resultLen, uint32_t density = 0);
112 
113 /**
114  * @brief Obtains the Base64 code of the image resource.
115  *
116  * Obtains the Base64 code of the image resource corresponding to the specified resource name.
117  *
118  * @param mgr Indicates the pointer to {@link NativeResourceManager}
119  * {@link OH_ResourceManager_InitNativeResourceManager}.
120  * @param resName Indicates the resource name.
121  * @param resultValue the result write to resultValue.
122  * @param resultLen the media length write to resultLen.
123  * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
124  * to use the density of current system dpi. If this attribute is not required, set this parameter to 0.
125  * @return {@link SUCCESS} 0 - Success.
126  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes:
127  *         1.Incorrect parameter types; 2.Parameter verification failed.
128            {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name.
129            {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name.
130            {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
131  * @since 12
132  */
133 ResourceManager_ErrorCode OH_ResourceManager_GetMediaBase64DataByName(const NativeResourceManager *mgr,
134     const char *resName, char **resultValue, uint64_t *resultLen, uint32_t density);
135 
136 /**
137  * @brief Obtains the content of the image resource.
138  *
139  * Obtains the content of the specified screen density media file corresponding to a specified resource ID.
140  *
141  * @param mgr Indicates the pointer to {@link NativeResourceManager}
142  * {@link OH_ResourceManager_InitNativeResourceManager}.
143  * @param resId Indicates the resource ID.
144  * @param resultValue the result write to resultValue.
145  * @param resultLen the media length write to resultLen.
146  * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
147  * to use the density of current system dpi.
148  * @return {@link SUCCESS} 0 - Success.
149  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes:
150  *         1.Incorrect parameter types; 2.Parameter verification failed.
151            {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID.
152            {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID.
153            {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
154  * @since 12
155  */
156 ResourceManager_ErrorCode OH_ResourceManager_GetMedia(const NativeResourceManager *mgr, uint32_t resId,
157     uint8_t **resultValue, uint64_t *resultLen, uint32_t density = 0);
158 
159 /**
160  * @brief Obtains the content of the image resource.
161  *
162  * Obtains the content of the specified screen density media file corresponding to a specified resource ID.
163  *
164  * @param mgr Indicates the pointer to {@link NativeResourceManager}
165  * {@link OH_ResourceManager_InitNativeResourceManager}.
166  * @param resId Indicates the resource ID.
167  * @param resultValue the result write to resultValue.
168  * @param resultLen the media length write to resultLen.
169  * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
170  * to use the density of current system dpi. If this attribute is not required, set this parameter to 0.
171  * @return {@link SUCCESS} 0 - Success.
172  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes:
173  *         1.Incorrect parameter types; 2.Parameter verification failed.
174            {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID.
175            {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID.
176            {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
177  * @since 12
178  */
179 ResourceManager_ErrorCode OH_ResourceManager_GetMediaData(const NativeResourceManager *mgr, uint32_t resId,
180     uint8_t **resultValue, uint64_t *resultLen, uint32_t density);
181 
182 /**
183  * @brief Obtains the content of the image resource.
184  *
185  * Obtains the content of the specified screen density media file corresponding to a specified resource name.
186  *
187  * @param mgr Indicates the pointer to {@link NativeResourceManager}
188  * {@link OH_ResourceManager_InitNativeResourceManager}.
189  * @param resName Indicates the resource name.
190  * @param resultValue the result write to resultValue.
191  * @param resultLen the media length write to resultLen.
192  * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
193  * to use the density of current system dpi.
194  * @return {@link SUCCESS} 0 - Success.
195  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes:
196  *         1.Incorrect parameter types; 2.Parameter verification failed.
197            {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name.
198            {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name.
199            {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
200  * @since 12
201  */
202 ResourceManager_ErrorCode OH_ResourceManager_GetMediaByName(const NativeResourceManager *mgr, const char *resName,
203     uint8_t **resultValue, uint64_t *resultLen, uint32_t density = 0);
204 
205 /**
206  * @brief Obtains the content of the image resource.
207  *
208  * Obtains the content of the specified screen density media file corresponding to a specified resource name.
209  *
210  * @param mgr Indicates the pointer to {@link NativeResourceManager}
211  * {@link OH_ResourceManager_InitNativeResourceManager}.
212  * @param resName Indicates the resource name.
213  * @param resultValue the result write to resultValue.
214  * @param resultLen the media length write to resultLen.
215  * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
216  * to use the density of current system dpi. If this attribute is not required, set this parameter to 0.
217  * @return {@link SUCCESS} 0 - Success.
218  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes:
219  *         1.Incorrect parameter types; 2.Parameter verification failed.
220            {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name.
221            {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name.
222            {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
223  * @since 12
224  */
225 ResourceManager_ErrorCode OH_ResourceManager_GetMediaDataByName(const NativeResourceManager *mgr, const char *resName,
226     uint8_t **resultValue, uint64_t *resultLen, uint32_t density);
227 
228 /**
229  * @brief Obtains the DrawableDescriptor of the media file.
230  *
231  * Obtains the DrawableDescriptor of the media file corresponding to a specified resource ID.
232  *
233  * @param mgr Indicates the pointer to {@link NativeResourceManager}
234  * {@link OH_ResourceManager_InitNativeResourceManager}.
235  * @param resId Indicates the resource ID.
236  * @param drawableDescriptor the result write to drawableDescriptor.
237  * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
238  * to use the density of current system dpi.
239  * @param type The optional parameter means the media type, 0 means the normal media, 1 means the the theme style media.
240  * @return {@link SUCCESS} 0 - Success.
241  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes:
242  *         1.Incorrect parameter types; 2.Parameter verification failed.
243            {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID.
244            {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID.
245  * @since 12
246  */
247 ResourceManager_ErrorCode OH_ResourceManager_GetDrawableDescriptor(const NativeResourceManager *mgr,
248     uint32_t resId, ArkUI_DrawableDescriptor **drawableDescriptor, uint32_t density = 0, uint32_t type = 0);
249 
250 /**
251  * @brief Obtains the DrawableDescriptor of the media file.
252  *
253  * Obtains the DrawableDescriptor of the media file corresponding to a specified resource ID.
254  *
255  * @param mgr Indicates the pointer to {@link NativeResourceManager}
256  * {@link OH_ResourceManager_InitNativeResourceManager}.
257  * @param resId Indicates the resource ID.
258  * @param drawableDescriptor the result write to drawableDescriptor.
259  * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
260  * to use the density of current system dpi. If this attribute is not required, set this parameter to 0.
261  * @param type The optional parameter means the media type, 0 means the normal media, 1 means the the theme style media.
262  * If this attribute is not required, set this parameter to 0.
263  * @return {@link SUCCESS} 0 - Success.
264  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes:
265  *         1.Incorrect parameter types; 2.Parameter verification failed.
266            {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID.
267            {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID.
268  * @since 12
269  */
270 ResourceManager_ErrorCode OH_ResourceManager_GetDrawableDescriptorData(const NativeResourceManager *mgr,
271     uint32_t resId, ArkUI_DrawableDescriptor **drawableDescriptor, uint32_t density, uint32_t type);
272 
273 /**
274  * @brief Obtains the DrawableDescriptor of the media file.
275  *
276  * Obtains the DrawableDescriptor of the media file corresponding to a specified resource name.
277  * @param mgr Indicates the pointer to {@link NativeResourceManager}
278  * {@link OH_ResourceManager_InitNativeResourceManager}.
279  * @param resName Indicates the resource name.
280  * @param drawableDescriptor the result write to drawableDescriptor.
281  * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
282  * to use the density of current system dpi.
283  * @param type The optional parameter means the media type, 0 means the normal media, 1 means the the theme style media,
284  * 2 means the theme dynamic media.
285  * @return {@link SUCCESS} 0 - Success.
286  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes:
287  *         1.Incorrect parameter types; 2.Parameter verification failed.
288            {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name.
289            {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name.
290  * @since 12
291  */
292 ResourceManager_ErrorCode OH_ResourceManager_GetDrawableDescriptorByName(const NativeResourceManager *mgr,
293     const char *resName, ArkUI_DrawableDescriptor **drawableDescriptor, uint32_t density = 0, uint32_t type = 0);
294 
295 /**
296  * @brief Obtains the DrawableDescriptor of the media file.
297  *
298  * Obtains the DrawableDescriptor of the media file corresponding to a specified resource name.
299  * @param mgr Indicates the pointer to {@link NativeResourceManager}
300  * {@link OH_ResourceManager_InitNativeResourceManager}.
301  * @param resName Indicates the resource name.
302  * @param drawableDescriptor the result write to drawableDescriptor.
303  * @param density The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means
304  * to use the density of current system dpi. If this attribute is not required, set this parameter to 0.
305  * @param type The optional parameter means the media type, 0 means the normal media, 1 means the the theme style media,
306  * 2 means the theme dynamic media. If this attribute is not required, set this parameter to 0.
307  * @return {@link SUCCESS} 0 - Success.
308  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes:
309  *         1.Incorrect parameter types; 2.Parameter verification failed.
310            {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name.
311            {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name.
312  * @since 12
313  */
314 ResourceManager_ErrorCode OH_ResourceManager_GetDrawableDescriptorDataByName(const NativeResourceManager *mgr,
315     const char *resName, ArkUI_DrawableDescriptor **drawableDescriptor, uint32_t density, uint32_t type);
316 
317 /**
318  * @brief Obtains the symbol resource.
319  *
320  * Obtains the symbol resource corresponding to the specified resource ID.
321  *
322  * @param mgr Indicates the pointer to {@link NativeResourceManager}
323  *        {@link OH_ResourceManager_InitNativeResourceManager}.
324  * @param resId Indicates the resource ID.
325  * @param resultValue the result write to resultValue.
326  * @return {@link SUCCESS} 0 - Success.
327  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
328            Possible causes: Incorrect parameter types.
329            {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID.
330            {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID.
331            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
332  * @since 12
333  */
334 ResourceManager_ErrorCode OH_ResourceManager_GetSymbol(const NativeResourceManager *mgr, uint32_t resId,
335     uint32_t *resultValue);
336 
337 /**
338  * @brief Obtains the symbol resource.
339  *
340  * Obtains the symbol resource corresponding to the specified resource name.
341  *
342  * @param mgr Indicates the pointer to {@link NativeResourceManager}
343  *        {@link OH_ResourceManager_InitNativeResourceManager}.
344  * @param resName Indicates the resource name.
345  * @param resultValue the result write to resultValue.
346  * @return {@link SUCCESS} 0 - Success.
347  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
348            Possible causes: Incorrect parameter types.
349            {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name.
350            {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name.
351            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
352  * @since 12
353  */
354 ResourceManager_ErrorCode OH_ResourceManager_GetSymbolByName(const NativeResourceManager *mgr, const char *resName,
355     uint32_t *resultValue);
356 
357 /**
358  * @brief Obtains locales list.
359  *
360  * You need to call the OH_ResourceManager_ReleaseStringArray() method to release the memory of localinfo.
361  *
362  * @param mgr Indicates the pointer to {@link NativeResourceManager}
363  *        {@link OH_ResourceManager_InitNativeResourceManager}.
364  * @param resultValue the result write to resultValue.
365  * @param resultLen the locales length write to resultLen.
366  * @param includeSystem the parameter controls whether to include system resources,
367  * the default value is false, it has no effect when only system resources query the locales list.
368  * @return {@link SUCCESS} 0 - Success.
369  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
370            Possible causes: Incorrect parameter types.
371  *         {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
372  * @since 12
373  */
374 ResourceManager_ErrorCode OH_ResourceManager_GetLocales(const NativeResourceManager *mgr, char ***resultValue,
375     uint32_t *resultLen, bool includeSystem = false);
376 
377 /**
378  * @brief Obtains locales list.
379  *
380  * You need to call the OH_ResourceManager_ReleaseStringArray() method to release the memory of localinfo.
381  *
382  * @param mgr Indicates the pointer to {@link NativeResourceManager}
383  *        {@link OH_ResourceManager_InitNativeResourceManager}.
384  * @param resultValue the result write to resultValue.
385  * @param resultLen the locales length write to resultLen.
386  * @param includeSystem the parameter controls whether to include system resources.
387  * If this attribute is not required, set this parameter to false.
388  * @return {@link SUCCESS} 0 - Success.
389  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
390            Possible causes: Incorrect parameter types.
391  *         {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
392  * @since 12
393  */
394 ResourceManager_ErrorCode OH_ResourceManager_GetLocalesData(const NativeResourceManager *mgr, char ***resultValue,
395     uint32_t *resultLen, bool includeSystem);
396 
397 /**
398  * @brief Obtains the device configuration.
399  *
400  * You need to call the OH_ResourceManager_ReleaseConfiguration() method to release the memory.
401  * If you use malloc to create a ResourceManager_Configuration object, you also need to call free to release it.
402  *
403  * @param mgr Indicates the pointer to {@link NativeResourceManager}
404  *        {@link OH_ResourceManager_InitNativeResourceManager}.
405  * @param configuration the result write to ResourceManager_Configuration.
406  * @return {@link SUCCESS} 0 - Success.
407  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
408            Possible causes: Incorrect parameter types.
409            {@link ERROR_CODE_SYSTEM_RES_MANAGER_GET_FAILED} 9001009 - If failed to access the system resource.
410            {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
411  * @since 12
412  */
413 ResourceManager_ErrorCode OH_ResourceManager_GetConfiguration(const NativeResourceManager *mgr,
414     ResourceManager_Configuration *configuration);
415 
416 /**
417  * @brief Release the device configuration.
418  * @param configuration the object need to release.
419  * @return {@link SUCCESS} 0 - Success.
420            {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
421            Possible causes: Incorrect parameter types.
422  * @since 12
423  */
424 ResourceManager_ErrorCode OH_ResourceManager_ReleaseConfiguration(ResourceManager_Configuration *configuration);
425 
426 /**
427  * @brief Obtains the character string.
428  *
429  * Obtains the character string corresponding to a specified resource ID.
430  * Obtain normal resource by calling OH_ResourceManager_GetString(mgr, resId, resultValue),
431    obtain a formatted resource with replacements for %d, %s, %f,
432    call OH_ResourceManager_GetString(mgr, resId, resultValue, 10, "format", 10.10).
433  * You need to call free() to release the memory for the string.
434  *
435  * @param mgr Indicates the pointer to {@link NativeResourceManager}
436  *        {@link OH_ResourceManager_InitNativeResourceManager}.
437  * @param resId Indicates the resource ID.
438  * @param resultValue the result write to resultValue.
439  * @param { const char* | int | float } args - Indicates the formatting string resource parameters.
440  * @return {@link SUCCESS} 0 - Success.
441  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
442            Possible causes: Incorrect parameter types.
443            {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID.
444            {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID.
445            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
446            {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
447  * @since 12
448  */
449 ResourceManager_ErrorCode OH_ResourceManager_GetString(const NativeResourceManager *mgr, uint32_t resId,
450     char **resultValue, ...);
451 
452 /**
453  * @brief Obtains the character string.
454  *
455  * Obtains the character string corresponding to a specified resource name.
456  * Obtain normal resource by calling OH_ResourceManager_GetString(mgr, resName, resultValue),
457    obtain a formatted resource with replacements for %d, %s, %f,
458    call OH_ResourceManager_GetString(mgr, resName, resultValue, 10, "format", 10.10).
459  * You need to call free() to release the memory for the string.
460  *
461  * @param mgr Indicates the pointer to {@link NativeResourceManager}
462  *        {@link OH_ResourceManager_InitNativeResourceManager}.
463  * @param resName Indicates the resource name.
464  * @param resultValue the result write to resultValue.
465  * @param { const char* | int | float } args - Indicates the formatting string resource parameters.
466  * @return {@link SUCCESS} 0 - Success.
467  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
468            Possible causes: Incorrect parameter types.
469            {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name.
470            {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name.
471            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
472            {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
473  * @since 12
474  */
475 ResourceManager_ErrorCode OH_ResourceManager_GetStringByName(const NativeResourceManager *mgr, const char *resName,
476     char **resultValue, ...);
477 
478 /**
479  * @brief Obtains the array of character strings.
480  *
481  * Obtains the array of character strings corresponding to a specified resource ID.
482  * You need to call the OH_ResourceManager_ReleaseStringArray() method to release the memory of string array.
483  *
484  * @param mgr Indicates the pointer to {@link NativeResourceManager}
485  *        {@link OH_ResourceManager_InitNativeResourceManager}.
486  * @param resId Indicates the resource ID.
487  * @param resultValue the result write to resultValue.
488  * @param resultLen the StringArray length write to resultLen.
489  * @return {@link SUCCESS} 0 - Success.
490  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
491            Possible causes: Incorrect parameter types.
492            {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID.
493            {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID.
494            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
495            {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
496  * @since 12
497  */
498 ResourceManager_ErrorCode OH_ResourceManager_GetStringArray(const NativeResourceManager *mgr, uint32_t resId,
499     char ***resultValue, uint32_t *resultLen);
500 
501 /**
502  * @brief Obtains the array of character strings.
503  *
504  * Obtains the array of character strings corresponding to a specified resource name.
505  * You need to call the OH_ResourceManager_ReleaseStringArray() method to release the memory of string array.
506  *
507  * @param mgr Indicates the pointer to {@link NativeResourceManager}
508  *        {@link OH_ResourceManager_InitNativeResourceManager}.
509  * @param resName Indicates the resource name.
510  * @param resultValue the result write to resultValue.
511  * @param resultLen the StringArray length write to resultLen.
512  * @return {@link SUCCESS} 0 - Success.
513  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
514            Possible causes: Incorrect parameter types.
515            {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name.
516            {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name.
517            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
518            {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
519  * @since 12
520  */
521 ResourceManager_ErrorCode OH_ResourceManager_GetStringArrayByName(const NativeResourceManager *mgr,
522     const char *resName, char ***resultValue, uint32_t *resultLen);
523 
524 /**
525  * @brief Release the array of character strings.
526  * @param resValue the array of character strings corresponding to the specified resource name.
527  * @param len the length of array.
528  * @return {@link SUCCESS} 0 - Success.
529            {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
530            Possible causes: Incorrect parameter types.
531  * @since 12
532  */
533 ResourceManager_ErrorCode OH_ResourceManager_ReleaseStringArray(char ***resValue, uint32_t len);
534 
535 /**
536  * @brief Obtains the singular-plural character string represented.
537  *
538  * Obtains the singular-plural character string represented by the ID string corresponding to the specified number.
539  * You need to call free() to release the memory for the string.
540  *
541  * @param mgr Indicates the pointer to {@link NativeResourceManager}
542  *        {@link OH_ResourceManager_InitNativeResourceManager}.
543  * @param resId Indicates the resource ID.
544  * @param num - Indicates the number.
545  * @param resultValue the result write to resultValue.
546  * @return {@link SUCCESS} 0 - Success.
547  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
548            Possible causes: Incorrect parameter types.
549            {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID.
550            {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID.
551            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
552            {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
553  * @since 12
554  * @deprecated since 16
555  * @useinstead OH_ResourceManager_GetIntPluralString
556  */
557 ResourceManager_ErrorCode OH_ResourceManager_GetPluralString(const NativeResourceManager *mgr, uint32_t resId,
558     uint32_t num, char **resultValue);
559 
560 /**
561  * @brief Obtains the singular-plural character string represented.
562  *
563  * Obtains the singular-plural character string represented by the Name string corresponding to the specified number.
564  * You need to call free() to release the memory for the string.
565  *
566  * @param mgr Indicates the pointer to {@link NativeResourceManager}
567  *        {@link OH_ResourceManager_InitNativeResourceManager}.
568  * @param resName Indicates the resource name.
569  * @param num - Indicates the number.
570  * @param resultValue the result write to resultValue.
571  * @return {@link SUCCESS} 0 - Success.
572  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
573            Possible causes: Incorrect parameter types.
574            {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name.
575            {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name.
576            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
577            {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
578  * @since 12
579  * @deprecated since 16
580  * @useinstead OH_ResourceManager_GetIntPluralStringByName
581  */
582 ResourceManager_ErrorCode OH_ResourceManager_GetPluralStringByName(const NativeResourceManager *mgr,
583     const char *resName, uint32_t num, char **resultValue);
584 
585 /**
586  * @brief Obtains the singular-plural character string represented.
587  *
588  * Obtains the singular-plural character string represented by the ID string corresponding to the specified number.
589  * You need to call free() to release the memory for the string.
590  *
591  * @param mgr Indicates the pointer to {@link NativeResourceManager}
592  *        {@link OH_ResourceManager_InitNativeResourceManager}.
593  * @param resId Indicates the resource ID.
594  * @param num - an integer used to get the correct string for the current plural rules.
595  * @param resultValue the result write to resultValue.
596  * @param { const char* | int | float } args - Indicates the formatting string resource parameters.
597  * @return {@link SUCCESS} 0 - Success.
598  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
599            Possible causes: Incorrect parameter types.
600            {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID.
601            {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID.
602            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
603            {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
604  * @since 16
605  */
606 ResourceManager_ErrorCode OH_ResourceManager_GetIntPluralString(const NativeResourceManager *mgr, uint32_t resId,
607     uint32_t num, char **resultValue, ...);
608 
609 /**
610  * @brief Obtains the singular-plural character string represented.
611  *
612  * Obtains the singular-plural character string represented by the ID string corresponding to the specified number.
613  * You need to call free() to release the memory for the string.
614  *
615  * @param mgr Indicates the pointer to {@link NativeResourceManager}
616  *        {@link OH_ResourceManager_InitNativeResourceManager}.
617  * @param resId Indicates the resource ID.
618  * @param num - a double parameter used to get the correct string for the current plural rules.
619  * @param resultValue the result write to resultValue.
620  * @param { const char* | int | float } args - Indicates the formatting string resource parameters.
621  * @return {@link SUCCESS} 0 - Success.
622  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
623            Possible causes: Incorrect parameter types.
624            {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID.
625            {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID.
626            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
627            {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
628  * @since 16
629  */
630 ResourceManager_ErrorCode OH_ResourceManager_GetDoublePluralString(const NativeResourceManager *mgr, uint32_t resId,
631     double num, char **resultValue, ...);
632 
633 /**
634  * @brief Obtains the singular-plural character string represented.
635  *
636  * Obtains the singular-plural character string represented by the Name string corresponding to the specified number.
637  * You need to call free() to release the memory for the string.
638  *
639  * @param mgr Indicates the pointer to {@link NativeResourceManager}
640  *        {@link OH_ResourceManager_InitNativeResourceManager}.
641  * @param resName Indicates the resource name.
642  * @param num - an integer used to get the correct string for the current plural rules.
643  * @param resultValue the result write to resultValue.
644  * @param { const char* | int | float } args - Indicates the formatting string resource parameters.
645  * @return {@link SUCCESS} 0 - Success.
646  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
647            Possible causes: Incorrect parameter types.
648            {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name.
649            {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name.
650            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
651            {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
652  * @since 16
653  */
654 ResourceManager_ErrorCode OH_ResourceManager_GetIntPluralStringByName(const NativeResourceManager *mgr,
655     const char *resName, uint32_t num, char **resultValue, ...);
656 
657 /**
658  * @brief Obtains the singular-plural character string represented.
659  *
660  * Obtains the singular-plural character string represented by the Name string corresponding to the specified number.
661  * You need to call free() to release the memory for the string.
662  *
663  * @param mgr Indicates the pointer to {@link NativeResourceManager}
664  *        {@link OH_ResourceManager_InitNativeResourceManager}.
665  * @param resName Indicates the resource name.
666  * @param num - a double parameter used to get the correct string for the current plural rules.
667  * @param resultValue the result write to resultValue.
668  * @param { const char* | int | float } args - Indicates the formatting string resource parameters.
669  * @return {@link SUCCESS} 0 - Success.
670  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
671            Possible causes: Incorrect parameter types.
672            {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name.
673            {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name.
674            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
675            {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory.
676  * @since 16
677  */
678 ResourceManager_ErrorCode OH_ResourceManager_GetDoublePluralStringByName(const NativeResourceManager *mgr,
679     const char *resName, double num, char **resultValue, ...);
680 
681 /**
682  * @brief Obtains the color resource.
683  *
684  * Obtains the color resource corresponding to the specified resource ID.
685  *
686  * @param mgr Indicates the pointer to {@link NativeResourceManager}
687  *        {@link OH_ResourceManager_InitNativeResourceManager}.
688  * @param resId Indicates the resource ID.
689  * @param resultValue the result write to resultValue.
690  * @return {@link SUCCESS} 0 - Success.
691  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
692            Possible causes: Incorrect parameter types.
693            {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID.
694            {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID.
695            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
696  * @since 12
697  */
698 ResourceManager_ErrorCode OH_ResourceManager_GetColor(const NativeResourceManager *mgr, uint32_t resId,
699     uint32_t *resultValue);
700 
701 /**
702  * @brief Obtains the color resource.
703  *
704  * Obtains the color resource corresponding to the specified resource name.
705  *
706  * @param mgr Indicates the pointer to {@link NativeResourceManager}
707  *        {@link OH_ResourceManager_InitNativeResourceManager}.
708  * @param resName Indicates the resource name.
709  * @param resultValue the result write to resultValue.
710  * @return {@link SUCCESS} 0 - Success.
711  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
712            Possible causes: Incorrect parameter types.
713            {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name.
714            {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name.
715            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
716  * @since 12
717  */
718 ResourceManager_ErrorCode OH_ResourceManager_GetColorByName(const NativeResourceManager *mgr, const char *resName,
719     uint32_t *resultValue);
720 
721 /**
722  * @brief Obtains the Int resource.
723  *
724  * Obtains the Int resource corresponding to the specified resource ID.
725  *
726  * @param mgr Indicates the pointer to {@link NativeResourceManager}
727  *        {@link OH_ResourceManager_InitNativeResourceManager}.
728  * @param resId Indicates the resource ID.
729  * @param resultValue the result write to resultValue.
730  * @return {@link SUCCESS} 0 - Success.
731  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
732            Possible causes: Incorrect parameter types.
733            {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID.
734            {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID.
735            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
736  * @since 12
737  */
738 ResourceManager_ErrorCode OH_ResourceManager_GetInt(const NativeResourceManager *mgr, uint32_t resId,
739     int *resultValue);
740 
741 /**
742  * @brief Obtains the Int resource.
743  *
744  * Obtains the Int resource corresponding to the specified resource name.
745  *
746  * @param mgr Indicates the pointer to {@link NativeResourceManager}
747  *        {@link OH_ResourceManager_InitNativeResourceManager}.
748  * @param resName Indicates the resource name.
749  * @param resultValue the result write to resultValue.
750  * @return {@link SUCCESS} 0 - Success.
751  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
752            Possible causes: Incorrect parameter types.
753            {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name.
754            {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name.
755            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
756  * @since 12
757  */
758 ResourceManager_ErrorCode OH_ResourceManager_GetIntByName(const NativeResourceManager *mgr, const char *resName,
759     int *resultValue);
760 
761 /**
762  * @brief Obtains the Float resource.
763  *
764  * Obtains the Int resource corresponding to the specified resource ID.
765  *
766  * @param mgr Indicates the pointer to {@link NativeResourceManager}
767  *        {@link OH_ResourceManager_InitNativeResourceManager}.
768  * @param resId Indicates the resource ID.
769  * @param resultValue the result write to resultValue.
770  * @return {@link SUCCESS} 0 - Success.
771  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
772            Possible causes: Incorrect parameter types.
773            {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID.
774            {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID.
775            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
776  * @since 12
777  */
778 ResourceManager_ErrorCode OH_ResourceManager_GetFloat(const NativeResourceManager *mgr, uint32_t resId,
779     float *resultValue);
780 
781 /**
782  * @brief Obtains the Float resource.
783  *
784  * Obtains the Float resource corresponding to the specified resource name.
785  *
786  * @param mgr Indicates the pointer to {@link NativeResourceManager}
787  *        {@link OH_ResourceManager_InitNativeResourceManager}.
788  * @param resName Indicates the resource name.
789  * @param resultValue the result write to resultValue.
790  * @return {@link SUCCESS} 0 - Success.
791  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
792            Possible causes: Incorrect parameter types.
793            {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name.
794            {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name.
795            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
796  * @since 12
797  */
798 ResourceManager_ErrorCode OH_ResourceManager_GetFloatByName(const NativeResourceManager *mgr, const char *resName,
799     float *resultValue);
800 
801 /**
802  * @brief Obtains the boolean result.
803  *
804  * Obtains the boolean result with a specified resource ID.
805  *
806  * @param mgr Indicates the pointer to {@link NativeResourceManager}
807  *        {@link OH_ResourceManager_InitNativeResourceManager}.
808  * @param resId Indicates the resource ID.
809  * @param resultValue the result write to resultValue.
810  * @return {@link SUCCESS} 0 - Success.
811  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
812            Possible causes: Incorrect parameter types.
813            {@link ERROR_CODE_RES_ID_NOT_FOUND} 9001001 - Invalid resource ID.
814            {@link ERROR_CODE_RES_NOT_FOUND_BY_ID} 9001002 - No matching resource is found based on the resource ID.
815            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
816  * @since 12
817  */
818 ResourceManager_ErrorCode OH_ResourceManager_GetBool(const NativeResourceManager *mgr, uint32_t resId,
819     bool *resultValue);
820 
821 /**
822  * @brief Obtains the boolean result.
823  *
824  * Obtains the boolean result with a specified resource name.
825  *
826  * @param mgr Indicates the pointer to {@link NativeResourceManager}
827  *        {@link OH_ResourceManager_InitNativeResourceManager}.
828  * @param resName Indicates the resource name.
829  * @param resultValue the result write to resultValue.
830  * @return {@link SUCCESS} 0 - Success.
831  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
832            Possible causes: Incorrect parameter types.
833            {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name.
834            {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name.
835            {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically.
836  * @since 12
837  */
838 ResourceManager_ErrorCode OH_ResourceManager_GetBoolByName(const NativeResourceManager *mgr, const char *resName,
839     bool *resultValue);
840 
841 /**
842  * @brief Add overlay resources during application runtime.
843  * @param mgr Indicates the pointer to {@link NativeResourceManager}
844  *        {@link OH_ResourceManager_InitNativeResourceManager}.
845  * @param path Indicates the application overlay path.
846  * @return {@link SUCCESS} 0 - Success.
847  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
848            Possible causes: Incorrect parameter types.
849            {@link ERROR_CODE_OVERLAY_RES_PATH_INVALID} 9001010 - Invalid overlay path.
850  * @since 12
851  */
852 ResourceManager_ErrorCode OH_ResourceManager_AddResource(const NativeResourceManager *mgr, const char *path);
853 
854 /**
855  * @brief Remove overlay resources during application runtime.
856  * @param mgr Indicates the pointer to {@link NativeResourceManager}
857  *        {@link OH_ResourceManager_InitNativeResourceManager}.
858  * @param path Indicates the application overlay path.
859  * @return {@link SUCCESS} 0 - Success.
860  *         {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid.
861            Possible causes: Incorrect parameter types.
862            {@link ERROR_CODE_OVERLAY_RES_PATH_INVALID} 9001010 - Invalid overlay path.
863  * @since 12
864  */
865 ResourceManager_ErrorCode OH_ResourceManager_RemoveResource(const NativeResourceManager *mgr, const char *path);
866 #ifdef __cplusplus
867 };
868 #endif
869 
870 /** @} */
871 #endif // GLOBAL_OH_RESMGR_H