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 /* This private definition is for marking that this process is using the stream info. created by sound-manager.
41 * It'll be maintained for backward compatibility regarding session feature that is deprecated since tizen 3.0. */
42 #define MM_SESSION_TYPE_REPLACED_BY_STREAM 1111
45 MM_SUBSESSION_TYPE_VOICE = 0,
46 MM_SUBSESSION_TYPE_RINGTONE,
47 MM_SUBSESSION_TYPE_MEDIA,
48 MM_SUBSESSION_TYPE_INIT,
49 MM_SUBSESSION_TYPE_VR_NORMAL,
50 MM_SUBSESSION_TYPE_VR_DRIVE,
51 MM_SUBSESSION_TYPE_RECORD_STEREO,
52 MM_SUBSESSION_TYPE_RECORD_MONO,
53 MM_SUBSESSION_TYPE_NUM
57 MM_SUBSESSION_OPTION_NONE = 0,
58 MM_SUBSESSION_OPTION_NUM
59 /* NOTE : Do not exceed 15, because of using mm_subsession_option_priv_t type with it internally */
60 } mm_subsession_option_t;
63 MM_SESSION_SUB_TYPE_NONE = 0,
64 MM_SESSION_SUB_TYPE_SHARE,
65 MM_SESSION_SUB_TYPE_EXCLUSIVE
70 * This function delete session information to system
72 * @param app_pid [in] Application pid (if -1, use caller process)
73 * @return This function returns MM_ERROR_NONE on success, or negative value
75 * @remark This function is only for internal implementation do not use this at application
76 * @see _mm_session_util_write_type _mm_session_util_read_type _mm_session_util_write_information _mm_session_util_read_information
79 int _mm_session_util_delete_information(int app_pid);
83 * This function write session type information to system
85 * @param app_pid [in] Application pid (if -1, use caller process)
86 * @param sessiontype [in] Multimedia Session type
88 * @return This function returns MM_ERROR_NONE on success, or negative value
90 * @remark This function is only for internal implementation do not use this at application
91 * Session type is unique for each application.
92 * if application want to change session type, Finish session first and Init again
93 * @see _mm_session_util_delete_information _mm_session_util_read_type
96 int _mm_session_util_write_type(int app_pid, int sessiontype);
100 * This function read session type information from system
102 * @param app_pid [in] Application pid (if -1, use caller process)
103 * @param sessiontype [out] Multimedia Session type
105 * @return This function returns MM_ERROR_NONE on success, or negative value
107 * @remark Session type is unique for each application.
108 * if application want to change session type, Finish session first and Init again
109 * @see _mm_session_util_write_type _mm_session_util_delete_information
112 int _mm_session_util_read_type(int app_pid, int *sessiontype);
116 * This function write session information to system
118 * @param app_pid [in] Application pid (if -1, use caller process)
119 * @param session_type [in] Multimedia Session type
120 * @param flags [in] Multimedia Session options
122 * @return This function returns MM_ERROR_NONE on success, or negative value
124 * @remark This function is only for internal implementation do not use this at application
125 * Session type and Session option are unique for each application.
126 * @see _mm_session_util_delete_information _mm_session_util_read_information
129 int _mm_session_util_write_information(int app_pid, int session_type, int flags);
133 * This function read session information from system
135 * @param app_pid [in] Application pid (if -1, use caller process)
136 * @param sessiontype [out] Multimedia Session type
137 * @param flags [out] Multimedia Session options
138 * @return This function returns MM_ERROR_NONE on success, or negative value
140 * @remark Session type is unique for each application.
141 * @see _mm_session_util_write_information _mm_session_util_delete_information
144 int _mm_session_util_read_information(int app_pid, int *session_type, int *flags);
148 * This function set sub-session type
150 * @param subsession [in] subsession type
151 * @param option [in] option of subsession type
153 * @return This function returns MM_ERROR_NONE on success, or negative value
155 * @remark This function is only for internal implementation do not use this at application
156 * Session type is unique for each application.
157 * @see mm_session_get_subsession
160 int mm_session_set_subsession (mm_subsession_t subsession, mm_subsession_option_t option);
163 * This function get current sub-session type
165 * @param subsession [out] subsession type
167 * @return This function returns MM_ERROR_NONE on success, or negative value
169 * @remark This function is only for internal implementation do not use this at application
170 * Session type is unique for each application.
171 * @see mm_session_set_subsession
174 int mm_session_get_subsession (mm_subsession_t *subsession);
177 * This function set sub-event type
179 * @param subevent [in] subevent type
181 * @return This function returns MM_ERROR_NONE on success, or negative value
183 * @remark This function is only for internal implementation do not use this at application
184 * Session type is unique for each application.
185 * @see mm_session_get_subevent
188 int mm_session_set_subevent (mm_session_sub_t subevent);
191 * This function get current sub-event type
193 * @param subevent [out] subevent type
195 * @return This function returns MM_ERROR_NONE on success, or negative value
197 * @remark This function is only for internal implementation do not use this at application
198 * Session type is unique for each application.
199 * @see mm_session_set_subsevnt
202 int mm_session_get_subevent (mm_session_sub_t *subevent);