Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

CallOutgoing Class Reference

Call Module for establishment of an outgoing connection and wait for successful connect. More...

#include <calloutgoing.h>

Inheritance diagram for CallOutgoing:

CallModule CallInterface List of all members.

Public Methods

 CallOutgoing (Capi *capi, _cdword controller, string call_from, string call_to, Connection::service_t service, int timeout, string faxStationID, string faxHeadline, bool clir)
 Constructor. Create object.

void mainLoop () throw (CapiExternalError,CapiMsgError)
 Initiate connection, wait for it to succeed.

void callConnected ()
 Finish if we got connection.

void alerting ()
 activate the timeout in the moment the other party starts getting alerted

ConnectiongetConnection ()
 return reference to the established connection

int getResult ()
 return result of connection establishment


Private Attributes

Connection::service_t service
 service with which we should connect

string call_from
 CallingPartyNumber.

string call_to
 CalledPartyNumber.

string faxStationID
 fax Station ID to use

string faxHeadline
 fax headlint to use

Capicapi
 reference to object of Capi to use

_cdword controller
 controller to use

bool clir
 enable CLIR? (don't show own number to called party)

int result
 result of the call establishment process (0=success, 1=timeout exceeded, 2=aborted w/o reason, 0x3301-0x34FF=CAPI errors)

int saved_timeout
 we'll save the given timeout for later as first phase (wait for alerting) doesn't need timeout


Detailed Description

Call Module for establishment of an outgoing connection and wait for successful connect.

This module serves to initiate an outgoing call and wait for the connection establishment. The module can finish for three reasons:

The timeout will be counted from the moment the other party is alerted, not from the moment we initiate the call!

This call module does never throw CapiWrongState! see getResult() if you need to know if conneciton succeeded.

Author:
Gernot Hillier


Constructor & Destructor Documentation

CallOutgoing::CallOutgoing Capi   capi,
_cdword    controller,
string    call_from,
string    call_to,
Connection::service_t    service,
int    timeout,
string    faxStationID,
string    faxHeadline,
bool    clir
 

Constructor. Create object.

Parameters:
capi  reference to object of Capi to use
controller  controller number to use
call_from  string containing the number to call
call_to  string containing the own number to use
service  service to call with as described in Connection::service_t
timeout  timeout to wait for connection establishment
faxStationID  fax station ID, only necessary when connecting in FAXG3 mode
faxHeadline  fax headline, only necessary when connecting in FAXG3 mode
clir  set to true to disable sending of own number


Member Function Documentation

void CallOutgoing::alerting   [virtual]
 

activate the timeout in the moment the other party starts getting alerted

Reimplemented from CallModule.

void CallOutgoing::callConnected   [virtual]
 

Finish if we got connection.

Reimplemented from CallModule.

Connection * CallOutgoing::getConnection  
 

return reference to the established connection

Returns:
reference to the established connection, NULL if timout exceeded w/o successful connection

int CallOutgoing::getResult  
 

return result of connection establishment

0: connection is up, call was successful 1: call timeout exceeded 2: connection not successful, no reason available 0x3301-0x34FF: connection not successful, reason given in CAPI coding. See CAPI spec for details.

Returns:
result, see above

void CallOutgoing::mainLoop   throw (CapiExternalError,CapiMsgError) [virtual]
 

Initiate connection, wait for it to succeed.

Exceptions:
CapiExternalError  Thrown by Connection::Connection(Capi*,_cdword,string,bool,string,service_t,string,string)
CapiMsgError  Thrown by Connection::Connection(Capi*,_cdword,string,bool,string,service_t,string,string)

Reimplemented from CallModule.


Member Data Documentation

string CallOutgoing::call_from [private]
 

CallingPartyNumber.

string CallOutgoing::call_to [private]
 

CalledPartyNumber.

Capi* CallOutgoing::capi [private]
 

reference to object of Capi to use

bool CallOutgoing::clir [private]
 

enable CLIR? (don't show own number to called party)

_cdword CallOutgoing::controller [private]
 

controller to use

string CallOutgoing::faxHeadline [private]
 

fax headlint to use

string CallOutgoing::faxStationID [private]
 

fax Station ID to use

int CallOutgoing::result [private]
 

result of the call establishment process (0=success, 1=timeout exceeded, 2=aborted w/o reason, 0x3301-0x34FF=CAPI errors)

int CallOutgoing::saved_timeout [private]
 

we'll save the given timeout for later as first phase (wait for alerting) doesn't need timeout

Connection::service_t CallOutgoing::service [private]
 

service with which we should connect


The documentation for this class was generated from the following files:
Generated on Mon Jan 5 12:20:00 2004 for CapiSuite by doxygen1.2.18