-
-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor TemplateFileStream class using TemplateStream
DataSourceStream * [BC] Amend StreamType enumeration eSST_TemplateFile -> eSST_Template * [BC] Make getStreamType() method const * [BC] make id() method const * Add virtual getName() method to provide generic way of getting filename from TemplateStream wrapper * Add virtual isValid() method TemplateFileStream * Refactor as TemplateStream class to allow any other stream type to provide source template data * Replace int with unsigned or size_t as appropriate * Minor code improvements HttpRequest * setFile() method can use any ReadWriteStream-derived class, doesn't have to be FileStream.
- Loading branch information
Showing
23 changed files
with
231 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/**** | ||
* Sming Framework Project - Open Source framework for high efficiency native ESP8266 development. | ||
* Created 2015 by Skurydin Alexey | ||
* http://github.com/anakod/Sming | ||
* All files of the Sming Core are provided under the LGPL v3 license. | ||
****/ | ||
|
||
#ifndef _SMING_CORE_DATA_TEMPLATE_FILE_STREAM_H_ | ||
#define _SMING_CORE_DATA_TEMPLATE_FILE_STREAM_H_ | ||
|
||
#include "FileStream.h" | ||
#include "TemplateStream.h" | ||
|
||
/** | ||
* @brief Template File stream class | ||
* @ingroup stream data | ||
* | ||
* @{ | ||
*/ | ||
|
||
class TemplateFileStream : public TemplateStream | ||
{ | ||
public: | ||
/** @brief Create a template file stream | ||
* @param templateFileName Template filename | ||
*/ | ||
TemplateFileStream(const String& fileName) : TemplateStream(new FileStream(fileName)) | ||
{ | ||
} | ||
}; | ||
|
||
/** @} */ | ||
|
||
#endif /* _SMING_CORE_DATA_TEMPLATE_FILE_STREAM_H_ */ |
Oops, something went wrong.