summaryrefslogtreecommitdiff
path: root/libkms++
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-06-04 22:34:58 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-06-07 17:02:08 +0300
commitc3b48926ec686f6376e0207f7ad4d4799fd18289 (patch)
tree76e5ad40bd490f83fa1fbf987a2e7423c6cb89f2 /libkms++
parentcefd494924d24e114065d921c2e7718b806f0820 (diff)
Property: remove now unused to_str()
Diffstat (limited to 'libkms++')
-rw-r--r--libkms++/property.cpp40
-rw-r--r--libkms++/property.h2
2 files changed, 0 insertions, 42 deletions
diff --git a/libkms++/property.cpp b/libkms++/property.cpp
index d4d03b6..e4390ba 100644
--- a/libkms++/property.cpp
+++ b/libkms++/property.cpp
@@ -84,44 +84,4 @@ vector<uint32_t> Property::get_blob_ids() const
drmModePropertyPtr p = m_priv->drm_prop;
return vector<uint32_t>(p->blob_ids, p->blob_ids + p->count_blobs);
}
-
-const std::string Property::to_str(uint64_t val) const
-{
- drmModePropertyPtr p = m_priv->drm_prop;
- string ret;
-
- if (p->flags & DRM_MODE_PROP_ENUM) {
- for (int i = 0; i < p->count_enums; i++) {
- if (p->enums[i].value == val) {
- ret += string("\"") + p->enums[i].name + "\"";
- break;
- }
- }
- ret += " (enum: " + to_string(val) + ")";
- } else if (p->flags & DRM_MODE_PROP_RANGE) {
- ret += to_string(val);
- if (p->count_values == 2)
- ret += " [" + to_string(p->values[0]) + "-" +
- to_string(p->values[1]) + "]";
- else
- ret += " <broken range>";
- } else if (p->flags & DRM_MODE_PROP_BLOB) {
- ret += "Blob id: " + to_string(val);
-
- auto blob = drmModeGetPropertyBlob(card().fd(), (uint32_t) val);
- if (blob) {
- ret += " length: " + to_string(blob->length);
- drmModeFreePropertyBlob(blob);
- }
- } else {
- ret += to_string(val);
- }
-
- if (p->flags & DRM_MODE_PROP_PENDING)
- ret += " (pendig)";
- if (p->flags & DRM_MODE_PROP_IMMUTABLE)
- ret += " (immutable)";
-
- return ret;
-}
}
diff --git a/libkms++/property.h b/libkms++/property.h
index 147496e..b9097ff 100644
--- a/libkms++/property.h
+++ b/libkms++/property.h
@@ -25,8 +25,6 @@ class Property : public DrmObject
public:
const std::string& name() const;
- const std::string to_str(uint64_t val) const;
-
bool is_immutable() const;
bool is_pending() const;