a7689d56f18cd657fc9553146d44d579e89ad8ff
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / efl_integration / public / ewk_media_playback_info_product.h
1 /*
2  * Copyright (C) 2016 Samsung Electronics. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY SAMSUNG ELECTRONICS. AND ITS CONTRIBUTORS
14  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SAMSUNG ELECTRONICS. OR ITS
17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
23  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24  */
25
26 /**
27  * @file    ewk_media_playback_info_product.h
28  * @brief   This file describes the ewk media playback info API.
29  */
30
31 #ifndef ewk_media_playback_info_product_h
32 #define ewk_media_playback_info_product_h
33
34 #include <Eina.h>
35 #include <Evas.h>
36 #include <tizen.h>
37
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
42 typedef struct _Ewk_Media_Playback_Info Ewk_Media_Playback_Info;
43
44 /**
45  * Get video id of media.
46  *
47  * @param meia playback info's structure
48  *
49  * @return @c video id
50  */
51 EXPORT_API const int ewk_media_playback_info_video_id_get(
52     Ewk_Media_Playback_Info* data);
53
54 /**
55  * Get url of media.
56  *
57  * @param meia playback info's structure
58  *
59  * @return @c media url
60  */
61 EXPORT_API const char* ewk_media_playback_info_media_url_get(
62     Ewk_Media_Playback_Info* data);
63
64 /**
65  * Get mime type of media.
66  *
67  * @param meia playback info's structure
68  *
69  * @return @c mime type
70  */
71 EXPORT_API const char* ewk_media_playback_info_mime_type_get(
72     Ewk_Media_Playback_Info* data);
73
74 /**
75  * Get translated url of media.
76  *
77  * @param media playback info's structure
78  *
79  * @return @c translated url
80  */
81 EXPORT_API const char* ewk_media_playback_info_translated_url_get(
82     Ewk_Media_Playback_Info* data);
83
84 /**
85  * Get drm info of media.
86  *
87  * @param media playback info's structure
88  *
89  * @return @c drm info
90  */
91 EXPORT_API const char* ewk_media_playback_info_drm_info_get(
92     Ewk_Media_Playback_Info* data);
93
94 /**
95  * Set media resource acquired of media.
96  *
97  * @param media playback info's structure
98  */
99 EXPORT_API void ewk_media_playback_info_media_resource_acquired_set(
100     Ewk_Media_Playback_Info* data,
101     Eina_Bool media_resource_acquired);
102
103 /**
104  * Set translated url of media.
105  *
106  * @param media playback info's structure
107  */
108 EXPORT_API void ewk_media_playback_info_translated_url_set(
109     Ewk_Media_Playback_Info* data,
110     const char* translated_url);
111
112 /**
113  * Set drm info of media.
114  *
115  * @param media playback info's structure
116  */
117 EXPORT_API void ewk_media_playback_info_drm_info_set(
118     Ewk_Media_Playback_Info* data,
119     const char* drm_info);
120
121 Ewk_Media_Playback_Info* ewkMediaPlaybackInfoCreate(const int player_id,
122                                                     const char* url,
123                                                     const char* mime_type);
124 Eina_Bool ewk_media_playback_info_media_resource_acquired_get(
125     Ewk_Media_Playback_Info* data);
126 void ewkMediaPlaybackInfoDelete(Ewk_Media_Playback_Info* data);
127
128 #ifdef __cplusplus
129 }
130 #endif
131 #endif  // ewk_media_playback_info_product_h