|
reSIProcate
SIP stack, Dialog Usage Manager and related libraries
|
List of known SIP headers, searchable by header type. More...
#include <SipMessage.hxx>
Classes | |
| class | HeaderInfo |
| Publicly accessible information about a header. More... | |
| class | OrderedView |
Ordered view over headers. The headers are produced in the order of Headers::Type enum values. More... | |
Public Types | |
| using | iterator = UsedIterator< TypedHeaders::iterator > |
| using | const_iterator = UsedIterator< TypedHeaders::const_iterator > |
| using | value_type = TypedHeaders::value_type |
| using | reference = TypedHeaders::reference |
| using | const_reference = TypedHeaders::const_reference |
| using | pointer = TypedHeaders::pointer |
| using | const_pointer = TypedHeaders::const_pointer |
| using | size_type = TypedHeaders::size_type |
| using | difference_type = TypedHeaders::difference_type |
| using | allocator_type = TypedHeaders::allocator_type |
Public Member Functions | |
| KnownHeaders () noexcept | |
| KnownHeaders (const allocator_type &alloc) noexcept(std::is_nothrow_constructible< TypedHeaders, const allocator_type & >::value) | |
| KnownHeaders (const KnownHeaders &)=delete | |
| KnownHeaders & | operator= (const KnownHeaders &)=delete |
| bool | empty () const noexcept |
Returns true if the container is empty. Does not consider "unused" elements. | |
| size_type | size () const noexcept |
| Returns the number of elements in the container. Does not consider "unused" elements. | |
| void | clear () noexcept |
Clears the container. Does not free HeaderFieldValueList objects but clears them and marks as "unused". | |
| template<typename Disposer > | |
| void | clearAndDispose (Disposer &&disposer) noexcept |
| Clears the container and invokes the dispose function on every element. | |
| const_iterator | cbegin () const noexcept |
| Iterator access. | |
| const_iterator | cend () const noexcept |
| const_iterator | begin () const noexcept |
| const_iterator | end () const noexcept |
| iterator | begin () noexcept |
| iterator | end () noexcept |
| void | reserve (size_type capacity) |
| Reserves internal storage for the given number of entries. | |
| size_type | capacity () const noexcept |
| Returns capacity of the internal storage. | |
| iterator | find (Headers::Type type) noexcept |
Finds header information, if present in the list. Returns end() if not found. Does not produce "unused" entries. | |
| const_iterator | find (Headers::Type type) const noexcept |
| void | erase (iterator it) noexcept |
Erases an element. Does not free the HeaderFieldValueList object but clears it and marks as "unused". | |
| template<typename ValuesFactory > | |
| iterator | insert (Headers::Type type, ValuesFactory &&valuesFactory) |
| Constructs or reuses a previously erased element for a given header type. | |
| OrderedView | ordered () const noexcept |
| Returns an ordered view over the list of headers. | |
Friends | |
| class | OrderedView::Iterator |
List of known SIP headers, searchable by header type.
This container provides access to headers of the SIP message that are known to libresiprocate. The headers can be searched by Headers::Type enum values and iterated over. The list of headers is unordered, and any modifications of the container may invalidate iterators, pointers and references into the container. The container does not own the HeaderFieldValueList objects, which must be explicitly freed on removal (which is handled by SipMessage).
Elements of the container can be in an "unused" state, which is when the element was removed but not disposed of. "Unused" elements do not participate in the publicly visible set of elements observed by users (e.g. they are not found by searching or exposed during iteration). "Unused" elements can be reused if the user attempts to insert an element with the matching header type. After that, the reused element becomes publicly accessible again.
The container can produce a read-only ordered view over its elements. When iterating over the view elements, headers are ordered by their types, i.e. Headers::Type enum values. The view does not expose "unused" elements. The view does not own or manage container elements and is invalidated on the parent container modifications.
HeaderTypes.hxx: "The Type enum controls the order of output of the headers in the encoded
SipMessage". The leading entries of that enum follow the recommendation in RFC 3261 section 7.3.1, that headers needed for proxy processing appear towards the top of the message to facilitate rapid parsing. Definition at line 210 of file SipMessage.hxx.
| using resip::SipMessage::KnownHeaders::allocator_type = TypedHeaders::allocator_type |
Definition at line 346 of file SipMessage.hxx.
| using resip::SipMessage::KnownHeaders::const_iterator = UsedIterator<TypedHeaders::const_iterator> |
Definition at line 338 of file SipMessage.hxx.
| using resip::SipMessage::KnownHeaders::const_pointer = TypedHeaders::const_pointer |
Definition at line 343 of file SipMessage.hxx.
| using resip::SipMessage::KnownHeaders::const_reference = TypedHeaders::const_reference |
Definition at line 341 of file SipMessage.hxx.
| using resip::SipMessage::KnownHeaders::difference_type = TypedHeaders::difference_type |
Definition at line 345 of file SipMessage.hxx.
| using resip::SipMessage::KnownHeaders::iterator = UsedIterator<TypedHeaders::iterator> |
Definition at line 337 of file SipMessage.hxx.
| using resip::SipMessage::KnownHeaders::pointer = TypedHeaders::pointer |
Definition at line 342 of file SipMessage.hxx.
| using resip::SipMessage::KnownHeaders::reference = TypedHeaders::reference |
Definition at line 340 of file SipMessage.hxx.
| using resip::SipMessage::KnownHeaders::size_type = TypedHeaders::size_type |
Definition at line 344 of file SipMessage.hxx.
| using resip::SipMessage::KnownHeaders::value_type = TypedHeaders::value_type |
Definition at line 339 of file SipMessage.hxx.
|
inlinenoexcept |
Definition at line 562 of file SipMessage.hxx.
|
inlineexplicitnoexcept |
Definition at line 563 of file SipMessage.hxx.
|
delete |
|
inlinenoexcept |
Definition at line 594 of file SipMessage.hxx.
|
inlinenoexcept |
Definition at line 597 of file SipMessage.hxx.
|
inlinenoexcept |
Returns capacity of the internal storage.
Definition at line 603 of file SipMessage.hxx.
|
inlinenoexcept |
Iterator access.
Definition at line 591 of file SipMessage.hxx.
|
inlinenoexcept |
Definition at line 592 of file SipMessage.hxx.
|
noexcept |
Clears the container. Does not free HeaderFieldValueList objects but clears them and marks as "unused".
Definition at line 30 of file SipMessage.cxx.
|
inlinenoexcept |
Clears the container and invokes the dispose function on every element.
The disposer function will be called on all entries, including "unused" ones. It is expected to free any resources associated with the entry and must not throw.
Definition at line 55 of file SipMessage.cxx.
|
inlinenoexcept |
Returns true if the container is empty. Does not consider "unused" elements.
Definition at line 576 of file SipMessage.hxx.
|
inlinenoexcept |
Definition at line 595 of file SipMessage.hxx.
|
inlinenoexcept |
Definition at line 598 of file SipMessage.hxx.
|
noexcept |
Erases an element. Does not free the HeaderFieldValueList object but clears it and marks as "unused".
Definition at line 69 of file SipMessage.cxx.
|
inlinenoexcept |
Definition at line 607 of file SipMessage.hxx.
|
noexcept |
Finds header information, if present in the list. Returns end() if not found. Does not produce "unused" entries.
Definition at line 138 of file SipMessage.cxx.
|
inline |
Constructs or reuses a previously erased element for a given header type.
If the header with the given type was previously erased and is in the "unused" state, this call reuses this element. Otherwise, the call constructs a new element with the given header type and a pointer to the HeaderFieldValueList object returned by the valuesFactory() function call.
Definition at line 88 of file SipMessage.cxx.
|
delete |
|
inlinenoexcept |
Returns an ordered view over the list of headers.
Definition at line 625 of file SipMessage.hxx.
|
inline |
Reserves internal storage for the given number of entries.
Definition at line 601 of file SipMessage.hxx.
|
inlinenoexcept |
Returns the number of elements in the container. Does not consider "unused" elements.
Definition at line 578 of file SipMessage.hxx.
|
friend |
Definition at line 549 of file SipMessage.hxx.