Faspstream Manager C/C++ API  3.6.1
A C and C++ language interface to basic streaming over the fasp protocol
FaspInputStream.h
Go to the documentation of this file.
1 /*
2  * Aspera, Inc.
3  *
4  * C++ only.
5  *
6  * FaspInputStream class.
7  */
8 #pragma once
9 
10 #include <string>
11 #include <vector>
12 
13 #include <Poco/Process.h>
14 #include <Poco/SharedPtr.h>
15 #include <Poco/PipeStream.h>
16 
17 #include "Constants.h"
18 
19 #ifdef WIN32
20 
21 #ifdef FASPSTREAM_CPP_EXPORTS
22 #define FASPSTREAM_CPP_API __declspec(dllexport)
23 #else
24 #define FASPSTREAM_CPP_API __declspec(dllimport)
25 #endif
26 
27 #else // NOT WIN32
28 #define FASPSTREAM_CPP_API
29 #endif
30 
37 {
38 
39 public:
45  FASPSTREAM_CPP_API FaspInputStream(const Poco::Pipe &outPipe, Poco::SharedPtr<Poco::ProcessHandle> ph);
65  FASPSTREAM_CPP_API int read(char* buffer, int offset, int length);
72  FASPSTREAM_CPP_API bool eof();
79 
80 private:
81  Poco::Pipe _outPipe;
82  Poco::SharedPtr<Poco::ProcessHandle> _ph;
83  bool _eof;
84 };
FASPSTREAM_CPP_API void cleanup()
Definition: FaspInputStream.h:36
#define FASPSTREAM_CPP_API
Definition: FaspInputStream.h:28
FASPSTREAM_CPP_API bool eof()
FASPSTREAM_CPP_API int read(char *buffer, int offset, int length)
FASPSTREAM_CPP_API void abort()
FASPSTREAM_CPP_API FaspInputStream(const Poco::Pipe &outPipe, Poco::SharedPtr< Poco::ProcessHandle > ph)
FASPSTREAM_CPP_API void close()