]> sigrok.org Git - libsigrok.git/commitdiff
bindings: Remove Device::description().
authorMartin Ling <redacted>
Sun, 12 Oct 2014 16:57:27 +0000 (17:57 +0100)
committerBert Vermeulen <redacted>
Wed, 15 Oct 2014 11:44:44 +0000 (13:44 +0200)
bindings/cxx/classes.cpp
bindings/cxx/include/libsigrok/libsigrok.hpp
bindings/swig/classes.i

index 1747bdff5f0c787545a80afa3f20b4efdfacbaa4..41ded8522ba89c6d22aff03d74e9e6c122369674 100644 (file)
@@ -437,29 +437,6 @@ Device::~Device()
                delete entry.second;
 }
 
-string Device::description()
-{
-       ostringstream s;
-
-       vector<string> parts =
-               {vendor(), model(), version(), serial_number()};
-
-       for (size_t i = 0; i < parts.size(); i++)
-       {
-               if (parts[i].length() > 0)
-               {
-                       if (i != 0)
-                               s << " ";
-                       s << parts[i];
-               }
-       }
-
-       if (serial_number().length() == 0 && connection_id().length() > 0)
-               s << " " << connection_id();
-
-       return s.str();
-}
-
 string Device::vendor()
 {
        return valid_string(_structure->vendor);
@@ -789,11 +766,6 @@ SessionDevice::~SessionDevice()
 {
 }
 
-string SessionDevice::description()
-{
-       return _parent->_filename;
-}
-
 shared_ptr<Device> SessionDevice::get_shared_from_this()
 {
        return static_pointer_cast<Device>(shared_from_this());
@@ -1365,11 +1337,6 @@ InputDevice::~InputDevice()
 {
 }
 
-string InputDevice::description()
-{
-       return "<input data>";
-}
-
 shared_ptr<Device> InputDevice::get_shared_from_this()
 {
        return static_pointer_cast<Device>(shared_from_this());
index 3e49bd5986defbc4cbabc789c0adf0be2c08a9f6..0fcc59d0f682c3f0150cd0de4071170ee3efd640 100644 (file)
@@ -352,8 +352,6 @@ protected:
 class SR_API Device : public Configurable
 {
 public:
-       /** Description identifying this device. */
-       virtual string description();
        /** Vendor name for this device. */
        string vendor();
        /** Model name for this device. */
@@ -615,8 +613,6 @@ class SR_API SessionDevice :
        public ParentOwned<SessionDevice, Session, struct sr_dev_inst>,
        public Device
 {
-       /** Description identifying this device. */
-       string description();
 protected:
        SessionDevice(struct sr_dev_inst *sdi);
        ~SessionDevice();
@@ -863,9 +859,6 @@ class SR_API InputDevice :
        public ParentOwned<InputDevice, Input, struct sr_dev_inst>,
        public Device
 {
-public:
-       /** Description identifying this device. */
-       string description();
 protected:
        InputDevice(shared_ptr<Input> input, struct sr_dev_inst *sdi);
        ~InputDevice();
index b688a857494fdb0a4b273b60b6db0720188eadc6..ce96c9d9e2af2af0a2f35d7808e59d875f26e4a6 100644 (file)
@@ -208,7 +208,6 @@ typedef std::map<const sigrok::ConfigKey *, Glib::VariantBase>
 %attributeval(sigrok::OutputFormat,
     map_string_Option, options, options);
 
-%attributestring(sigrok::Device, std::string, description, description);
 %attributestring(sigrok::Device, std::string, vendor, vendor);
 %attributestring(sigrok::Device, std::string, model, model);
 %attributestring(sigrok::Device, std::string, version, version);