mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-07 12:25:31 +00:00
sip: provider: Add API to remove origins
This commit is contained in:
parent
1a4b501653
commit
1749dcec60
4 changed files with 23 additions and 0 deletions
|
@ -1380,6 +1380,7 @@ calls_sip_origin_set_credentials (CallsSipOrigin *self,
|
||||||
const char *password,
|
const char *password,
|
||||||
const char *display_name,
|
const char *display_name,
|
||||||
const char *transport_protocol,
|
const char *transport_protocol,
|
||||||
|
gint port,
|
||||||
gboolean auto_connect)
|
gboolean auto_connect)
|
||||||
{
|
{
|
||||||
g_return_if_fail (CALLS_IS_SIP_ORIGIN (self));
|
g_return_if_fail (CALLS_IS_SIP_ORIGIN (self));
|
||||||
|
@ -1415,6 +1416,8 @@ calls_sip_origin_set_credentials (CallsSipOrigin *self,
|
||||||
else
|
else
|
||||||
self->transport_protocol = g_strdup ("UDP");
|
self->transport_protocol = g_strdup ("UDP");
|
||||||
|
|
||||||
|
self->port = port;
|
||||||
|
|
||||||
/* Propagate changes to nua stack */
|
/* Propagate changes to nua stack */
|
||||||
update_nua (self);
|
update_nua (self);
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@ void calls_sip_origin_set_credentials (CallsSipOrigin *sel
|
||||||
const char *password,
|
const char *password,
|
||||||
const char *display_name,
|
const char *display_name,
|
||||||
const char *transport_protocol,
|
const char *transport_protocol,
|
||||||
|
gint port,
|
||||||
gboolean auto_connect);
|
gboolean auto_connect);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
|
@ -496,6 +496,23 @@ calls_sip_provider_add_origin_full (CallsSipProvider *self,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
calls_sip_provider_remove_origin (CallsSipProvider *self,
|
||||||
|
CallsSipOrigin *origin)
|
||||||
|
{
|
||||||
|
guint position;
|
||||||
|
|
||||||
|
g_return_val_if_fail (CALLS_IS_SIP_PROVIDER (self), FALSE);
|
||||||
|
g_return_val_if_fail (CALLS_IS_SIP_ORIGIN (origin), FALSE);
|
||||||
|
|
||||||
|
if (g_list_store_find (self->origins, origin, &position)) {
|
||||||
|
g_list_store_remove (self->origins, position);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
CallsSipProvider *
|
CallsSipProvider *
|
||||||
calls_sip_provider_new (void)
|
calls_sip_provider_new (void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -54,6 +54,8 @@ CallsSipOrigin *calls_sip_provider_add_origin_full (CallsSipProvider *s
|
||||||
gboolean auto_connect,
|
gboolean auto_connect,
|
||||||
gboolean direct_mode,
|
gboolean direct_mode,
|
||||||
gint local_port);
|
gint local_port);
|
||||||
|
gboolean calls_sip_provider_remove_origin (CallsSipProvider *self,
|
||||||
|
CallsSipOrigin *origin);
|
||||||
void calls_sip_provider_load_accounts (CallsSipProvider *self,
|
void calls_sip_provider_load_accounts (CallsSipProvider *self,
|
||||||
GKeyFile *key_file);
|
GKeyFile *key_file);
|
||||||
void peas_register_types (PeasObjectModule *module);
|
void peas_register_types (PeasObjectModule *module);
|
||||||
|
|
Loading…
Reference in a new issue