Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages
include / osip2

osip_dialog.h

Go to the documentation of this file.
00001 /*
00002  The oSIP library implements the Session Initiation Protocol (SIP -rfc3261-)
00003  Copyright (C) 2001,2002,2003,2004 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 {
00039 #endif
00040 
00041 
00042 #ifndef DOXYGEN
00043 typedef enum _osip_dialog_type_t
00044 {
00045 CALLER,
00046 CALLEE
00047 }
00048 osip_dialog_type_t;
00049 #endif
00050 
00051 
00056 typedef struct osip_dialog osip_dialog_t;
00057 
00058 
00063 struct osip_dialog
00064 {
00065 char *call_id; 
00066 char *local_tag; 
00067 char *remote_tag; 
00068 osip_list_t *route_set; 
00069 int local_cseq; 
00070 int remote_cseq; 
00071 osip_to_t *remote_uri; 
00072 osip_from_t *local_uri; 
00073 osip_contact_t *remote_contact_uri; 
00074 int secure; 
00076 osip_dialog_type_t type; 
00077 state_t state; 
00078 void *your_instance; 
00079 };
00080 
00086 #define osip_dialog_set_instance(dialog,instance) (dialog)->your_instance = (void*)(instance)
00087 
00093 #define osip_dialog_get_instance(dialog) (dialog)->your_instance
00094 
00106 int osip_dialog_init_as_uac (osip_dialog_t ** dialog,
00107 osip_message_t * response);
00116 int osip_dialog_init_as_uac_with_remote_request (osip_dialog_t ** dialog,
00117 osip_message_t *next_request,
00118 int local_cseq);
00119 
00128 int osip_dialog_init_as_uas (osip_dialog_t ** dialog,
00129 osip_message_t * invite,
00130 osip_message_t * response);
00135 void osip_dialog_free (osip_dialog_t * dialog);
00142 void osip_dialog_set_state (osip_dialog_t * dialog, state_t type);
00153 int osip_dialog_update_route_set_as_uas (osip_dialog_t * dialog,
00154 osip_message_t * invite);
00161 int osip_dialog_update_osip_cseq_as_uas (osip_dialog_t * dialog,
00162 osip_message_t * request);
00163 
00169 int osip_dialog_match_as_uac (osip_dialog_t * dialog,
00170 osip_message_t * response);
00177 int osip_dialog_update_tag_as_uac (osip_dialog_t * dialog,
00178 osip_message_t * response);
00189 int osip_dialog_update_route_set_as_uac (osip_dialog_t * dialog,
00190 osip_message_t * response);
00191 
00197 int osip_dialog_match_as_uas (osip_dialog_t * dialog,
00198 osip_message_t * request);
00199 
00205 int osip_dialog_is_originator (osip_dialog_t * dialog);
00211 int osip_dialog_is_callee (osip_dialog_t * dialog);
00212 
00213 
00214 #ifdef __cplusplus
00215 }
00216 #endif
00217 
00221 #endif

Generated on Tue Feb 22 00:59:46 2005 for libosip by doxygen 1.4.1

AltStyle によって変換されたページ (->オリジナル) /