diff options
| author | orivej <[email protected]> | 2022-02-10 16:44:49 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:44:49 +0300 |
| commit | 718c552901d703c502ccbefdfc3c9028d608b947 (patch) | |
| tree | 46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /contrib/libs/poco/Net/src/StringPartSource.cpp | |
| parent | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 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 a512449f69f..d007155a6c8 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 |
