src/messaging/qmessagefolderfilter.cpp
changeset 0 876b1a06bc25
equal deleted inserted replaced
-1:000000000000 0:876b1a06bc25
       
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     4 ** All rights reserved.
       
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
       
     6 **
       
     7 ** This file is part of the Qt Mobility Components.
       
     8 **
       
     9 ** $QT_BEGIN_LICENSE:LGPL$
       
    10 ** No Commercial Usage
       
    11 ** This file contains pre-release code and may not be distributed.
       
    12 ** You may use this file in accordance with the terms and conditions
       
    13 ** contained in the Technology Preview License Agreement accompanying
       
    14 ** this package.
       
    15 **
       
    16 ** GNU Lesser General Public License Usage
       
    17 ** Alternatively, this file may be used under the terms of the GNU Lesser
       
    18 ** General Public License version 2.1 as published by the Free Software
       
    19 ** Foundation and appearing in the file LICENSE.LGPL included in the
       
    20 ** packaging of this file.  Please review the following information to
       
    21 ** ensure the GNU Lesser General Public License version 2.1 requirements
       
    22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
       
    23 **
       
    24 ** In addition, as a special exception, Nokia gives you certain additional
       
    25 ** rights.  These rights are described in the Nokia Qt LGPL Exception
       
    26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
       
    27 **
       
    28 ** If you have questions regarding the use of this file, please contact
       
    29 ** Nokia at qt-info@nokia.com.
       
    30 **
       
    31 **
       
    32 **
       
    33 **
       
    34 **
       
    35 **
       
    36 **
       
    37 **
       
    38 ** $QT_END_LICENSE$
       
    39 **
       
    40 ****************************************************************************/
       
    41 #include "qmessagefolderfilter.h"
       
    42 #include "qmessagefolderfilter_p.h"
       
    43 
       
    44 QTM_BEGIN_NAMESPACE
       
    45 
       
    46 /*!
       
    47     \class QMessageFolderFilter
       
    48 
       
    49     \brief The QMessageFolderFilter class defines the parameters used for querying a subset of
       
    50     all available folders from the messaging store.
       
    51     \ingroup messaging
       
    52 
       
    53     A QMessageFolderFilter is composed of a folder property, an optional comparison operator
       
    54     and a comparison value. The QMessageFolderFilter class is used in conjunction with the 
       
    55     QMessageManager::queryFolders() and QMessageManager::countFolders() functions to filter results 
       
    56     which meet the criteria defined by the filter.
       
    57 
       
    58     QMessageFolderFilters can be combined using the logical operators (&), (|) and (~) to
       
    59     create more refined queries.
       
    60 
       
    61     \sa QMessageManager, QMessageFolder
       
    62 */
       
    63 
       
    64 /*!
       
    65     \fn QMessageFolderFilter::QMessageFolderFilter()
       
    66   
       
    67     Creates a QMessageFolderFilter without specifying matching parameters.
       
    68 
       
    69     A default-constructed filter (one for which isEmpty() returns true) matches all folders. 
       
    70 
       
    71     \sa isEmpty()
       
    72 */
       
    73 
       
    74 /*!
       
    75     \fn QMessageFolderFilter::QMessageFolderFilter(const QMessageFolderFilter &other)
       
    76   
       
    77     Constructs a copy of \a other.
       
    78 */
       
    79 
       
    80 /*!
       
    81     \fn QMessageFolderFilter::~QMessageFolderFilter()
       
    82     
       
    83     Destroys the filter.
       
    84 */
       
    85 
       
    86 /*!
       
    87     \internal
       
    88     \fn QMessageFolderFilter::operator=(const QMessageFolderFilter& other)
       
    89 */
       
    90 
       
    91 /*!
       
    92     \fn QMessageFolderFilter::setMatchFlags(QMessageDataComparator::MatchFlags matchFlags)
       
    93   
       
    94     Set the match flags for the search filter to \a matchFlags.
       
    95 
       
    96     \sa matchFlags()
       
    97 */
       
    98 
       
    99 /*!
       
   100     \fn QMessageDataComparator::MatchFlags QMessageFolderFilter::matchFlags() const
       
   101   
       
   102     Return the match flags for the search filter.
       
   103     
       
   104     Default is no match flags set.
       
   105 
       
   106     \sa setMatchFlags()
       
   107 */
       
   108 
       
   109 /*!
       
   110     \fn QMessageFolderFilter::isEmpty() const
       
   111   
       
   112     Returns true if the filter remains empty after default construction; otherwise returns false. 
       
   113 
       
   114     An empty filter matches all folders.
       
   115 
       
   116     The result of combining an empty filter with a non-empty filter is the original non-empty filter. 
       
   117     This is true regardless of whether the combination is formed by an AND or an OR operation.
       
   118 
       
   119     The result of combining two empty filters is an empty filter.
       
   120 */
       
   121 
       
   122 /*!
       
   123     \fn QMessageFolderFilter::isSupported() const
       
   124   
       
   125     Returns true if the filter is supported on the current platform; otherwise returns false.
       
   126 */
       
   127 
       
   128 /*!
       
   129     \fn QMessageFolderFilter::operator~() const
       
   130   
       
   131     Returns a filter that is the logical NOT of the value of this filter (ignoring any
       
   132     matchFlags() set on the filter).
       
   133 
       
   134     If this filter is empty, the result will be a non-matching filter; if this filter is 
       
   135     non-matching, the result will be an empty filter.
       
   136 
       
   137     \sa isEmpty()
       
   138 */
       
   139 
       
   140 /*!
       
   141     \fn QMessageFolderFilter::operator&(const QMessageFolderFilter& other) const
       
   142   
       
   143     Returns a filter that is the logical AND of this filter and the value of filter \a other.
       
   144 */
       
   145 
       
   146 /*!
       
   147     \fn QMessageFolderFilter::operator|(const QMessageFolderFilter& other) const
       
   148   
       
   149     Returns a filter that is the logical OR of this filter and the value of filter \a other.
       
   150 */
       
   151 
       
   152 /*!
       
   153     \fn QMessageFolderFilter::operator&=(const QMessageFolderFilter& other)
       
   154   
       
   155     Performs a logical AND with this filter and the filter \a other and assigns the result
       
   156     to this filter.
       
   157 */
       
   158 
       
   159 /*!
       
   160     \fn QMessageFolderFilter::operator|=(const QMessageFolderFilter& other)
       
   161   
       
   162     Performs a logical OR with this filter and the filter \a other and assigns the result
       
   163     to this filter.
       
   164 */
       
   165 
       
   166 /*!
       
   167     \internal
       
   168     \fn QMessageFolderFilter::operator==(const QMessageFolderFilter& other) const
       
   169 */
       
   170 
       
   171 /*!
       
   172     \internal
       
   173 */
       
   174 bool QMessageFolderFilter::operator!=(const QMessageFolderFilter& other) const
       
   175 {
       
   176     return !operator==(other);
       
   177 }
       
   178 
       
   179 /*!
       
   180     \fn QMessageFolderFilter::byId(const QMessageFolderId &id, QMessageDataComparator::EqualityComparator cmp)
       
   181   
       
   182     Returns a filter matching folders whose identifier matches \a id, according to \a cmp.
       
   183 
       
   184     \sa QMessageFolder::id()
       
   185 */
       
   186 
       
   187 /*!
       
   188     \fn QMessageFolderFilter::byId(const QMessageFolderIdList &ids, QMessageDataComparator::InclusionComparator cmp)
       
   189   
       
   190     Returns a filter matching folders whose identifier is a member of \a ids, according to \a cmp.
       
   191 
       
   192     \sa QMessageFolder::id()
       
   193 */
       
   194 
       
   195 /*!
       
   196     \fn QMessageFolderFilter::byId(const QMessageFolderFilter &filter, QMessageDataComparator::InclusionComparator cmp)
       
   197   
       
   198     Returns a filter matching folders whose identifier is a member of the set yielded by \a filter, according to \a cmp.
       
   199 
       
   200     \sa QMessageFolder::id()
       
   201 */
       
   202 
       
   203 /*!
       
   204     \fn QMessageFolderFilter::byName(const QString &value, QMessageDataComparator::EqualityComparator cmp)
       
   205   
       
   206     Returns a filter matching folders whose display name matches \a value, according to \a cmp.
       
   207 
       
   208     \sa QMessageFolder::name()
       
   209 */
       
   210 
       
   211 /*!
       
   212     \fn QMessageFolderFilter::byName(const QString &value, QMessageDataComparator::InclusionComparator cmp)
       
   213   
       
   214     Returns a filter matching folders whose display name matches the substring \a value, according to \a cmp.
       
   215 
       
   216     \sa QMessageFolder::name()
       
   217 */
       
   218 
       
   219 /*!
       
   220     \fn QMessageFolderFilter::byPath(const QString &value, QMessageDataComparator::EqualityComparator cmp)
       
   221   
       
   222     Returns a filter matching folders whose path matches \a value, according to \a cmp.
       
   223 
       
   224     \sa QMessageFolder::path()
       
   225 */
       
   226 
       
   227 /*!
       
   228     \fn QMessageFolderFilter::byPath(const QString &value, QMessageDataComparator::InclusionComparator cmp)
       
   229   
       
   230     Returns a filter matching folders whose path matches the substring \a value, according to \a cmp.
       
   231 
       
   232     \sa QMessageFolder::path()
       
   233 */
       
   234 
       
   235 /*!
       
   236     \fn QMessageFolderFilter::byParentAccountId(const QMessageAccountId &id, QMessageDataComparator::EqualityComparator cmp)
       
   237   
       
   238     Returns a filter matching folders whose parent account identifier matches \a id, according to \a cmp.
       
   239 
       
   240     \sa QMessageAccount::id()
       
   241 */
       
   242 
       
   243 /*!
       
   244     \fn QMessageFolderFilter::byParentAccountId(const QMessageAccountFilter &filter, QMessageDataComparator::InclusionComparator cmp)
       
   245   
       
   246     Returns a filter matching folders whose parent account identifier is a member of the set yielded by \a filter, according to \a cmp.
       
   247 
       
   248     \sa QMessageAccount::id()
       
   249 */
       
   250 
       
   251 /*!
       
   252     \fn QMessageFolderFilter::byParentFolderId(const QMessageFolderId &id, QMessageDataComparator::EqualityComparator cmp)
       
   253   
       
   254     Returns a filter matching folders whose parent folder identifier matches \a id, according to \a cmp.
       
   255 
       
   256     \sa QMessageFolder::id()
       
   257 */
       
   258 
       
   259 /*!
       
   260     \fn QMessageFolderFilter::byParentFolderId(const QMessageFolderFilter &filter, QMessageDataComparator::InclusionComparator cmp)
       
   261   
       
   262     Returns a filter matching folders whose parent folder identifier is a member of the set yielded by \a filter, according to \a cmp.
       
   263 
       
   264     \sa QMessageFolder::id()
       
   265 */
       
   266 
       
   267 /*!
       
   268     \fn QMessageFolderFilter::byAncestorFolderIds(const QMessageFolderId &id, QMessageDataComparator::InclusionComparator cmp)
       
   269   
       
   270     Returns a filter matching folders whose ancestor folders' identifiers contain \a id, according to \a cmp.
       
   271 
       
   272     \sa QMessageFolder::id()
       
   273 */
       
   274 
       
   275 /*!
       
   276     \fn QMessageFolderFilter::byAncestorFolderIds(const QMessageFolderFilter &filter, QMessageDataComparator::InclusionComparator cmp)
       
   277   
       
   278     Returns a filter matching folders whose ancestor folders' identifiers contain a member of the set yielded by \a filter, according to \a cmp.
       
   279 
       
   280     \sa QMessageFolder::id()
       
   281 */
       
   282 
       
   283 QTM_END_NAMESPACE