soa 1.12.11devel
/tmp/buildd/sofia-sip-1.12.11+20110422/libsofia-sip-ua/soa/sofia-sip/soa.h
Go to the documentation of this file.
00001 /*
00002  * This file is part of the Sofia-SIP package
00003  *
00004  * Copyright (C) 2005 Nokia Corporation.
00005  *
00006  * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00021  * 02110-1301 USA
00022  *
00023  */
00024 
00025 #ifndef SOA_H
00026 
00027 #define SOA_H
00028 
00036 #ifndef SU_WAIT_H
00037 #include <sofia-sip/su_wait.h>
00038 #endif
00039 #ifndef SU_TAG_H
00040 #include <sofia-sip/su_tag.h>
00041 #endif
00042 
00043 SOFIA_BEGIN_DECLS
00044 
00045 typedef struct soa_session soa_session_t;
00046 
00047 struct sdp_session_s;
00048 
00049 #ifndef SOA_MAGIC_T
00050 #define SOA_MAGIC_T void
00051 #endif
00052 
00053 typedef SOA_MAGIC_T soa_magic_t;
00054 
00055 typedef int soa_callback_f(soa_magic_t *arg, soa_session_t *session);
00056 
00057 SOFIAPUBFUN soa_session_t *soa_create(char const *name, su_root_t *, soa_magic_t *);
00058 
00059 SOFIAPUBFUN soa_session_t *soa_clone(soa_session_t *, su_root_t *, soa_magic_t *);
00060 
00061 SOFIAPUBFUN void soa_destroy(soa_session_t *);
00062 
00063 SOFIAPUBFUN int soa_set_params(soa_session_t *ss,
00064                                tag_type_t tag, tag_value_t value, ...);
00065 SOFIAPUBFUN int soa_get_params(soa_session_t const *ss,
00066                                tag_type_t tag, tag_value_t value, ...);
00067 
00068 SOFIAPUBFUN tagi_t *soa_get_paramlist(soa_session_t const *ss,
00069                                       tag_type_t tag, tag_value_t value, ...);
00070 
00071 SOFIAPUBFUN int soa_error_as_sip_response(soa_session_t *soa,
00072                                           char const **return_phrase);
00073 
00074 SOFIAPUBFUN char const *soa_error_as_sip_reason(soa_session_t *soa);
00075 
00076 SOFIAPUBFUN int soa_get_warning(soa_session_t *ss, char const **return_phrase);
00077 
00078 SOFIAPUBFUN int soa_set_capability_sdp(soa_session_t *ss,
00079                                        struct sdp_session_s const *sdp,
00080                                        char const *str, issize_t len);
00081 
00082 SOFIAPUBFUN int soa_get_capability_sdp(soa_session_t const *ss,
00083                                        struct sdp_session_s const **return_sdp,
00084                                        char const **return_sdp_str,
00085                                        isize_t *return_len);
00086 
00087 SOFIAPUBFUN int soa_set_remote_sdp(soa_session_t *ss,
00088                                    struct sdp_session_s const *sdp,
00089                                    char const *str, issize_t len);
00090 
00091 SOFIAPUBFUN int soa_get_remote_sdp(soa_session_t const *ss,
00092                                    struct sdp_session_s const **return_sdp,
00093                                    char const **return_sdp_str,
00094                                    isize_t *return_len);
00095 
00096 SOFIAPUBFUN int soa_clear_remote_sdp(soa_session_t *ss);
00097 
00098 SOFIAPUBFUN int soa_get_remote_version(soa_session_t const *ss);
00099 
00100 SOFIAPUBFUN int soa_set_user_sdp(soa_session_t *ss,
00101                                  struct sdp_session_s const *sdp,
00102                                  char const *str, issize_t len);
00103 
00104 SOFIAPUBFUN int soa_get_user_sdp(soa_session_t const *ss,
00105                                  struct sdp_session_s const **return_sdp,
00106                                  char const **return_sdp_str,
00107                                  isize_t *return_len);
00108 
00109 SOFIAPUBFUN int soa_get_user_version(soa_session_t const *ss);
00110 
00111 SOFIAPUBFUN int soa_get_local_sdp(soa_session_t const *ss,
00112                                   struct sdp_session_s const **return_sdp,
00113                                   char const **return_sdp_str,
00114                                   isize_t *return_len);
00115 
00116 SOFIAPUBFUN char const * const * soa_sip_require(soa_session_t const *ss);
00117 SOFIAPUBFUN char const * const * soa_sip_supported(soa_session_t const *ss);
00118 
00119 SOFIAPUBFUN int soa_remote_sip_features(soa_session_t *ss,
00120                                         char const * const * support,
00121                                         char const * const * required);
00122 
00123 SOFIAPUBFUN char **soa_media_features(soa_session_t *ss, int live, su_home_t *home);
00124 
00125 SOFIAPUBFUN int soa_generate_offer(soa_session_t *, int always, soa_callback_f *);
00126 SOFIAPUBFUN int soa_generate_answer(soa_session_t *, soa_callback_f *);
00127 SOFIAPUBFUN int soa_process_answer(soa_session_t *, soa_callback_f *);
00128 SOFIAPUBFUN int soa_process_reject(soa_session_t *, soa_callback_f *);
00129 
00130 SOFIAPUBFUN int soa_activate(soa_session_t *, char const *option);
00131 SOFIAPUBFUN int soa_deactivate(soa_session_t *, char const *option);
00132 
00133 SOFIAPUBFUN void soa_terminate(soa_session_t *, char const *option);
00134 
00135 SOFIAPUBFUN int soa_is_complete(soa_session_t const *ss);
00136 
00137 SOFIAPUBFUN int soa_init_offer_answer(soa_session_t *ss);
00138 
00139 SOFIAPUBFUN int soa_is_audio_active(soa_session_t const *ss);
00140 SOFIAPUBFUN int soa_is_video_active(soa_session_t const *ss);
00141 SOFIAPUBFUN int soa_is_image_active(soa_session_t const *ss);
00142 SOFIAPUBFUN int soa_is_chat_active(soa_session_t const *ss);
00143 
00144 SOFIAPUBFUN int soa_is_remote_audio_active(soa_session_t const *ss);
00145 SOFIAPUBFUN int soa_is_remote_video_active(soa_session_t const *ss);
00146 SOFIAPUBFUN int soa_is_remote_image_active(soa_session_t const *ss);
00147 SOFIAPUBFUN int soa_is_remote_chat_active(soa_session_t const *ss);
00148 
00149 SOFIAPUBFUN int soa_is_delayed_offer(soa_session_t const *ss);
00150 
00151 SOFIAPUBFUN int soa_tag_filter(tagi_t const *f, tagi_t const *t);
00152 
00153 SOFIA_END_DECLS
00154 
00155 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

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