2006-04-02 16:22:23 +00:00
|
|
|
/*
|
2007-09-21 11:08:15 -04:00
|
|
|
* Copyright (C) 2004-2007 Savoir-Faire Linux inc.
|
|
|
|
* Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>
|
2006-04-02 16:22:23 +00:00
|
|
|
* Author: Yan Morin <yan.morin@savoirfairelinux.com>
|
|
|
|
* Author : Laurielle Lea <laurielle.lea@savoirfairelinux.com>
|
2005-12-19 00:11:35 +00:00
|
|
|
*
|
2006-04-02 16:22:23 +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
|
2008-01-11 12:52:43 -05:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2006-04-02 16:22:23 +00:00
|
|
|
* (at your option) any later version.
|
2005-12-19 00:11:35 +00:00
|
|
|
*
|
2006-04-02 16:22:23 +00:00
|
|
|
* 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.
|
2005-12-19 00:11:35 +00:00
|
|
|
*
|
2006-04-02 16:22:23 +00:00
|
|
|
* 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.
|
2005-12-19 00:11:35 +00:00
|
|
|
*/
|
2006-04-02 16:22:23 +00:00
|
|
|
#ifndef SIPCALL_H
|
|
|
|
#define SIPCALL_H
|
2005-12-19 00:11:35 +00:00
|
|
|
|
|
|
|
#include "call.h"
|
2009-01-27 17:31:36 -05:00
|
|
|
#include "sipvoiplink.h"
|
2009-02-27 16:47:37 -05:00
|
|
|
#include "sdp.h"
|
2005-12-19 00:11:35 +00:00
|
|
|
|
|
|
|
class AudioCodec;
|
|
|
|
|
2006-04-02 16:22:23 +00:00
|
|
|
/**
|
2008-04-18 14:44:15 -04:00
|
|
|
* @file sipcall.h
|
|
|
|
* @brief SIPCall are SIP implementation of a normal Call
|
2006-04-09 22:44:09 +00:00
|
|
|
*/
|
2006-04-02 16:22:23 +00:00
|
|
|
class SIPCall : public Call
|
|
|
|
{
|
2008-04-18 14:44:15 -04:00
|
|
|
public:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructor
|
|
|
|
* @param id The call identifier
|
|
|
|
* @param type The type of the call. Could be Incoming
|
|
|
|
* Outgoing
|
|
|
|
*/
|
2009-02-27 16:47:37 -05:00
|
|
|
SIPCall(const CallID& id, Call::CallType type, pj_pool_t *pool );
|
2006-04-02 16:22:23 +00:00
|
|
|
|
2008-04-18 14:44:15 -04:00
|
|
|
/**
|
|
|
|
* Destructor
|
|
|
|
*/
|
2006-04-02 16:22:23 +00:00
|
|
|
~SIPCall();
|
|
|
|
|
2008-04-18 14:44:15 -04:00
|
|
|
/**
|
|
|
|
* Call Identifier
|
2008-09-26 12:06:55 -04:00
|
|
|
* @return int SIP call id
|
2008-04-18 14:44:15 -04:00
|
|
|
*/
|
|
|
|
int getCid() { return _cid; }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Call Identifier
|
2008-09-26 12:06:55 -04:00
|
|
|
* @param cid SIP call id
|
2008-04-18 14:44:15 -04:00
|
|
|
*/
|
|
|
|
void setCid(int cid) { _cid = cid ; }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Domain identifier
|
2008-09-26 12:06:55 -04:00
|
|
|
* @return int SIP domain id
|
2008-04-18 14:44:15 -04:00
|
|
|
*/
|
|
|
|
int getDid() { return _did; }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Domain identifier
|
2008-09-26 12:06:55 -04:00
|
|
|
* @param did SIP domain id
|
2008-04-18 14:44:15 -04:00
|
|
|
*/
|
|
|
|
void setDid(int did) { _did = did; }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Transaction identifier
|
2008-09-26 12:06:55 -04:00
|
|
|
* @return int SIP transaction id
|
2008-04-18 14:44:15 -04:00
|
|
|
*/
|
|
|
|
int getTid() { return _tid; }
|
|
|
|
|
2009-02-14 12:36:47 -05:00
|
|
|
|
2008-04-18 14:44:15 -04:00
|
|
|
/**
|
|
|
|
* Transaction identifier
|
2008-09-26 12:06:55 -04:00
|
|
|
* @param tid SIP transaction id
|
2008-04-18 14:44:15 -04:00
|
|
|
*/
|
|
|
|
void setTid(int tid) { _tid = tid; }
|
|
|
|
|
2008-09-25 10:07:03 -04:00
|
|
|
void setXferSub(pjsip_evsub* sub) {_xferSub = sub;}
|
|
|
|
pjsip_evsub *getXferSub() {return _xferSub;}
|
|
|
|
|
|
|
|
void setInvSession(pjsip_inv_session* inv) {_invSession = inv;}
|
|
|
|
pjsip_inv_session *getInvSession() {return _invSession;}
|
|
|
|
|
2009-02-27 16:47:37 -05:00
|
|
|
Sdp* getLocalSDP (void) { return _local_sdp; }
|
|
|
|
|
|
|
|
void setLocalSDP (Sdp *local_sdp) { _local_sdp = local_sdp; }
|
|
|
|
|
2008-04-18 14:44:15 -04:00
|
|
|
private:
|
2008-10-02 09:34:16 -04:00
|
|
|
|
2008-04-18 14:44:15 -04:00
|
|
|
int _cid;
|
|
|
|
int _did;
|
|
|
|
int _tid;
|
2006-04-02 16:22:23 +00:00
|
|
|
|
2009-02-14 12:36:47 -05:00
|
|
|
// Copy Constructor
|
|
|
|
SIPCall(const SIPCall& rh);
|
2008-09-23 10:30:44 -04:00
|
|
|
|
2009-02-14 12:36:47 -05:00
|
|
|
// Assignment Operator
|
|
|
|
SIPCall& operator=( const SIPCall& rh);
|
2008-09-23 10:30:44 -04:00
|
|
|
|
2008-09-25 10:07:03 -04:00
|
|
|
|
|
|
|
pjsip_evsub *_xferSub;
|
2009-07-23 15:06:40 -04:00
|
|
|
|
|
|
|
pjsip_inv_session *_invSession;
|
|
|
|
|
|
|
|
Sdp *_local_sdp;
|
|
|
|
|
2005-12-19 00:11:35 +00:00
|
|
|
};
|
|
|
|
|
2006-04-02 16:22:23 +00:00
|
|
|
#endif
|