add missing getter for volume and mute.
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Tue, 10 Jul 2012 21:32:32 +0000 (18:32 -0300)
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Tue, 10 Jul 2012 22:13:28 +0000 (19:13 -0300)
dialer/ofono.c
dialer/ofono.h

index de8f6bc..c37281e 100644 (file)
@@ -1933,6 +1933,13 @@ OFono_Pending *ofono_mute_set(Eina_Bool mute, OFono_Simple_Cb cb,
                                                &dbus_mute, cb, data);
 }
 
+Eina_Bool ofono_mute_get(void)
+{
+       OFono_Modem *m = _modem_selected_get();
+       EINA_SAFETY_ON_NULL_RETURN_VAL(m, EINA_FALSE);
+       return m->muted;
+}
+
 OFono_Pending *ofono_volume_speaker_set(unsigned char volume,
                                        OFono_Simple_Cb cb,
                                        const void *data)
@@ -1942,6 +1949,13 @@ OFono_Pending *ofono_volume_speaker_set(unsigned char volume,
                                                &volume, cb, data);
 }
 
+unsigned char ofono_volume_speaker_get(void)
+{
+       OFono_Modem *m = _modem_selected_get();
+       EINA_SAFETY_ON_NULL_RETURN_VAL(m, 0);
+       return m->speaker_volume;
+}
+
 OFono_Pending *ofono_volume_microphone_set(unsigned char volume,
                                                OFono_Simple_Cb cb,
                                                const void *data)
@@ -1951,6 +1965,13 @@ OFono_Pending *ofono_volume_microphone_set(unsigned char volume,
                                                data);
 }
 
+unsigned char ofono_volume_microphone_get(void)
+{
+       OFono_Modem *m = _modem_selected_get();
+       EINA_SAFETY_ON_NULL_RETURN_VAL(m, 0);
+       return m->microphone_volume;
+}
+
 OFono_Pending *ofono_tones_send(const char *tones,
                                                OFono_Simple_Cb cb,
                                                const void *data)
index 9b86b4f..db01b44 100644 (file)
@@ -113,11 +113,14 @@ OFono_Pending *ofono_dial(const char *number, const char *hide_callerid,
 /* Call Volume: */
 
 OFono_Pending *ofono_mute_set(Eina_Bool mute, OFono_Simple_Cb cb, const void *data);
+Eina_Bool ofono_mute_get(void);
 
 OFono_Pending *ofono_volume_speaker_set(unsigned char volume, OFono_Simple_Cb cb, const void *data);
+unsigned char ofono_volume_speaker_get(void);
 
 
 OFono_Pending *ofono_volume_microphone_set(unsigned char volume, OFono_Simple_Cb cb, const void *data);
+unsigned char ofono_volume_microphone_get(void);
 
 /* Setup: */
 void ofono_modem_api_require(unsigned int api_mask);