bindings: Add Session::filename() and corresponding SWIG attribute.
This commit is contained in:
parent
73a1eb017b
commit
1411f7d8e9
|
@ -1071,6 +1071,11 @@ void Session::set_trigger(shared_ptr<Trigger> trigger)
|
|||
_trigger = trigger;
|
||||
}
|
||||
|
||||
string Session::filename()
|
||||
{
|
||||
return _filename;
|
||||
}
|
||||
|
||||
Packet::Packet(shared_ptr<Device> device,
|
||||
const struct sr_datafeed_packet *structure) :
|
||||
UserOwned(structure),
|
||||
|
|
|
@ -672,6 +672,8 @@ public:
|
|||
/** Set trigger setting.
|
||||
* @param trigger Trigger object to use. */
|
||||
void set_trigger(shared_ptr<Trigger> trigger);
|
||||
/** Get filename this session was loaded from. */
|
||||
string filename();
|
||||
protected:
|
||||
Session(shared_ptr<Context> context);
|
||||
Session(shared_ptr<Context> context, string filename);
|
||||
|
|
|
@ -257,6 +257,8 @@ typedef std::map<const sigrok::ConfigKey *, Glib::VariantBase>
|
|||
%attributestring(sigrok::Session,
|
||||
std::shared_ptr<sigrok::Trigger>, trigger, trigger, set_trigger);
|
||||
|
||||
%attributestring(sigrok::Session, std::string, filename, filename);
|
||||
|
||||
%attribute(sigrok::Packet,
|
||||
const sigrok::PacketType *, type, type);
|
||||
%attributestring(sigrok::Packet,
|
||||
|
|
Loading…
Reference in New Issue