sipstack.h 1.9 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
/*
	belle-sip - SIP (RFC3261) library.
    Copyright (C) 2010  Belledonne Communications SARL

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program 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 General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/


#ifndef belle_sip_stack_h
#define belle_sip_stack_h

23
struct belle_sip_hop{
24 25
	char *host;
	char *transport;
26 27 28 29
	int port;
};

typedef struct belle_sip_hop belle_sip_hop_t;
30

31 32 33 34 35 36 37 38 39
struct belle_sip_timer_config{
	int T1;
	int T2;
	int T3;
	int T4;
};

typedef struct belle_sip_timer_config belle_sip_timer_config_t;

40 41 42 43 44 45
BELLE_SIP_BEGIN_DECLS

belle_sip_stack_t * belle_sip_stack_new(const char *properties);

belle_sip_listening_point_t *belle_sip_stack_create_listening_point(belle_sip_stack_t *s, const char *ipaddress, int port, const char *transport);

46 47
void belle_sip_stack_delete_listening_point(belle_sip_stack_t *s, belle_sip_listening_point_t *lp);

48 49
belle_sip_provider_t *belle_sip_stack_create_provider(belle_sip_stack_t *s, belle_sip_listening_point_t *lp);

50 51
belle_sip_main_loop_t* belle_sip_stack_get_main_loop(belle_sip_stack_t *stack);

52 53 54 55
void belle_sip_stack_main(belle_sip_stack_t *stack);

void belle_sip_stack_sleep(belle_sip_stack_t *stack, unsigned int milliseconds);

56 57
void belle_sip_hop_free(belle_sip_hop_t *hop);

Simon Morlat's avatar
Simon Morlat committed
58 59 60 61 62
/**
 * Can be used to simulate network transmission delays, for tests.
**/
void belle_sip_stack_set_tx_delay(belle_sip_stack_t *stack, int delay_ms);

63 64 65 66
BELLE_SIP_END_DECLS

#endif