]> sjero.net Git - linphone/blob - coreapi/upnp.c
Start including upnp
[linphone] / coreapi / upnp.c
1 /*
2 linphone
3 Copyright (C) 2012  Belledonne Communications SARL
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (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
20 #include "private.h"
21 #include "mediastreamer2/upnp_igd.h"
22
23 /* Convert uPnP IGD logs to ortp logs */
24 void linphone_upnp_igd_print(void *cookie, upnp_igd_print_level level, const char *fmt, va_list list) {
25         int ortp_level = ORTP_DEBUG;
26         switch(level) {
27         case UPNP_IGD_MESSAGE:
28                 ortp_level = ORTP_MESSAGE;
29                 break;
30         case UPNP_IGD_WARNING:
31                 ortp_level = ORTP_WARNING;
32                 break;
33         case UPNP_IGD_ERROR:
34                 ortp_level = ORTP_ERROR;
35                 break;
36         default:
37                 break;
38         }
39         ortp_logv(level, fmt, list);
40 }
41
42 void linphone_upnp_igd_callback(void *cookie, upnp_igd_event event, void *arg) {
43 }
44
45 int linphone_upnp_init(LinphoneCore *lc) {
46         lc->upnp_igd_ctxt = NULL;
47         return 0;
48 }
49 void linphone_upnp_destroy(LinphoneCore *lc) {
50
51 }