Remove unused APIs 07/120207/2
authorJeongho Mok <jho.mok@samsung.com>
Wed, 22 Mar 2017 05:48:33 +0000 (14:48 +0900)
committerJeongho Mok <jho.mok@samsung.com>
Wed, 29 Mar 2017 06:38:47 +0000 (15:38 +0900)
[Version] 0.2.11
[Profile] Common
[Issue Type] Cleanup

Change-Id: I0a8930eb9c9c814b2e2f9470d4f9597cd34ceac4

mm_session.c
mm_session.h
mm_session_private.h
packaging/libmm-session.spec

index 69d3ec7..c537787 100644 (file)
@@ -46,14 +46,6 @@ struct sigaction session_xcpu_old_action;
 EXPORT_API
 int mm_session_init(int sessiontype)
 {
-       debug_fenter();
-       return mm_session_init_ex(sessiontype, NULL, NULL);
-       debug_fleave();
-}
-
-EXPORT_API
-int mm_session_init_ex(int sessiontype, session_callback_fn callback, void* user_param)
-{
        int result = MM_ERROR_NONE;
        int ltype = 0;
        bool do_not_update_session_info = false;
@@ -77,13 +69,6 @@ int mm_session_init_ex(int sessiontype, session_callback_fn callback, void* user
                }
        }
 
-       /* Monitor Callback */
-       if (NULL == callback) {
-               debug_warning("Null callback function");
-       } else {
-               debug_warning("It was deprecated, do not use monitor callback, callback(%p), user_param(%p)", callback, user_param);
-       }
-
        g_session_type = sessiontype;
 
        if (!do_not_update_session_info) {
@@ -144,16 +129,6 @@ int mm_session_update_option(session_update_type_t update_type, int options)
 }
 
 EXPORT_API
-int mm_session_add_watch_callback(int watchevent, int watchstate, watch_callback_fn callback, void* user_param)
-{
-       debug_fenter();
-
-       debug_fleave();
-
-       return MM_ERROR_NOT_SUPPORT_API;
-}
-
-EXPORT_API
 int mm_session_get_current_type(int *sessiontype)
 {
        int result = MM_ERROR_NONE;
@@ -232,66 +207,6 @@ int mm_session_finish(void)
 }
 
 EXPORT_API
-int mm_session_remove_watch_callback(int watchevent, int watchstate)
-{
-       debug_fenter();
-
-       debug_fleave();
-
-       return MM_ERROR_NOT_SUPPORT_API;
-}
-
-EXPORT_API
-int mm_session_set_subsession(mm_subsession_t subsession, mm_subsession_option_t option)
-{
-       debug_fenter();
-
-       debug_fleave();
-
-       return MM_ERROR_NOT_SUPPORT_API;
-}
-
-EXPORT_API
-int mm_session_get_subsession(mm_subsession_t *subsession)
-{
-       debug_fenter();
-
-       debug_fleave();
-
-       return MM_ERROR_NOT_SUPPORT_API;
-}
-
-EXPORT_API
-int mm_session_set_subevent(mm_session_sub_t subevent)
-{
-       debug_fenter();
-
-       debug_fleave();
-
-       return MM_ERROR_NOT_SUPPORT_API;
-}
-
-EXPORT_API
-int mm_session_get_subevent(mm_session_sub_t *subevent)
-{
-       debug_fenter();
-
-       debug_fleave();
-
-       return MM_ERROR_NOT_SUPPORT_API;
-}
-
-EXPORT_API
-int mm_session_reset_resumption_info(void)
-{
-       debug_fenter();
-
-       debug_fleave();
-
-       return MM_ERROR_NOT_SUPPORT_API;
-}
-
-EXPORT_API
 int _mm_session_util_delete_information(int app_pid)
 {
        pid_t mypid;
index 4f5ac16..758e221 100644 (file)
@@ -66,7 +66,7 @@ typedef enum {
        MM_SESSION_UPDATE_TYPE_ADD,
        MM_SESSION_UPDATE_TYPE_REMOVE,
        MM_SESSION_UPDATE_TYPE_NUM
-}session_update_type_t;
+} session_update_type_t;
 
 /**
   * This define is for session options
@@ -76,44 +76,6 @@ typedef enum {
 #define MM_SESSION_OPTION_RESUME_BY_SYSTEM_OR_MEDIA_PAUSED  0x0010
 
 /**
-  * This enumeration defines session callback message type.
-  */
-typedef enum {
-       MM_SESSION_MSG_STOP,    /**< Message Stop : this messages means that session of application has interrupted by policy.
-                                                                                               So application should stop it's multi-media context when this message has come */
-       MM_SESSION_MSG_RESUME,  /**< Message Stop : this messages means that session interrupt of application has ended.
-                                                                                               So application could resume it's multi-media context when this message has come */
-       MM_SESSION_MSG_NUM
-}session_msg_t;
-
-typedef enum {
-       MM_SESSION_EVENT_MEDIA = 0,
-       MM_SESSION_EVENT_CALL,
-       MM_SESSION_EVENT_ALARM,
-       MM_SESSION_EVENT_EARJACK_UNPLUG,
-       MM_SESSION_EVENT_RESOURCE_CONFLICT,
-       MM_SESSION_EVENT_EMERGENCY,
-       MM_SESSION_EVENT_NOTIFICATION,
-}session_event_t;
-
-typedef enum {
-       MM_SESSION_WATCH_EVENT_IGNORE = -1,
-       MM_SESSION_WATCH_EVENT_CALL = 0,
-       MM_SESSION_WATCH_EVENT_VIDEO_CALL,
-       MM_SESSION_WATCH_EVENT_ALARM,
-       MM_SESSION_WATCH_EVENT_NUM
-}session_watch_event_t;
-
-typedef enum {
-       MM_SESSION_WATCH_STATE_STOP = 0,
-       MM_SESSION_WATCH_STATE_PLAYING,
-       MM_SESSION_WATCH_STATE_NUM
-}session_watch_state_t;
-
-typedef void (*session_callback_fn) (session_msg_t msg, session_event_t event, void *user_param);
-typedef void (*watch_callback_fn) (session_watch_event_t event, session_watch_state_t state, void *user_param);
-
-/**
  * This function defines application's Multimedia Session policy
  *
  * @param      sessiontype     [in] Multimedia Session type
@@ -174,97 +136,6 @@ int main()
  */
 int mm_session_init(int sessiontype);
 
