aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authormnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-02 21:30:47 +0000
committermnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-02 21:30:47 +0000
commitcd66a6b62b01e21e05657696c6933e547e40c427 (patch)
treeabd028c1f273884dc2d131e8d27b232558d91afe /include
parentb4edc6badbec25f98b1c3bf282c767a57bda721c (diff)
Add support for reserving a fax session before answering the channel.
Note: this change breaks ABI compatibility. FAX-217 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@297486 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/res_fax.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/include/asterisk/res_fax.h b/include/asterisk/res_fax.h
index a6b3a21c1..70715d58c 100644
--- a/include/asterisk/res_fax.h
+++ b/include/asterisk/res_fax.h
@@ -58,8 +58,10 @@ enum ast_fax_modems {
/*! \brief current state of a fax session */
enum ast_fax_state {
+ /*! reserved state */
+ AST_FAX_STATE_RESERVED = 0,
/*! uninitialized state */
- AST_FAX_STATE_UNINITIALIZED = 0,
+ AST_FAX_STATE_UNINITIALIZED,
/*! initialized state */
AST_FAX_STATE_INITIALIZED,
/*! fax resources open state */
@@ -168,7 +170,8 @@ struct ast_fax_session_details {
struct ast_fax_tech;
struct ast_fax_debug_info;
-
+struct ast_fax_tech_token;
+
/*! \brief The data required to handle a fax session */
struct ast_fax_session {
/*! session id */
@@ -183,6 +186,8 @@ struct ast_fax_session {
unsigned long frames_sent;
/*! the fax technology callbacks */
const struct ast_fax_tech *tech;
+ /*! the token used to reserve this session */
+ struct ast_fax_tech_token *token;
/*! private implementation pointer */
void *tech_pvt;
/*! fax state */
@@ -197,9 +202,11 @@ struct ast_fax_session {
struct ast_fax_debug_info *debug_info;
/*! used to take variable-sized frames in and output frames of an expected size to the fax stack */
struct ast_smoother *smoother;
-};
-struct ast_fax_tech_token;
+ /*! some flags to track the stat counters for this session */
+ unsigned int reserved:1;
+ unsigned int active:1;
+};
/*! \brief used to register a FAX technology module with res_fax */
struct ast_fax_tech {
@@ -242,7 +249,15 @@ struct ast_fax_tech {
/*! displays settings from the fax technology module */
char * (* const cli_show_settings)(int);
};
-
+
+/*! \brief used by res_fax to reserve a FAX session */
+struct ast_fax_tech_token {
+ /*! the fax technology callbacks */
+ const struct ast_fax_tech *tech;
+ /*! private implementation pointer */
+ void *tech_pvt;
+};
+
/*! \brief register a fax technology */
int ast_fax_tech_register(struct ast_fax_tech *tech);