mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-07 20:35:31 +00:00
sip: provider: return origin in calls_sip_provider_add_origin()
This commit is contained in:
parent
a6cb02a4c9
commit
36cd9bd122
2 changed files with 9 additions and 4 deletions
|
@ -355,8 +355,10 @@ calls_sip_provider_init (CallsSipProvider *self)
|
||||||
* Adds a new origin (SIP account). If @direct_connection is set
|
* Adds a new origin (SIP account). If @direct_connection is set
|
||||||
* some properties of @credentials can be set automatically
|
* some properties of @credentials can be set automatically
|
||||||
* (f.e. use the username and hostname).
|
* (f.e. use the username and hostname).
|
||||||
|
*
|
||||||
|
* Return: (transfer none): A #CallsSipOrigin
|
||||||
*/
|
*/
|
||||||
void
|
CallsSipOrigin *
|
||||||
calls_sip_provider_add_origin (CallsSipProvider *self,
|
calls_sip_provider_add_origin (CallsSipProvider *self,
|
||||||
CallsCredentials *credentials,
|
CallsCredentials *credentials,
|
||||||
gint local_port,
|
gint local_port,
|
||||||
|
@ -364,8 +366,8 @@ calls_sip_provider_add_origin (CallsSipProvider *self,
|
||||||
{
|
{
|
||||||
g_autoptr (CallsSipOrigin) origin = NULL;
|
g_autoptr (CallsSipOrigin) origin = NULL;
|
||||||
|
|
||||||
g_return_if_fail (CALLS_IS_SIP_PROVIDER (self));
|
g_return_val_if_fail (CALLS_IS_SIP_PROVIDER (self), NULL);
|
||||||
g_return_if_fail (CALLS_IS_CREDENTIALS (credentials));
|
g_return_val_if_fail (CALLS_IS_CREDENTIALS (credentials), NULL);
|
||||||
|
|
||||||
origin = calls_sip_origin_new (self->ctx,
|
origin = calls_sip_origin_new (self->ctx,
|
||||||
credentials,
|
credentials,
|
||||||
|
@ -373,6 +375,8 @@ calls_sip_provider_add_origin (CallsSipProvider *self,
|
||||||
direct_connection);
|
direct_connection);
|
||||||
|
|
||||||
g_list_store_append (self->origins, origin);
|
g_list_store_append (self->origins, origin);
|
||||||
|
|
||||||
|
return origin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
#include "calls-credentials.h"
|
#include "calls-credentials.h"
|
||||||
#include "calls-provider.h"
|
#include "calls-provider.h"
|
||||||
|
#include "calls-sip-origin.h"
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
|
||||||
|
@ -36,7 +37,7 @@ G_BEGIN_DECLS
|
||||||
G_DECLARE_FINAL_TYPE (CallsSipProvider, calls_sip_provider, CALLS, SIP_PROVIDER, CallsProvider)
|
G_DECLARE_FINAL_TYPE (CallsSipProvider, calls_sip_provider, CALLS, SIP_PROVIDER, CallsProvider)
|
||||||
|
|
||||||
CallsSipProvider *calls_sip_provider_new ();
|
CallsSipProvider *calls_sip_provider_new ();
|
||||||
void calls_sip_provider_add_origin (CallsSipProvider *self,
|
CallsSipOrigin *calls_sip_provider_add_origin (CallsSipProvider *self,
|
||||||
CallsCredentials *credentials,
|
CallsCredentials *credentials,
|
||||||
gint local_port,
|
gint local_port,
|
||||||
gboolean direct_connection);
|
gboolean direct_connection);
|
||||||
|
|
Loading…
Reference in a new issue