mirror of git://git.sysmocom.de/ofono
audio: Update audio settings API for active notification
This commit is contained in:
parent
cea08ad1d8
commit
3fd4af4fc2
|
@ -50,21 +50,21 @@ static void cring_notify(GAtResult *result, gpointer user_data)
|
||||||
{
|
{
|
||||||
struct ofono_audio_settings *as = user_data;
|
struct ofono_audio_settings *as = user_data;
|
||||||
|
|
||||||
ofono_audio_settings_notify(as, TRUE);
|
ofono_audio_settings_active_notify(as, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void orig_notify(GAtResult *result, gpointer user_data)
|
static void orig_notify(GAtResult *result, gpointer user_data)
|
||||||
{
|
{
|
||||||
struct ofono_audio_settings *as = user_data;
|
struct ofono_audio_settings *as = user_data;
|
||||||
|
|
||||||
ofono_audio_settings_notify(as, TRUE);
|
ofono_audio_settings_active_notify(as, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cend_notify(GAtResult *result, gpointer user_data)
|
static void cend_notify(GAtResult *result, gpointer user_data)
|
||||||
{
|
{
|
||||||
struct ofono_audio_settings *as = user_data;
|
struct ofono_audio_settings *as = user_data;
|
||||||
|
|
||||||
ofono_audio_settings_notify(as, FALSE);
|
ofono_audio_settings_active_notify(as, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cvoice_support_cb(gboolean ok, GAtResult *result,
|
static void cvoice_support_cb(gboolean ok, GAtResult *result,
|
||||||
|
|
|
@ -71,7 +71,7 @@ static void xprogress_notify(GAtResult *result, gpointer user_data)
|
||||||
case 9:
|
case 9:
|
||||||
case 10:
|
case 10:
|
||||||
case 11:
|
case 11:
|
||||||
ofono_audio_settings_notify(as, FALSE);
|
ofono_audio_settings_active_notify(as, FALSE);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
case 3:
|
case 3:
|
||||||
|
@ -79,7 +79,7 @@ static void xprogress_notify(GAtResult *result, gpointer user_data)
|
||||||
case 6:
|
case 6:
|
||||||
case 7:
|
case 7:
|
||||||
case 8:
|
case 8:
|
||||||
ofono_audio_settings_notify(as, TRUE);
|
ofono_audio_settings_active_notify(as, TRUE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ struct ofono_audio_settings_driver {
|
||||||
void (*remove)(struct ofono_audio_settings *as);
|
void (*remove)(struct ofono_audio_settings *as);
|
||||||
};
|
};
|
||||||
|
|
||||||
void ofono_audio_settings_notify(struct ofono_audio_settings *as,
|
void ofono_audio_settings_active_notify(struct ofono_audio_settings *as,
|
||||||
ofono_bool_t active);
|
ofono_bool_t active);
|
||||||
|
|
||||||
int ofono_audio_settings_driver_register(const struct ofono_audio_settings_driver *d);
|
int ofono_audio_settings_driver_register(const struct ofono_audio_settings_driver *d);
|
||||||
|
|
|
@ -42,7 +42,7 @@ struct ofono_audio_settings {
|
||||||
struct ofono_atom *atom;
|
struct ofono_atom *atom;
|
||||||
};
|
};
|
||||||
|
|
||||||
void ofono_audio_settings_notify(struct ofono_audio_settings *as,
|
void ofono_audio_settings_active_notify(struct ofono_audio_settings *as,
|
||||||
ofono_bool_t active)
|
ofono_bool_t active)
|
||||||
{
|
{
|
||||||
const char *path = __ofono_atom_get_path(as->atom);
|
const char *path = __ofono_atom_get_path(as->atom);
|
||||||
|
|
Loading…
Reference in New Issue