((player_completed_cb) cb_info->user_cb[ev]) (cb_info->user_data[ev]);
}
+static char* _convert_code_to_str(int code)
+{
+ switch (code) {
+ case PLAYER_INTERRUPTED_COMPLETED: /* Deprecated since 3.0 */
+ return "PLAYER_INTERRUPTED_COMPLETED";
+ case PLAYER_INTERRUPTED_BY_MEDIA: /* Deprecated since 3.0 */
+ return "PLAYER_INTERRUPTED_BY_MEDIA";
+ case PLAYER_INTERRUPTED_BY_CALL: /* Deprecated since 3.0 */
+ return "PLAYER_INTERRUPTED_BY_CALL";
+ case PLAYER_INTERRUPTED_BY_EARJACK_UNPLUG: /* Deprecated since 3.0 */
+ return "PLAYER_INTERRUPTED_BY_EARJACK_UNPLUG";
+ case PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT:
+ return "PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT";
+ case PLAYER_INTERRUPTED_BY_ALARM: /* Deprecated since 3.0 */
+ return "PLAYER_INTERRUPTED_BY_ALARM";
+ case PLAYER_INTERRUPTED_BY_EMERGENCY: /* Deprecated since 3.0 */
+ return "PLAYER_INTERRUPTED_BY_EMERGENCY";
+ case PLAYER_INTERRUPTED_BY_NOTIFICATION: /* Deprecated since 3.0 */
+ return "PLAYER_INTERRUPTED_BY_NOTIFICATION";
+ default:
+ LOGE("Invalid interrupted code %d (Never enter here)", code);
+ return NULL;
+ }
+}
+
static void __interrupt_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
int code;
muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_INTERRUPT;
- if (player_msg_get(code, recvMsg))
+ if (player_msg_get(code, recvMsg)) {
+
+ if (code >= PLAYER_INTERRUPTED_COMPLETED &&
+ code <= PLAYER_INTERRUPTED_BY_NOTIFICATION &&
+ code != PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT) {
+ LOGW("DEPRECATION WARNING: %s is deprecated and will be removed from next release.", _convert_code_to_str(code));
+ }
+
((player_interrupted_cb) cb_info->user_cb[ev]) (code, cb_info->user_data[ev]);
+ }
}
static void __error_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
char *ret_buf = NULL;
LOGD("ENTER");
+ LOGW("DEPRECATION WARNING: player_set_sound_type() is deprecated and will be removed from next release. Use player_set_audio_policy_info() instead.");
player_msg_send1(api, pc, ret_buf, ret, INT, type);
g_free(ret_buf);