1 /*! 2 * \file forward_declarations.h 3 * \brief Forward Declarations 4 * \author Diederik de Groot <ddegroot [at] users.sourceforge.net> 5 * \note This program is free software and may be modified and distributed under the terms of the GNU Public License. 6 * See the LICENSE file at the top of the source tree. 7 * 8 * $Date$ 9 * $Revision$ 10 */ 11 #pragma once 12 13 __BEGIN_C_EXTERN__ 14 /* global types */ 15 #if defined(HAVE_UNALIGNED_BUSERROR) // for example sparc64 16 typedef unsigned long sccp_group_t; //!< SCCP callgroup / pickupgroup 17 #else 18 typedef ULONG sccp_group_t; //!< SCCP callgroup / pickupgroup 19 #endif 20 21 typedef struct sccp_session sccp_session_t; //!< SCCP Session Structure 22 typedef struct sccp_linedevice sccp_linedevice_t; //!< SCCP Line Connected to Devices 23 typedef struct sccp_device sccp_device_t; //!< SCCP Device Structure 24 typedef struct sccp_line sccp_line_t; //!< SCCP Line Structure 25 typedef struct sccp_channel sccp_channel_t; //!< SCCP Channel Structure 26 typedef struct sccp_speed sccp_speed_t; //!< SCCP Speed Structure 27 typedef struct sccp_service sccp_service_t; //!< SCCP Service Structure 28 typedef struct sccp_addon sccp_addon_t; //!< SCCP Add-On Structure 29 typedef struct sccp_hint sccp_hint_t; //!< SCCP Hint Structure 30 typedef struct sccp_hostname sccp_hostname_t; //!< SCCP HostName Structure 31 typedef struct sccp_rtp sccp_rtp_t; //!< SCCP RTP Structure 32 typedef struct sccp_header sccp_header_t; //!< Skinny Protocol Structure 33 typedef struct sccp_msg sccp_msg_t; //!< Skinny Message Structure 34 35 /* we are promissing not to change the pointer (don't cast away `*const`), when we use the object pointer */ 36 #define sessionPtr sccp_session_t *const 37 #define devicePtr sccp_device_t *const 38 #define linePtr sccp_line_t *const 39 #define channelPtr sccp_channel_t *const 40 #define lineDevicePtr sccp_linedevice_t * const 41 #define conferencePtr sccp_conference_t *const 42 #define rtpPtr sccp_rtp_t * const 43 #define messagePtr sccp_msg_t * const 44 /* we are promissing not to change the object nor the pointer to the object, when we use this object pointer */ 45 #define constSessionPtr const sccp_session_t *const 46 #define constDevicePtr const sccp_device_t *const 47 #define constLinePtr const sccp_line_t *const 48 #define constChannelPtr const sccp_channel_t *const 49 #define constLineDevicePtr const sccp_linedevice_t * const 50 #define constConferencePtr const sccp_conference_t *const 51 #define constRtpPtr const sccp_rtp_t * const 52 #define constMessagePtr const sccp_msg_t * const 53 #ifdef CS_DEVSTATE_FEATURE 54 typedef struct sccp_devstate_specifier sccp_devstate_specifier_t; //!< SCCP Custom DeviceState Specifier Structure 55 #endif 56 typedef struct sccp_feature_configuration sccp_featureConfiguration_t; //!< SCCP Feature Configuration Structure 57 typedef struct sccp_selectedchannel sccp_selectedchannel_t; //!< SCCP Selected Channel Structure 58 typedef struct sccp_ast_channel_name sccp_ast_channel_name_t; //!< SCCP Asterisk Channel Name Structure 59 typedef struct sccp_buttonconfig sccp_buttonconfig_t; //!< SCCP Button Config Structure 60 typedef struct sccp_hotline sccp_hotline_t; //!< SCCP Hotline Structure 61 typedef struct sccp_callinfo sccp_callinfo_t; //!< SCCP Call Information Structure 62 typedef struct sccp_call_statistics sccp_call_statistics_t; //!< SCCP Call Statistic Structure 63 typedef struct softKeySetConfiguration sccp_softKeySetConfiguration_t; //!< SoftKeySet configuration 64 typedef struct sccp_mailbox sccp_mailbox_t; //!< SCCP Mailbox Type Definition 65 typedef struct subscriptionId sccp_subscription_id_t; //!< SCCP SubscriptionId Structure 66 typedef struct sccp_conference sccp_conference_t; //!< SCCP Conference Structure 67 typedef struct sccp_private_channel_data sccp_private_channel_data_t; //!< SCCP Private Channel Data Structure 68 typedef struct sccp_private_device_data sccp_private_device_data_t; //!< SCCP Private Device Data Structure 69 typedef struct sccp_cfwd_information sccp_cfwd_information_t; //!< SCCP CallForward information Structure 70 typedef struct sccp_buttonconfig_list sccp_buttonconfig_list_t; //!< SCCP ButtonConfig List Structure 71 typedef struct sccp_threadpool sccp_threadpool_t; //!< SCCP ThreadPool Structure 72 typedef struct _xmlDoc xmlDoc; 73 typedef struct _xmlNode xmlNode; 74 75 #ifndef SOLARIS 76 # if defined __STDC__ && defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L 77 typedef _Bool boolean_t; 78 # define FALSE false 79 # define TRUE true 80 # else 81 // typedef enum { FALSE = 0, TRUE = 1 } boolean_t; //!< Asterisk Reverses True and False 82 #define TRUE 1 83 #define FALSE 0 84 typedef bool boolean_t; 85 # endif 86 #else 87 # define FALSE B_FALSE 88 # define TRUE B_TRUE 89 #endif 90 91 /* CompileTime Annotations */ 92 #define do_expect(_x) __builtin_expect(_x,1) 93 #define dont_expect(_x) __builtin_expect(_x,0) 94 #if defined(CCC_ANALYZER) 95 #define NONENULL(...) __attribute__((nonnull(__VA_ARGS__))) 96 #else 97 #define NONENULL(...) 98 #endif 99 100 /* callback function types */ 101 typedef void sk_func(sccp_device_t * d, sccp_line_t * l, sccp_channel_t * c); 102 typedef int (*sccp_sched_cb) (const void *data); 103 __END_C_EXTERN__ 104