aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/res_fax.h
diff options
context:
space:
mode:
authormnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-03 15:32:22 +0000
committermnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-03 15:32:22 +0000
commit74a4a31f8601dbf106e5b4deb871ddd360be0308 (patch)
tree84166d7be38ba21e1318741d07c65a4b100b1a31 /include/asterisk/res_fax.h
parent184c5bf3a8831f3a1a298861a35095416aea15bf (diff)
Merged revisions 297157,297486,297495 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r297157 | mnicholson | 2010-12-01 13:47:33 -0600 (Wed, 01 Dec 2010) | 2 lines Changed some NOTICE and WARNING messages to DEBUG messages. ........ r297486 | mnicholson | 2010-12-02 15:30:47 -0600 (Thu, 02 Dec 2010) | 6 lines Add support for reserving a fax session before answering the channel. Note: this change breaks ABI compatibility. FAX-217 ........ r297495 | mnicholson | 2010-12-03 09:21:52 -0600 (Fri, 03 Dec 2010) | 4 lines Print a DEBUG message instead of a WARNING message when the selected fax tech does not support reserving sessions. Answer the channel before quering it for t.38 support. This is necessary for the query to work properly over local channels. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@297496 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/res_fax.h')
-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);