Commit 63033bd1 authored by Youness Alaoui's avatar Youness Alaoui

Add an API to enable/disable debug messages for pseudotcp

parent 9b1a9844
This diff is collapsed.
...@@ -98,6 +98,20 @@ struct _PseudoTcpSocket { ...@@ -98,6 +98,20 @@ struct _PseudoTcpSocket {
PseudoTcpSocketPrivate *priv; PseudoTcpSocketPrivate *priv;
}; };
/**
* PseudoTcpDebugLevel:
* @PSEUDO_TCP_DEBUG_NONE: Disable debug messages
* @PSEUDO_TCP_DEBUG_NORMAL: Enable basic debug messages
* @PSEUDO_TCP_DEBUG_VERBOSE: Enable verbose debug messages
*
* Valid values of debug levels to be set.
*/
typedef enum {
PSEUDO_TCP_DEBUG_NONE = 0,
PSEUDO_TCP_DEBUG_NORMAL,
PSEUDO_TCP_DEBUG_VERBOSE,
} PseudoTcpDebugLevel;
/** /**
* PseudoTcpState: * PseudoTcpState:
* @TCP_LISTEN: The socket's initial state. The socket isn't connected and is * @TCP_LISTEN: The socket's initial state. The socket isn't connected and is
...@@ -350,6 +364,15 @@ gboolean pseudo_tcp_socket_notify_packet(PseudoTcpSocket *self, ...@@ -350,6 +364,15 @@ gboolean pseudo_tcp_socket_notify_packet(PseudoTcpSocket *self,
const gchar * buffer, guint32 len); const gchar * buffer, guint32 len);
/**
* pseudo_tcp_set_debug_level:
* @level: The level of debug to set
*
* Sets the debug level to enable/disable normal/verbose debug messages.
*
*/
void pseudo_tcp_set_debug_level (PseudoTcpDebugLevel level);
G_END_DECLS G_END_DECLS
#endif /* _PSEUDOTCP_H */ #endif /* _PSEUDOTCP_H */
......
...@@ -228,6 +228,7 @@ PseudoTcpSocket ...@@ -228,6 +228,7 @@ PseudoTcpSocket
PseudoTcpState PseudoTcpState
PseudoTcpWriteResult PseudoTcpWriteResult
PseudoTcpCallbacks PseudoTcpCallbacks
PseudoTcpDebugLevel
pseudo_tcp_socket_new pseudo_tcp_socket_new
pseudo_tcp_socket_connect pseudo_tcp_socket_connect
pseudo_tcp_socket_recv pseudo_tcp_socket_recv
...@@ -238,4 +239,5 @@ pseudo_tcp_socket_get_next_clock ...@@ -238,4 +239,5 @@ pseudo_tcp_socket_get_next_clock
pseudo_tcp_socket_notify_clock pseudo_tcp_socket_notify_clock
pseudo_tcp_socket_notify_mtu pseudo_tcp_socket_notify_mtu
pseudo_tcp_socket_notify_packet pseudo_tcp_socket_notify_packet
pseudo_tcp_set_debug_level
</SECTION> </SECTION>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment