Newer
Older
/**
* Copyright (C) 2004-2005 Savoir-Faire Linux inc.
* Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com>
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <iostream>
switch (_type) {
case Outgoing:
_voIPLink->newOutgoingCall(_id);
break;
case Incoming:
_voIPLink->newIncomingCall(_id);
break;
default:
break;
}
}
Call::~Call (void)
{
}
Call::getId (void)
{
return _id;
}
void
{
_id = id;
}
void
Call::setVoIPLink (VoIPLink* voIPLink)
{
_voIPLink = voIPLink;
}
VoIPLink*
Call::getVoIPLink (void)
{
return _voIPLink;
}
Call::getCallerIdName (void)
{
return _callerIdName;
}
void
Call::getCallerIdNumber (void)
{
return _callerIdNumber;
}
void
{
_state = state;
}
enum CallType
Call::getType (void)
{
return _type;
}
void
Call::setType (enum CallType type)
{
_type = type;
}
bool
Call::isBusy (void)
{
return true;
} else {
return false;
}
}
bool
Call::isOnHold (void)
{
return (_state == OnHold) ? true : false;
}
bool
Call::isOffHold (void)
{
return (_state == OffHold) ? true : false;
}
bool
Call::isOnMute (void)
{
return (_state == MuteOn) ? true : false;
}
bool
Call::isOffMute (void)
{
return (_state == MuteOff) ? true : false;
}
bool
Call::isTransfered (void)
{
return (_state == Transfered) ? true : false;
}
bool
Call::isHungup (void)
{
return (_state == Hungup) ? true : false;
}
bool
Call::isRinging (void)
{
return (_state == Ringing) ? true : false;
}
bool
Call::isRefused (void)
{
return (_state == Refused) ? true : false;
}
return (_state == Error || _state == NotExist || _state == Busy) ? true : false;
}
bool
Call::isProgressing (void)
{
return (_state == Progressing) ? true : false;
}
bool
Call::isOutgoingType (void)
{
return (_type == Outgoing) ? true : false;
}
bool
Call::isIncomingType (void)
{
return (_type == Incoming) ? true : false;
}
int
}
int
Call::hangup (void)
{
int i = _voIPLink->hangup(_id);
int
Call::cancel (void)
{
int i = _voIPLink->cancel(_id);
}
int
Call::onHold (void)
{
int i = _voIPLink->onhold(_id);
}
int
Call::offHold (void)
{
int i = _voIPLink->offhold(_id);
}
int
Call::refuse (void)
{
int i = _voIPLink->refuse(_id);