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 MediaAssetManager
18  * @{
19  *
20  * @brief Provides APIs of request capability for Media Source.
21  *
22  * @since 12
23  */
24 
25 /**
26  * @file media_access_helper_capi.h
27  *
28  * @brief Defines APIs related to media assess helper.
29  *
30  * Provides the ability to create photo albums, as well as access and modify media data information in the albums.
31  *
32  * @kit MediaLibraryKit
33  * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core
34  * @library libmedia_asset_manager.so
35  * @since 12
36  */
37 
38 #ifndef MULTIMEDIA_MEDIA_LIBRARY_NATIVE_MEDIA_ACCESS_HELPER_H
39 #define MULTIMEDIA_MEDIA_LIBRARY_NATIVE_MEDIA_ACCESS_HELPER_H
40 
41 #include "media_asset_base_capi.h"
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 /**
48  * @brief Apply the change request of asset or album.
49  *
50  * @permission ohos.permission.WRITE_IMAGEVIDEO
51  * @param changeRequest the {@link OH_MediaAssetChangeRequest} instance to be applied.
52  * @return {@link #MEDIA_LIBRARY_OK} if the method call succeeds.
53  *         {@link #MEDIA_LIBRARY_PARAMETER_ERROR} Parameter error. Possible causes:
54  *                                                1. Mandatory parameters are left unspecified.
55  *                                                2. Incorrect parameter types.
56  *                                                3. Parameter verification failed.
57  *         {@link #MEDIA_LIBRARY_PERMISSION_DENIED} Permission is denied.
58  *         {@link #MEDIA_LIBRARY_INTERNAL_SYSTEM_ERROR} if internal system error.
59  * @since 12
60  */
61 MediaLibrary_ErrorCode OH_MediaAccessHelper_ApplyChanges(OH_MediaAssetChangeRequest* changeRequest);
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 
67 #endif // MULTIMEDIA_MEDIA_LIBRARY_NATIVE_MEDIA_ACCESS_HELPER_H
68 /** @} */