summaryrefslogtreecommitdiff
path: root/include/dahdi/kernel.h
diff options
context:
space:
mode:
authorRussell Bryant <russell@digium.com>2008-08-03 15:42:46 +0000
committerRussell Bryant <russell@digium.com>2008-08-03 15:42:46 +0000
commit99bb77154edc3511ce751829fcc948de59793dc4 (patch)
tree295a3ecde4aed3fb7e28470efa4ec8c9f1e85187 /include/dahdi/kernel.h
parent210e1ee25783d7be083220b0690bd37c4a7a99c0 (diff)
Rework the table of signalling bits for signalling types and hook states
in dahdi_rbs_sethook() to a much more readable and less error prone format. In passing, get rid of the dahdi_txsig_t typedef, and fix uses of it throughout the tree. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4679 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'include/dahdi/kernel.h')
-rw-r--r--include/dahdi/kernel.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h
index 1fe579b..911db1f 100644
--- a/include/dahdi/kernel.h
+++ b/include/dahdi/kernel.h
@@ -419,12 +419,14 @@ int dahdi_register_chardev(struct dahdi_chardev *dev);
int dahdi_unregister_chardev(struct dahdi_chardev *dev);
/*! \brief defines for transmit signalling */
-typedef enum {
+enum dahdi_txsig {
DAHDI_TXSIG_ONHOOK, /*!< On hook */
DAHDI_TXSIG_OFFHOOK, /*!< Off hook */
DAHDI_TXSIG_START, /*!< Start / Ring */
- DAHDI_TXSIG_KEWL /*!< Drop battery if possible */
-} dahdi_txsig_t;
+ DAHDI_TXSIG_KEWL, /*!< Drop battery if possible */
+ /*! Leave this as the last entry */
+ DAHDI_TXSIG_TOTAL,
+};
typedef enum {
DAHDI_RXSIG_ONHOOK,
@@ -575,7 +577,7 @@ struct dahdi_span {
generate ring, etc directly) then you can just specify a
sethook function, and we'll call you with appropriate hook states
to set. Still set the DAHDI_FLAG_RBS in this case as well */
- int (*hooksig)(struct dahdi_chan *chan, dahdi_txsig_t hookstate);
+ int (*hooksig)(struct dahdi_chan *chan, enum dahdi_txsig hookstate);
/*! Option 3: If you can't use sig bits, you can write a function
which handles the individual hook states */