UniMRCP  1.7.0
Data Structures | Typedefs | Functions
apt_multipart_content.h File Reference

Multipart Content Routine. More...

#include "apt_header_field.h"
Include dependency graph for apt_multipart_content.h:

Go to the source code of this file.

Data Structures

struct  apt_content_part_t
 

Typedefs

typedef typedefAPT_BEGIN_EXTERN_C struct apt_multipart_content_t apt_multipart_content_t
 
typedef struct apt_content_part_t apt_content_part_t
 

Functions

apt_multipart_content_tapt_multipart_content_create (apr_size_t max_content_size, const apt_str_t *boundary, apr_pool_t *pool)
 
apt_bool_t apt_multipart_content_add (apt_multipart_content_t *multipart_content, const apt_content_part_t *content_part)
 
apt_bool_t apt_multipart_content_add2 (apt_multipart_content_t *multipart_content, const apt_str_t *content_type, const apt_str_t *content_id, const apt_str_t *body)
 
apt_str_tapt_multipart_content_finalize (apt_multipart_content_t *multipart_content)
 
apt_multipart_content_tapt_multipart_content_assign (const apt_str_t *body, const apt_str_t *boundary, apr_pool_t *pool)
 
apt_bool_t apt_multipart_content_get (apt_multipart_content_t *multipart_content, apt_content_part_t *content_part, apt_bool_t *is_final)
 

Detailed Description

Multipart Content Routine.

Typedef Documentation

◆ apt_content_part_t

Content part declaration

◆ apt_multipart_content_t

typedef typedefAPT_BEGIN_EXTERN_C struct apt_multipart_content_t apt_multipart_content_t

Opaque multipart content declaration

Function Documentation

◆ apt_multipart_content_add()

apt_bool_t apt_multipart_content_add ( apt_multipart_content_t multipart_content,
const apt_content_part_t content_part 
)

Add content part to multipart content

Parameters
multipart_contentthe multipart content to add content part to
content_partthe content part to add
Returns
TRUE on success

◆ apt_multipart_content_add2()

apt_bool_t apt_multipart_content_add2 ( apt_multipart_content_t multipart_content,
const apt_str_t content_type,
const apt_str_t content_id,
const apt_str_t body 
)

Add content part to multipart content by specified header fields and body

Parameters
multipart_contentthe multipart content to add content part to
content_typethe type of content part
content_idthe identifier of content part
bodythe body of content part
Returns
TRUE on success

◆ apt_multipart_content_assign()

apt_multipart_content_t* apt_multipart_content_assign ( const apt_str_t body,
const apt_str_t boundary,
apr_pool_t *  pool 
)

Assign body to multipart content to get (parse) each content part from

Parameters
bodythe body of multipart content to parse
boundarythe boundary to separate content parts
poolthe pool to allocate memory from
Returns
multipart content with assigned body

◆ apt_multipart_content_create()

apt_multipart_content_t* apt_multipart_content_create ( apr_size_t  max_content_size,
const apt_str_t boundary,
apr_pool_t *  pool 
)

Create an empty multipart content

Parameters
max_content_sizethe max size of the content (body)
boundarythe boundary to separate content parts
poolthe pool to allocate memory from
Returns
an empty multipart content

◆ apt_multipart_content_finalize()

apt_str_t* apt_multipart_content_finalize ( apt_multipart_content_t multipart_content)

Finalize multipart content generation

Parameters
multipart_contentthe multipart content to finalize
Returns
generated multipart content

◆ apt_multipart_content_get()

apt_bool_t apt_multipart_content_get ( apt_multipart_content_t multipart_content,
apt_content_part_t content_part,
apt_bool_t is_final 
)

Get the next content part

Parameters
multipart_contentthe multipart content to get the next content part from
content_partthe parsed content part
is_finalindicates the final boundary is reached
Returns
TRUE on success