]> sigrok.org Git - pulseview.git/blobdiff - pv/binding/decoder.hpp
Remove DecodeStack dependency from decode binding wrapper
[pulseview.git] / pv / binding / decoder.hpp
index 48e5945bc32f6451c31c8d429b3c9f9846817178..a93a057f1a371b8571f19b0cd2808aa11e217b9e 100644 (file)
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
  */
 
-#ifndef PULSEVIEW_PV_BINDING_DECODER_H
-#define PULSEVIEW_PV_BINDING_DECODER_H
+#ifndef PULSEVIEW_PV_BINDING_DECODER_HPP
+#define PULSEVIEW_PV_BINDING_DECODER_HPP
 
 #include "binding.hpp"
 
 #include <pv/prop/property.hpp>
 
 
 #include "binding.hpp"
 
 #include <pv/prop/property.hpp>
 
+using std::shared_ptr;
+
 struct srd_decoder_option;
 
 namespace pv {
 
 namespace data {
 struct srd_decoder_option;
 
 namespace pv {
 
 namespace data {
-class DecoderStack;
+class DecodeSignal;
 namespace decode {
 class Decoder;
 }
 namespace decode {
 class Decoder;
 }
@@ -41,12 +42,12 @@ namespace binding {
 class Decoder : public Binding
 {
 public:
 class Decoder : public Binding
 {
 public:
-       Decoder(std::shared_ptr<pv::data::DecoderStack> decoder_stack,
-               std::shared_ptr<pv::data::decode::Decoder> decoder);
+       Decoder(shared_ptr<pv::data::DecodeSignal> decode_signal,
+               shared_ptr<pv::data::decode::Decoder> decoder);
 
 private:
 
 private:
-       static std::shared_ptr<prop::Property> bind_enum(const QString &name,
-               const srd_decoder_option *option,
+       static shared_ptr<prop::Property> bind_enum(const QString &name,
+               const QString &desc, const srd_decoder_option *option,
                prop::Property::Getter getter, prop::Property::Setter setter);
 
        Glib::VariantBase getter(const char *id);
                prop::Property::Getter getter, prop::Property::Setter setter);
 
        Glib::VariantBase getter(const char *id);
@@ -54,11 +55,11 @@ private:
        void setter(const char *id, Glib::VariantBase value);
 
 private:
        void setter(const char *id, Glib::VariantBase value);
 
 private:
-       std::shared_ptr<pv::data::DecoderStack> decoder_stack_;
-       std::shared_ptr<pv::data::decode::Decoder> decoder_;
+       shared_ptr<pv::data::DecodeSignal> decode_signal_;
+       shared_ptr<pv::data::decode::Decoder> decoder_;
 };
 
 };
 
-} // binding
-} // pv
+}  // namespace binding
+}  // namespace pv
 
 
-#endif // PULSEVIEW_PV_BINDING_DECODER_H
+#endif // PULSEVIEW_PV_BINDING_DECODER_HPP