* Copyright (C) 2023 Xiaomi Corperation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __MEDIA_CONTENT_H__
#define __MEDIA_CONTENT_H__
#include <errno.h>
typedef enum {
MEDIA_CONTENT_ERROR_NONE = 0,
MEDIA_CONTENT_ERROR_INVALID_PARAMETER = -EINVAL,
MEDIA_CONTENT_ERROR_OUT_OF_MEMORY = -ENOMEM,
MEDIA_CONTENT_ERROR_INVALID_OPERATION = -EINVAL,
MEDIA_CONTENT_FILE_NO_SPACE_ON_DEVICE = -ENOSPC,
MEDIA_CONTENT_ERROR_PERMISSION_DENIED = -EACCES,
MEDIA_CONTENT_ERROR_DB_FAILED = -EIO,
MEDIA_CONTENT_ERROR_DB_BUSY = -EBUSY,
MEDIA_CONTENT_ERROR_NETWORK = -EREMOTEIO,
MEDIA_CONTENT_ERROR_UNSUPPORTED_CONTENT = -ENOTTY,
MEDIA_CONTENT_ERROR_NOT_SUPPORTED = -ENOTSUP,
} media_content_error_e;
typedef enum {
MEDIA_CONTENT_TYPE_IMAGE = 0,
MEDIA_CONTENT_TYPE_VIDEO = 1,
MEDIA_CONTENT_TYPE_SOUND = 2,
MEDIA_CONTENT_TYPE_MUSIC = 3,
MEDIA_CONTENT_TYPE_OTHERS = 4,
} media_content_type_e;
typedef enum {
MEDIA_CONTENT_ORIENTATION_NOT_AVAILABLE = 0,
MEDIA_CONTENT_ORIENTATION_NORMAL = 1,
MEDIA_CONTENT_ORIENTATION_HFLIP = 2,
MEDIA_CONTENT_ORIENTATION_ROT_180 = 3,
MEDIA_CONTENT_ORIENTATION_VFLIP = 4,
MEDIA_CONTENT_ORIENTATION_TRANSPOSE = 5,
MEDIA_CONTENT_ORIENTATION_ROT_90 = 6,
MEDIA_CONTENT_ORIENTATION_TRANSVERSE = 7,
MEDIA_CONTENT_ORIENTATION_ROT_270 = 8,
} media_content_orientation_e;
typedef enum {
MEDIA_CONTENT_COLLATE_DEFAULT = 0,
MEDIA_CONTENT_COLLATE_NOCASE = 1,
MEDIA_CONTENT_COLLATE_RTRIM = 2,
MEDIA_CONTENT_COLLATE_LOCALIZED = 3,
} media_content_collation_e;
* @brief Disconnects from the media content service.
* @details This function closes connection to the media content service. Any further media content related operation
* cannot be performed after this function is called.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
* @return @c 0 on success,
* otherwise a negative error value
*
* @retval #MEDIA_CONTENT_ERROR_NONE Successful
* @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB operation failed
*
* @pre media_content_connect()
*
* @see media_content_connect()
*
*/
int media_content_disconnect(void);
#endif