test_proxy.h 2.59 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
/*
 * 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 TEST_PROXY_H
#define TEST_PROXY_H

28 29
#include <sofia-sip/su_wait.h>
#include <sofia-sip/nta.h>
30

31 32
SOFIA_BEGIN_DECLS

33
struct proxy;
34
struct domain;
35

36 37
struct proxy *test_proxy_create(su_root_t *, tag_type_t, tag_value_t, ...);

38 39
void test_proxy_destroy(struct proxy *);

40 41
url_t const *test_proxy_uri(struct proxy const *);

42 43 44
char const *test_proxy_route_uri(struct proxy const *p,
				 sip_route_t const **return_route);

45 46 47
struct domain *test_proxy_add_domain(struct proxy *,
				     url_t const *domain,
				     tag_type_t, tag_value_t, ...);
48

49 50
void test_proxy_set_logging(struct proxy *, int logging);

51
void test_proxy_domain_set_expiration(struct domain *,
52 53
				      sip_time_t min_expires,
				      sip_time_t expires,
54 55 56
				      sip_time_t max_expires);

void test_proxy_domain_get_expiration(struct domain *,
57 58
				      sip_time_t *return_min_expires,
				      sip_time_t *return_expires,
59
				      sip_time_t *return_max_expires);
60

61
void test_proxy_set_session_timer(struct proxy *p,
62
				  sip_time_t session_expires,
63 64 65 66 67 68
				  sip_time_t min_se);

void test_proxy_get_session_timer(struct proxy *p,
				  sip_time_t *return_session_expires,
				  sip_time_t *return_min_se);

69 70 71
int test_proxy_domain_set_authorize(struct domain *, char const *realm);
int test_proxy_domain_get_authorize(struct domain *,
				    char const **return_realm);
72

73 74 75 76 77
void test_proxy_domain_set_outbound(struct domain *d,
				    int use_outbound);
void test_proxy_domain_get_outbound(struct domain *d,
				    int *return_use_outbound);

78 79 80 81 82
void test_proxy_domain_set_record_route(struct domain *d,
					int use_record_route);
void test_proxy_domain_get_record_route(struct domain *d,
					int *return_use_record_route);

83 84
int test_proxy_close_tports(struct proxy *p);

85 86
SOFIA_END_DECLS

87
#endif