[Freeswitch-svn] [commit] r4757 - freeswitch/trunk/src/include
Freeswitch SVN
mikej at freeswitch.org
Fri Mar 23 23:14:24 EDT 2007
Author: mikej
Date: Fri Mar 23 23:14:24 2007
New Revision: 4757
Modified:
freeswitch/trunk/src/include/switch_ivr.h
freeswitch/trunk/src/include/switch_types.h
Log:
add _COUNT memeber at the end of most enum defs (except for those with specific vals like the flags. These should be very handy for bounds checking later on.
Modified: freeswitch/trunk/src/include/switch_ivr.h
==============================================================================
--- freeswitch/trunk/src/include/switch_ivr.h (original)
+++ freeswitch/trunk/src/include/switch_ivr.h Fri Mar 23 23:14:24 2007
@@ -509,6 +509,8 @@
SWITCH_IVR_ACTION_TOMAIN, /* Go back to the top level menu. */
SWITCH_IVR_ACTION_TRANSFER, /* Transfer caller to another ext. */
SWITCH_IVR_ACTION_NOOP, /* No operation */
+
+ SWITCH_IVR_ACTION_COUNT
} switch_ivr_action_t;
struct switch_ivr_menu;
typedef switch_ivr_action_t switch_ivr_menu_action_function_t(struct switch_ivr_menu *, char *, char *, size_t, void *);
Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h (original)
+++ freeswitch/trunk/src/include/switch_types.h Fri Mar 23 23:14:24 2007
@@ -137,7 +137,9 @@
SSM_NA,
SSM_PRONOUNCED,
SSM_ITERATED,
- SSM_COUNTED
+ SSM_COUNTED,
+
+ SSM_COUNT
} switch_say_method_t;
typedef enum {
@@ -159,12 +161,16 @@
SST_ACCOUNT_NUMBER,
SST_NAME_SPELLED,
SST_NAME_PHONETIC,
+
+ SST_COUNT
} switch_say_type_t;
typedef enum {
SMA_NONE,
SMA_GET,
- SMA_SET
+ SMA_SET,
+
+ SMA_COUNT
} switch_management_action_t;
typedef enum {
@@ -186,6 +192,8 @@
SWITCH_ABC_TYPE_WRITE,
SWITCH_ABC_TYPE_WRITE_REPLACE,
SWITCH_ABC_TYPE_CLOSE,
+
+ SWITCH_ABC_TYPE_COUNT
} switch_abc_type_t;
typedef struct {
@@ -241,7 +249,7 @@
SWITCH_AUDIO_COL_STR_SOFTWARE = 0x03,
SWITCH_AUDIO_COL_STR_ARTIST = 0x04,
SWITCH_AUDIO_COL_STR_COMMENT = 0x05,
- SWITCH_AUDIO_COL_STR_DATE = 0x06
+ SWITCH_AUDIO_COL_STR_DATE = 0x06,
} switch_audio_col_t;
typedef enum {
@@ -323,6 +331,8 @@
SWITCH_PRIORITY_NORMAL,
SWITCH_PRIORITY_LOW,
SWITCH_PRIORITY_HIGH,
+
+ SWITCH_PRIORITY_COUNT
} switch_priority_t;
/*!
@@ -369,7 +379,9 @@
SWITCH_MESSAGE_INDICATE_NOMEDIA,
SWITCH_MESSAGE_INDICATE_HOLD,
SWITCH_MESSAGE_INDICATE_UNHOLD,
- SWITCH_MESSAGE_INDICATE_REDIRECT
+ SWITCH_MESSAGE_INDICATE_REDIRECT,
+
+ SWITCH_MESSAGE_INDICATE_COUNT
} switch_core_session_message_types_t;
@@ -424,7 +436,9 @@
SWITCH_STATUS_SOCKERR,
SWITCH_STATUS_MORE_DATA,
SWITCH_STATUS_NOTFOUND,
- SWITCH_STATUS_UNLOAD
+ SWITCH_STATUS_UNLOAD,
+
+ SWITCH_STATUS_COUNT
} switch_status_t;
@@ -469,7 +483,9 @@
typedef enum {
SWITCH_CHANNEL_ID_LOG,
SWITCH_CHANNEL_ID_LOG_CLEAN,
- SWITCH_CHANNEL_ID_EVENT
+ SWITCH_CHANNEL_ID_EVENT,
+
+ SWITCH_CHANNEL_ID_COUNT
} switch_text_channel_t;
typedef enum {
@@ -506,7 +522,9 @@
CS_HOLD,
CS_HIBERNATE,
CS_HANGUP,
- CS_DONE
+ CS_DONE,
+
+ CS_COUNT
} switch_channel_state_t;
@@ -594,7 +612,9 @@
SWITCH_SIG_NONE,
SWITCH_SIG_KILL,
SWITCH_SIG_XFER,
- SWITCH_SIG_BREAK
+ SWITCH_SIG_BREAK,
+
+ SWITCH_SIG_COUNT
} switch_signal_t;
/*!
@@ -690,7 +710,9 @@
SWITCH_CODEC_TYPE_AUDIO,
SWITCH_CODEC_TYPE_VIDEO,
SWITCH_CODEC_TYPE_T38,
- SWITCH_CODEC_TYPE_APP
+ SWITCH_CODEC_TYPE_APP,
+
+ SWITCH_CODEC_TYPE_COUNT
} switch_codec_type_t;
@@ -850,7 +872,9 @@
typedef enum {
SWITCH_INPUT_TYPE_DTMF,
- SWITCH_INPUT_TYPE_EVENT
+ SWITCH_INPUT_TYPE_EVENT,
+
+ SWITCH_INPUT_TYPE_COUNT
} switch_input_type_t;
typedef enum {
@@ -917,7 +941,9 @@
SCSC_PAUSE_INBOUND,
SCSC_HUPALL,
SCSC_SHUTDOWN,
- SCSC_CHECK_RUNNING
+ SCSC_CHECK_RUNNING,
+
+ SCSC_COUNT
} switch_session_ctl_t;
typedef uint16_t switch_port_t;
More information about the Freeswitch-svn
mailing list