1 /*!
2  * \file        sccp_indicate.h
3  * \brief       SCCP Indicate Header
4  * \author      Sergio Chersovani <mlists [at] c-net.it>
5  * \note        Reworked, but based on chan_sccp code.
6  *              The original chan_sccp driver that was made by Zozo which itself was derived from the chan_skinny driver.
7  *              Modified by Jan Czmok and Julien Goodwin
8  * \note        This program is free software and may be modified and distributed under the terms of the GNU Public License.
9  *              See the LICENSE file at the top of the source tree.
10  */
11 #pragma once
12 #define SCCP_INDICATE_NOLOCK 	0
13 #define SCCP_INDICATE_LOCK		1
14 
15 SCCP_API void SCCP_CALL __sccp_indicate (constDevicePtr maybe_device, channelPtr c, const sccp_channelstate_t state, boolean_t force, const uint8_t debug, const char * file, const int line, const char * pretty_function);
16 
17 #define SCCP_GROUPED_CHANNELSTATE_IDLE		9
18 #define SCCP_GROUPED_CHANNELSTATE_DIALING	19
19 #define SCCP_GROUPED_CHANNELSTATE_SETUP		29
20 #define SCCP_GROUPED_CHANNELSTATE_CONNECTION  	39
21 #define SCCP_GROUPED_CHANNELSTATE_TERMINATION	49
22 
23 #define SCCP_CHANNELSTATE_Idling(_x) (( _x) <= SCCP_GROUPED_CHANNELSTATE_IDLE)
24 #define SCCP_CHANNELSTATE_IsDialing(_x) (( _x) > SCCP_GROUPED_CHANNELSTATE_IDLE && ( _x) <= SCCP_GROUPED_CHANNELSTATE_DIALING)
25 #define SCCP_CHANNELSTATE_IsSettingUp(_x) (( _x) > SCCP_GROUPED_CHANNELSTATE_DIALING && ( _x) <= SCCP_GROUPED_CHANNELSTATE_SETUP)
26 #define SCCP_CHANNELSTATE_IsConnected(_x) (( _x) > SCCP_GROUPED_CHANNELSTATE_SETUP && ( _x) <= SCCP_GROUPED_CHANNELSTATE_CONNECTION)
27 #define SCCP_CHANNELSTATE_IsTerminating(_x) (( _x) > SCCP_GROUPED_CHANNELSTATE_CONNECTION && ( _x) <= SCCP_GROUPED_CHANNELSTATE_TERMINATION)
28 
29 #ifdef CS_DEBUG_INDICATIONS
30 #	define sccp_indicate(x, y, z)       __sccp_indicate (x, (channelPtr)y, z, FALSE, 1, __FILE__, __LINE__, __PRETTY_FUNCTION__)
31 #	define sccp_indicate_force(x, y, z) __sccp_indicate (x, (channelPtr)y, z, TRUE, 1, __FILE__, __LINE__, __PRETTY_FUNCTION__)
32 #else
33 #	define sccp_indicate(x, y, z)       __sccp_indicate (x, (channelPtr)y, z, FALSE, 0, NULL, 0, NULL)
34 #	define sccp_indicate_force(x, y, z) __sccp_indicate (x, (channelPtr)y, z, TRUE, 0, NULL, 0, NULL)
35 #endif
36 // kate: indent-width 8; replace-tabs off; indent-mode cstyle; auto-insert-doxygen on; line-numbers on; tab-indents on; keep-extra-spaces off; auto-brackets off;
37