Home · All Classes · Grouped Classes · Annotated · Functions

QObexFolderListingEntryInfo Class Reference

The QObexFolderListingEntryInfo class provides information about an item in an OBEX folder listing object. More...

    #include <QObexFolderListingEntryInfo>

Public Types

Public Functions

Static Public Members


Detailed Description

The QObexFolderListingEntryInfo class provides information about an item in an OBEX folder listing object.

OBEX specification provides a standard way for OBEX peers to exchange file and folder information. The OBEX specification defines a standard XML file format for exchanging these listing objects and is called Folder-Listing.

The information provided by the folder listing format can include the name(), size(), lastModified(), created(), lastRead(), permissions(), group(), owner(), mimetype(), description() attributes about each particular item in the listing. The QObexFolderListingEntryInfo object stores each folider listing item's attributes.

You can create your own QObexFolderListingEntryInfo objects by passing in all the relevant information in the constructor, and you can modify a QObexFolderListingEntryInfo; for each getter mentioned above there is an equivalent setter. Note that setting values does not affect the underlying resource that the QObexFolderListingEntryInfo provides information about.


Member Type Documentation

enum QObexFolderListingEntryInfo::Permission
flags QObexFolderListingEntryInfo::Permissions

This enum is used by the permissions() function to report the permissions of a file or directory.

ConstantValueDescription
QObexFolderListingEntryInfo::ReadOwner0400The file is readable by the owner of the file.
QObexFolderListingEntryInfo::WriteOwner0200The file is writable by the owner of the file.
QObexFolderListingEntryInfo::DeleteOwner0100The file is deletable by the owner of the file.
QObexFolderListingEntryInfo::ReadGroup0040The file is readable by the group.
QObexFolderListingEntryInfo::WriteGroup0020The file is writable by the group.
QObexFolderListingEntryInfo::DeleteGroup0010The file is deletable by the group.
QObexFolderListingEntryInfo::ReadOther0004The file is readable by anyone.
QObexFolderListingEntryInfo::WriteOther0002The file is writable by anyone.
QObexFolderListingEntryInfo::DeleteOther0001The file is deletable by anyone.

The Permissions type is a typedef for QFlags<Permission>. It stores an OR combination of Permission values.


Member Function Documentation

QObexFolderListingEntryInfo::QObexFolderListingEntryInfo ()

Constructs an invalid folder listing info object.

See also isValid().

QObexFolderListingEntryInfo::QObexFolderListingEntryInfo ( const QObexFolderListingEntryInfo & other )

Constructs a new copy of a folder listing info from other.

See also isValid().

QObexFolderListingEntryInfo::~QObexFolderListingEntryInfo ()

Destructor

QObexFolderListingEntryInfo QObexFolderListingEntryInfo::createFile ( const QString & name, qint64 size, const QDateTime & lastModified, const QDateTime & lastAccessed, const QDateTime & timeCreated, QObexFolderListingEntryInfo::Permissions permissions, const QString & owner, const QString & group, const QString & mimetype, const QString & description = QString(), const ExtensionAttributes & extensionAttributes = ExtensionAttributes() )   [static]

Creates a Folder Listing entry that represents a file with name, size. The file was last modified on lastModified, last accessed on lastAccessed and created on timeCreated. The permissions specify file permissions, and owner, group and mimetype specify the owner, group and mimetype of the file. The description refers to the optional description of the object. The extensionAttributes parameter refers to non-standard attributes that might be used by various implementations.

See also createFolder() and createParent().

QObexFolderListingEntryInfo QObexFolderListingEntryInfo::createFolder ( const QString & name, qint64 size, const QDateTime & lastModified, const QDateTime & lastAccessed, const QDateTime & timeCreated, QObexFolderListingEntryInfo::Permissions permissions, const QString & owner, const QString & group, const QString & description = QString(), const ExtensionAttributes & extensionAttributes = ExtensionAttributes() )   [static]

Creates a Folder Listing entry that represents a folder with name, size. The folder was last modified on lastModified, last accessed on lastAccessed and created on timeCreated. The permissions specify file permissions. owner and group specify the owner and group the folder belongs to, respectively. The description refers to the optional description of the object. The extensionAttributes parameter refers to non-standard attributes that might be used by various implementations.

See also createFile() and createParent().

QObexFolderListingEntryInfo QObexFolderListingEntryInfo::createParent ()   [static]

Creates a Folder Listing entry that represents a parent directory. OBEX Folders can have parent directories. These directories do not have any attributes associated with them.

See also createFile() and createFolder().

QDateTime QObexFolderListingEntryInfo::created () const

Returns the creation time of the file or folder referred to by the folder listing info. If this information was not provided, an invalid QDateTime object is returned.

See also setCreated().

QString QObexFolderListingEntryInfo::description () const

Returns the description of the file or folder referred to by the folder listing info. If this information was not provided, an empty string is returned.

See also setDescription().

QMap<QString, QString> QObexFolderListingEntryInfo::extensionAttributes () const

Returns the extended attributes of the file or folder referred to by the folder listing info. Some implementations can report attributes which are not specified by the standard, cuch as folder location (e.g. phone memory, flash card, etc). These attributes are reported as key-value pairs.

If this information was not provided, an empty map is returned.

See also setExtensionAttributes().

QString QObexFolderListingEntryInfo::group () const

Returns the group of the file or folder referred to by the folder listing info. If this information was not provided, an empty string is returned.

See also setGroup().

bool QObexFolderListingEntryInfo::isFile () const

