rebase code with tizen 2.3
[platform/core/multimedia/libmm-session.git] / mm_session_private.h
index 506f451..4cbe223 100644 (file)
@@ -1,9 +1,9 @@
 /*
  * libmm-session
  *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
  *
- * Contact: Seungbae Shin <seungbae.shin@samsung.com>
+ * Contact: Seungbae Shin <seungbae.shin at samsung.com>, Sangchul Lee <sc11.lee at samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -36,39 +36,42 @@ extern "C" {
 
 #include <mm_session.h>
 
-/**
-  * This enumeration defines session types for internal usage.
-  */
-enum MMSessionTypePrivate{
-       MM_SESSION_TYPE_ALARM = 2,
-       MM_SESSION_TYPE_EMERGENCY,
-       MM_SESSION_TYPE_NOTIFY,
-       MM_SESSION_TYPE_CALL,
-       MM_SESSION_TYPE_VIDEOCALL,
-       MM_SESSION_TYPE_RICH_CALL,
-       MM_SESSION_PRIVATE_TYPE_NUM
-};
-
 typedef enum {
        MM_SUBSESSION_TYPE_VOICE = 0,
        MM_SUBSESSION_TYPE_RINGTONE,
-       MM_SUBSESSION_TYPE_MEDIA
+       MM_SUBSESSION_TYPE_MEDIA,
+       MM_SUBSESSION_TYPE_INIT,
+       MM_SUBSESSION_TYPE_VR_NORMAL,
+       MM_SUBSESSION_TYPE_VR_DRIVE,
+       MM_SUBSESSION_TYPE_RECORD_STEREO,
+       MM_SUBSESSION_TYPE_RECORD_MONO,
+       MM_SUBSESSION_TYPE_NUM
 } mm_subsession_t;
 
+typedef enum {
+       MM_SUBSESSION_OPTION_NONE = 0,
+       MM_SUBSESSION_OPTION_NUM
+       /* NOTE : Do not exceed 15, because of using mm_subsession_option_priv_t type with it internally */
+} mm_subsession_option_t;
+
+typedef enum {
+       MM_SESSION_SUB_TYPE_NONE = 0,
+       MM_SESSION_SUB_TYPE_SHARE,
+       MM_SESSION_SUB_TYPE_EXCLUSIVE
+} mm_session_sub_t;
+
+
 /**
- * This function delete session type information to system
+ * This function delete session information to system
  *
  * @param      app_pid [in] Application pid (if -1, use caller process)
  * @return     This function returns MM_ERROR_NONE on success, or negative value
  *                     with error code.
  * @remark     This function is only for internal implementation do not use this at application
- *                     Session type is unique for each application.
- *                     if application want to change session type, Finish session first and Init again
- * @see                _mm_session_util_write_type _mm_session_util_read_type
+ * @see                _mm_session_util_write_type _mm_session_util_read_type _mm_session_util_write_information _mm_session_util_read_information
  * @since
  */
-int _mm_session_util_delete_type(int app_pid);
-
+int _mm_session_util_delete_information(int app_pid);
 
 
 /**
@@ -82,7 +85,7 @@ int _mm_session_util_delete_type(int app_pid);
  * @remark     This function is only for internal implementation do not use this at application
  *                     Session type is unique for each application.
  *                     if application want to change session type, Finish session first and Init again
- * @see                _mm_session_util_delete_type _mm_session_util_read_type
+ * @see                _mm_session_util_delete_information _mm_session_util_read_type
  * @since
  */
 int _mm_session_util_write_type(int app_pid, int sessiontype);
@@ -98,15 +101,49 @@ int _mm_session_util_write_type(int app_pid, int sessiontype);
  *                     with error code.
  * @remark     Session type is unique for each application.
  *                     if application want to change session type, Finish session first and Init again
- * @see                _mm_session_util_write_type _mm_session_util_delete_type
+ * @see                _mm_session_util_write_type _mm_session_util_delete_information
  * @since
  */
 int _mm_session_util_read_type(int app_pid, int *sessiontype);
 
+
+/**
+ * This function write session information to system
+ *
+ * @param      app_pid [in] Application pid (if -1, use caller process)
+ * @param      session_type    [in] Multimedia Session type
+ * @param      flags   [in] Multimedia Session options
+ *
+ * @return     This function returns MM_ERROR_NONE on success, or negative value
+ *                     with error code.
+ * @remark     This function is only for internal implementation do not use this at application
+ *                     Session type and Session option are unique for each application.
+ * @see                _mm_session_util_delete_information _mm_session_util_read_information
+ * @since
+ */
+int _mm_session_util_write_information(int app_pid, int session_type, int flags);
+
+
+/**
+ * This function read session information from system
+ *
+ * @param      app_pid [in] Application pid (if -1, use caller process)
+ * @param      sessiontype     [out] Multimedia Session type
+ * @param      flags   [out] Multimedia Session options
+ * @return     This function returns MM_ERROR_NONE on success, or negative value
+ *                     with error code.
+ * @remark     Session type is unique for each application.
+ * @see                _mm_session_util_write_information _mm_session_util_delete_information
+ * @since
+ */
+int _mm_session_util_read_information(int app_pid, int *session_type, int *flags);
+
+
 /**
  * This function set sub-session type
  *
  * @param      subsession [in] subsession type
+ * @param      option  [in] option of subsession type
  *
  * @return     This function returns MM_ERROR_NONE on success, or negative value
  *                     with error code.
@@ -115,7 +152,7 @@ int _mm_session_util_read_type(int app_pid, int *sessiontype);
  * @see                mm_session_get_subsession
  * @since
  */
-int mm_session_set_subsession (mm_subsession_t subsession);
+int mm_session_set_subsession (mm_subsession_t subsession, mm_subsession_option_t option);
 
 /**
  * This function get current sub-session type
@@ -131,6 +168,34 @@ int mm_session_set_subsession (mm_subsession_t subsession);
  */
 int mm_session_get_subsession (mm_subsession_t *subsession);
 
+/**
+ * This function set sub-event type
+ *
+ * @param      subevent [in] subevent type
+ *
+ * @return     This function returns MM_ERROR_NONE on success, or negative value
+ *                     with error code.
+ * @remark     This function is only for internal implementation do not use this at application
+ *                     Session type is unique for each application.
+ * @see                mm_session_get_subevent
+ * @since
+ */
+int mm_session_set_subevent (mm_session_sub_t subevent);
+
+/**
+ * This function get current sub-event type
+ *
+ * @param      subevent [out] subevent type
+ *
+ * @return     This function returns MM_ERROR_NONE on success, or negative value
+ *                     with error code.
+ * @remark     This function is only for internal implementation do not use this at application
+ *                     Session type is unique for each application.
+ * @see                mm_session_set_subsevnt
+ * @since
+ */
+int mm_session_get_subevent (mm_session_sub_t *subevent);
+
 #ifdef __cplusplus
 }
 #endif