2012-04-29 18:52:25 +00:00
|
|
|
//
|
|
|
|
// PartSource.cpp
|
|
|
|
//
|
|
|
|
// Library: Net
|
|
|
|
// Package: Messages
|
|
|
|
// Module: PartSource
|
|
|
|
//
|
|
|
|
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
|
|
|
// and Contributors.
|
|
|
|
//
|
2014-05-04 21:02:42 +02:00
|
|
|
// SPDX-License-Identifier: BSL-1.0
|
2012-04-29 18:52:25 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
#include "Poco/Net/PartSource.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace Poco {
|
|
|
|
namespace Net {
|
|
|
|
|
|
|
|
|
2013-12-04 18:19:20 -02:00
|
|
|
const int PartSource::UNKNOWN_CONTENT_LENGTH = -1;
|
|
|
|
|
|
|
|
|
2012-04-29 18:52:25 +00:00
|
|
|
PartSource::PartSource():
|
|
|
|
_mediaType("application/octet-stream")
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
PartSource::PartSource(const std::string& mediaType):
|
|
|
|
_mediaType(mediaType)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
PartSource::~PartSource()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
namespace
|
|
|
|
{
|
|
|
|
static const std::string EMPTY;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-03-10 23:36:04 -05:00
|
|
|
const std::string& PartSource::filename() const
|
2012-04-29 18:52:25 +00:00
|
|
|
{
|
|
|
|
return EMPTY;
|
|
|
|
}
|
|
|
|
|
2013-12-04 18:19:20 -02:00
|
|
|
std::streamsize PartSource::getContentLength() const
|
|
|
|
{
|
|
|
|
return UNKNOWN_CONTENT_LENGTH;
|
|
|
|
}
|
2012-04-29 18:52:25 +00:00
|
|
|
|
|
|
|
} } // namespace Poco::Net
|