Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 1 | /* $Id$ */ |
| 2 | /* |
| 3 | * Copyright (C) 2003-2006 Benny Prijono <benny@prijono.org> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 18 | */ |
| 19 | #ifndef __TEST_H__ |
| 20 | #define __TEST_H__ |
| 21 | |
| 22 | #include <pjsip/sip_types.h> |
| 23 | |
| 24 | extern pjsip_endpoint *endpt; |
| 25 | |
Benny Prijono | fa73e3e | 2006-01-05 23:35:46 +0000 | [diff] [blame] | 26 | #define TEST_UDP_PORT 15060 |
| 27 | #define TEST_UDP_PORT_STR "15060" |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 28 | |
Benny Prijono | 0ca04b6 | 2005-12-30 23:50:15 +0000 | [diff] [blame] | 29 | /* The tests */ |
| 30 | int uri_test(void); |
| 31 | int msg_test(void); |
| 32 | int txdata_test(void); |
| 33 | int transport_udp_test(void); |
Benny Prijono | fa73e3e | 2006-01-05 23:35:46 +0000 | [diff] [blame] | 34 | int transport_loop_test(void); |
| 35 | int tsx_uac_test(void); |
Benny Prijono | 0ca04b6 | 2005-12-30 23:50:15 +0000 | [diff] [blame] | 36 | |
| 37 | /* Transport test helpers (transport_test.c). */ |
| 38 | int generic_transport_test(pjsip_transport *tp); |
| 39 | int transport_send_recv_test( pjsip_transport_type_e tp_type, |
| 40 | pjsip_transport *ref_tp, |
Benny Prijono | fa73e3e | 2006-01-05 23:35:46 +0000 | [diff] [blame] | 41 | char *target_url ); |
Benny Prijono | 0ca04b6 | 2005-12-30 23:50:15 +0000 | [diff] [blame] | 42 | int transport_rt_test( pjsip_transport_type_e tp_type, |
| 43 | pjsip_transport *ref_tp, |
Benny Prijono | fa73e3e | 2006-01-05 23:35:46 +0000 | [diff] [blame] | 44 | char *target_url ); |
Benny Prijono | 0ca04b6 | 2005-12-30 23:50:15 +0000 | [diff] [blame] | 45 | |
| 46 | /* Test main entry */ |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 47 | int test_main(void); |
Benny Prijono | 0ca04b6 | 2005-12-30 23:50:15 +0000 | [diff] [blame] | 48 | |
| 49 | /* Test utilities. */ |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 50 | void app_perror(const char *msg, pj_status_t status); |
| 51 | |
| 52 | |
| 53 | #endif /* __TEST_H__ */ |