diff options
| author | orivej <[email protected]> | 2022-02-10 16:45:01 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:45:01 +0300 |
| commit | 2d37894b1b037cf24231090eda8589bbb44fb6fc (patch) | |
| tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/libs/poco/Net/src/StringPartSource.cpp | |
| parent | 718c552901d703c502ccbefdfc3c9028d608b947 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/poco/Net/src/StringPartSource.cpp')
| -rw-r--r-- | contrib/libs/poco/Net/src/StringPartSource.cpp | 134 |
1 files changed, 67 insertions, 67 deletions
diff --git a/contrib/libs/poco/Net/src/StringPartSource.cpp b/contrib/libs/poco/Net/src/StringPartSource.cpp index d007155a6c8..a512449f69f 100644 --- a/contrib/libs/poco/Net/src/StringPartSource.cpp +++ b/contrib/libs/poco/Net/src/StringPartSource.cpp @@ -1,67 +1,67 @@ -// -// StringPartSource.cpp -// -// Library: Net -// Package: Messages -// Module: StringPartSource -// -// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "Poco/Net/StringPartSource.h" - - -namespace Poco { -namespace Net { - - -StringPartSource::StringPartSource(const std::string& str): - PartSource("text/plain"), - _istr(str) -{ -} - - -StringPartSource::StringPartSource(const std::string& str, const std::string& mediaType): - PartSource(mediaType), - _istr(str) -{ -} - - -StringPartSource::StringPartSource(const std::string& str, const std::string& mediaType, const std::string& filename): - PartSource(mediaType), - _istr(str), - _filename(filename) -{ -} - - -StringPartSource::~StringPartSource() -{ -} - - -std::istream& StringPartSource::stream() -{ - return _istr; -} - - -const std::string& StringPartSource::filename() const -{ - return _filename; -} - - -std::streamsize StringPartSource::getContentLength() const -{ - return _istr.str().length(); -} - - -} } // namespace Poco::Net +// +// StringPartSource.cpp +// +// Library: Net +// Package: Messages +// Module: StringPartSource +// +// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. +// and Contributors. +// +// SPDX-License-Identifier: BSL-1.0 +// + + +#include "Poco/Net/StringPartSource.h" + + +namespace Poco { +namespace Net { + + +StringPartSource::StringPartSource(const std::string& str): + PartSource("text/plain"), + _istr(str) +{ +} + + +StringPartSource::StringPartSource(const std::string& str, const std::string& mediaType): + PartSource(mediaType), + _istr(str) +{ +} + + +StringPartSource::StringPartSource(const std::string& str, const std::string& mediaType, const std::string& filename): + PartSource(mediaType), + _istr(str), + _filename(filename) +{ +} + + +StringPartSource::~StringPartSource() +{ +} + + +std::istream& StringPartSource::stream() +{ + return _istr; +} + + +const std::string& StringPartSource::filename() const +{ + return _filename; +} + + +std::streamsize StringPartSource::getContentLength() const +{ + return _istr.str().length(); +} + + +} } // namespace Poco::Net |
