#pragma once

//#include <qobject.h>
#include "PipewireManager1.h"

namespace UkuiAudioFramwork
{
/**
 * @todo write docs
 */
class PipewirePort
{

public:
    PipewirePort(Pipewire *parent, uint32_t id, const spa_dict *props);

    virtual ~PipewirePort();

    uint32_t id() const;

	void _port_info(const struct pw_port_info *info);

	void _port_param(int seq,
	                 uint32_t id, uint32_t index, uint32_t next,
	                 const struct spa_pod *param);

    void set_id(uint32_t id);

    void idChanged(uint32_t id);

private:
    Pipewire* pipewire;
    uint32_t m_id = 0;
	pw_port *port = nullptr;
	spa_hook port_listener;
};
}
