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

📄 sipcommand.hxx

📁 SIP(Session Initiation Protocol)是由IETF定义
💻 HXX
📖 第 1 页 / 共 2 页
字号:
#ifndef SIPCOMMAND_HXX_#define SIPCOMMAND_HXX_/* ==================================================================== * The Vovida Software License, Version 1.0  *  * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved. *  * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: *  * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. *  * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in *    the documentation and/or other materials provided with the *    distribution. *  * 3. The names "VOCAL", "Vovida Open Communication Application Library", *    and "Vovida Open Communication Application Library (VOCAL)" must *    not be used to endorse or promote products derived from this *    software without prior written permission. For written *    permission, please contact vocal@vovida.org. * * 4. Products derived from this software may not be called "VOCAL", nor *    may "VOCAL" appear in their name, without prior written *    permission of Vovida Networks, Inc. *  * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. *  * ==================================================================== *  * This software consists of voluntary contributions made by Vovida * Networks, Inc. and many individuals on behalf of Vovida Networks, * Inc.  For more information on Vovida Networks, Inc., please see * <http://www.vovida.org/>. * */static const char* const SipCommand_hxx_Version= "$Id: SipCommand.hxx,v 1.66.2.3 2003/02/20 00:52:53 bko Exp $";#include <vector>#include "SipMsg.hxx"#include "SipRequestLine.hxx"namespace Vocal{class SipAlso;class SipAuthorization;class SipContentDisposition;class SipHide;class SipMaxForwards;class SipOrganization;class SipOspAuthorization;class SipPriority;class SipProxyAuthorization;class SipProxyRequire;class SipRequire;class SipResponseKey;class SipRoute;class SipSubject;class StatusMsg;//All command classes throw exceptions of this type.enum SipCommandErrorType{    COMMAND_CSEQ_OUT_OF_RANGE,    COMMAND_VIA_NOT_PRESENT,    COMMAND_PARSE_FAILED,    COMMAND_INDEX_OUT_OF_BOUND};/// exception classclass SipCommandException{    public:        SipCommandException(SipCommandErrorType i)            {                value = i;            }        SipCommandErrorType value;};///Base class for all SIP requestsclass SipCommand : public SipMsg{    public:        ///        SipCommand();        ///        SipCommand& operator =(const SipCommand&);        ///        bool operator ==(const SipCommand& src) const;        ///        SipCommand(const SipCommand&);         ///        SipCommand(const SipCommand&, const SipVia&, const SipCSeq& );         ///        SipCommand(const StatusMsg&);         /** decode a SipCommand.            @return            true if there is an error while parsing, false            if there is no error            @param inputData   the message to be parsed        */        bool decode(const Data& inputData);                /// Set's the branch number on top (most recent) via        void setViaBranch( int i );        /// Get's the branch number on top (most recent) via        int getViaBranch();        /**@name RequestLine Header Methods           */        //@{        /// Returns a COPY of the request line        const SipRequestLine& getRequestLine() const;        /// Returns a reference to the request line.        SipRequestLine& getMutableRequestLine() ;        /// Set the RequestLine header        void setRequestLine( const SipRequestLine& );                //@}                /**@name Authorization Header Methods          */        //@{        ///        const SipAuthorization& getAuthorization() const;        /// Set the Authorization header        void setAuthorization( const SipAuthorization& );        /// Set the Authorization header        void setAuthorization( const Data& textData);               //@}        ///        const SipHide& getHide() const;        /// Set the Hide header        void setHide( const SipHide& );        ///        void setHide( const Data& textData);        ///        const SipAlso& getAlso() const;        ///        void setAlso(const SipAlso& );        ///        const SipContentDisposition& getContentDisposition() const;        ///        void setContentDisposition(const SipContentDisposition&);        ///        void setContentDisposition(const Data&);        /**@name MaxForwards Header Methods          */        //@{        ///        const SipMaxForwards& getMaxForwards() const;                /// Set the MaxForwards header        void setMaxForwards( const SipMaxForwards& );        /// Set the MaxForwards header        void setMaxForwards( const Data& textData);                ///returns false , if maxforwards becomes < 0.        bool checkMaxForwards();        /**returns false , if maxforwards becomes < 0. also adds MaxForwards          *header if did not exist and sets value = 70. see rfc           */        bool decrementMaxForwards();                //@}        /**@name Organization Header Methods          */        //@{        ///        const SipOrganization& getOrganization() const;        /// Set the Organization header        void setOrganization( const SipOrganization& );        /// Set the Organization header        void setOrganization( const Data& textData);        //@}        /**@name Priority Header Methods          */        //@{        ///        const SipPriority& getPriority() const;        /// Set the Priority header        void setPriority( const SipPriority& );        /// Set the Priority header        void setPriority( const Data& textData);        //@}        // ----------------- ProxyAuthorization Header Methods --------        /// get the proxyauthorization header        const SipProxyAuthorization& getProxyAuthorization() const;                /// Set the ProxyAuthorization header        void setProxyAuthorization( const SipProxyAuthorization& );        /// Set the ProxyAuthorization header        void setProxyAuthorization( const Data& textData);        /// get the number of Require items        int getNumProxyRequire() const;        /// Get the i'th Require item. If i is -1, it gets the last one        const SipProxyRequire& getProxyRequire( int i = -1) const;               /** set or add another Require itme, if the index is -1, it is          * appended to the current list            */        void setProxyRequire(SipProxyRequire item, int index = -1);              /** set or add another Require itme, if the index is -1, it is

⌨️ 快捷键说明

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