Aegis  4.25.D505
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
input_multipart Class Reference

#include <multipart.h>

Inheritance diagram for input_multipart:
input_ty

Public Member Functions

virtual ~input_multipart ()
nstring name ()
off_t length ()
void keepalive ()
ssize_t read_inner (void *data, size_t nbytes)
off_t ftell_inner ()
bool is_remote () const

Static Public Member Functions

static input create (input &deeper, const nstring &boundary)

Private Types

enum  line_type_t { line_type_content, line_type_empty, line_type_boundary, line_type_last_boundary }

Private Member Functions

 input_multipart (input &deeper, const nstring &boundary)
line_type_t line_type (const nstring &line)
 input_multipart ()
 input_multipart (const input_multipart &arg)
input_multipartoperator= (const input_multipart &arg)

Private Attributes

input deeper
nstring boundary1
nstring boundary2
int state
unsigned long spos

Detailed Description

The input_multipart class is used to represent an input that extracts the first part of a MIME multipart message.

Definition at line 28 of file multipart.h.


Member Enumeration Documentation

Enumerator:
line_type_content 
line_type_empty 
line_type_boundary 
line_type_last_boundary 

Definition at line 91 of file multipart.h.


Constructor & Destructor Documentation

virtual input_multipart::~input_multipart ( ) [virtual]

The destructor.

input_multipart::input_multipart ( input deeper,
const nstring boundary 
) [private]

The constructor. It is private on purpose, use the create method instead.

Parameters:
deeperthe data source for this filter.
boundaryThe boundary string separating the parts

The default constructor. Do not use.

The copy constructor. Do not use.


Member Function Documentation

static input input_multipart::create ( input deeper,
const nstring boundary 
) [static]

The create class method is used to create new dynamically allocated instances of this class.

Parameters:
deeperthe data source for this filter.
boundaryThe boundary string separating the parts
off_t input_multipart::ftell_inner ( ) [virtual]

The ftell_inner method is used to determine the unbuffered current position within the input.

Implements input_ty.

bool input_multipart::is_remote ( ) const [virtual]

The is_remote method is used to determine whether or not an input stream is from a local file or a remote source. This is only intended to be a generally informative thing, to provide information to the user, it isn't (and can't be) utterly precise.

Reimplemented from input_ty.

void input_multipart::keepalive ( ) [virtual]

The keepalive method is used to set the SO_KEEPALIVE socket option, if the file is a socket. Does nothing otherwise.

Reimplemented from input_ty.

off_t input_multipart::length ( ) [virtual]

The length method is used to determine the length of the input. May return -1 if the length is unknown.

Implements input_ty.

line_type_t input_multipart::line_type ( const nstring line) [private]

The name method is used to determine the name of the input.

Implements input_ty.

input_multipart& input_multipart::operator= ( const input_multipart arg) [private]

The assignment operator. Do not use.

ssize_t input_multipart::read_inner ( void *  data,
size_t  nbytes 
) [virtual]

The read_inner method is used to read unbuffered data from the given input stream. At most nbytes bytes will be read into data. The number of bytes actually read will be returned. At end-of-file, a value <= 0 will be returned, and data will be unchanged. All file read errors or format errors are fatal, and will cause the method to not return.

Parameters:
dataWhere to put the results of the read.
nbytesThe maximum number of bytes to read.
Returns:
The actual number of bytes read, or zero for end-of-file.

Implements input_ty.


Field Documentation

Definition at line 86 of file multipart.h.

Definition at line 87 of file multipart.h.

The deeper instance variable is used to remember the data source for this filter.

Definition at line 84 of file multipart.h.

unsigned long input_multipart::spos [private]

Definition at line 89 of file multipart.h.

int input_multipart::state [private]

Definition at line 88 of file multipart.h.


The documentation for this class was generated from the following file: