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
 

Friends

class TMultipartFormData
 

Detailed Description

The TMimeEntity represents a MIME entity.

Constructor & Destructor Documentation

TMimeEntity::TMimeEntity ( )
inline
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
inline

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
inline

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

TMimeHeader & TMimeEntity::header ( )
inline

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

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

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

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

Assignment operator.

QString TMimeEntity::originalFileName ( ) const
inline

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
friend

Member Data Documentation

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

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