Commit cfde7105 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Added linphone_core_is_in_background() method

parent 3c5f7194
......@@ -1054,6 +1054,13 @@ LINPHONE_PUBLIC const char *linphone_core_get_version(void);
**/
LINPHONE_PUBLIC const char *linphone_core_get_user_agent(LinphoneCore *core);
/**
* Gets whether the Core is considering itself in background or not.
* The Core foreground/background state depends on the last call made to linphone_core_enter_background() or linphone_core_enter_foreground().
* @return TRUE if the Core is in background, FALSE otherwise.
**/
LINPHONE_PUBLIC bool_t linphone_core_is_in_background(const LinphoneCore *lc);
/**
* @}
**/
......
......@@ -228,3 +228,7 @@ VideoStream * linphone_core_get_preview_stream(LinphoneCore *lc) {
const char *linphone_core_get_groupchat_version(void){
return "1.1"; //FIXME use CorePrivate::groupChatversion
}
bool_t linphone_core_is_in_background(const LinphoneCore *lc) {
return L_GET_CPP_PTR_FROM_C_OBJECT(lc)->isInBackground();
}
......@@ -528,7 +528,7 @@ void Core::enterForeground () {
d->notifyEnteringForeground();
}
bool Core::isInBackground () {
bool Core::isInBackground () const {
L_D();
return d->isInBackground;
}
......
......@@ -103,7 +103,7 @@ public:
void enterBackground ();
void enterForeground ();
bool isInBackground ();
bool isInBackground () const;
// ---------------------------------------------------------------------------
// C-Core.
......
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