apt_multipart_content.h File Reference

Multipart Content Routine. More...

#include "apt_header_field.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

Content part declaration

typedef typedefAPT_BEGIN_EXTERN_C struct apt_multipart_content_t apt_multipart_content_t

Opaque multipart content declaration


Function Documentation

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_content the multipart content to add content part to
content_part the content part to add
Returns:
TRUE on success
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_content the multipart content to add content part to
content_type the type of content part
content_id the identifier of content part
body the body of content part
Returns:
TRUE on success
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:
body the body of multipart content to parse
boundary the boundary to separate content parts
pool the pool to allocate memory from
Returns:
multipart content with assigned body
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_size the max size of the content (body)
boundary the boundary to separate content parts
pool the pool to allocate memory from
Returns:
an empty multipart content
apt_str_t* apt_multipart_content_finalize ( apt_multipart_content_t multipart_content  ) 

Finalize multipart content generation

Parameters:
multipart_content the multipart content to finalize
Returns:
generated multipart content
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_content the multipart content to get the next content part from
content_part the parsed content part
is_final indicates the final boundary is reached
Returns:
TRUE on success
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 25 Mar 2013 for UniMRCP by  doxygen 1.6.1