#ifndef GERMANAIRLINESVA_GACONNECTOR_RECORDING_H
#define GERMANAIRLINESVA_GACONNECTOR_RECORDING_H

#include <cstdint>
#include <cstring>
#include <vector>

#include "pathSegment.h"

#define CURRENT_VERSION 1

namespace germanairlinesva_recording
{
  /*
   * Header
   *
   * CHAR[5] | UINT8
   * --------+--------
   * VGAR    | VERSION
   */
  /*
   * Path Recording
   *
   * PATHSEGMENT[]
   * -------------
   * SEGMENTS
   */
  class PathRecording
  {
    private:
      std::uint64_t count = 0;
      std::vector<std::uint8_t> file{'V', 'G', 'A', 'R', 0, CURRENT_VERSION};

    public:
      void addSegment(PathSegment segment);

      inline std::uint8_t *getBinaryData() { return file.data(); }
      inline std::size_t getBinaryLength() { return file.size(); }
  };

} // namespace germanairlinesva_recording

#endif