/*
 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
 *
 * 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 __TIZEN_APPFW_WATCHFACE_COMMON_H__
#define __TIZEN_APPFW_WATCHFACE_COMMON_H__

#include <tizen.h>

#ifdef EXPORT_API
#undef EXPORT_API
#endif

#define EXPORT_API __attribute__((visibility("default")))

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @file watchface-common.h
 * @brief This file contains enumerations for Watchface complication.
 */

/**
 * @addtogroup WATCHFACE_COMPLICATION_MODULE
 * @{
 */

/**
 * @brief Enumeration for Complication Error.
 * @since_tizen 5.0
 */
typedef enum _complication_error {
  WATCHFACE_COMPLICATION_ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */
  WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
  WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
  WATCHFACE_COMPLICATION_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
  WATCHFACE_COMPLICATION_ERROR_NO_DATA = TIZEN_ERROR_NO_DATA, /**< No data available */
  WATCHFACE_COMPLICATION_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
  WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
  WATCHFACE_COMPLICATION_ERROR_DB = TIZEN_ERROR_COMPLICATION | 0x1, /**< Database error */
  WATCHFACE_COMPLICATION_ERROR_DBUS = TIZEN_ERROR_COMPLICATION | 0x2, /**< DBUS error */
  WATCHFACE_COMPLICATION_ERROR_EDIT_NOT_READY = TIZEN_ERROR_COMPLICATION | 0x3, /**< Edit not ready */
  WATCHFACE_COMPLICATION_ERROR_EXIST_ID = TIZEN_ERROR_COMPLICATION | 0x4, /**< ID already exist */
  WATCHFACE_COMPLICATION_ERROR_NOT_EXIST = TIZEN_ERROR_COMPLICATION | 0x5, /**< Not exist */
  WATCHFACE_COMPLICATION_ERROR_PROVIDER_NOT_AVAILABLE = TIZEN_ERROR_COMPLICATION | 0x6, /**< Provider is not available, it could be uninstalled or disabled */
} watchface_complication_error_e;

/**
 * @brief Enumeration for Complication Type.
 * @since_tizen 5.0
 */
typedef enum _complication_type {
  WATCHFACE_COMPLICATION_TYPE_NO_DATA = 0x01, /**< No Data */
  WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT = 0x02, /**< Short Text */
  WATCHFACE_COMPLICATION_TYPE_LONG_TEXT = 0x04, /**< Long Text */
  WATCHFACE_COMPLICATION_TYPE_RANGED_VALUE = 0x08, /**< Ranged Value */
  WATCHFACE_COMPLICATION_TYPE_TIME = 0x10, /**< Time */
  WATCHFACE_COMPLICATION_TYPE_ICON = 0x20, /**< Icon */
  WATCHFACE_COMPLICATION_TYPE_IMAGE = 0x40, /**< Image */
} watchface_complication_type_e;

/**
 * @brief Enumeration for Complication event type.
 * @details Watchface should transfer the touch event to complication provider
 *          to trigger the complication tap action.
 *          #WATCHFACE_COMPLICATION_EVENT_NONE is transferred to the complication provider
 *          when the complication is launched without tap event.
 * @since_tizen 5.0
 */
typedef enum _complication_event_type {
	WATCHFACE_COMPLICATION_EVENT_NONE = 0x01, /**< Complication is not tapped */
	WATCHFACE_COMPLICATION_EVENT_TAP = 0x02, /**< Tap */
	WATCHFACE_COMPLICATION_EVENT_DOUBLE_TAP = 0x04 /**< Double Tap */
} watchface_complication_event_type_e;

/**
 * @brief The complication time information handle.
 * @since_tizen 5.5
 */
typedef struct complication_time_info_s *complication_time_info_h;

/**
 * @}
 */

#ifdef __cplusplus
}
#endif

#endif  /* __TIZEN_APPFW_WATCHFACE_COMMON_H__ */
