From: Uwe Hermann Date: Fri, 11 Jan 2019 00:17:32 +0000 (+0100) Subject: Factor out main.hpp. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=3f86037d18c697ec9f97eca1a615ad169589da61;p=libsigrokflow.git Factor out main.hpp. --- diff --git a/Makefile.am b/Makefile.am index 4ee00a2..c37e17e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -41,6 +41,7 @@ libsigrokflow_la_LDFLAGS = -version-info $(SRF_LIB_VERSION) -no-undefined library_includedir = $(includedir)/libsigrokflow library_include_HEADERS = \ include/libsigrokflow/libsigrokflow.hpp \ + include/libsigrokflow/main.hpp \ include/libsigrokflow/init.hpp pkgconfigdir = $(libdir)/pkgconfig diff --git a/include/libsigrokflow/libsigrokflow.hpp b/include/libsigrokflow/libsigrokflow.hpp index 98397b5..6bd159f 100644 --- a/include/libsigrokflow/libsigrokflow.hpp +++ b/include/libsigrokflow/libsigrokflow.hpp @@ -35,6 +35,7 @@ #include #endif +#include #include namespace Srf @@ -42,34 +43,6 @@ namespace Srf using namespace std; -class Block -{ - /* Config API etc. goes here. */ -}; - -class Sink : - public Gst::BaseSink -{ -protected: - explicit Sink(GstBaseSink *gobj); -}; - -class Device : - public Gst::Element -{ - /* Operations specific to hardware devices go here. */ -protected: - explicit Device(GstElement *gobj); -}; - -class CaptureDevice : - public Device -{ - /* Operations specific to capture (source) devices go here. */ -protected: - explicit CaptureDevice(GstElement *gobj); -}; - #ifdef HAVE_LIBSIGROKCXX class LegacyCaptureDevice : public CaptureDevice diff --git a/include/libsigrokflow/main.hpp b/include/libsigrokflow/main.hpp new file mode 100644 index 0000000..b177eb1 --- /dev/null +++ b/include/libsigrokflow/main.hpp @@ -0,0 +1,58 @@ +/* + * This file is part of the libsigrokflow project. + * + * Copyright (C) 2018 Martin Ling + * Copyright (C) 2018 Uwe Hermann + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * 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, see . + */ + +#ifndef LIBSIGROKFLOW_MAIN_HPP +#define LIBSIGROKFLOW_MAIN_HPP + +#include + +namespace Srf +{ + +class Block +{ + /* Config API etc. goes here. */ +}; + +class Sink : + public Gst::BaseSink +{ +protected: + explicit Sink(GstBaseSink *gobj); +}; + +class Device : + public Gst::Element +{ + /* Operations specific to hardware devices go here. */ +protected: + explicit Device(GstElement *gobj); +}; + +class CaptureDevice : + public Device +{ + /* Operations specific to capture (source) devices go here. */ +protected: + explicit CaptureDevice(GstElement *gobj); +}; + +} +#endif diff --git a/src/main.cpp b/src/main.cpp index 6ade497..ae0cd9d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,7 +19,8 @@ */ #include -#include +#include +#include namespace Srf {