|
libosip 3.6.0
|
00001 /* 00002 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261-) 00003 Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Aymeric MOIZARD jack@atosc.org 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with this library; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 */ 00019 00020 #ifndef _DIALOG_H_ 00021 #define _DIALOG_H_ 00022 00023 #include <osip2/osip.h> 00024 00036 #ifdef __cplusplus 00037 extern "C" { 00038 #endif 00039 00040 00041 #ifndef DOXYGEN 00042 typedef enum _osip_dialog_type_t { 00043 CALLER, 00044 CALLEE 00045 } osip_dialog_type_t; 00046 #endif 00047 00048 00053 typedef struct osip_dialog osip_dialog_t; 00054 00055 00060 struct osip_dialog { 00061 char *call_id; 00062 char *local_tag; 00063 char *remote_tag; 00064 char *line_param; 00065 osip_list_t route_set; 00066 int local_cseq; 00067 int remote_cseq; 00068 osip_to_t *remote_uri; 00069 osip_from_t *local_uri; 00070 osip_contact_t *remote_contact_uri; 00072 int secure; 00074 osip_dialog_type_t type; 00075 state_t state; 00076 void *your_instance; 00077 }; 00078 00084 #define osip_dialog_set_instance(dialog,instance) (dialog)->your_instance = (void*)(instance) 00085 00091 #define osip_dialog_get_instance(dialog) (dialog)->your_instance 00092 00104 int osip_dialog_init_as_uac(osip_dialog_t ** dialog, 00105 osip_message_t * response); 00114 int osip_dialog_init_as_uac_with_remote_request(osip_dialog_t ** dialog, 00115 osip_message_t * 00116 next_request, int local_cseq); 00117 00126 int osip_dialog_init_as_uas(osip_dialog_t ** dialog, 00127 osip_message_t * invite, 00128 osip_message_t * response); 00133 void osip_dialog_free(osip_dialog_t * dialog); 00140 void osip_dialog_set_state(osip_dialog_t * dialog, state_t type); 00151 int osip_dialog_update_route_set_as_uas(osip_dialog_t * dialog, 00152 osip_message_t * invite); 00159 int osip_dialog_update_osip_cseq_as_uas(osip_dialog_t * dialog, 00160 osip_message_t * request); 00161 00167 int osip_dialog_match_as_uac(osip_dialog_t * dialog, 00168 osip_message_t * response); 00175 int osip_dialog_update_tag_as_uac(osip_dialog_t * dialog, 00176 osip_message_t * response); 00187 int osip_dialog_update_route_set_as_uac(osip_dialog_t * dialog, 00188 osip_message_t * response); 00189 00195 int osip_dialog_match_as_uas(osip_dialog_t * dialog, osip_message_t * request); 00196 00202 int osip_dialog_is_originator(osip_dialog_t * dialog); 00208 int osip_dialog_is_callee(osip_dialog_t * dialog); 00209 00210 00211 #ifdef __cplusplus 00212 } 00213 #endif 00214 00215 #endif
1.7.3