51 QTM_USE_NAMESPACE |
51 QTM_USE_NAMESPACE |
52 class CntAbstractContactFilter |
52 class CntAbstractContactFilter |
53 { |
53 { |
54 public: |
54 public: |
55 enum FilterSupport { |
55 enum FilterSupport { |
56 /* The filter not supported */ |
56 /* The filter is not supported */ |
57 NotSupported = 0, |
57 NotSupported = 0, |
58 /* The filter is supported */ |
58 /* The filter is illegal. Filtering is not allowed and the operation |
|
59 * should fail immediately with an error. |
|
60 */ |
|
61 IllegalFilter, |
|
62 /* The filter is supported natively */ |
59 Supported, |
63 Supported, |
60 /* The filter is not directly supported, but for performance reasons |
64 /* The filter is not fully natively supported, but for performance |
61 * the contact filter implementation pretends supporting the filter |
65 * reasons the contact filter implementation pretends supporting the |
62 * when it actually maps the filter to another, less strict filter. |
66 * filter when it actually maps the filter to another, less strict |
63 * For example if the caller uses match flag QContactFilter::MatchExactly, the |
67 * filter. |
64 * filter actually gives the result as QContactFilter::MatchContains (because of |
68 * |
65 * the limitations in the underlying database). |
69 * For example if the caller uses match flag QContactFilter::MatchExactly, |
|
70 * the filter actually gives the result as QContactFilter::MatchContains |
|
71 * (because of the limitations in the underlying database). |
|
72 * |
66 * The result then needs to be filtered by the caller (for example by |
73 * The result then needs to be filtered by the caller (for example by |
67 * using QContactManagerEngine::testFilter). */ |
74 * using QContactManagerEngine::testFilter). |
|
75 */ |
68 SupportedPreFilterOnly |
76 SupportedPreFilterOnly |
69 }; |
77 }; |
70 public: |
78 public: |
71 virtual QList<QContactLocalId> contacts( |
79 virtual QList<QContactLocalId> contacts( |
72 const QContactFilter &filter, |
80 const QContactFilter &filter, |
73 const QList<QContactSortOrder> &sortOrders, |
81 const QList<QContactSortOrder> &sortOrders, |
74 bool &filterSupported, |
82 bool &filterSupported, |
75 QContactManager::Error &error) = 0; |
83 QContactManager::Error* error) = 0; |
76 virtual bool filterSupported(const QContactFilter& filter) = 0; |
84 virtual bool filterSupported(const QContactFilter& filter) = 0; |
77 }; |
85 }; |
78 |
86 |
79 #endif /* QABSTRACTCONTACTFILTER_H */ |
87 #endif /* QABSTRACTCONTACTFILTER_H */ |