Commit 1f73f427 authored by Ludovic Fauvet's avatar Ludovic Fauvet

playback service: option to allow the playback service to exit the main loop after playback

parent 4042b009
......@@ -27,6 +27,7 @@
#include <Elementary.h>
#include <Emotion.h>
#include <notification.h>
#include <app.h>
#include <app_control.h>
#include <device/power.h>
......@@ -72,6 +73,8 @@ struct playback_service
bool b_started;
bool b_seeking;
bool b_auto_exit;
notification_h p_notification;
app_control_h p_app_control;
};
......@@ -541,6 +544,9 @@ playback_service_stop_notify(playback_service *p_ps, bool b_notify)
notification_delete(p_ps->p_notification);
if (p_ps->b_auto_exit)
ui_app_exit();
return 0;
}
......@@ -778,3 +784,9 @@ playback_service_audio_channel_set(playback_service *p_ps, int channel)
{
emotion_object_audio_channel_set(p_ps->p_e, channel);
}
void
playback_service_set_auto_exit(playback_service *p_ps, bool value)
{
p_ps->b_auto_exit = value;
}
......@@ -166,4 +166,7 @@ playback_service_audio_channel_get_list(playback_service *p_ps);
void
playback_service_audio_channel_set(playback_service *p_ps, int channel);
void
playback_service_set_auto_exit(playback_service *p_ps, bool value);
#endif /* PLAYBACK_SERVICE_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment