projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
win32: Fix the Windows build (namespace pollution via windows.h).
[pulseview.git]
/
pv
/
session.hpp
diff --git
a/pv/session.hpp
b/pv/session.hpp
index ba07fdcf648ddacd86ec660086eb457482c394a7..d71b1d6cec3f267bab7044b52dd69d375a1987a3 100644
(file)
--- a/
pv/session.hpp
+++ b/
pv/session.hpp
@@
-18,8
+18,8
@@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef PULSEVIEW_PV_SIGSESSION_H
-#define PULSEVIEW_PV_SIGSESSION_H
+#ifndef PULSEVIEW_PV_SIGSESSION_H
PP
+#define PULSEVIEW_PV_SIGSESSION_H
PP
#include <map>
#include <memory>
#include <map>
#include <memory>
@@
-29,6
+29,11
@@
#include <thread>
#include <vector>
#include <thread>
#include <vector>
+#ifdef _WIN32
+// Windows: Avoid namespace pollution by thread.hpp (which includes windows.h).
+#define NOGDI
+#define NORESOURCE
+#endif
#include <boost/thread.hpp>
#include <QObject>
#include <boost/thread.hpp>
#include <QObject>
@@
-38,13
+43,13
@@
struct srd_decoder;
struct srd_channel;
namespace sigrok {
struct srd_channel;
namespace sigrok {
-
class Analog;
-
class Channel;
-
class Device;
-
class Logic;
-
class Meta;
-
class Packet;
-
class Session;
+class Analog;
+class Channel;
+class Device;
+class Logic;
+class Meta;
+class Packet;
+class Session;
}
namespace pv {
}
namespace pv {
@@
-94,7
+99,11
@@
public:
*/
void set_device(std::shared_ptr<sigrok::Device> device);
*/
void set_device(std::shared_ptr<sigrok::Device> device);
- void set_file(const std::string &name);
+ /**
+ * Sets a sigrok session file as the capture device.
+ * @param name the path to the file.
+ */
+ void set_session_file(const std::string &name);
void set_default_device();
void set_default_device();
@@
-188,4
+197,4
@@
Q_SIGNALS:
} // namespace pv
} // namespace pv
-#endif // PULSEVIEW_PV_SIGSESSION_H
+#endif // PULSEVIEW_PV_SIGSESSION_H
PP