1 | // |
2 | // PartSource.cpp |
3 | // |
4 | // Library: Net |
5 | // Package: Messages |
6 | // Module: PartSource |
7 | // |
8 | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. |
9 | // and Contributors. |
10 | // |
11 | // SPDX-License-Identifier: BSL-1.0 |
12 | // |
13 | |
14 | |
15 | #include "Poco/Net/PartSource.h" |
16 | |
17 | |
18 | namespace Poco { |
19 | namespace Net { |
20 | |
21 | |
22 | const int PartSource::UNKNOWN_CONTENT_LENGTH = -1; |
23 | |
24 | |
25 | PartSource::PartSource(): |
26 | _mediaType("application/octet-stream" ) |
27 | { |
28 | } |
29 | |
30 | |
31 | PartSource::PartSource(const std::string& mediaType): |
32 | _mediaType(mediaType) |
33 | { |
34 | } |
35 | |
36 | |
37 | PartSource::~PartSource() |
38 | { |
39 | } |
40 | |
41 | |
42 | namespace |
43 | { |
44 | static const std::string EMPTY; |
45 | } |
46 | |
47 | |
48 | const std::string& PartSource::filename() const |
49 | { |
50 | return EMPTY; |
51 | } |
52 | |
53 | std::streamsize PartSource::getContentLength() const |
54 | { |
55 | return UNKNOWN_CONTENT_LENGTH; |
56 | } |
57 | |
58 | } } // namespace Poco::Net |
59 | |