⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 siptransaction.h

📁 一个SIP协议栈
💻 H
字号:
#ifndef __SIPTRANSACTION_H__#define __SIPTRANSACTION_H__/********************************************************************* $Id: SIPTransaction.h,v 1.2 1999/08/31 02:22:05 cullen Exp $ *********************************************************************  This library is free software; you can redistribute it and/or modify  it under the terms of the GNU Lesser General Public License as  published by the Free Software Foundation; either version 2 of the  License, or (at your option) any later version.  In addition to the  terms and conditions set forth in the GNU Lesser General Public  License, as a condition of using this library you are required to  grant to all users of this library or any implementation utilizing  or derived from this library a reciprocal, no cost, worldwide,  perpetual, non-exclusive, non-transferable, unrestricted license to  your claims of all patents and patent applications throughout the  world that are infringed by the library or any implementation  utilizing or derived from this library.  In the event you  redistribute this library or any implementation utilizing or derived  from this library, you must prominently display the foregoing terms  and conditions with the library or the implementation utilizing or  derived from this library.   In the event of a conflict of terms between the foregoing license  grant and the terms set forth in the GNU Lesser General Public  License, the foregoing terms and conditions shall be deemed to  govern.   This library 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  Lesser General Public License for more details.   You should have received a copy of the GNU Lesser General Public  License along with this library; if not; write to the Free Software  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA.   Copyright 1999 Vovida Networks, Inc.  All Rights Reserved. ********************************************************************* $Log: SIPTransaction.h,v $ Revision 1.2  1999/08/31 02:22:05  cullen updated header **********************************************************************/#include "MpCommon.h"#include "SIPCallLeg.h"namespace msip{    //==================================================================================    /** SIP Transaction consists of Call Leg (CallID, From, To) and CSeq number.     * This class aggregates CallLeg object and CSeq parameter.     */    class Transaction    {        CallLeg    tr_CallLeg;        MpMsgType  tr_Method;        unsigned   tr_CSeq;    public:                ///Default constructor        Transaction() {}        ///Copy constructor        Transaction(const Transaction &trn, bool reverse_flag=false)         { createFrom(trn, reverse_flag); }         ///Construct from Message object        Transaction(const Message &msg, bool reverse_flag=false)         { createFrom(msg, reverse_flag); }        ///Get the source CallLeg        const CallLeg & getCallLeg() { return tr_CallLeg; }        ///Create from Transaction object        Transaction & createFrom(const Transaction &trn, bool reverse_flag=false);        ///Create from Message object        void createFrom(/*const*/ Message &msg, bool reverse_flag=false);        ///Assignment from Transaction object        Transaction & operator = (const Transaction & trn) { return createFrom(trn); }        ///Assignment from Message object        void operator = (/*const*/ Message & msg) { createFrom(msg); }        ///Compare with Transaction object        TrnCmpResult  compareWith(const Transaction &trn, bool reverse_flag=false) const;        ///Operator == with Transaction        bool operator == (const Transaction &trn) const { return compareWith(trn) == tcmpEq; }        ///Operator > with Transaction        bool operator > (const Transaction &trn) const { return compareWith(trn) == tcmpCSeqGr; }    };}#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -