/*
 * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
 *
 * 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 __VIDEO_PLAYER_VIEW_H__
#define __VIDEO_PLAYER_VIEW_H__

#include <Evas.h>
#include <Elementary.h>

struct _app_data;
typedef struct _video_player_view video_player_view;

/**
 * @typedef player_state
 * Player view finish states to pass to result callback
 */
typedef enum
{
    STATE_FINISHED, /**< Player view starts to pop out*/
    STATE_DESTROYED /**< Player view layout is destroyed */
} player_state;

/**
 * @typedef player_destroy_cb
 * Callback to notify about player finishing
 */
typedef void (*player_result_cb)(player_state state, void *user_data);

/**
 * @brief Create video player view
 * @param[in]   app   application instance
 * @param[in]   navi  owner naviframe
 * @param[in]   video_file  saved on disk video file
 * @param[in]   callback Callback to notify parent view
 * @param[in]   user_data Data callback to pass
 * @return naviframe item with video player layout on it
 */
Elm_Object_Item *video_player_view_add(struct _app_data *app, Evas_Object *navi, const char *video_file, player_result_cb callback, void *user_data);

#endif // __VIDEO_PLAYER_VIEW_H__

