UrlencodedOutputStream.h
Go to the documentation of this file.
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2015 by Skurydin Alexey
4  * http://github.com/SmingHub/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * UrlencodedOutputStream.h
8  *
9  * @author Slavey Karadzhov <slaff@attachix.com>
10  *
11  ****/
12 
13 #pragma once
14 
15 #include "MemoryDataStream.h"
17 
26 {
27 public:
32  UrlencodedOutputStream(const HttpParams& params);
33 
34  //Use base class documentation
35  StreamType getStreamType() const override
36  {
37  return stream.getStreamType();
38  }
39 
44  int available() override
45  {
46  return stream.available();
47  }
48 
49  //Use base class documentation
50  uint16_t readMemoryBlock(char* data, int bufSize) override
51  {
52  return stream.readMemoryBlock(data, bufSize);
53  }
54 
55  //Use base class documentation
56  bool seek(int len) override
57  {
58  return stream.seek(len);
59  }
60 
61  //Use base class documentation
62  bool isFinished() override
63  {
64  return stream.isFinished();
65  }
66 
67 private:
68  MemoryDataStream stream;
69 };
70 
int available() override
Return the total length of the stream.
Definition: UrlencodedOutputStream.h:44
bool isFinished() override
Check if all data has been read.
Definition: MemoryDataStream.h:71
Definition: HttpParams.h:31
Base class for data source stream.
Definition: DataSourceStream.h:39
UrlEncoded Stream.
Definition: UrlencodedOutputStream.h:25
uint16_t readMemoryBlock(char *data, int bufSize) override
Read a block of memory.
Definition: UrlencodedOutputStream.h:50
int available() override
Return the total length of the stream.
Definition: MemoryDataStream.h:53
bool seek(int len) override
Move read cursor.
Definition: UrlencodedOutputStream.h:56
virtual bool seek(int len)
Move read cursor.
Definition: DataSourceStream.h:96
StreamType getStreamType() const override
Get the stream type.
Definition: UrlencodedOutputStream.h:35
StreamType
Data stream type.
Definition: DataSourceStream.h:22
uint16_t readMemoryBlock(char *data, int bufSize) override
Read a block of memory.
UrlencodedOutputStream(const HttpParams &params)
Represents key-value pairs as urlencoded string.
bool isFinished() override
Check if all data has been read.
Definition: UrlencodedOutputStream.h:62
StreamType getStreamType() const override
Get the stream type.
Definition: MemoryDataStream.h:36
Definition: MemoryDataStream.h:28