Remove placeholders and cleanup spec
[platform/core/multimedia/libmm-session.git] / mm_session_private.h
1 /*
2  * libmm-session
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Seungbae Shin <seungbae.shin@samsung.com>
7  *
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
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
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.
19  *
20  */
21
22 /**
23  * This file declares common data structure of multimedia framework.
24  *
25  * @file                mm_session_private.h
26  * @author
27  * @version             1.0
28  * @brief               This file declares multimedia framework session type.
29  */
30 #ifndef _MM_SESSION_PRIVATE_H_
31 #define _MM_SESSION_PRIVATE_H_
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 #include <mm_session.h>
38
39 /**
40   * This enumeration defines session types for internal usage.
41   */
42 enum MMSessionTypePrivate{
43         MM_SESSION_TYPE_ALARM = 2,
44         MM_SESSION_TYPE_EMERGENCY,
45         MM_SESSION_TYPE_NOTIFY,
46         MM_SESSION_TYPE_CALL,
47         MM_SESSION_TYPE_VIDEOCALL,
48         MM_SESSION_TYPE_RICH_CALL,
49         MM_SESSION_PRIVATE_TYPE_NUM
50 };
51
52 typedef enum {
53         MM_SUBSESSION_TYPE_VOICE = 0,
54         MM_SUBSESSION_TYPE_RINGTONE,
55         MM_SUBSESSION_TYPE_MEDIA
56 } mm_subsession_t;
57
58 /**
59  * This function delete session type information to system
60  *
61  * @param       app_pid [in] Application pid (if -1, use caller process)
62  * @return      This function returns MM_ERROR_NONE on success, or negative value
63  *                      with error code.
64  * @remark      This function is only for internal implementation do not use this at application
65  *                      Session type is unique for each application.
66  *                      if application want to change session type, Finish session first and Init again
67  * @see         _mm_session_util_write_type _mm_session_util_read_type
68  * @since
69  */
70 int _mm_session_util_delete_type(int app_pid);
71
72
73
74 /**
75  * This function write session type information to system
76  *
77  * @param       app_pid [in] Application pid (if -1, use caller process)
78  * @param       sessiontype     [in] Multimedia Session type
79  *
80  * @return      This function returns MM_ERROR_NONE on success, or negative value
81  *                      with error code.
82  * @remark      This function is only for internal implementation do not use this at application
83  *                      Session type is unique for each application.
84  *                      if application want to change session type, Finish session first and Init again
85  * @see         _mm_session_util_delete_type _mm_session_util_read_type
86  * @since
87  */
88 int _mm_session_util_write_type(int app_pid, int sessiontype);
89
90
91 /**
92  * This function read session type information from system
93  *
94  * @param       app_pid [in] Application pid (if -1, use caller process)
95  * @param       sessiontype     [out] Multimedia Session type
96  *
97  * @return      This function returns MM_ERROR_NONE on success, or negative value
98  *                      with error code.
99  * @remark      Session type is unique for each application.
100  *                      if application want to change session type, Finish session first and Init again
101  * @see         _mm_session_util_write_type _mm_session_util_delete_type
102  * @since
103  */
104 int _mm_session_util_read_type(int app_pid, int *sessiontype);
105
106 /**
107  * This function set sub-session type
108  *
109  * @param       subsession [in] subsession type
110  *
111  * @return      This function returns MM_ERROR_NONE on success, or negative value
112  *                      with error code.
113  * @remark      This function is only for internal implementation do not use this at application
114  *                      Session type is unique for each application.
115  * @see         mm_session_get_subsession
116  * @since
117  */
118 int mm_session_set_subsession (mm_subsession_t subsession);
119
120 /**
121  * This function get current sub-session type
122  *
123  * @param       subsession [out] subsession type
124  *
125  * @return      This function returns MM_ERROR_NONE on success, or negative value
126  *                      with error code.
127  * @remark      This function is only for internal implementation do not use this at application
128  *                      Session type is unique for each application.
129  * @see         mm_session_set_subsession
130  * @since
131  */
132 int mm_session_get_subsession (mm_subsession_t *subsession);
133
134 #ifdef __cplusplus
135 }
136 #endif
137
138 #endif