sipcall.h 2.79 KB
Newer Older
yanmorin's avatar
yanmorin committed
1
/*
2 3
 *  Copyright (C) 2004-2007 Savoir-Faire Linux inc.
 *  Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>
yanmorin's avatar
yanmorin committed
4 5
 *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
 *  Author : Laurielle Lea <laurielle.lea@savoirfairelinux.com>
jpbl's avatar
jpbl committed
6
 *
yanmorin's avatar
yanmorin committed
7 8
 *  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
9
 *  the Free Software Foundation; either version 3 of the License, or
yanmorin's avatar
yanmorin committed
10
 *  (at your option) any later version.
jpbl's avatar
jpbl committed
11
 *
yanmorin's avatar
yanmorin committed
12 13 14 15
 *  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.
jpbl's avatar
jpbl committed
16
 *
yanmorin's avatar
yanmorin committed
17 18 19
 *  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.
jpbl's avatar
jpbl committed
20
 */
yanmorin's avatar
yanmorin committed
21 22
#ifndef SIPCALL_H
#define SIPCALL_H
jpbl's avatar
jpbl committed
23 24

#include "call.h"
25
#include "sipvoiplink.h"
Emmanuel Milou's avatar
Emmanuel Milou committed
26
#include "sdp.h"
jpbl's avatar
jpbl committed
27 28 29

class AudioCodec;

yanmorin's avatar
yanmorin committed
30
/**
31 32
 * @file sipcall.h
 * @brief SIPCall are SIP implementation of a normal Call 
33
 */
yanmorin's avatar
yanmorin committed
34 35
class SIPCall : public Call
{
36 37 38 39 40 41 42 43
  public:

    /**
     * Constructor
     * @param id	The call identifier
     * @param type  The type of the call. Could be Incoming
     *						 Outgoing
     */
Emmanuel Milou's avatar
Emmanuel Milou committed
44
    SIPCall(const CallID& id, Call::CallType type, pj_pool_t *pool );
yanmorin's avatar
yanmorin committed
45

46 47 48
    /**
     * Destructor
     */
yanmorin's avatar
yanmorin committed
49 50
    ~SIPCall();

51 52
    /** 
     * Call Identifier
53
     * @return int  SIP call id
54 55 56 57 58
     */
    int  getCid() { return _cid; }
    
    /** 
     * Call Identifier
59
     * @param cid SIP call id
60 61 62 63 64
     */
    void setCid(int cid) { _cid = cid ; } 
    
    /** 
     * Domain identifier
65
     * @return int  SIP domain id
66 67 68 69 70
     */
    int  getDid() { return _did; }
    
    /** 
     * Domain identifier
71
     * @param did SIP domain id
72 73 74 75 76
     */
    void setDid(int did) { _did = did; } 
    
    /** 
     * Transaction identifier
77
     * @return int  SIP transaction id
78 79 80
     */
    int  getTid() { return _tid; }
    
81
    
82 83
    /** 
     * Transaction identifier
84
     * @param tid SIP transaction id
85 86 87
     */
    void setTid(int tid) { _tid = tid; } 

88 89 90 91 92 93
    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;}
    
Emmanuel Milou's avatar
Emmanuel Milou committed
94 95 96 97
    Sdp* getLocalSDP (void) { return _local_sdp; }

    void setLocalSDP (Sdp *local_sdp) { _local_sdp = local_sdp; }

98
  private:
Yun Liu's avatar
Yun Liu committed
99

100 101 102
    int _cid;
    int _did;
    int _tid;
yanmorin's avatar
yanmorin committed
103

104 105
    // Copy Constructor
    SIPCall(const SIPCall& rh);
106

107 108
    // Assignment Operator
    SIPCall& operator=( const SIPCall& rh);
109
    
110 111
    
    pjsip_evsub *_xferSub;
112 113 114 115 116
    
	pjsip_inv_session *_invSession;
    
	Sdp *_local_sdp;

jpbl's avatar
jpbl committed
117 118
};

yanmorin's avatar
yanmorin committed
119
#endif