/*! \file
 * \brief DataFrame base.
 *
 * \copyright
 * COPYRIGHT NOTICE: (c) 2017-2022 Neonode Technologies AB. All rights reserved.
 */

#ifndef DATAFRAME_DATAFRAME_H
#define DATAFRAME_DATAFRAME_H 1

#ifndef ZFORCECOMMON_H
    #error Please include "zForceCommon.h" before this file.
#endif // ZFORCECOMMON_H
/*!
 * \sa struct DataFrame
 */
typedef struct DataFrame DataFrame;
/*!
 * \brief Struct containing the DataFrame information.
 *
 * The DataFrame is the actual raw data transferred between the Transport Layer and Protocol Layer.
 * The DataFrame is encoded and decoded by the Protocol, protocol transform DataFrame(s) into Message(s) and viceversa.
 */
struct DataFrame
{
    /*!
    * \brief A string pointer to the type of DataFrame.
    *
    * A string pointer to the type of DataFrame.
    * For now the only type is Streaming. In the future we can have more types.
    */
    char       * DataFrameType;
    /*!
     * \brief A Connection pointer that associates the DataFrame with the Connection.
     *
     * A Connection pointer that associates the DataFrame with the Connection.
     */
    Connection * Connection;
    /*!
     * \brief Relative timeout in MilliSeconds.
     *
     * Relative timeout in MilliSeconds.
     */
    uint64_t     RelativeTimeoutMilliSeconds;
    /*!
     * \brief Destructor for DataFrame.
     *
     * Destructor for DataFrame.
     *
     * \param self Pointer to the struct itself.
     *
     * \return Returns nothing.
     */
    void (* Destructor) (DataFrame * self);
};

#endif // DATAFRAME_DATAFRAME_H
