TreeFrogFramework  1.29
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() [1/2]

TMimeEntity::TMimeEntity ( )

◆ TMimeEntity() [2/2]

TMimeEntity::TMimeEntity ( const TMimeEntity other)

Copy constructor.

Member Function Documentation

◆ contentType()

QString TMimeEntity::contentType ( ) const

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

◆ dataName()

QByteArray TMimeEntity::dataName ( ) const

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

◆ fileSize()

qint64 TMimeEntity::fileSize ( ) const

Returns the file size in bytes.

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

◆ header() [1/3]

TMimeHeader& TMimeEntity::header ( )

◆ header() [2/3]

TMimeHeader & TMimeEntity::header ( ) const

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

◆ header() [3/3]

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

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

◆ operator=()

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

Assignment operator.

◆ originalFileName()

QString TMimeEntity::originalFileName ( ) const

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

◆ renameUploadedFile()

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.

◆ uploadedFilePath()

QString TMimeEntity::uploadedFilePath ( ) const

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

Friends And Related Function Documentation

◆ TMultipartFormData

friend class TMultipartFormData

Member Data Documentation

◆ DefaultPermissions

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

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