|
CURL * | GetEasyHandle () const noexcept |
| Returns a libcurl easy_handle . More...
|
|
CURLcode | GetCurlError () const noexcept |
| Returns the error code that occurs in a function that takes a libcurl easy_handle as the argument. More...
|
|
CURLMcode | GetCurlMultiError () const noexcept |
| Returns the error code that occurs in a function that takes a libcurl multi_handle as the argument. More...
|
|
NLIB_CHECK_RESULT errno_t | Init (BufferSize buffer_size) noexcept |
| Initializes a stream. More...
|
|
NLIB_CHECK_RESULT errno_t | Init () noexcept |
| Executes Init(kBufferSize1x) .
|
|
CURLcode | SetUrl (const char *url) noexcept |
| Sets the URL to be read. More...
|
|
bool | StartDownload () noexcept |
|
|
| CurlInputStream () noexcept |
| Instantiates the object with default parameters (default constructor). The stream must be initialized with Init() .
|
|
virtual | ~CurlInputStream () noexcept override |
| Destructor. More...
|
|
errno_t | GetErrorValue () const noexcept |
| Gets the error value. More...
|
|
size_t | Pos () const noexcept |
| Returns the current position in the stream. More...
|
|
uint64_t | Pos64 () const noexcept |
| Returns the current position in the stream as a 64-bit value. More...
|
|
bool | IsEos () noexcept |
| Returns true if the stream is finished being read through to the end. If the stream has not been read through to the end, or if an error occurs, the function returns false . More...
|
|
int | Read () noexcept |
| Reads one byte of data from the stream. More...
|
|
NLIB_CHECK_RESULT int | Peek () noexcept |
| Reads the next byte without consuming the stream. More...
|
|
size_t | Skip (size_t nbytes) noexcept |
| Skips over the number of bytes specified by nBytes. More...
|
|
size_t | Read (void *ptr, size_t nbytes) noexcept |
| Reads the number of bytes of data specified by nBytes into the memory region specified by ptr. More...
|
|
bool | Close () noexcept |
| Closes the stream. Returns true if successful. More...
|
|
| operator bool () const |
| Returns true if no internal error has occurred.
|
|
constexpr | InputStream () noexcept |
| Instantiates the object. This function is called from the derived class.
|
|
virtual | ~InputStream () noexcept |
| Destructor. This function is called from the derived class.
|
|
The stream class for downloading using libcurl
.
- Description
- By using this class, you can handle data obtained with
libcurl
through the InputStream
interface. The following code is a common implementation for using the class.
}
stream.SetUrl("http://www.nintendo.co.jp/");
}
int c;
while ((c = stream.Read()) != -1) {
....
}
}
stream.Close();
- The transition of the object state.
- The overview of the object state transitions is described below:
Definition at line 31 of file CurlInputStream.h.