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>
41 MM_SUBSESSION_TYPE_VOICE = 0,
42 MM_SUBSESSION_TYPE_RINGTONE,
43 MM_SUBSESSION_TYPE_MEDIA,
44 MM_SUBSESSION_TYPE_INIT,
45 MM_SUBSESSION_TYPE_VR_NORMAL,
46 MM_SUBSESSION_TYPE_VR_DRIVE,
47 MM_SUBSESSION_TYPE_RECORD_STEREO,
48 MM_SUBSESSION_TYPE_RECORD_MONO,
49 MM_SUBSESSION_TYPE_NUM
53 MM_SUBSESSION_OPTION_NONE = 0,
54 MM_SUBSESSION_OPTION_NUM
55 /* NOTE : Do not exceed 15, because of using mm_subsession_option_priv_t type with it internally */
56 } mm_subsession_option_t;
59 MM_SESSION_SUB_TYPE_NONE = 0,
60 MM_SESSION_SUB_TYPE_SHARE,
61 MM_SESSION_SUB_TYPE_EXCLUSIVE
66 * This function delete session information to system
68 * @param app_pid [in] Application pid (if -1, use caller process)
69 * @return This function returns MM_ERROR_NONE on success, or negative value
71 * @remark This function is only for internal implementation do not use this at application
72 * @see _mm_session_util_write_type _mm_session_util_read_type _mm_session_util_write_information _mm_session_util_read_information
75 int _mm_session_util_delete_information(int app_pid);
79 * This function write session type information to system
81 * @param app_pid [in] Application pid (if -1, use caller process)
82 * @param sessiontype [in] Multimedia Session type
84 * @return This function returns MM_ERROR_NONE on success, or negative value
86 * @remark This function is only for internal implementation do not use this at application
87 * Session type is unique for each application.
88 * if application want to change session type, Finish session first and Init again
89 * @see _mm_session_util_delete_information _mm_session_util_read_type
92 int _mm_session_util_write_type(int app_pid, int sessiontype);
96 * This function read session type information from system
98 * @param app_pid [in] Application pid (if -1, use caller process)
99 * @param sessiontype [out] Multimedia Session type
101 * @return This function returns MM_ERROR_NONE on success, or negative value
103 * @remark Session type is unique for each application.
104 * if application want to change session type, Finish session first and Init again
105 * @see _mm_session_util_write_type _mm_session_util_delete_information
108 int _mm_session_util_read_type(int app_pid, int *sessiontype);
112 * This function write session information to system
114 * @param app_pid [in] Application pid (if -1, use caller process)
115 * @param session_type [in] Multimedia Session type
116 * @param flags [in] Multimedia Session options
118 * @return This function returns MM_ERROR_NONE on success, or negative value
120 * @remark This function is only for internal implementation do not use this at application
121 * Session type and Session option are unique for each application.
122 * @see _mm_session_util_delete_information _mm_session_util_read_information
125 int _mm_session_util_write_information(int app_pid, int session_type, int flags);
129 * This function read session information from system
131 * @param app_pid [in] Application pid (if -1, use caller process)
132 * @param sessiontype [out] Multimedia Session type
133 * @param flags [out] Multimedia Session options
134 * @return This function returns MM_ERROR_NONE on success, or negative value
136 * @remark Session type is unique for each application.
137 * @see _mm_session_util_write_information _mm_session_util_delete_information
140 int _mm_session_util_read_information(int app_pid, int *session_type, int *flags);
144 * This function set sub-session type
146 * @param subsession [in] subsession type
147 * @param option [in] option of subsession type
149 * @return This function returns MM_ERROR_NONE on success, or negative value
151 * @remark This function is only for internal implementation do not use this at application
152 * Session type is unique for each application.
153 * @see mm_session_get_subsession
156 int mm_session_set_subsession (mm_subsession_t subsession, mm_subsession_option_t option);
159 * This function get current sub-session type
161 * @param subsession [out] subsession type
163 * @return This function returns MM_ERROR_NONE on success, or negative value
165 * @remark This function is only for internal implementation do not use this at application
166 * Session type is unique for each application.
167 * @see mm_session_set_subsession
170 int mm_session_get_subsession (mm_subsession_t *subsession);
173 * This function set sub-event type
175 * @param subevent [in] subevent type
177 * @return This function returns MM_ERROR_NONE on success, or negative value
179 * @remark This function is only for internal implementation do not use this at application
180 * Session type is unique for each application.
181 * @see mm_session_get_subevent
184 int mm_session_set_subevent (mm_session_sub_t subevent);
187 * This function get current sub-event type
189 * @param subevent [out] subevent type
191 * @return This function returns MM_ERROR_NONE on success, or negative value
193 * @remark This function is only for internal implementation do not use this at application
194 * Session type is unique for each application.
195 * @see mm_session_set_subsevnt
198 int mm_session_get_subevent (mm_session_sub_t *subevent);