]> sigrok.org Git - libsigrok.git/blobdiff - bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp
Add filename field to sr_output and make it accessible
[libsigrok.git] / bindings / cxx / include / libsigrokcxx / libsigrokcxx.hpp
index 0542a1be8e15132733e45a0bf77c040a93434efd..9bc9cdaa11282ae4352839527d13c8b44900d286 100644 (file)
@@ -888,8 +888,9 @@ public:
        /** Virtual device associated with this input. */
        shared_ptr<InputDevice> device();
        /** Send next stream data.
-        * @param data Next stream data. */
-       void send(string data);
+        * @param data Next stream data.
+        * @param length Length of data. */
+       void send(void *data, size_t length);
        /** Signal end of input data. */
        void end();
 protected:
@@ -948,12 +949,24 @@ public:
        string name();
        /** Description of this output format. */
        string description();
+       /** A list of preferred file name extensions for this file format.
+         * @note This list is a recommendation only. */
+       vector<string> extensions();
        /** Options supported by this output format. */
        map<string, shared_ptr<Option> > options();
        /** Create an output using this format.
         * @param device Device to output for.
         * @param options Mapping of (option name, value) pairs. */
-       shared_ptr<Output> create_output(shared_ptr<Device> device,
+       shared_ptr<Output> create_output(
+               shared_ptr<Device> device,
+               map<string, Glib::VariantBase> options =
+                       map<string, Glib::VariantBase>());
+       /** Create an output using this format.
+        * @param filename Name of destination file.
+        * @param device Device to output for.
+        * @param options Mapping of (option name, value) pairs. */
+       shared_ptr<Output> create_output(string filename,
+               shared_ptr<Device> device,
                map<string, Glib::VariantBase> options =
                        map<string, Glib::VariantBase>());
 protected:
@@ -974,6 +987,8 @@ protected:
        Output(shared_ptr<OutputFormat> format, shared_ptr<Device> device);
        Output(shared_ptr<OutputFormat> format,
                shared_ptr<Device> device, map<string, Glib::VariantBase> options);
+       Output(string filename, shared_ptr<OutputFormat> format,
+               shared_ptr<Device> device, map<string, Glib::VariantBase> options);
        ~Output();
        const shared_ptr<OutputFormat> _format;
        const shared_ptr<Device> _device;