Also initialize the number of timer retransmissions
[sipe-libnice.git] / agent / debug.h
bloba31d95cbd72122ac10ca4fcdefd2142ef8dc3da6
1 /*
2 * This file is part of the Nice GLib ICE library.
4 * (C) 2008 Collabora Ltd.
5 * Contact: Youness Alaoui
6 * (C) 2008 Nokia Corporation. All rights reserved.
8 * The contents of this file are subject to the Mozilla Public License Version
9 * 1.1 (the "License"); you may not use this file except in compliance with
10 * the License. You may obtain a copy of the License at
11 * http://www.mozilla.org/MPL/
13 * Software distributed under the License is distributed on an "AS IS" basis,
14 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
15 * for the specific language governing rights and limitations under the
16 * License.
18 * The Original Code is the Nice GLib ICE library.
20 * The Initial Developers of the Original Code are Collabora Ltd and Nokia
21 * Corporation. All Rights Reserved.
23 * Contributors:
24 * Youness Alaoui, Collabora Ltd.
26 * Alternatively, the contents of this file may be used under the terms of the
27 * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
28 * case the provisions of LGPL are applicable instead of those above. If you
29 * wish to allow use of your version of this file only under the terms of the
30 * LGPL and not to allow others to use your version of this file under the
31 * MPL, indicate your decision by deleting the provisions above and replace
32 * them with the notice and other provisions required by the LGPL. If you do
33 * not delete the provisions above, a recipient may use your version of this
34 * file under either the MPL or the LGPL.
37 #ifndef _DEBUG_H
38 #define _DEBUG_H
41 /**
42 * SECTION:debug
43 * @short_description: Debug messages utility functions
44 * @stability: Unstable
46 * <para>Libnice can output a lot of information when debug messages are enabled.
47 * This can significantly help track down problems and/or understand what
48 * it's doing.</para>
50 * <para>You can enable/disable the debug messages by calling nice_debug_enable()
51 * or nice_debug_disable() and choosing whether you want only ICE debug messages
52 * or also stun debug messages.</para>
54 * <para>By default, the debug messages are disabled, unless the environment
55 * variable NICE_DEBUG is set, in which case, it must contain a comma separated
56 * list of flags specifying which debug to enable.</para>
57 * <para> The currently available flags are "nice", "stun", "pseudotcp",
58 * "pseudotcp-verbose" or "all" to enable all debug messages.</para>
59 * <para> If the 'pseudotcp' flag is enabled, then 'pseudotcp-verbose' gets
60 * automatically disabled. This is to allow the use of the 'all' flag without
61 * having verbose messages from pseudotcp. You can enable verbose debug messages
62 * from the pseudotcp layer by specifying 'pseudotcp-verbose' without the
63 * 'pseudotcp' flag.</para>
66 * <para>This API is unstable and is subject to change at any time...
67 * More flags are to come and a better API to enable/disable each flag
68 * should be added.</para>
72 #include <glib.h>
74 G_BEGIN_DECLS
76 /**
77 * nice_debug_init:
79 * Initialize the debugging system. Uses the NICE_DEBUG environment variable
80 * to set the appropriate debugging flags
82 void nice_debug_init (void);
84 /**
85 * nice_debug_enable:
86 * @with_stun: Also enable stun debugging messages
88 * Enables libnice debug output to the terminal
90 void nice_debug_enable (gboolean with_stun);
92 /**
93 * nice_debug_disable:
94 * @with_stun: Also disable stun debugging messages
96 * Disables libnice debug output to the terminal
98 void nice_debug_disable (gboolean with_stun);
100 void nice_debug (const char *fmt, ...);
102 G_END_DECLS
104 #endif /* _DEBUG_H */