4 * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Seungbae Shin <seungbae.shin at samsung.com>, Sangchul Lee <sc11.lee at samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
23 * This file declares common data structure of multimedia framework.
25 * @file mm_session_private.h
28 * @brief This file declares multimedia framework session type.
30 #ifndef _MM_SESSION_PRIVATE_H_
31 #define _MM_SESSION_PRIVATE_H_
37 #include <mm_session.h>
40 MM_SUBSESSION_TYPE_VOICE = 0,
41 MM_SUBSESSION_TYPE_RINGTONE,
42 MM_SUBSESSION_TYPE_MEDIA,
43 MM_SUBSESSION_TYPE_INIT,
44 MM_SUBSESSION_TYPE_VR_NORMAL,
45 MM_SUBSESSION_TYPE_VR_DRIVE,
46 MM_SUBSESSION_TYPE_RECORD_STEREO,
47 MM_SUBSESSION_TYPE_RECORD_MONO,
48 MM_SUBSESSION_TYPE_NUM
52 MM_SUBSESSION_OPTION_NONE = 0,
53 MM_SUBSESSION_OPTION_NUM
54 /* NOTE : Do not exceed 15, because of using mm_subsession_option_priv_t type with it internally */
55 } mm_subsession_option_t;
58 MM_SESSION_SUB_TYPE_NONE = 0,
59 MM_SESSION_SUB_TYPE_SHARE,
60 MM_SESSION_SUB_TYPE_EXCLUSIVE
65 * This function delete session information to system
67 * @param app_pid [in] Application pid (if -1, use caller process)
68 * @return This function returns MM_ERROR_NONE on success, or negative value
70 * @remark This function is only for internal implementation do not use this at application
71 * @see _mm_session_util_write_type _mm_session_util_read_type _mm_session_util_write_information _mm_session_util_read_information
74 int _mm_session_util_delete_information(int app_pid);
78 * This function write session type information to system
80 * @param app_pid [in] Application pid (if -1, use caller process)
81 * @param sessiontype [in] Multimedia Session type
83 * @return This function returns MM_ERROR_NONE on success, or negative value
85 * @remark This function is only for internal implementation do not use this at application
86 * Session type is unique for each application.
87 * if application want to change session type, Finish session first and Init again
88 * @see _mm_session_util_delete_information _mm_session_util_read_type
91 int _mm_session_util_write_type(int app_pid, int sessiontype);
95 * This function read session type information from system
97 * @param app_pid [in] Application pid (if -1, use caller process)
98 * @param sessiontype [out] Multimedia Session type
100 * @return This function returns MM_ERROR_NONE on success, or negative value
102 * @remark Session type is unique for each application.
103 * if application want to change session type, Finish session first and Init again
104 * @see _mm_session_util_write_type _mm_session_util_delete_information
107 int _mm_session_util_read_type(int app_pid, int *sessiontype);
111 * This function write session information to system
113 * @param app_pid [in] Application pid (if -1, use caller process)
114 * @param session_type [in] Multimedia Session type
115 * @param flags [in] Multimedia Session options
117 * @return This function returns MM_ERROR_NONE on success, or negative value
119 * @remark This function is only for internal implementation do not use this at application
120 * Session type and Session option are unique for each application.
121 * @see _mm_session_util_delete_information _mm_session_util_read_information
124 int _mm_session_util_write_information(int app_pid, int session_type, int flags);
128 * This function read session information from system
130 * @param app_pid [in] Application pid (if -1, use caller process)
131 * @param sessiontype [out] Multimedia Session type
132 * @param flags [out] Multimedia Session options
133 * @return This function returns MM_ERROR_NONE on success, or negative value
135 * @remark Session type is unique for each application.
136 * @see _mm_session_util_write_information _mm_session_util_delete_information
139 int _mm_session_util_read_information(int app_pid, int *session_type, int *flags);
143 * This function set sub-session type
145 * @param subsession [in] subsession type
146 * @param option [in] option of subsession type
148 * @return This function returns MM_ERROR_NONE on success, or negative value
150 * @remark This function is only for internal implementation do not use this at application
151 * Session type is unique for each application.
152 * @see mm_session_get_subsession
155 int mm_session_set_subsession (mm_subsession_t subsession, mm_subsession_option_t option);
158 * This function get current sub-session type
160 * @param subsession [out] subsession type
162 * @return This function returns MM_ERROR_NONE on success, or negative value
164 * @remark This function is only for internal implementation do not use this at application
165 * Session type is unique for each application.
166 * @see mm_session_set_subsession
169 int mm_session_get_subsession (mm_subsession_t *subsession);
172 * This function set sub-event type
174 * @param subevent [in] subevent type
176 * @return This function returns MM_ERROR_NONE on success, or negative value
178 * @remark This function is only for internal implementation do not use this at application
179 * Session type is unique for each application.
180 * @see mm_session_get_subevent
183 int mm_session_set_subevent (mm_session_sub_t subevent);
186 * This function get current sub-event type
188 * @param subevent [out] subevent type
190 * @return This function returns MM_ERROR_NONE on success, or negative value
192 * @remark This function is only for internal implementation do not use this at application
193 * Session type is unique for each application.
194 * @see mm_session_set_subsevnt
197 int mm_session_get_subevent (mm_session_sub_t *subevent);