TreeFrogFramework  1.18
Public Member Functions | Static Public Attributes | Friends | List of all members
TMimeEntity Class Reference

#include <tmultipartformdata.h>

Public Member Functions

 TMimeEntity ()
 TMimeEntity (const TMimeEntity &other)
TMimeEntityoperator= (const TMimeEntity &other)
const TMimeHeaderheader () const
TMimeHeaderheader ()
QByteArray header (const QByteArray &headerName) const
QByteArray dataName () const
QString contentType () const
qint64 fileSize () const
QString originalFileName () const
bool renameUploadedFile (const QString &newName, bool overwrite=false, QFile::Permissions permissions=DefaultPermissions)
QString uploadedFilePath () const

Static Public Attributes

static const QFile::Permissions DefaultPermissions = TMultipartFormData::DefaultPermissions


class TMultipartFormData

Detailed Description

The TMimeEntity represents a MIME entity.

Constructor & Destructor Documentation

TMimeEntity::TMimeEntity ( )
TMimeEntity::TMimeEntity ( const TMimeEntity other)

Copy constructor.

Member Function Documentation

QString TMimeEntity::contentType ( ) const

Returns the value of the MIME header field content-type.

QByteArray TMimeEntity::dataName ( ) const

Returns the parameter 'name' of the header field content-disposition in this entity.

qint64 TMimeEntity::fileSize ( ) const

Returns the file size in bytes.

If the file does not exist, -1 is returned.

const TMimeHeader & TMimeEntity::header ( ) const

Returns a reference to the MIME header contained in this entity.

TMimeHeader & TMimeEntity::header ( )

Returns a reference to the MIME header contained in this entity.

QByteArray TMimeEntity::header ( const QByteArray &  headerName) const

Returns the value of the header headerName contained in this entity.

TMimeEntity & TMimeEntity::operator= ( const TMimeEntity other)

Assignment operator.

QString TMimeEntity::originalFileName ( ) const

Returns the original name of the file contained in this entity.

bool TMimeEntity::renameUploadedFile ( const QString &  newName,
bool  overwrite = false,
QFile::Permissions  permissions = DefaultPermissions 

Renames the file contained in this entity to newName.

Returns true if successful; otherwise returns false. This function will overwrite it if the overwrite is true. The newName can have a relative path or an absolute path.

QString TMimeEntity::uploadedFilePath ( ) const

Returns the name of the temporary file contained in this entity, including the absolute path.

Friends And Related Function Documentation

friend class TMultipartFormData

Member Data Documentation

const QFile::Permissions TMimeEntity::DefaultPermissions = TMultipartFormData::DefaultPermissions

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