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

📄 sipcallleg.h

📁 一个SIP协议栈
💻 H
字号:
#ifndef __SIPCALLLEG_H__#define __SIPCALLLEG_H__/********************************************************************* $Id: SIPCallLeg.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: SIPCallLeg.h,v $ Revision 1.2  1999/08/31 02:22:05  cullen updated header **********************************************************************/#include "SIPMessage.h"namespace msip{    enum TrnCmpResult    {        tcmpEq,         //Completely equal        tcmpNoEq,       //Different CallID, CallerAddr or CalleeAddr        tcmpTag,        //Different any tag parameter        tcmpCSeqLe,     //CSeq is less than...        tcmpCSeqGr      //CSeq is greater than...    };    //==================================================================================    /**     * Call Leg identification class.     * The spec is not clear on identification of a call leg.      * Section 1.3 says it's the combination of To, From, and Call-ID.      * However, requests from the callee to the caller have the      * To and From reversed, so this definition is not quite accurate.      * Additionally, the tag field should be included in the definition      * of call leg. The spec should rather say that a call leg is defined      * as the combination of local-address, remote-address, and call-id,      * where these addresses include tags. Also note that only the username      * and host part of the To and From headers are used for this purpose.*/    class CallLeg    {        std::mstring cl_CallID;        std::mstring cl_CallerAddr;        std::mstring cl_CallerTag;        std::mstring cl_CalleeAddr;        std::mstring cl_CalleeTag;            public:        ///Default constructor        CallLeg() {}        ///Copy constructor        CallLeg(const CallLeg &leg, bool reverse_flag=false) { createFrom(leg, reverse_flag); }         ///Construct from Message object        CallLeg(const Message &msg, bool reverse_flag=false) { createFrom(msg, reverse_flag); }        ///Create from CallLeg object        CallLeg & createFrom(const CallLeg &leg, bool reverse_flag=false);        ///Create from Message object        void createFrom(/*const*/ Message &msg, bool reverse_flag=false);        ///Assignment from CallLeg object        CallLeg & operator = (const CallLeg & leg) { return createFrom(leg); }        ///Assignment from Message object        void operator = (/*const*/ Message & msg) { createFrom(msg); }        ///Compare with CallLeg object        TrnCmpResult compareWith(const CallLeg &leg, bool reverse_flag=false) const;        ///Compare operator with CallLeg        bool operator == (const CallLeg &leg) const { return compareWith(leg) == tcmpEq; }    };}#endif

⌨️ 快捷键说明

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