Commit 914a3f7f authored by Kai Vehmanen's avatar Kai Vehmanen

Removed unused source and header files.

darcs-hash:20070222151957-7659e-20bfc00e1936bbe1b0afb28700162f4d92bf1c59.gz
parent af24101c
accept Accept
accept_charset Accept-Charset
accept_encoding Accept-Encoding
accept_language Accept-Language
accept_ranges Accept-Ranges
age Age
allow Allow
authorization Authorization
cache_control Cache-Control
connection Connection
content_encoding Content-Encoding
content_language Content-Language
content_length Content-Length
content_location Content-Location
content_md5 Content-MD5
content_range Content-Range
content_type Content-Type
date Date
etag ETag
expect Expect
expires Expires
from From
host Host
if_match If-Match
if_modified_since If-Modified-Since
if_none_match If-None-Match
if_range If-Range
if_unmodified_since If-Unmodified-Since
last_modified Last-Modified
location Location
max_forwards Max-Forwards
mime_version MIME-Version
pragma Pragma
pr_authenticate Proxy-Authenticate
pr_authorization Proxy-Authorization
range Range
referer Referer
retry_after Retry-After
server Server
te TE
trailer Trailer
transfer_encoding Transfer-Encoding
upgrade Upgrade
user_agent User-Agent
vary Vary
via Via
warning Warning
www_authenticate WWW-Authenticate
; Template for http.def
LIBRARY "http"
DESCRIPTION 'HTTP Win32 Dynamic Link Library'
EXPORTS
; Explicit exports can go here
http_default_mclass
sip_#xxxxxx#_class
sip_#xxxxxx#_p
sip_#xxxxxx#_dup
sip_#xxxxxx#_copy
sip_#xxxxxx#_make
This diff is collapsed.
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi@nokia.com>
*
* 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 NTA_COMPAT_H
/** Defined when <nta_compat.h> has been included. */
#define NTA_COMPAT_H;
/**@file nta_compat.h
* @brief Deprecated NTA functions and types.
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*
* @date Created: Tue Sep 4 15:54:57 2001 ppessi
*/
#ifndef NTA_H
#include <sofia-sip/nta.h>
#endif
typedef msg_t nta_msg_t;
sip_param_t nta_agent_set_branch(nta_agent_t *agent, sip_param_t branch);
sip_param_t nta_agent_tag(nta_agent_t const *a);
int nta_agent_set_uas(nta_agent_t *agent, int value);
int nta_agent_set_proxy(nta_agent_t *agent, url_string_t const *u);
int nta_msg_send(nta_agent_t *agent, msg_t *msg,
url_string_t const *route_url,
void *extra, ...);
int nta_msg_reply(nta_agent_t *self,
msg_t *request_msg,
int status, char const *phrase,
void *extra, ...);
nta_leg_t *nta_msg_leg(nta_agent_t *agent,
msg_t *msg,
nta_request_f *req_callback,
nta_leg_magic_t *magic, ...);
nta_leg_t *nta_leg_create(nta_agent_t *agent,
nta_request_f *req_callback,
nta_leg_magic_t *magic,
sip_call_id_t const *i,
sip_from_t const *from,
sip_to_t const *to,
void const *extra, ...);
int nta_leg_branch(nta_leg_t *leg);
int nta_leg_route(nta_leg_t *, sip_record_route_t const *,
sip_contact_t const *, url_string_t const *);
int nta_incoming_reply(nta_incoming_t *irq,
int status, char const *phrase,
void const *extra, ...);
int nta_incoming_forward(nta_incoming_t *ireq,
nta_outgoing_t *request,
sip_t const *sip,
void const *extra, ...);
int nta_incoming_tforward(nta_incoming_t *ireq,
nta_outgoing_t *request,
sip_t const *sip,
tag_type_t tag, tag_value_t value, ...);
nta_outgoing_t *nta_outgoing_create(nta_leg_t *leg,
nta_response_f *callback,
nta_outgoing_magic_t *magic,
url_string_t const *route_url,
sip_method_t method,
char const *method_name,
url_string_t const *req_url,
void const *extra_headers, ...);
/** Create a new outgoing request with old contents, but new url */
nta_outgoing_t *nta_outgoing_fork(nta_outgoing_t *,
nta_response_f *callback,
nta_outgoing_magic_t *magic,
url_string_t const *route_url,
url_string_t const *request_url,
void const *extra, ...);
nta_outgoing_t *nta_outgoing_forward(nta_leg_t *leg,
nta_response_f *callback,
nta_outgoing_magic_t *magic,
url_string_t const *route_url,
url_string_t const *request_url,
nta_incoming_t *ireq,
sip_t const *sip,
void const *extra, ...);
nta_outgoing_t *nta_outgoing_tclone(nta_agent_t *agent,
nta_response_f *callback,
nta_outgoing_magic_t *magic,
url_string_t const *route_url,
msg_t *parent,
tag_type_t tag, tag_value_t value, ...);
nta_outgoing_t *nta_outgoing_tbye(nta_outgoing_t *orq,
nta_response_f *callback,
nta_outgoing_magic_t *magic,
url_string_t const *route_url,
tag_type_t tag, tag_value_t value, ...);
/** Process message statefully using @a leg. */
int nta_leg_stateful(nta_leg_t *leg, msg_t *msg);
typedef nta_ack_cancel_f nta_incoming_f;
#define nta_incoming_request nta_incoming_getrequest
#define nta_outgoing_response nta_outgoing_getresponse
#define nta_get_params nta_agent_get_params
#define nta_set_params nta_agent_set_params
int nta_msg_vsend(nta_agent_t *agent, msg_t *msg, url_string_t const *u,
void *extra, va_list headers);
int nta_msg_vreply(nta_agent_t *self,
msg_t *msg,
int status, char const *phrase,
void *extra, va_list headers);
nta_leg_t *nta_leg_vcreate(nta_agent_t *agent,
nta_request_f *req_callback,
nta_leg_magic_t *magic,
sip_call_id_t const *i,
sip_from_t const *from,
sip_to_t const *to,
void const *extra, va_list header);
int nta_incoming_vreply(nta_incoming_t *irq,
int status, char const *phrase,
void const *extra, va_list header);
int nta_incoming_vforward(nta_incoming_t *ireq,
nta_outgoing_t *request,
sip_t const *sip,
void const *extra, va_list header);
nta_outgoing_t *nta_outgoing_vcreate(nta_leg_t *leg,
nta_response_f *callback,
nta_outgoing_magic_t *magic,
url_string_t const *route_url,
sip_method_t method,
char const *method_name,
url_string_t const *request_uri,
void const *extra,
va_list headers);
nta_outgoing_t *nta_outgoing_vforward(nta_leg_t *leg,
nta_response_f *callback,
nta_outgoing_magic_t *magic,
url_string_t const *route_url,
url_string_t const *request_url,
nta_incoming_t const *ireq,
sip_t const *isip,
void const *extra,
va_list headers);
nta_outgoing_t *nta_outgoing_vfork(nta_outgoing_t *old_orq,
nta_response_f *callback,
nta_outgoing_magic_t *magic,
url_string_t const *route_url,
url_string_t const *request_url,
void const *extra, va_list headers);
enum {
NTA_RETRY_TIMER_INI = NTA_SIP_T1,
NTA_RETRY_TIMER_MAX = NTA_SIP_T2,
NTA_LINGER_TIMER = NTA_SIP_T4,
NTA_RETRY_COUNT = 11,
NTA_INVITE_COUNT = 7,
};
#define NTATAG_RETRY_TIMER_INI NTATAG_SIP_T1
#define NTATAG_RETRY_TIMER_INI_REF NTATAG_SIP_T1_REF
#define NTATAG_RETRY_TIMER_MAX NTATAG_SIP_T2
#define NTATAG_RETRY_TIMER_MAX_REF NTATAG_SIP_T2_REF
#define NTATAG_LINGER_TIMER NTATAG_SIP_T4
#define NTATAG_LINGER_TIMER_REF NTATAG_SIP_T4_REF
#define NTATAG_RETRY_COUNT(x) tag_skip, (tag_value_t)0
#define NTATAG_RETRY_COUNT_REF(x) tag_skip, (tag_value_t)0
#define NTATAG_INVITE_COUNT(x) tag_skip, (tag_value_t)0
#define NTATAG_INVITE_COUNT_REF(x) tag_skip, (tag_value_t)0
#endif /* !defined(NTA_COMPAT_H) */
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi@nokia.com>
*
* 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
*
*/
/**@CFILE soa_asynch.c
*
* @brief Static implementation of Sofia SDP Offer/Answer Engine
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*
* @date Created: Tue Aug 16 17:06:06 EEST 2005
*/
#include "config.h"
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
struct soa_asynch_complete;
#define SU_MSG_ARG_T struct soa_asynch_completed
#include <sofia-sip/su_wait.h>
#include <sofia-sip/su_tag_class.h>
#include <sofia-sip/su_tag_class.h>
#include <sofia-sip/su_tagarg.h>
#include <sofia-sip/su_strlst.h>
#include "sofia-sip/soa.h"
#include <sofia-sip/sdp.h>
#include "sofia-sip/soa_session.h"
#define NONE ((void *)-1)
#define XXX assert(!"implemented")
typedef struct soa_asynch_session
{
soa_session_t sss_session[1];
}
soa_asynch_session_t;
struct soa_asynch_completed
{
soa_session_t *completed_session;
unsigned completed_terminated;
int (*completed_call)(soa_session_t *, soa_callback_f *);
};
static int soa_asynch_init(char const *, soa_session_t *, soa_session_t *);
static void soa_asynch_deinit(soa_session_t *);
static int soa_asynch_set_params(soa_session_t *ss, tagi_t const *tags);
static int soa_asynch_get_params(soa_session_t const *ss, tagi_t *tags);
static tagi_t *soa_asynch_get_paramlist(soa_session_t const *ss);
static int soa_asynch_generate_offer(soa_session_t *ss,
soa_callback_f *completed);
static int soa_asynch_generate_answer(soa_session_t *ss,
soa_callback_f *completed);
static int soa_asynch_process_answer(soa_session_t *ss,
soa_callback_f *completed);
static int soa_asynch_activate(soa_session_t *ss, char const *option);
static int soa_asynch_deactivate(soa_session_t *ss, char const *option);
static void soa_asynch_terminate(soa_session_t *ss, char const *option);
struct soa_session_actions const soa_asynch_actions =
{
(sizeof soa_asynch_actions),
sizeof (struct soa_asynch_session),
soa_asynch_init,
soa_asynch_deinit,
soa_asynch_set_params,
soa_asynch_get_params,
soa_asynch_get_paramlist,
soa_base_media_features,
soa_base_sip_require,
soa_base_sip_supported,
soa_base_remote_sip_features,
soa_base_set_capability_sdp,
soa_base_set_remote_sdp,
soa_base_set_local_sdp,
soa_asynch_generate_offer,
soa_asynch_generate_answer,
soa_asynch_process_answer,
soa_asynch_activate,
soa_asynch_deactivate,
soa_asynch_terminate
};
/* Initialize session */
static int soa_asynch_init(char const *name,
soa_session_t *ss,
soa_session_t *parent)
{
return soa_base_init(name, ss, parent);
}
static void soa_asynch_deinit(soa_session_t *ss)
{
soa_base_deinit(ss);
}
static int soa_asynch_set_params(soa_session_t *ss, tagi_t const *tags)
{
return soa_base_set_params(ss, tags);
}
static int soa_asynch_get_params(soa_session_t const *ss, tagi_t *tags)
{
return soa_base_get_params(ss, tags);
}
static tagi_t *soa_asynch_get_paramlist(soa_session_t const *ss)
{
return soa_base_get_paramlist(ss);
}
static void soa_asynch_completed(su_root_magic_t *magic,
su_msg_r msg,
struct soa_asynch_completed *arg)
{
soa_session_t *ss = arg->completed_session;
if (arg->completed_terminated == ss->ss_terminated) {
if (ss->ss_in_progress) {
soa_callback_f *completed = ss->ss_in_progress;
ss->ss_in_progress = NULL;
/* Update local activity */
if (arg->completed_call(ss, NULL) < 0)
/* XXX - Process error */;
completed(ss->ss_magic, ss);
}
}
soa_session_unref(ss);
}
static int soa_asynch_generate_offer(soa_session_t *ss,
soa_callback_f *completed)
{
sdp_session_t *sdp;
sdp_media_t *m;
uint16_t port = 5004;
su_msg_r msg;
if (ss->ss_user->ssd_sdp == NULL) {
if (ss->ss_caps->ssd_unparsed == NULL)
return soa_set_status(ss, 500, "No local session available");
}
if (ss->ss_user->ssd_sdp)
return 0; /* We are done */
/* Generate a dummy SDP offer based on our capabilities */
if (soa_set_local_sdp(ss, ss->ss_caps->ssd_unparsed, -1) < 0)
return -1;
sdp = ss->ss_user->ssd_sdp; assert(ss->ss_user->ssd_sdp);
for (m = sdp->sdp_media; m; m = m->m_next)
if (m->m_port == 0)
m->m_port = port, port += 2;
/* We pretend to be asynchronous */
if (su_msg_create(msg,
su_root_task(ss->ss_root),
su_root_task(ss->ss_root),
soa_asynch_completed,
sizeof (struct soa_asynch_completed)) == -1)
return soa_set_status(ss, 500, "Internal error");
su_msg_data(msg)->completed_session = soa_session_ref(ss);
su_msg_data(msg)->completed_terminated = ss->ss_terminated;
su_msg_data(msg)->completed_call = soa_base_generate_offer;
su_msg_send(msg);
ss->ss_in_progress = completed;
return 1; /* Indicate caller of async operation */
}
static int soa_asynch_generate_answer(soa_session_t *ss,
soa_callback_f *completed)
{
sdp_session_t *sdp;
sdp_media_t *m;
uint16_t port = 5004;
su_msg_r msg;
if (ss->ss_user->ssd_sdp == NULL) {
if (ss->ss_caps->ssd_unparsed == NULL)
return soa_set_status(ss, 500, "No local session available");
}
if (ss->ss_user->ssd_sdp)
return 0; /* We are done */
/* Generate a dummy SDP offer based on our capabilities */
if (soa_set_local_sdp(ss, ss->ss_caps->ssd_unparsed, -1) < 0)
return -1;
sdp = ss->ss_user->ssd_sdp; assert(ss->ss_user->ssd_sdp);
for (m = sdp->sdp_media; m; m = m->m_next)
if (m->m_port == 0)
m->m_port = port, port += 2;
/* We pretend to be asynchronous */
if (su_msg_create(msg,
su_root_task(ss->ss_root),
su_root_task(ss->ss_root),
soa_asynch_completed,
sizeof (struct soa_asynch_completed)) == -1)
return soa_set_status(ss, 500, "Internal error");
su_msg_data(msg)->completed_session = soa_session_ref(ss);
su_msg_data(msg)->completed_terminated = ss->ss_terminated;
su_msg_data(msg)->completed_call = soa_base_generate_answer;
su_msg_send(msg);
ss->ss_in_progress = completed;
return 1; /* Indicate caller of async operation */
}
static int soa_asynch_process_answer(soa_session_t *ss,
soa_callback_f *completed)
{
su_msg_r msg;
/* We pretend to be asynchronous */
if (su_msg_create(msg,
su_root_task(ss->ss_root),
su_root_task(ss->ss_root),
soa_asynch_completed,
sizeof (struct soa_asynch_completed)) == -1)
return soa_set_status(ss, 500, "Internal error");
su_msg_data(msg)->completed_session = soa_session_ref(ss);
su_msg_data(msg)->completed_terminated = ss->ss_terminated;
su_msg_data(msg)->completed_call = soa_base_process_answer;
su_msg_send(msg);
ss->ss_in_progress = completed;
return 1; /* Indicate caller of async operation */
}
static int soa_asynch_activate(soa_session_t *ss, char const *option)
{
return soa_base_activate(ss, option);
}
static int soa_asynch_deactivate(soa_session_t *ss, char const *option)
{
return soa_base_deactivate(ss, option);
}
static void soa_asynch_terminate(soa_session_t *ss, char const *option)
{
ss->ss_in_progress = NULL;
soa_description_free(ss, ss->ss_user);
soa_base_terminate(ss, option);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment