bindings: Add Session::filename() and corresponding SWIG attribute.

This commit is contained in:
Martin Ling 2014-10-12 17:53:10 +01:00 committed by Bert Vermeulen
parent 73a1eb017b
commit 1411f7d8e9
3 changed files with 9 additions and 0 deletions

View File

@ -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),

View File

@ -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);

View File

@ -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,