📄 sipcommand.hxx
字号:
* appended to the current list */ void setProxyRequire(const Data&item, int index = -1); /** Set number of Require items. If i is less than current number then the extras are deleted. */ void setNumProxyRequire(int i); /// void copyProxyRequireList(const SipCommand& src); /// void flushProxyrequireList(); /// const vector < SipProxyRequire* >& getProxyrequireList() const; /// void addsipProxyrequire(SipProxyRequire* sipProxyrequire); // ----------------- ResponseKey Header Methods ------------------ /// get the responsekey const SipResponseKey& getResponseKey() const; /// Set the ResponseKey header void setResponseKey( const SipResponseKey& ); // ----------------- Require Header Methods ---------------- /// get the number of requires int getNumRequire() const; /// Get the i'th Require item. If i is -1, it gets the last one const SipRequire& getRequire( int i = -1) const; /** set or add another Require itme, if the index is -1, it is appended to the current list */ void setRequire(const SipRequire& item, int index = -1); /** set or add another Require itme, if the index is -1, it is appended to the current list */ void setRequire(const Data&item, int index = -1); /** Set number of Require items. If i is less than current number then the extras are deleted. */ void setNumRequire(int i); /// void copyRequireList(const SipCommand& src); /// void flushrequireList(); /// const vector < SipRequire* >& getrequireList() const; /// void addsiprequire(SipRequire* siprequire); /// ----------------- Route Header Methods ----------------- int getNumRoute() const; /// Get the i'th Route item. If i is -1, it gets the last one const SipRoute& getRoute( int i = -1) const; /** set or add another Route itme, if the index is -1, it is * appended to the current list */ void setRoute(const SipRoute& item, int index = -1); /** set or add another Route itme, if the index is -1, it is * appended to the current list */ void setRoute(const Data&item, int index = -1); /** Set number of Route items.If i is less than current number then * the extras are deleted. */ void setNumRoute(int i); /// highest in the command, next element to be sent to void routePushFront(const SipRoute& item); /// lowest in the command, last element to be sent to void routePushBack(const SipRoute& item); void routePopFront(); void routePopBack(); const SipRoute& routeFront() const; const SipRoute& routeBack() const; bool routeEmpty() const; /// void copyRouteList(const SipCommand& src); /// void flushrouteList(); /// const vector < Sptr<SipRoute> > getRouteList() const; /// void addsiproute(SipRoute* siproute); /// void setRouteList(const vector < SipRoute* > sipRouteList); /// replacement for previous interface vector <SipRoute*> void setRouteList(const vector < Sptr<SipRoute > > list); /// void removeRoute(int index = -1); /// ----------------- Subject Header Methods ------------------ /// get the subject header const SipSubject& getSubject() const; /// Set the Subject header void setSubject( const SipSubject& ); /// Set the Subject header void setSubject( const Data& textData); /// Basic auth details void setAuthBasic(const Data& data, const Data& pwd = ""); /// bool checkAuthBasic(const Data& data, const Data& pwd = ""); /// void setProxyAuth(const Data& data, const Data& pwd = ""); /// bool checkProxyAuth(const Data& data, const Data& pwd = ""); /// Digest Proxy-Authentication Details void setProxyAuthDigest(const Data& nonce, const Data& user, const Data& pwd, const Data& method, const Data& realm, const Data& requestURI, const Data& qop, const Data& cnonce, const Data& alg, const Data& noncecount, const Data& opaque); /// Digest Authentication Details void setAuthDigest(const Data& nonce, const Data& user, const Data& pwd, const Data& method, const Data& realm, const Data& requestURI, const Data& qop, const Data& cnonce, const Data& alg, const Data& noncecount, const Data& opaque); /** verify the digest returned by the user is correct. Here, * pass the following items to be verified. The other * headers should not be needed (e.g. requestURI, algorithm) * and can be gotten from the message * * */ bool checkAuthDigest(const Data& nonce, const Data& user, const Data& pwd, const Data& requestURI, const Data& realm, const bool authReg = false); /// void setSipOspAuthorization(const SipOspAuthorization &); /// void setSipOspAuthorization( const Data& data); /// const SipOspAuthorization& getSipOspAuthorization() const; /// virtual ~SipCommand(); /** Form cryptographically unique branch, should be combined with * results of computeBranch to satisfy draft bis09. */ static Data computeUniqueBranch(); /** return a branch to be used by a proxy for via (for loop detection) As per draft bis09, this computes a branch using computeUniqueBranch combined with a cryptographically random suffix "z9hG4bK" + computeUniqueBranch() + "." + cryptokey */ Data computeProxyBranch() const; /** This version does not add a cryptographically random suffix but is * otherwise the same as computeProxyBranch */ Data computeStatelessProxyBranch() const; /** detect loops in this command - only if branch was computed using computeProxyBranch */ bool detectLoop() const; ///form MD5 hash for the branch here. Data computeBranch(Data hashBranch = "") const; /// alternate form which uses local data as well Data computeBranch2() const; /// Moved from public to private Data encodeProxyRequireList() const; /// Data encodeRequireList() const; /// Data encodeRouteList() const; bool compareProxyRequireList(const SipCommand& src) const; bool compareRouteList(const SipCommand& src) const; bool compareRequireList(const SipCommand& src) const; /// virtual Data encode() const; ///Check to see if message is a candidate for retransmission virtual bool toBeRetransmitted() const; /** return the next hop - based on the message's request-uri * and/or route-set see 16.6 section 6 and section 7. * If a client wants to send a SipCommand with a req-uri of tel:xyz, * they must load a route into the ROUTE header to tell the stack where * to send the message. */ Sptr<SipUrl> postProcessRouteAndGetNextHop(); protected: SipRequestLine myRequestLine; bool isMethod(const Data& data); bool parseStartLine(const Data& line1); void sipdecode(const Data& fgdata); }; } // namespace Vocal/* Local Variables: *//* c-file-style: "stroustrup" *//* indent-tabs-mode: nil *//* c-file-offsets: ((access-label . -) (inclass . ++)) *//* c-basic-offset: 4 *//* End: */#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -