mm-iface-mode: provide direction and number when creating calls
Calls created from property bundles are always outgoing, while calls created as input events from URCs during runtime are always incoming. This change makes it mandatory to provide at least direction of the call when the object is created, leaving the number as an optional property that may or may not be known in advance (e.g. it would be optional only for incoming calls).
This commit is contained in:
committed by
Dan Williams
parent
44413308b2
commit
887376fe44
@@ -2987,10 +2987,12 @@ modem_voice_disable_unsolicited_events (MMIfaceModemVoice *self,
|
||||
/* Create call (Voice interface) */
|
||||
|
||||
static MMBaseCall *
|
||||
create_call (MMIfaceModemVoice *self)
|
||||
create_call (MMIfaceModemVoice *self,
|
||||
MMCallDirection direction,
|
||||
const gchar *number)
|
||||
{
|
||||
/* New Huawei Call */
|
||||
return mm_call_huawei_new (MM_BASE_MODEM (self));
|
||||
return mm_call_huawei_new (MM_BASE_MODEM (self), direction, number);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
@@ -201,10 +201,14 @@ cleanup_unsolicited_events (MMBaseCall *self,
|
||||
/*****************************************************************************/
|
||||
|
||||
MMBaseCall *
|
||||
mm_call_huawei_new (MMBaseModem *modem)
|
||||
mm_call_huawei_new (MMBaseModem *modem,
|
||||
MMCallDirection direction,
|
||||
const gchar *number)
|
||||
{
|
||||
return MM_BASE_CALL (g_object_new (MM_TYPE_CALL_HUAWEI,
|
||||
MM_BASE_CALL_MODEM, modem,
|
||||
"direction", direction,
|
||||
"number", number,
|
||||
MM_BASE_CALL_SUPPORTS_DIALING_TO_RINGING, TRUE,
|
||||
MM_BASE_CALL_SUPPORTS_RINGING_TO_ACTIVE, TRUE,
|
||||
NULL));
|
||||
|
||||
@@ -43,6 +43,8 @@ struct _MMCallHuaweiClass {
|
||||
|
||||
GType mm_call_huawei_get_type (void);
|
||||
|
||||
MMBaseCall *mm_call_huawei_new (MMBaseModem *modem);
|
||||
MMBaseCall *mm_call_huawei_new (MMBaseModem *modem,
|
||||
MMCallDirection direction,
|
||||
const gchar *number);
|
||||
|
||||
#endif /* MM_CALL_HUAWEI_H */
|
||||
|
||||
Reference in New Issue
Block a user