From f178b3546b0c8a45a7bb0c702faffff315503eaa Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Sun, 11 Apr 2021 02:28:01 +0200 Subject: [PATCH] sip: provider: document public functions --- plugins/sip/calls-sip-call.c | 39 ++++++++++++++++++++++++++++---- plugins/sip/calls-sip-origin.c | 3 ++- plugins/sip/calls-sip-provider.c | 17 +++++++++++++- 3 files changed, 52 insertions(+), 7 deletions(-) diff --git a/plugins/sip/calls-sip-call.c b/plugins/sip/calls-sip-call.c index e43de2e..af7c99b 100644 --- a/plugins/sip/calls-sip-call.c +++ b/plugins/sip/calls-sip-call.c @@ -314,7 +314,12 @@ calls_sip_call_init (CallsSipCall *self) self->manager = calls_sip_media_manager_default (); } - +/** + * calls_sip_call_setup_local_media_connection: + * @self: A #CallsSipCall + * @port_rtp: The RTP port on the the local host + * @port_rtcp: The RTCP port on the local host + */ void calls_sip_call_setup_local_media_connection (CallsSipCall *self, guint port_rtp, @@ -328,7 +333,13 @@ calls_sip_call_setup_local_media_connection (CallsSipCall *self, try_setting_up_media_pipeline (self); } - +/** + * calls_sip_call_setup_remote_media_connection: + * @self: A #CallsSipCall + * @remote: The remote host + * @port_rtp: The RTP port on the remote host + * @port_rtcp: The RTCP port on the remote host + */ void calls_sip_call_setup_remote_media_connection (CallsSipCall *self, const char *remote, @@ -345,7 +356,13 @@ calls_sip_call_setup_remote_media_connection (CallsSipCall *self, try_setting_up_media_pipeline (self); } - +/** + * calls_sip_call_activate_media: + * @self: A #CallsSipCall + * @enabled: %TRUE to enable the media pipeline, %FALSE to disable + * + * Controls the state of the #CallsSipMediaPipeline + */ void calls_sip_call_activate_media (CallsSipCall *self, gboolean enabled) @@ -385,7 +402,13 @@ calls_sip_call_new (const gchar *number, return call; } - +/** + * calls_sip_call_set_state: + * @self: A #CallsSipCall + * @state: The new #CallsCallState to set + * + * Sets the new call state and emits the state-changed signal + */ void calls_sip_call_set_state (CallsSipCall *self, CallsCallState state) @@ -409,7 +432,13 @@ calls_sip_call_set_state (CallsSipCall *self, old_state); } - +/** + * calls_sip_call_set_codecs: + * @self: A #CallsSipCall + * @codecs: A #GList of #MediaCodecInfo elements + * + * Set the supported codecs. This is used when answering the call + */ void calls_sip_call_set_codecs (CallsSipCall *self, GList *codecs) diff --git a/plugins/sip/calls-sip-origin.c b/plugins/sip/calls-sip-origin.c index c45bf29..4f061dc 100644 --- a/plugins/sip/calls-sip-origin.c +++ b/plugins/sip/calls-sip-origin.c @@ -1173,7 +1173,8 @@ calls_sip_origin_new (const gchar *name, } -/* calls_sip_origin_go_online: +/** + * calls_sip_origin_go_online: * @self: A #CallsSipOrigin * @enabled: %TRUE to go online, %FALSE to go offline */ diff --git a/plugins/sip/calls-sip-provider.c b/plugins/sip/calls-sip-provider.c index f2950ed..a92aa19 100644 --- a/plugins/sip/calls-sip-provider.c +++ b/plugins/sip/calls-sip-provider.c @@ -397,7 +397,22 @@ calls_sip_provider_init (CallsSipProvider *self) NULL); } - +/** + * calls_sip_provider_add_origin: + * @self: A #CallsSipProvider + * @name: The name of the origin + * @user: (nullable): The username to use or %NULL + * @password: (nullable): The password to use or %NULL + * @host: (nullable):The host to use or %NULL + * @port: The port of the host to connect to, usually 5060 + * @local_port: The local port to bind to or 0 + * @protocol: (nullable): The protocol to use. Can be "TCP", "UDP", "TLS" or %NULL + * @direct_connection: %TRUE to use a direct connection to peers, %FALSE otherwise + * @auto_connect: %TRUE to automatically try to register, %FALSE otherwise + * + * Adds a new origin (SIP account). If @direct_connection is set the nullables + * can be set automatically (f.e. use the local user and hostname). + */ void calls_sip_provider_add_origin (CallsSipProvider *self, const gchar *name,