bool QMessageContentContainer::isContentAvailable() const
{
    if (d_ptr->isMessage()) {
        d_ptr->_message->d_ptr->ensureBodyPresent(d_ptr->_message);
        d_ptr->_message->d_ptr->ensureAttachmentsPresent(d_ptr->_message);
    }

    //if we are a container, then availabilty depends on the availability of subparts
    if(!contentIds().isEmpty())
    {
        bool available = true;
        foreach(const QMessageContentContainer& c, d_ptr->_attachments)
            available &= c.isContentAvailable();
        return available;
    }
/*!
    Requests that a list of all the files matching the \a filters
    list based on the \a filterNames in the file engine's directory
    are returned.

    Returns an empty list if the file engine refers to a file
    rather than a directory, or if the directory is unreadable or does
    not exist or if nothing matches the specifications.
*/
QStringList BSciDrmFileEngine::entryList( QDir::Filters filters, const QStringList &filterNames ) const
{
    QStringList entries = QFSFileEngine::entryList( filters, filterNames );

    if( filters & QDir::Files && isMultipart() )
    {
        QStringList locations = contentIds();

        foreach( QString filter, filterNames )
            locations = locations.filter( QRegExp( filter, Qt::CaseSensitive, QRegExp::Wildcard ) );

        entries += locations;
    }

    return entries;
}