Odil
A C++11 library for the DICOM standard
Loading...
Searching...
No Matches
multipart_related.h
Go to the documentation of this file.
1/*************************************************************************
2 * odil - Copyright (C) Universite de Strasbourg
3 * Distributed under the terms of the CeCILL-B license, as published by
4 * the CEA-CNRS-INRIA. Refer to the LICENSE file or to
5 * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
6 * for details.
7 ************************************************************************/
8
9#ifndef _9d8fe506_1ea6_448c_8c6c_bcd7375e89de
10#define _9d8fe506_1ea6_448c_8c6c_bcd7375e89de
11
12#include <ostream>
13#include <string>
14
16
17namespace odil
18{
19
20namespace webservices
21{
22
25
30ODIL_API std::size_t count_parts(Message const & message);
31
34
36template<typename Iterator, typename UnaryFunctor>
38 Message const & message, Iterator destination, UnaryFunctor functor);
39
40
42template<typename UnaryFunctor>
43void for_each_part(Message const & message, UnaryFunctor functor);
44
50template<typename Iterator, typename UnaryFunction>
51std::ostream & accumulate_parts(
52 Iterator begin, Iterator end, UnaryFunction serialize, std::ostream & stream,
53 std::string const & boundary);
54
55}
56
57}
58
59#include "multipart_related.txx"
60
61#endif // _9d8fe506_1ea6_448c_8c6c_bcd7375e89de
RFC 5322 Message (i.e. headers with body).
Definition Message.h:27
void for_each_part(Message const &message, UnaryFunctor functor)
Use to call a functor for each part of a multipart/related message.
bool is_multipart_related(Message const &message)
Test whether the message is multipart/related.
void transform_parts(Message const &message, Iterator destination, UnaryFunctor functor)
Transform each part of a multipart/related message.
std::string random_boundary()
Return a random multipart/related boundary.
std::ostream & accumulate_parts(Iterator begin, Iterator end, UnaryFunction serialize, std::ostream &stream, std::string const &boundary)
Serialize the (begin, end) sequence as a multipart/related message body in stream as described in the...
std::size_t count_parts(Message const &message)
Return the number of parts in the message, 0 if the message is not multipart/related.
Definition Association.h:25
#define ODIL_API
Definition odil.h:28