2003-02-19 08:19:51 +00:00
|
|
|
/** @file faxsend.h
|
|
|
|
@brief Contains FaxSend - Call Module for sending an analog fax (group 3)
|
|
|
|
|
|
|
|
@author Gernot Hillier <gernot@hillier.de>
|
2004-02-08 Gernot Hillier <gernot@hillier.de>
* src/application/capisuitemodule.cpp (capisuite_audio_send,
capisuite_fax_send): catch some missing Exceptions
* src/backend/connection.{cpp,h} (connectWaiting,rejectWaiting): throw
CapiExternalError instead of CapiError when user passed a wrong call
* src/backend/connection.{cpp,h} (connectWaiting,connect_b3_active_ind,
disconnect_b3_ind,disconnect_ind,data_b3_ind,facility_ind_DTMF,
info_ind_alerting,info_ind_called_party_nr,select_b_protocol_conf,
alert_conf,data_b3_conf,facility_conf_DTMF,disconnect_b3_conf,
disconnect_conf,send_block,start_file_transmission): add CapiError to
allowed throwable objects in declaration
* src/modules/audiosend.{cpp,h} (mainLoop): Likewise.
* src/modules/callmodule.{cpp,h} (mainLoop): Likewise.
* src/modules/faxsend.{cpp,h} (mainLoop): Likewise.
git-svn-id: https://svn.ibp.de/svn/capisuite/trunk/capisuite@225 4ebea2bb-67d4-0310-8558-a5799e421b66
2004-02-08 21:06:08 +00:00
|
|
|
$Revision: 1.4 $
|
2003-02-19 08:19:51 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/***************************************************************************
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#ifndef FAXSEND_H
|
|
|
|
#define FAXSEND_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include "callmodule.h"
|
|
|
|
|
|
|
|
class Connection;
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
/** @brief Call Module for sending an analog fax (group 3).
|
|
|
|
|
2003-12-28 15:00:35 +00:00
|
|
|
This module handles the send of an analog fax (fax group 3). It starts the
|
|
|
|
send and waits for the end of the connection.
|
|
|
|
|
2003-02-19 08:19:51 +00:00
|
|
|
Fax polling isn't supported yet.
|
|
|
|
|
2003-12-28 15:00:35 +00:00
|
|
|
Fax mode must have been established before using this (by connecting in fax
|
|
|
|
mode or switching to fax with Switch2FaxG3), otherwise an exception is
|
|
|
|
caused.
|
|
|
|
|
|
|
|
CapiWrongState will only be thrown if connection is not up at startup,
|
|
|
|
not later on. We see a later disconnect as normal event, no error.
|
|
|
|
|
|
|
|
The given file must be in the format used by Capi, i.e. Structured Fax File
|
|
|
|
(SFF).
|
2003-02-19 08:19:51 +00:00
|
|
|
|
|
|
|
@author Gernot Hillier
|
|
|
|
*/
|
|
|
|
class FaxSend: public CallModule
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** @brief Constructor. Test if we are in fax mode and create an object.
|
|
|
|
|
|
|
|
@param conn reference to Connection object
|
|
|
|
@param file name of file to send
|
|
|
|
@throw CapiExternalError Thrown if we are not in fax mode.
|
2003-12-28 15:00:35 +00:00
|
|
|
@throw CapiWrongState Thrown if connection not up (thrown by base class)
|
2003-02-19 08:19:51 +00:00
|
|
|
*/
|
2003-12-28 15:00:35 +00:00
|
|
|
FaxSend(Connection *conn, string file) throw (CapiWrongState,CapiExternalError);
|
2003-02-19 08:19:51 +00:00
|
|
|
|
|
|
|
/** @brief Start file send, wait for disconnect and stop the send afterwards
|
2004-02-08 Gernot Hillier <gernot@hillier.de>
* src/application/capisuitemodule.cpp (capisuite_audio_send,
capisuite_fax_send): catch some missing Exceptions
* src/backend/connection.{cpp,h} (connectWaiting,rejectWaiting): throw
CapiExternalError instead of CapiError when user passed a wrong call
* src/backend/connection.{cpp,h} (connectWaiting,connect_b3_active_ind,
disconnect_b3_ind,disconnect_ind,data_b3_ind,facility_ind_DTMF,
info_ind_alerting,info_ind_called_party_nr,select_b_protocol_conf,
alert_conf,data_b3_conf,facility_conf_DTMF,disconnect_b3_conf,
disconnect_conf,send_block,start_file_transmission): add CapiError to
allowed throwable objects in declaration
* src/modules/audiosend.{cpp,h} (mainLoop): Likewise.
* src/modules/callmodule.{cpp,h} (mainLoop): Likewise.
* src/modules/faxsend.{cpp,h} (mainLoop): Likewise.
git-svn-id: https://svn.ibp.de/svn/capisuite/trunk/capisuite@225 4ebea2bb-67d4-0310-8558-a5799e421b66
2004-02-08 21:06:08 +00:00
|
|
|
|
2003-02-19 08:19:51 +00:00
|
|
|
@throw CapiExternalError Thrown by Connection::start_file_transmission. See there for explanation.
|
|
|
|
@throw CapiMsgError Thrown by Connection::start_file_transmission. See there for explanation.
|
2004-02-08 Gernot Hillier <gernot@hillier.de>
* src/application/capisuitemodule.cpp (capisuite_audio_send,
capisuite_fax_send): catch some missing Exceptions
* src/backend/connection.{cpp,h} (connectWaiting,rejectWaiting): throw
CapiExternalError instead of CapiError when user passed a wrong call
* src/backend/connection.{cpp,h} (connectWaiting,connect_b3_active_ind,
disconnect_b3_ind,disconnect_ind,data_b3_ind,facility_ind_DTMF,
info_ind_alerting,info_ind_called_party_nr,select_b_protocol_conf,
alert_conf,data_b3_conf,facility_conf_DTMF,disconnect_b3_conf,
disconnect_conf,send_block,start_file_transmission): add CapiError to
allowed throwable objects in declaration
* src/modules/audiosend.{cpp,h} (mainLoop): Likewise.
* src/modules/callmodule.{cpp,h} (mainLoop): Likewise.
* src/modules/faxsend.{cpp,h} (mainLoop): Likewise.
git-svn-id: https://svn.ibp.de/svn/capisuite/trunk/capisuite@225 4ebea2bb-67d4-0310-8558-a5799e421b66
2004-02-08 21:06:08 +00:00
|
|
|
@throw CapiError Thrown by Connection::start_file_transmission. See there for explanation.
|
2003-12-28 15:00:35 +00:00
|
|
|
@throw CapiWrongState Thrown if connection is not up at start of transfer (thrown by Connection::start_file_transmission)
|
2003-02-19 08:19:51 +00:00
|
|
|
*/
|
2004-02-08 Gernot Hillier <gernot@hillier.de>
* src/application/capisuitemodule.cpp (capisuite_audio_send,
capisuite_fax_send): catch some missing Exceptions
* src/backend/connection.{cpp,h} (connectWaiting,rejectWaiting): throw
CapiExternalError instead of CapiError when user passed a wrong call
* src/backend/connection.{cpp,h} (connectWaiting,connect_b3_active_ind,
disconnect_b3_ind,disconnect_ind,data_b3_ind,facility_ind_DTMF,
info_ind_alerting,info_ind_called_party_nr,select_b_protocol_conf,
alert_conf,data_b3_conf,facility_conf_DTMF,disconnect_b3_conf,
disconnect_conf,send_block,start_file_transmission): add CapiError to
allowed throwable objects in declaration
* src/modules/audiosend.{cpp,h} (mainLoop): Likewise.
* src/modules/callmodule.{cpp,h} (mainLoop): Likewise.
* src/modules/faxsend.{cpp,h} (mainLoop): Likewise.
git-svn-id: https://svn.ibp.de/svn/capisuite/trunk/capisuite@225 4ebea2bb-67d4-0310-8558-a5799e421b66
2004-02-08 21:06:08 +00:00
|
|
|
void mainLoop() throw (CapiError,CapiWrongState,CapiExternalError, CapiMsgError);
|
2003-02-19 08:19:51 +00:00
|
|
|
|
|
|
|
/** @brief finish main loop if file is completely sent
|
|
|
|
*/
|
|
|
|
void transmissionComplete();
|
|
|
|
|
|
|
|
private:
|
|
|
|
string file; ///< file name to send
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* History
|
|
|
|
|
2003-12-28 21:01:04 +00:00
|
|
|
Old Log (for new changes see ChangeLog):
|
2003-12-28 15:00:35 +00:00
|
|
|
|
|
|
|
Revision 1.1.1.1 2003/02/19 08:19:53 gernot
|
|
|
|
initial checkin of 0.4
|
2003-02-19 08:19:51 +00:00
|
|
|
|
|
|
|
Revision 1.1 2002/12/13 11:44:34 ghillie
|
|
|
|
added support for fax send
|
|
|
|
|
|
|
|
*/
|