call: Move state property into base class
This let's us get rid of a lot of duplication in the derived classes. Additionally we set the initial state to CALLS_CALL_STATE_INCOMING if inbound is TRUE and CALLS_CALL_STATE_DIALING otherwise.
This commit is contained in:
@@ -53,7 +53,6 @@ struct _CallsCallClass
|
||||
|
||||
const char *(*get_id) (CallsCall *self);
|
||||
const char *(*get_name) (CallsCall *self);
|
||||
CallsCallState (*get_state) (CallsCall *self);
|
||||
const char *(*get_protocol) (CallsCall *self);
|
||||
void (*answer) (CallsCall *self);
|
||||
void (*hang_up) (CallsCall *self);
|
||||
@@ -61,19 +60,21 @@ struct _CallsCallClass
|
||||
char key);
|
||||
};
|
||||
|
||||
const char *calls_call_get_id (CallsCall *self);
|
||||
const char *calls_call_get_name (CallsCall *self);
|
||||
CallsCallState calls_call_get_state (CallsCall *self);
|
||||
gboolean calls_call_get_inbound (CallsCall *self);
|
||||
const char *calls_call_get_protocol (CallsCall *self);
|
||||
void calls_call_answer (CallsCall *self);
|
||||
void calls_call_hang_up (CallsCall *self);
|
||||
gboolean calls_call_can_dtmf (CallsCall *self);
|
||||
void calls_call_send_dtmf_tone (CallsCall *self,
|
||||
char key);
|
||||
CallsBestMatch *calls_call_get_contact (CallsCall *self);
|
||||
void calls_call_silence_ring (CallsCall *self);
|
||||
gboolean calls_call_get_silenced (CallsCall *self);
|
||||
const char *calls_call_get_id (CallsCall *self);
|
||||
const char *calls_call_get_name (CallsCall *self);
|
||||
CallsCallState calls_call_get_state (CallsCall *self);
|
||||
void calls_call_set_state (CallsCall *self,
|
||||
CallsCallState state);
|
||||
gboolean calls_call_get_inbound (CallsCall *self);
|
||||
const char *calls_call_get_protocol (CallsCall *self);
|
||||
void calls_call_answer (CallsCall *self);
|
||||
void calls_call_hang_up (CallsCall *self);
|
||||
gboolean calls_call_can_dtmf (CallsCall *self);
|
||||
void calls_call_send_dtmf_tone (CallsCall *self,
|
||||
char key);
|
||||
CallsBestMatch *calls_call_get_contact (CallsCall *self);
|
||||
void calls_call_silence_ring (CallsCall *self);
|
||||
gboolean calls_call_get_silenced (CallsCall *self);
|
||||
|
||||
void calls_call_state_to_string (GString *string,
|
||||
CallsCallState state);
|
||||
|
Reference in New Issue
Block a user