From: Uwe Hermann Date: Fri, 11 Jan 2019 00:10:53 +0000 (+0100) Subject: Factor out init.hpp. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=8ab86460091b3065411e3b48a63ac54b7f207689;p=libsigrokflow.git Factor out init.hpp. --- diff --git a/Makefile.am b/Makefile.am index 5ebd114..4ee00a2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,7 +40,8 @@ libsigrokflow_la_LDFLAGS = -version-info $(SRF_LIB_VERSION) -no-undefined library_includedir = $(includedir)/libsigrokflow library_include_HEADERS = \ - include/libsigrokflow/libsigrokflow.hpp + include/libsigrokflow/libsigrokflow.hpp \ + include/libsigrokflow/init.hpp pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libsigrokflow.pc diff --git a/include/libsigrokflow/init.hpp b/include/libsigrokflow/init.hpp new file mode 100644 index 0000000..f4f3987 --- /dev/null +++ b/include/libsigrokflow/init.hpp @@ -0,0 +1,32 @@ +/* + * 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_INIT_HPP +#define LIBSIGROKFLOW_INIT_HPP + +namespace Srf +{ + +void init(); + +void deinit(); + +} +#endif diff --git a/include/libsigrokflow/libsigrokflow.hpp b/include/libsigrokflow/libsigrokflow.hpp index 56e248d..98397b5 100644 --- a/include/libsigrokflow/libsigrokflow.hpp +++ b/include/libsigrokflow/libsigrokflow.hpp @@ -35,15 +35,13 @@ #include #endif +#include + namespace Srf { using namespace std; -void init(); - -void deinit(); - class Block { /* Config API etc. goes here. */ diff --git a/src/init.cpp b/src/init.cpp index e306ff2..e299592 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -19,10 +19,16 @@ */ #include -#include +#include +#include +#include +#include +#include +#include namespace Srf { +using namespace std; static bool srf_initialized_ = false;