source: mediastreamer2/linphone/coreapi/sipsetup.h @ 222:b0a88ad21aa7

Last change on this file since 222:b0a88ad21aa7 was 222:b0a88ad21aa7, checked in by smorlat <smorlat@…>, 4 years ago

various things in progress.

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@225 3f6dc0c8-ddfe-455d-9043-3cd528dc4637

File size: 2.2 KB
Line 
1/*
2linphone
3Copyright (C) 2000  Simon MORLAT (simon.morlat@linphone.org)
4
5This program is free software; you can redistribute it and/or
6modify it under the terms of the GNU General Public License
7as published by the Free Software Foundation; either version 2
8of the License, or (at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18*/
19
20
21#ifndef sipsetup_h
22#define sipsetup_h
23#include "linphonecore.h"
24
25struct _SipSetup;
26
27struct _SipSetupContext{
28        struct _SipSetup *funcs;
29        char domain[128];
30        char username[128];
31        void *data;
32};
33
34typedef struct _SipSetupContext SipSetupContext;
35
36struct _SipSetup{
37        char *name;
38        bool_t (*init)(void);
39        int (*create_account)( const char *uri, const char *passwd);
40        int (*login_account)(SipSetupContext *ctx, const char *uri, const char *passwd);
41        int (*get_proxy)(SipSetupContext *ctx, const char *domain, char *proxy, size_t sz);
42        int (*get_stun_servers)(SipSetupContext *ctx, char *stun1, char *stun2, size_t size);
43        int (*get_relay)(SipSetupContext *ctx, char *relay, size_t size);
44        void (*exit)(void);
45        bool_t initialized;
46};
47
48typedef struct _SipSetup SipSetup;
49
50void sip_setup_register_all(void);
51SipSetup *sip_setup_lookup(const char *type_name);
52void sip_setup_unregister_all(void);
53
54int sip_setup_new_account(SipSetup *s, const char *uri, const char *passwd);
55SipSetupContext * sip_setup_context_new(SipSetup *s);
56int sip_setup_context_login_account(SipSetupContext * ctx, const char *uri, const char *passwd);
57int sip_setup_context_get_proxy(SipSetupContext *ctx, const char *domain, char *proxy, size_t sz);
58int sip_setup_context_get_stun_servers(SipSetupContext *ctx, char *stun1, char *stun2, size_t size);
59int sip_setup_context_get_relay(SipSetupContext *ctx,char *relay, size_t size);
60void sip_setup_context_free(SipSetupContext *ctx);
61#endif
62
Note: See TracBrowser for help on using the repository browser.