File: faxsend.cpp

package info (click to toggle)
capisuite 0.4.5-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,588 kB
  • ctags: 1,050
  • sloc: cpp: 3,979; sh: 3,465; python: 446; makefile: 263
file content (56 lines) | stat: -rw-r--r-- 1,679 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* @file faxsend.cpp
   @brief Contains FaxSend - Call Module for sending an analog fax (group 3)

   @author Gernot Hillier <gernot@hillier.de>
   $Revision: 1.1 $
*/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

#include "../backend/connection.h"
#include "faxsend.h"


FaxSend::FaxSend(Connection *conn, string file) throw (CapiExternalError)
:CallModule(conn),file(file)
{
	if (conn->getService()!=Connection::FAXG3)
	 	throw CapiExternalError("Connection not in fax mode","FaxSend::FaxSend()");
}


void
FaxSend::mainLoop() throw (CapiError,CapiWrongState,CapiExternalError,CapiMsgError)
{
	conn->start_file_transmission(file);
	CallModule::mainLoop();
	conn->stop_file_transmission();
}

void 
FaxSend::transmissionComplete()
{
	finish=true;
}

/*  History

$Log: faxsend.cpp,v $
Revision 1.1  2003/02/19 08:19:53  gernot
Initial revision

Revision 1.2  2003/01/19 16:50:27  ghillie
- removed severity in exceptions. No FATAL-automatic-exit any more.
  Removed many FATAL conditions, other ones are exiting now by themselves

Revision 1.1  2002/12/13 11:44:34  ghillie
added support for fax send

*/