• CoreLinkParser
  • CoreLinkParser Class

    Provides an easy way to parse a CoRE link list. More...

    Header: #include <CoreLinkParser>
    Inherits:

    Public Functions

    CoreLinkParser(const QByteArray & data, QObject * parent = 0)
    QList<CoreLink> links() const

    Detailed Description

    Provides an easy way to parse a CoRE link list.

    Example

    if (reply->contentType == CoapPdu::ApplicationLink) {
        CoreLinkParser parser(reply->payload());
    
        foreach (const CoreLink &link, parser.links()) {
            qDebug() << link;
        }
    }

    See also CoreLink.

    Member Function Documentation

    CoreLinkParser::CoreLinkParser(const QByteArray & data, QObject * parent = 0)

    Constructs a CoRE link parser with the given parent. The given data should contain a CoRE link list from the discovery.

    Returns the parsed list of CoreLinks.