Returns true if the folder listing info refers to a file.

See also isFolder(), isParent(), and setFile().

bool QObexFolderListingEntryInfo::isFolder () const

Returns true if the folder listing info refers to a directory.

See also isFile(), isParent(), and setFolder().

bool QObexFolderListingEntryInfo::isParent () const

Returns true if the folder listing info refers to a parent directory.

See also isFolder().

bool QObexFolderListingEntryInfo::isValid () const

Returns true if the folder listing info is valid and false otherwise. If the object is invalid, any value returned should not be relied upon.

QDateTime QObexFolderListingEntryInfo::lastModified () const

Returns the last modification time of the file or folder referred to by the folder listing info. If this information was not provided, an invalid QDateTime object is returned.

See also setLastModified().

QDateTime QObexFolderListingEntryInfo::lastRead () const

Returns the time the file or folder referred to by the folder listing info has been last accessed. If this information was not provided, an invalid QDateTime object is returned.

See also setLastRead().

QString QObexFolderListingEntryInfo::name () const

Returns the name of the file or folder referred to by the folder listing info. If the name was not provided or the folder listing entry is invalid, returns an empty string.

See also setName().

QString QObexFolderListingEntryInfo::owner () const

Returns the owner of the file or folder referred to by the folder listing info. If this information was not provided, an empty string is returned.

See also setOwner().

Permissions QObexFolderListingEntryInfo::permissions () const

Returns the permissions for the folder listing info.

See also setPermissions().

void QObexFolderListingEntryInfo::setCreated ( const QDateTime & timeCreated )

Sets the creation time of the folder listing info to timeCreated.

If you call this function for an invalid folder listing info, this function turns it into a valid one.

See also created().

void QObexFolderListingEntryInfo::setDescription ( const QString & description )

Sets the description of the folder listing info to description.

If you call this function for an invalid folder listing info, this function turns it into a valid one.

See also description().

void QObexFolderListingEntryInfo::setExtensionAttributes ( const QMap<QString, QString> & attributes )

Sets the extended attributes of the folder listing info to attributes.

If you call this function for an invalid folder listing info, this function turns it into a valid one.

See also extensionAttributes().

void QObexFolderListingEntryInfo::setFile ( bool b )

If b is true, then the folder listing info is set to refer to a file.

If you call this function for an invalid folder listing info, this function turns it into a valid one.

See also isFile().

void QObexFolderListingEntryInfo::setFolder ( bool b )

If b is true, then the folder listing info is set to refer to a directory.

If you call this function for an invalid folder listing info, this function turns it into a valid one.

See also isFolder().

void QObexFolderListingEntryInfo::setGroup ( const QString & group )

Sets the group of the folder listing info to group.

If you call this function for an invalid folder listing info, this function turns it into a valid one.

See also group().

void QObexFolderListingEntryInfo::setLastModified ( const QDateTime & lastModified )

Sets the last modified time of the folder listing info to lastModified.

If you call this function for an invalid folder listing info, this function turns it into a valid one.

See also lastModified().

void QObexFolderListingEntryInfo::setLastRead ( const QDateTime & lastRead )

Sets the last access time of the folder listing info to lastRead.

If you call this function for an invalid folder listing info, this function turns it into a valid one.

See also lastRead().

void QObexFolderListingEntryInfo::setName ( const QString & name )

Sets the name of the folder listing info to name.

If you call this function for an invalid folder listing info, this function turns it into a valid one.

See also name().

void QObexFolderListingEntryInfo::setOwner ( const QString & owner )

Sets the owner of the folder listing info to owner.

If you call this function for an invalid folder listing info, this function turns it into a valid one.

See also owner().

void QObexFolderListingEntryInfo::setParent ( bool b )

If b is true, then the folder listing info is set to refer to a parent directory. Parent directories should have no attributes associated with them. E.g. name, size, etc, information should not be provided.

If you call this function for an invalid folder listing info, this function turns it into a valid one.

See also isParent().

void QObexFolderListingEntryInfo::setPermissions ( Permissions permissions )

Sets the last permissions of the folder listing info to permissions.

If you call this function for an invalid folder listing info, this function turns it into a valid one.

See also permissions().

void QObexFolderListingEntryInfo::setSize ( qint64 size )

Sets the size in bytes of the folder listing info to size.

If you call this function for an invalid folder listing info, this function turns it into a valid one.

See also size().

void QObexFolderListingEntryInfo::setType ( const QString & mimetype )

Sets the mimetype of the folder listing info to mimetype.

If you call this function for an invalid folder listing info, this function turns it into a valid one.

See also type().

qint64 QObexFolderListingEntryInfo::size () const

Returns the size in bytes of the file or folder referred to by the folder listing info. According to the OBEX standard, the size might not be accurate (e.g. only an estimate) and should not be relied upon to be exact. If no size information was provided, a 0 is returned.

See also setSize().

QString QObexFolderListingEntryInfo::type () const

Returns the mimetype of the file or folder referred to by the folder listing info. If this information was not provided, an empty string is returned.

See also setType().

bool QObexFolderListingEntryInfo::operator!= ( const QObexFolderListingEntryInfo & info ) const

Comparison operator. Returns true if the current object is not equal to info.

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

Assigns the contents of other to the current object.

bool QObexFolderListingEntryInfo::operator== ( const QObexFolderListingEntryInfo & info ) const

Comparison operator. Returns true if the current object is equal to info.


Copyright © 2008 Nokia Trademarks
Qtopia 4.3.3