-
-
-
-/**
- * This function defines application's Multimedia Session policy
- *
- * @param      sessiontype     [in] Multimedia Session type
- * @param      session_callback_fn [in] session message callback function pointer
- * @param      user_param [in] callback function user parameter
- *
- * @return     This function returns MM_ERROR_NONE on success, or negative value
- *                     with error code.
- * @remark     Session type is unique for each application (each PID actually).
- *                     if application want to change session type, Finish session first and Init again
- * @pre                There should be pre-initialized session type for caller application.
- * @post       A session type of caller application will be defined process widely.
- *                     And session callback will be registered as given function pointer with given user_param
- * @see                MMSessionType mm_session_finish
- * @since
- * @par Example
- * @code
-#include <mm_session.h>
-
-session_callback_fn session_cb(session_msg_t msg,  session_event_t event, void *user_param)
-{
-       struct appdata* ad = (struct appdata*) user_param;
-
-       switch(msg)
-       {
-       case MM_SESSION_MSG_STOP:
-               // Stop multi-media context here
-               ...
-               break;
-       case MM_SESSION_MSG_RESUME:
-               // Resume multi-media context here
-               ...
-               break;
-       default:
-               break;
-       }
-       ...
-}
-
-static int _create(void *data)
-{
-       struct appdata* ad = (struct appdata*) data;
-       int ret = 0;
-
-       // Initialize Multimedia Session Type with callback
-       ret = mm_session_init_ex(MM_SESSION_TYPE_MEDIA, session_cb, (void*)ad);
-       if(ret < 0)
-       {
-               printf("Can not initialize session \n");
-       }
-       ...
-}
-
-static int _terminate(void* data)
-{
-       int ret = 0;
-
-       // Deinitialize Multimedia Session Type
-       ret = mm_session_finish();
-       if(ret < 0)
-       {
-               printf("Can not finish session\n");
-       }
-       ...
-}
-
-
-int main()
-{
-       ...
-       struct appcore_ops ops = {
-               .create = _create,
-               .terminate = _terminate,
-               .pause = _pause,
-               .resume = _resume,
-               .reset = _reset,
-       };
-       ...
-       return appcore_efl_main(PACKAGE, ..., &ops);
-}
-
- * @endcode
- */
-int mm_session_init_ex(int sessiontype, session_callback_fn callback, void* user_param);
-
-
-
 /**
  * This function finish application's Multimedia Session.
  *
@@ -360,41 +231,6 @@ int mm_session_get_current_information(int *session_type, int *session_options);
 int mm_session_update_option(session_update_type_t update_type, int options);
 
 /**
- * This function add a watch callback
- *
- * @param      watchevent      [in]    The session type to be watched
- * @param      watchstate      [in]    The session state of the session type of first argument to be watched
- * @param      callback        [in]    The callback which will be called when the watched session state was activated
- * @param      user_param      [in]    The user param passed from the callback registration function
- * @return     This function returns MM_ERROR_NONE on success, or negative value
- *                     with error code.
- * @see
- * @since
- */
-int mm_session_add_watch_callback(int watchevent, int watchstate, watch_callback_fn callback, void* user_param);
-
-/**
- * This function removes a watch callback corresponding with two arguments
- *
- * @param      watchevent      [in]    The session type to be removed
- * @param      watchstate      [in]    The session state to be removed
- * @return     This function returns MM_ERROR_NONE on success, or negative value
- *                     with error code.
- * @see
- * @since
- */
-int mm_session_remove_watch_callback(int watchevent, int watchstate);
-
-/**
- * This function initialize resumption of other ASM handles which were paused by this session
- * It can be used only when call series or voice recognition session is set
- *
- * @return     This function returns MM_ERROR_NONE on success, or negative value
- *                     with error code.
- */
-int mm_session_reset_resumption_info(void);
-
-/**
        @}
  */
 
index 8980999..06ecac1 100644 (file)
@@ -143,64 +143,6 @@ int _mm_session_util_write_information(int app_pid, int session_type, int flags)
  */
 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.
- * @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_subsession
- * @since
- */
-int mm_session_set_subsession (mm_subsession_t subsession, mm_subsession_option_t option);
-
-/**
- * This function get current sub-session type
- *
- * @param      subsession [out] subsession 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_subsession
- * @since
- */
-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
index 375bdda..40c5194 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-session
 Summary:    Multimedia Session Library
-Version:    0.2.10
+Version:    0.2.11
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0