bindings: Add Output::format()

This commit is contained in:
Martin Ling 2018-12-30 04:01:21 +01:00 committed by Uwe Hermann
parent 47b821dc7d
commit ea7a83a437
2 changed files with 7 additions and 0 deletions

View File

@ -1661,6 +1661,11 @@ Output::~Output()
check(sr_output_free(_structure)); check(sr_output_free(_structure));
} }
shared_ptr<OutputFormat> Output::format()
{
return _format;
}
string Output::receive(shared_ptr<Packet> packet) string Output::receive(shared_ptr<Packet> packet)
{ {
GString *out; GString *out;

View File

@ -1016,6 +1016,8 @@ public:
/** Update output with data from the given packet. /** Update output with data from the given packet.
* @param packet Packet to handle. */ * @param packet Packet to handle. */
string receive(shared_ptr<Packet> packet); string receive(shared_ptr<Packet> packet);
/** Output format in use for this output */
shared_ptr<OutputFormat> format();
private: private:
Output(shared_ptr<OutputFormat> format, shared_ptr<Device> device); Output(shared_ptr<OutputFormat> format, shared_ptr<Device> device);
Output(shared_ptr<OutputFormat> format, Output(shared_ptr<OutputFormat> format,