Loading...
Searching...
No Matches
soa.h
Go to the documentation of this file.
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef SOA_H
#define SOA_H
#ifndef SU_WAIT_H
#include <sofia-sip/su_wait.h>
#endif
#ifndef SU_TAG_H
#include <sofia-sip/su_tag.h>
#endif
SOFIA_BEGIN_DECLS
typedef struct soa_session soa_session_t;
struct sdp_session_s;
#ifndef SOA_MAGIC_T
#define SOA_MAGIC_T void
#endif
typedef SOA_MAGIC_T soa_magic_t;
typedef int soa_callback_f(soa_magic_t *arg, soa_session_t *session);
SOFIAPUBFUN soa_session_t *soa_create(char const *name, su_root_t *, soa_magic_t *);
SOFIAPUBFUN soa_session_t *soa_clone(soa_session_t *, su_root_t *, soa_magic_t *);
SOFIAPUBFUN void soa_destroy(soa_session_t *);
SOFIAPUBFUN int soa_set_params(soa_session_t *ss,
tag_type_t tag, tag_value_t value, ...);
SOFIAPUBFUN int soa_get_params(soa_session_t const *ss,
tag_type_t tag, tag_value_t value, ...);
SOFIAPUBFUN tagi_t *soa_get_paramlist(soa_session_t const *ss,
tag_type_t tag, tag_value_t value, ...);
SOFIAPUBFUN int soa_error_as_sip_response(soa_session_t *soa,
char const **return_phrase);
SOFIAPUBFUN char const *soa_error_as_sip_reason(soa_session_t *soa);
SOFIAPUBFUN int soa_get_warning(soa_session_t *ss, char const **return_phrase);
SOFIAPUBFUN int soa_set_capability_sdp(soa_session_t *ss,
struct sdp_session_s const *sdp,
char const *str, issize_t len);
SOFIAPUBFUN int soa_get_capability_sdp(soa_session_t const *ss,
struct sdp_session_s const **return_sdp,
char const **return_sdp_str,
isize_t *return_len);
SOFIAPUBFUN int soa_set_remote_sdp(soa_session_t *ss,
struct sdp_session_s const *sdp,
char const *str, issize_t len);
SOFIAPUBFUN int soa_get_remote_sdp(soa_session_t const *ss,
struct sdp_session_s const **return_sdp,
char const **return_sdp_str,
isize_t *return_len);
SOFIAPUBFUN int soa_clear_remote_sdp(soa_session_t *ss);
SOFIAPUBFUN int soa_get_remote_version(soa_session_t const *ss);
SOFIAPUBFUN int soa_set_user_sdp(soa_session_t *ss,
struct sdp_session_s const *sdp,
char const *str, issize_t len);
SOFIAPUBFUN int soa_get_user_sdp(soa_session_t const *ss,
struct sdp_session_s const **return_sdp,
char const **return_sdp_str,
isize_t *return_len);
SOFIAPUBFUN int soa_get_user_version(soa_session_t const *ss);
SOFIAPUBFUN int soa_get_local_sdp(soa_session_t const *ss,
struct sdp_session_s const **return_sdp,
char const **return_sdp_str,
isize_t *return_len);
SOFIAPUBFUN char const * const * soa_sip_require(soa_session_t const *ss);
SOFIAPUBFUN char const * const * soa_sip_supported(soa_session_t const *ss);
SOFIAPUBFUN int soa_remote_sip_features(soa_session_t *ss,
char const * const * support,
char const * const * required);
SOFIAPUBFUN char **soa_media_features(soa_session_t *ss, int live, su_home_t *home);
SOFIAPUBFUN int soa_generate_offer(soa_session_t *, int always, soa_callback_f *);
SOFIAPUBFUN int soa_generate_answer(soa_session_t *, soa_callback_f *);
SOFIAPUBFUN int soa_process_answer(soa_session_t *, soa_callback_f *);
SOFIAPUBFUN int soa_process_reject(soa_session_t *, soa_callback_f *);
SOFIAPUBFUN int soa_activate(soa_session_t *, char const *option);
SOFIAPUBFUN int soa_deactivate(soa_session_t *, char const *option);
SOFIAPUBFUN void soa_terminate(soa_session_t *, char const *option);
SOFIAPUBFUN int soa_is_complete(soa_session_t const *ss);
SOFIAPUBFUN int soa_init_offer_answer(soa_session_t *ss);
SOFIAPUBFUN int soa_is_audio_active(soa_session_t const *ss);
SOFIAPUBFUN int soa_is_video_active(soa_session_t const *ss);
SOFIAPUBFUN int soa_is_image_active(soa_session_t const *ss);
SOFIAPUBFUN int soa_is_chat_active(soa_session_t const *ss);
SOFIAPUBFUN int soa_is_remote_audio_active(soa_session_t const *ss);
SOFIAPUBFUN int soa_is_remote_video_active(soa_session_t const *ss);
SOFIAPUBFUN int soa_is_remote_image_active(soa_session_t const *ss);
SOFIAPUBFUN int soa_is_remote_chat_active(soa_session_t const *ss);
SOFIAPUBFUN int soa_is_delayed_offer(soa_session_t const *ss);
SOFIAPUBFUN int soa_tag_filter(tagi_t const *f, tagi_t const *t);
SOFIA_END_DECLS
#endif
soa_get_paramlist
tagi_t * soa_get_paramlist(soa_session_t const *ss, tag_type_t tag, tag_value_t value,...)
Return a list of parameters.
Definition soa.c:713
soa_media_features
char ** soa_media_features(soa_session_t *ss, int live, su_home_t *home)
Return list of media fetures.
Definition soa.c:1345
soa_generate_offer
int soa_generate_offer(soa_session_t *, int always, soa_callback_f *)
Generate offer.
Definition soa.c:1445
soa_get_params
int soa_get_params(soa_session_t const *ss, tag_type_t tag, tag_value_t value,...)
Get tagged parameters.
Definition soa.c:625
soa_is_remote_image_active
int soa_is_remote_image_active(soa_session_t const *ss)
Return true if image sharing is active (not on hold).
Definition soa.c:1890
soa_get_local_sdp
int soa_get_local_sdp(soa_session_t const *ss, struct sdp_session_s const **return_sdp, char const **return_sdp_str, isize_t *return_len)
Get local SDP.
Definition soa.c:1284
soa_set_remote_sdp
int soa_set_remote_sdp(soa_session_t *ss, struct sdp_session_s const *sdp, char const *str, issize_t len)
Set remote SDP (offer or answer).
Definition soa.c:1190
soa_get_user_version
int soa_get_user_version(soa_session_t const *ss)
Returns the version number of user session description.
Definition soa.c:1036
soa_terminate
void soa_terminate(soa_session_t *, char const *option)
Terminate session.
Definition soa.c:1805
soa_is_complete
int soa_is_complete(soa_session_t const *ss)
Return true if the SDP Offer/Answer negotation is complete.
Definition soa.c:1836
soa_get_warning
int soa_get_warning(soa_session_t *ss, char const **return_phrase)
Return SIP Warning code and text.
Definition soa.c:830
soa_is_remote_video_active
int soa_is_remote_video_active(soa_session_t const *ss)
Return true if remote video is active (not on hold).
Definition soa.c:1882
soa_set_user_sdp
int soa_set_user_sdp(soa_session_t *ss, struct sdp_session_s const *sdp, char const *str, issize_t len)
Store user SDP to soa session.
Definition soa.c:1071
soa_activate
int soa_activate(soa_session_t *, char const *option)
Activate session.
Definition soa.c:1751
soa_is_remote_chat_active
int soa_is_remote_chat_active(soa_session_t const *ss)
Return true if chat session is active (not on hold).
Definition soa.c:1898
soa_tag_filter
int soa_tag_filter(tagi_t const *f, tagi_t const *t)
Filter soa tags.
Definition soa_tag.c:54
soa_is_delayed_offer
int soa_is_delayed_offer(soa_session_t const *ss)
Return true if delayed offer has been activated.
Definition soa.c:1906
soa_process_answer
int soa_process_answer(soa_session_t *, soa_callback_f *)
Complete offer-answer after receiving answer.
Definition soa.c:1615
soa_get_user_sdp
int soa_get_user_sdp(soa_session_t const *ss, struct sdp_session_s const **return_sdp, char const **return_sdp_str, isize_t *return_len)
Return user SDP description.
Definition soa.c:995
soa_session_t
struct soa_session soa_session_t
"soa" session object.
Definition soa.h:45
soa_set_params
int soa_set_params(soa_session_t *ss, tag_type_t tag, tag_value_t value,...)
Set parameters.
Definition soa.c:397
soa_set_capability_sdp
int soa_set_capability_sdp(soa_session_t *ss, struct sdp_session_s const *sdp, char const *str, issize_t len)
Set capability SDP.
Definition soa.c:909
soa_error_as_sip_response
int soa_error_as_sip_response(soa_session_t *soa, char const **return_phrase)
Convert soa error to a SIP response code and phrase.
Definition soa.c:788
soa_process_reject
int soa_process_reject(soa_session_t *, soa_callback_f *)
Process rejection of offer.
Definition soa.c:1696
soa_is_chat_active
int soa_is_chat_active(soa_session_t const *ss)
Return true if messaging session has been activated.
Definition soa.c:1866
soa_deactivate
int soa_deactivate(soa_session_t *, char const *option)
Deactivate session.
Definition soa.c:1782
soa_is_remote_audio_active
int soa_is_remote_audio_active(soa_session_t const *ss)
Return true if remote audio is active (not on hold).
Definition soa.c:1874
soa_clear_remote_sdp
int soa_clear_remote_sdp(soa_session_t *ss)
Clear remote SDP.
Definition soa.c:1235
soa_is_video_active
int soa_is_video_active(soa_session_t const *ss)
Return true if video has been activated.
Definition soa.c:1850
soa_generate_answer
int soa_generate_answer(soa_session_t *, soa_callback_f *)
Process offer, generate answer.
Definition soa.c:1535
soa_get_capability_sdp
int soa_get_capability_sdp(soa_session_t const *ss, struct sdp_session_s const **return_sdp, char const **return_sdp_str, isize_t *return_len)
Return SDP description of capabilities.
Definition soa.c:859
soa_create
soa_session_t * soa_create(char const *name, su_root_t *, soa_magic_t *)
Create a soa session.
Definition soa.c:218
soa_error_as_sip_reason
char const * soa_error_as_sip_reason(soa_session_t *soa)
Convert soa error to a SIP Reason header.
Definition soa.c:806
soa_init_offer_answer
int soa_init_offer_answer(soa_session_t *ss)
Initialize the offer/answer state machine.
Definition soa.c:1321
soa_get_remote_version
int soa_get_remote_version(soa_session_t const *ss)
Returns the version number of remote session description.
Definition soa.c:1153
soa_is_audio_active
int soa_is_audio_active(soa_session_t const *ss)
Return true if audio has been activated.
Definition soa.c:1842
soa_clone
soa_session_t * soa_clone(soa_session_t *, su_root_t *, soa_magic_t *)
Create a copy of a soa session object.
Definition soa.c:270
soa_destroy
void soa_destroy(soa_session_t *)
Destroy a session.
Definition soa.c:352
soa_get_remote_sdp
int soa_get_remote_sdp(soa_session_t const *ss, struct sdp_session_s const **return_sdp, char const **return_sdp_str, isize_t *return_len)
Return remote SDP description of the session.
Definition soa.c:1112
soa_is_image_active
int soa_is_image_active(soa_session_t const *ss)
Return true if image sharing has been activated.
Definition soa.c:1858
sdp_session_s
tagi_t
su_home_t
SU_HOME_T su_home_t
SOFIAPUBFUN
#define SOFIAPUBFUN
su_tag.h
tag_value_t
intptr_t tag_value_t
tag_type_t
struct tag_type_s const * tag_type_t
su_wait.h
su_root_t
struct su_root_t su_root_t

Sofia-SIP 1.12.11devel - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.