Loading...
Searching...
No Matches
check_nta.h
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2008 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 CHECK_NTA_H
#define CHECK_NTA_H
#include <s2check.h>
#include <sofia-sip/sip.h>
#include <sofia-sip/tport.h>
#include <sofia-sip/nta.h>
#include <stdarg.h>
#include "s2sip.h"
extern struct s2nta {
su_home_t home[1];
nta_agent_t *nta;
su_root_t *root;
nta_leg_t *default_leg;
struct event {
struct event *next, **prev;
nta_agent_magic_t *amagic;
nta_outgoing_magic_t *omagic;
nta_outgoing_t *orq;
nta_leg_magic_t *lmagic;
nta_leg_t *leg;
nta_incoming_magic_t *imagic;
nta_incoming_t *irq;
sip_method_t method;
char const *method_name;
int status;
char const *phrase;
msg_t *msg;
sip_t *sip;
} *events;
} *s2;
struct event *s2_nta_remove_event(struct event *e);
void s2_nta_free_event(struct event *e);
void s2_nta_flush_events(void);
struct event *s2_nta_next_event(void);
enum wait_for {
wait_for_amagic = 1,
wait_for_omagic,
wait_for_orq,
wait_for_lmagic,
wait_for_leg,
wait_for_imagic,
wait_for_irq,
wait_for_method,
wait_for_method_name,
wait_for_status,
wait_for_phrase
};
struct event *s2_nta_vwait_for(enum wait_for,
void const *value,
va_list va);
struct event *s2_nta_wait_for(enum wait_for,
void const *value,
...);
int s2_nta_check_for(enum wait_for,
void const *value,
...);
int s2_nta_msg_callback(nta_agent_magic_t *magic,
nta_agent_t *nta,
msg_t *msg,
sip_t *sip);
int s2_nta_orq_callback(nta_outgoing_magic_t *magic,
nta_outgoing_t *orq,
sip_t const *sip);
int s2_nta_leg_callback(nta_leg_magic_t *magic,
nta_leg_t *leg,
nta_incoming_t *irq,
sip_t const *sip);
int s2_nta_irq_callback(nta_incoming_magic_t *magic,
nta_incoming_t *irq,
sip_t const *sip);
void s2_nta_setup_logs(int level);
void s2_nta_setup(char const *label,
char const * const *transports,
tag_type_t tag, tag_value_t value, ...);
nta_agent_t *s2_nta_agent_setup(url_string_t const *bind_url,
nta_message_f *callback,
nta_agent_magic_t *magic,
tag_type_t tag, tag_value_t value, ...);
void s2_nta_teardown(void);
TCase *check_nta_api_1_0(void);
TCase *check_nta_client_2_0(void);
TCase *check_nta_client_2_1(void);
TCase *check_nta_client_2_2(void);
TCase *check_nta_server_3_0(void);
#endif
msg_t
struct msg_s msg_t
nta.h
Nokia Transaction API for SIP.
nta_agent_magic_t
NTA_AGENT_MAGIC_T nta_agent_magic_t
Application context for NTA agents.
Definition nta.h:89
nta_incoming_magic_t
NTA_INCOMING_MAGIC_T nta_incoming_magic_t
Application context for incoming NTA requests.
Definition nta.h:95
nta_leg_t
struct nta_leg_s nta_leg_t
NTA call leg.
Definition nta.h:57
nta_incoming_t
struct nta_incoming_s nta_incoming_t
NTA incoming request.
Definition nta.h:61
nta_leg_magic_t
NTA_LEG_MAGIC_T nta_leg_magic_t
Application context for NTA call legs.
Definition nta.h:91
nta_message_f
int nta_message_f(nta_agent_magic_t *context, nta_agent_t *agent, msg_t *msg, sip_t *sip)
Callback for incoming messages.
Definition nta.h:120
nta_agent_t
struct nta_agent_s nta_agent_t
NTA agent.
Definition nta.h:55
nta_outgoing_t
struct nta_outgoing_s nta_outgoing_t
NTA outgoing request.
Definition nta.h:59
nta_outgoing_magic_t
NTA_OUTGOING_MAGIC_T nta_outgoing_magic_t
Application context for outgoing NTA requests.
Definition nta.h:93
sip.h
sip_t
struct sip_s sip_t
sip_method_t
sip_method_t
su_home_t
SU_HOME_T su_home_t
tag_value_t
intptr_t tag_value_t
tag_type_t
struct tag_type_s const * tag_type_t
su_root_t
struct su_root_t su_root_t
tport.h
url_string_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.