TreeFrogFramework  2.8
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
 
int64_t 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
 

Friends

class TMultipartFormData
 

Detailed Description

The TMimeEntity represents a MIME entity.

Constructor & Destructor Documentation

◆ TMimeEntity() [1/2]

TMimeEntity::TMimeEntity ( )
inline

◆ 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
inline

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

◆ fileSize()

int64_t TMimeEntity::fileSize ( ) const

Returns the file size in bytes.

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

◆ header() [1/3]

TMimeHeader & TMimeEntity::header ( )
inline

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

◆ header() [2/3]

const TMimeHeader & TMimeEntity::header ( ) const
inline

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

◆ header() [3/3]

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

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
inline

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
friend

Member Data Documentation

◆ DefaultPermissions

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

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