Akonadi

monitor.h
1/*
2 SPDX-FileCopyrightText: 2006-2007 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "akonadicore_export.h"
10#include "collection.h"
11#include "item.h"
12#include "tag.h"
13
14#include <QObject>
15
16#include <memory>
17
18namespace Akonadi
19{
20class CollectionFetchScope;
21class CollectionStatistics;
22class Item;
23class ItemFetchScope;
24class MonitorPrivate;
25class Session;
26class TagFetchScope;
27class NotificationSubscriber;
28class ChangeNotification;
29
30namespace Protocol
31{
32class Command;
33}
34
35/**
36 * @short Monitors an item or collection for changes.
37 *
38 * The Monitor emits signals if some of these objects are changed or
39 * removed or new ones are added to the Akonadi storage.
40 *
41 * There are various ways to filter these notifications. There are three types of filter
42 * evaluation:
43 * - (-) removal-only filter, ie. if the filter matches the notification is dropped,
44 * if not filter evaluation continues with the next one
45 * - (+) pass-exit filter, ie. if the filter matches the notification is delivered,
46 * if not evaluation is continued
47 * - (f) final filter, ie. evaluation ends here if the corresponding filter criteria is set,
48 * the notification is delivered depending on the result, evaluation is only continued
49 * if no filter criteria is defined
50 *
51 * The following filter are available, listed in evaluation order:
52 * (1) ignored sessions (-)
53 * (2) monitor everything (+)
54 * (3a) resource and mimetype filters (f) (items only)
55 * (3b) resource filters (f) (collections only)
56 * (4) item is monitored (+)
57 * (5) collection is monitored (+)
58 *
59 * Optionally, the changed objects can be fetched automatically from the server.
60 * To enable this, see itemFetchScope() and collectionFetchScope().
61 *
62 * Note that as a consequence of rule 3a, it is not possible to monitor (more than zero resources
63 * OR more than zero mimetypes) AND more than zero collections.
64 *
65 * @todo Distinguish between monitoring collection properties and collection content.
66 * @todo Special case for collection content counts changed
67 *
68 * @author Volker Krause <vkrause@kde.org>
69 */
70class AKONADICORE_EXPORT Monitor : public QObject
71{
72 Q_OBJECT
73
74public:
75 enum Type {
76 /**
77 * @internal This must be kept in sync with Akonadi::NotificationMessageV2::Type
78 */
79 Collections = 1,
80 Items,
81 Tags,
82 /**
83 * Listen to subscription changes of other Monitors connected to Akonadi.
84 * This is only for debugging purposes and should not be used in real
85 * applications.
86 * @since 5.4
87 */
89 /**
90 * Listens to all notifications being emitted by the server and provides
91 * additional information about them. This is only for debugging purposes
92 * and should not be used in real applications.
93 *
94 * @note Enabling monitoring this type has performance impact on the
95 * Akonadi Server.
96 *
97 * @since 5.4
98 */
99 Notifications
100 };
101
102 /**
103 * Creates a new monitor.
104 *
105 * @param parent The parent object.
106 */
107 explicit Monitor(QObject *parent = nullptr);
108
109 /**
110 * Destroys the monitor.
111 */
112 ~Monitor() override;
113
114 /**
115 * Sets whether the specified collection shall be monitored for changes. If
116 * monitoring is turned on for the collection, all notifications for items
117 * in that collection will be emitted, and its child collections will also
118 * be monitored. Note that move notifications will be emitted if either one
119 * of the collections involved is being monitored.
120 *
121 * Note that if a session is being ignored, this takes precedence over
122 * setCollectionMonitored() on that session.
123 *
124 * @param collection The collection to monitor.
125 * If this collection is Collection::root(), all collections
126 * in the Akonadi storage will be monitored.
127 * @param monitored Whether to monitor the collection.
128 */
129 void setCollectionMonitored(const Collection &collection, bool monitored = true);
130
131 /**
132 * Sets whether the specified item shall be monitored for changes.
133 *
134 * Note that if a session is being ignored, this takes precedence over
135 * setItemMonitored() on that session.
136 *
137 * @param item The item to monitor.
138 * @param monitored Whether to monitor the item.
139 */
140 void setItemMonitored(const Item &item, bool monitored = true);
141
142 /**
143 * Sets whether the specified resource shall be monitored for changes. If
144 * monitoring is turned on for the resource, all notifications for
145 * collections and items in that resource will be emitted.
146 *
147 * Note that if a session is being ignored, this takes precedence over
148 * setResourceMonitored() on that session.
149 *
150 * @param resource The resource identifier.
151 * @param monitored Whether to monitor the resource.
152 */
153 void setResourceMonitored(const QByteArray &resource, bool monitored = true);
154
155 /**
156 * Sets whether items of the specified mime type shall be monitored for changes.
157 * If monitoring is turned on for the mime type, all notifications for items
158 * matching that mime type will be emitted, but notifications for collections
159 * matching that mime type will only be emitted if this is otherwise specified,
160 * for example by setCollectionMonitored().
161 *
162 * Note that if a session is being ignored, this takes precedence over
163 * setMimeTypeMonitored() on that session.
164 *
165 * @param mimetype The mime type to monitor.
166 * @param monitored Whether to monitor the mime type.
167 */
168 void setMimeTypeMonitored(const QString &mimetype, bool monitored = true);
169
170 /**
171 * Sets whether the specified tag shall be monitored for changes.
172 *
173 * Same rules as for item monitoring apply.
174 *
175 * @param tag Tag to monitor.
176 * @param monitored Whether to monitor the tag.
177 * @since 4.13
178 */
179 void setTagMonitored(const Tag &tag, bool monitored = true);
180
181 /**
182 * Sets whether given type (Collection, Item, Tag should be monitored).
183 *
184 * By default all types are monitored, but once you change one, you have
185 * to explicitly enable all other types you want to monitor.
186 *
187 * @param type Type to monitor.
188 * @param monitored Whether to monitor the type
189 * @since 4.13
190 */
191 void setTypeMonitored(Type type, bool monitored = true);
192
193 /**
194 * Sets whether all items shall be monitored.
195 * @param monitored sets all items as monitored if set as @c true
196 * Note that if a session is being ignored, this takes precedence over
197 * setAllMonitored() on that session.
198 */
199 void setAllMonitored(bool monitored = true);
200
201 void setExclusive(bool exclusive = true);
202 [[nodiscard]] bool exclusive() const;
203
204 /**
205 * Ignores all change notifications caused by the given session. This
206 * overrides all other settings on this session.
207 *
208 * @param session The session you want to ignore.
209 */
210 void ignoreSession(Session *session);
211
212 /**
213 * Enables automatic fetching of changed collections from the Akonadi storage.
214 *
215 * @param enable @c true enables automatic fetching, @c false disables automatic fetching.
216 */
217 void fetchCollection(bool enable);
218
219 /**
220 * Enables automatic fetching of changed collection statistics information from
221 * the Akonadi storage.
222 *
223 * @param enable @c true to enables automatic fetching, @c false disables automatic fetching.
224 */
225 void fetchCollectionStatistics(bool enable);
226
227 /**
228 * Sets the item fetch scope.
229 *
230 * Controls how much of an item's data is fetched from the server, e.g.
231 * whether to fetch the full item payload or only meta data.
232 *
233 * @param fetchScope The new scope for item fetch operations.
234 *
235 * @see itemFetchScope()
236 */
237 void setItemFetchScope(const ItemFetchScope &fetchScope);
238
239 /**
240 * Instructs the monitor to fetch only those parts that were changed and
241 * were requested in the fetch scope.
242 *
243 * This is taken in account only for item modifications.
244 * Example usage:
245 * @code
246 * monitor->itemFetchScope().fetchFullPayload( true );
247 * monitor->fetchChangedOnly(true);
248 * @endcode
249 *
250 * In the example if an item was changed, but its payload was not, the full
251 * payload will not be retrieved.
252 * If the item's payload was changed, the monitor retrieves the changed
253 * payload as well.
254 *
255 * The default is to fetch everything requested.
256 *
257 * @since 4.8
258 *
259 * @param enable @c true to enable the feature, @c false means everything
260 * that was requested will be fetched.
261 */
262 void fetchChangedOnly(bool enable);
263
264 /**
265 * Returns the item fetch scope.
266 *
267 * Since this returns a reference it can be used to conveniently modify the
268 * current scope in-place, i.e. by calling a method on the returned reference
269 * without storing it in a local variable. See the ItemFetchScope documentation
270 * for an example.
271 *
272 * @return a reference to the current item fetch scope
273 *
274 * @see setItemFetchScope() for replacing the current item fetch scope
275 */
276 ItemFetchScope &itemFetchScope();
277
278 /**
279 * Sets the collection fetch scope.
280 *
281 * Controls which collections are monitored and how much of a collection's data
282 * is fetched from the server.
283 *
284 * @param fetchScope The new scope for collection fetch operations.
285 *
286 * @see collectionFetchScope()
287 * @since 4.4
288 */
289 void setCollectionFetchScope(const CollectionFetchScope &fetchScope);
290
291 /**
292 * Returns the collection fetch scope.
293 *
294 * Since this returns a reference it can be used to conveniently modify the
295 * current scope in-place, i.e. by calling a method on the returned reference
296 * without storing it in a local variable. See the CollectionFetchScope documentation
297 * for an example.
298 *
299 * @return a reference to the current collection fetch scope
300 *
301 * @see setCollectionFetchScope() for replacing the current collection fetch scope
302 * @since 4.4
303 */
304 CollectionFetchScope &collectionFetchScope();
305
306 /**
307 * Sets the tag fetch scope.
308 *
309 * Controls how much of an tag's data is fetched from the server.
310 *
311 * @param fetchScope The new scope for tag fetch operations.
312 *
313 * @see tagFetchScope()
314 */
315 void setTagFetchScope(const TagFetchScope &fetchScope);
316
317 /**
318 * Returns the tag fetch scope.
319 *
320 * Since this returns a reference it can be used to conveniently modify the
321 * current scope in-place, i.e. by calling a method on the returned reference
322 * without storing it in a local variable.
323 *
324 * @return a reference to the current tag fetch scope
325 *
326 * @see setTagFetchScope() for replacing the current tag fetch scope
327 */
328 TagFetchScope &tagFetchScope();
329
330 /**
331 * Returns the list of collections being monitored.
332 *
333 * @since 4.3
334 */
335 [[nodiscard]] Collection::List collectionsMonitored() const;
336
337 /**
338 * Returns the set of items being monitored.
339 *
340 * Faster version (at least on 32-bit systems) of itemsMonitored().
341 *
342 * @since 4.6
343 */
344 [[nodiscard]] QList<Item::Id> itemsMonitoredEx() const;
345
346 /**
347 * Returns the number of items being monitored.
348 * Optimization.
349 * @since 4.14.3
350 */
351 [[nodiscard]] int numItemsMonitored() const;
352
353 /**
354 * Returns the set of mimetypes being monitored.
355 *
356 * @since 4.3
357 */
358 [[nodiscard]] QStringList mimeTypesMonitored() const;
359
360 /**
361 * Returns the number of mimetypes being monitored.
362 * Optimization.
363 * @since 4.14.3
364 */
365 [[nodiscard]] int numMimeTypesMonitored() const;
366
367 /**
368 * Returns the set of tags being monitored.
369 *
370 * @since 4.13
371 */
372 [[nodiscard]] QList<Tag::Id> tagsMonitored() const;
373
374 /**
375 * Returns the set of types being monitored.
376 *
377 * @since 4.13
378 */
379 [[nodiscard]] QList<Type> typesMonitored() const;
380
381 /**
382 * Returns the set of identifiers for resources being monitored.
383 *
384 * @since 4.3
385 */
386 [[nodiscard]] QList<QByteArray> resourcesMonitored() const;
387
388 /**
389 * Returns the number of resources being monitored.
390 * Optimization.
391 * @since 4.14.3
392 */
393 [[nodiscard]] int numResourcesMonitored() const;
394
395 /**
396 * Returns true if everything is being monitored.
397 *
398 * @since 4.3
399 */
400 [[nodiscard]] bool isAllMonitored() const;
401
402 /**
403 * Sets the session used by the Monitor to communicate with the %Akonadi server.
404 * If not set, the Akonadi::Session::defaultSession is used.
405 * @param session the session to be set
406 * @since 4.4
407 */
408 void setSession(Akonadi::Session *session);
409
410 /**
411 * Returns the Session used by the monitor to communicate with Akonadi.
412 *
413 * @since 4.4
414 */
415 [[nodiscard]] Session *session() const;
416
417 /**
418 * Allows to enable/disable collection move translation. If enabled (the default), move
419 * notifications are automatically translated into add/remove notifications if the source/destination
420 * is outside of the monitored collection hierarchy.
421 * @param enabled enables collection move translation if set as @c true
422 * @since 4.9
423 */
424 void setCollectionMoveTranslationEnabled(bool enabled);
425
426Q_SIGNALS:
427 /**
428 * This signal is emitted if a monitored item has changed, e.g. item parts have been modified.
429 *
430 * @param item The changed item.
431 * @param partIdentifiers The identifiers of the item parts that has been changed.
432 */
433 void itemChanged(const Akonadi::Item &item, const QSet<QByteArray> &partIdentifiers);
434
435 /**
436 * This signal is emitted if flags of monitored items have changed.
437 *
438 * @param items Items that were changed
439 * @param addedFlags Flags that have been added to each item in @p items
440 * @param removedFlags Flags that have been removed from each item in @p items
441 * @since 4.11
442 */
443 void itemsFlagsChanged(const Akonadi::Item::List &items, const QSet<QByteArray> &addedFlags, const QSet<QByteArray> &removedFlags);
444
445 /**
446 * This signal is emitted if tags of monitored items have changed.
447 *
448 * @param items Items that were changed
449 * @param addedTags Tags that have been added to each item in @p items.
450 * @param removedTags Tags that have been removed from each item in @p items
451 * @since 4.13
452 */
453 void itemsTagsChanged(const Akonadi::Item::List &items, const QSet<Akonadi::Tag> &addedTags, const QSet<Akonadi::Tag> &removedTags);
454
455 /**
456 * This signal is emitted if a monitored item has been moved between two collections
457 *
458 * @param item The moved item.
459 * @param collectionSource The collection the item has been moved from.
460 * @param collectionDestination The collection the item has been moved to.
461 */
462 void itemMoved(const Akonadi::Item &item, const Akonadi::Collection &collectionSource, const Akonadi::Collection &collectionDestination);
463
464 /**
465 * This is signal is emitted when multiple monitored items have been moved between two collections
466 *
467 * @param items Moved items
468 * @param collectionSource The collection the items have been moved from.
469 * @param collectionDestination The collection the items have been moved to.
470 *
471 * @since 4.11
472 */
473 void itemsMoved(const Akonadi::Item::List &items, const Akonadi::Collection &collectionSource, const Akonadi::Collection &collectionDestination);
474
475 /**
476 * This signal is emitted if an item has been added to a monitored collection in the Akonadi storage.
477 *
478 * @param item The new item.
479 * @param collection The collection the item has been added to.
480 */
481 void itemAdded(const Akonadi::Item &item, const Akonadi::Collection &collection);
482
483 /**
484 * This signal is emitted if
485 * - a monitored item has been removed from the Akonadi storage
486 * or
487 * - a item has been removed from a monitored collection.
488 *
489 * @param item The removed item.
490 */
491 void itemRemoved(const Akonadi::Item &item);
492
493 /**
494 * This signal is emitted if monitored items have been removed from Akonadi
495 * storage of items have been removed from a monitored collection.
496 *
497 * @param items Removed items
498 *
499 * @since 4.11
500 */
502
503 /**
504 * This signal is emitted if a reference to an item is added to a virtual collection.
505 * @param item The linked item.
506 * @param collection The collection the item is linked to.
507 *
508 * @since 4.2
509 */
510 void itemLinked(const Akonadi::Item &item, const Akonadi::Collection &collection);
511
512 /**
513 * This signal is emitted if a reference to multiple items is added to a virtual collection
514 *
515 * @param items The linked items
516 * @param collection The collections the items are linked to
517 *
518 * @since 4.11
519 */
520 void itemsLinked(const Akonadi::Item::List &items, const Akonadi::Collection &collection);
521
522 /**
523 * This signal is emitted if a reference to an item is removed from a virtual collection.
524 * @param item The unlinked item.
525 * @param collection The collection the item is unlinked from.
526 *
527 * @since 4.2
528 */
529 void itemUnlinked(const Akonadi::Item &item, const Akonadi::Collection &collection);
530
531 /**
532 * This signal is emitted if a reference to items is removed from a virtual collection
533 *
534 * @param items The unlinked items
535 * @param collection The collections the items are unlinked from
536 *
537 * @since 4.11
538 */
539 void itemsUnlinked(const Akonadi::Item::List &items, const Akonadi::Collection &collection);
540
541 /**
542 * This signal is emitted if a new collection has been added to a monitored collection in the Akonadi storage.
543 *
544 * @param collection The new collection.
545 * @param parent The parent collection.
546 */
547 void collectionAdded(const Akonadi::Collection &collection, const Akonadi::Collection &parent);
548
549 /**
550 * This signal is emitted if a monitored collection has been changed (properties or content).
551 *
552 * @param collection The changed collection.
553 */
554 void collectionChanged(const Akonadi::Collection &collection);
555
556 /**
557 * This signal is emitted if a monitored collection has been changed (properties or attributes).
558 *
559 * @param collection The changed collection.
560 * @param attributeNames The names of the collection attributes that have been changed.
561 *
562 * @since 4.4
563 */
564 void collectionChanged(const Akonadi::Collection &collection, const QSet<QByteArray> &attributeNames);
565
566 /**
567 * This signals is emitted if a monitored collection has been moved.
568 *
569 * @param collection The moved collection.
570 * @param source The previous parent collection.
571 * @param destination The new parent collection.
572 *
573 * @since 4.4
574 */
575 void collectionMoved(const Akonadi::Collection &collection, const Akonadi::Collection &source, const Akonadi::Collection &destination);
576
577 /**
578 * This signal is emitted if a monitored collection has been removed from the Akonadi storage.
579 *
580 * @param collection The removed collection.
581 */
582 void collectionRemoved(const Akonadi::Collection &collection);
583
584 /**
585 * This signal is emitted if a collection has been subscribed to by the user.
586 * It will be emitted even for unmonitored collections as the check for whether to
587 * monitor it has not been applied yet.
588 *
589 * @param collection The subscribed collection
590 * @param parent The parent collection of the subscribed collection.
591 *
592 * @since 4.6
593 */
594 void collectionSubscribed(const Akonadi::Collection &collection, const Akonadi::Collection &parent);
595
596 /**
597 * This signal is emitted if a user unsubscribes from a collection.
598 *
599 * @param collection The unsubscribed collection
600 *
601 * @since 4.6
602 */
604
605 /**
606 * This signal is emitted if the statistics information of a monitored collection
607 * has changed.
608 *
609 * @param id The collection identifier of the changed collection.
610 * @param statistics The updated collection statistics, invalid if automatic
611 * fetching of statistics changes is disabled.
612 */
614
615 /**
616 * This signal is emitted if a tag has been added to Akonadi storage.
617 *
618 * @param tag The added tag
619 * @since 4.13
620 */
621 void tagAdded(const Akonadi::Tag &tag);
622
623 /**
624 * This signal is emitted if a monitored tag is changed on the server.
625 *
626 * @param tag The changed tag.
627 * @since 4.13
628 */
629 void tagChanged(const Akonadi::Tag &tag);
630
631 /**
632 * This signal is emitted if a monitored tag is removed from the server storage.
633 *
634 * The monitor will also emit itemTagsChanged() signal for all monitored items
635 * (if any) that were tagged by @p tag.
636 *
637 * @param tag The removed tag.
638 * @since 4.13
639 */
640 void tagRemoved(const Akonadi::Tag &tag);
641
642 /**
643 * This signal is emitted when Subscribers are monitored and a new subscriber
644 * subscribers to the server.
645 *
646 * @param subscriber The new subscriber
647 * @since 5.4
648 *
649 * @note Monitoring for subscribers and listening to this signal only makes
650 * sense if you want to globally debug Monitors. There is no reason to use
651 * this in regular applications.
652 */
653 void notificationSubscriberAdded(const Akonadi::NotificationSubscriber &subscriber);
654
655 /**
656 * This signal is emitted when Subscribers are monitored and an existing
657 * subscriber changes its subscription.
658 *
659 * @param subscriber The changed subscriber
660 * @since 5.4
661 *
662 * @note Monitoring for subscribers and listening to this signal only makes
663 * sense if you want to globally debug Monitors. There is no reason to use
664 * this in regular applications.
665 */
666 void notificationSubscriberChanged(const Akonadi::NotificationSubscriber &subscriber);
667
668 /**
669 * This signal is emitted when Subscribers are monitored and an existing
670 * subscriber unsubscribes from the server.
671 *
672 * @param subscriber The removed subscriber
673 * @since 5.4
674 *
675 * @note Monitoring for subscribers and listening to this signal only makes
676 * sense if you want to globally debug Monitors. There is no reason to use
677 * this in regular applications.
678 */
679 void notificationSubscriberRemoved(const Akonadi::NotificationSubscriber &subscriber);
680
681 /**
682 * This signal is emitted when Notifications are monitored and the server emits
683 * any change notification.
684 *
685 * @since 5.4
686 *
687 * @note Getting introspection into all change notifications only makes sense
688 * if you want to globally debug Notifications. There is no reason to use
689 * this in regular applications.
690 */
692
693 /**
694 * This signal is emitted if the Monitor starts or stops monitoring @p collection explicitly.
695 * @param collection The collection
696 * @param monitored Whether the collection is now being monitored or not.
697 *
698 * @since 4.3
699 */
700 void collectionMonitored(const Akonadi::Collection &collection, bool monitored);
701
702 /**
703 * This signal is emitted if the Monitor starts or stops monitoring @p item explicitly.
704 * @param item The item
705 * @param monitored Whether the item is now being monitored or not.
706 *
707 * @since 4.3
708 */
709 void itemMonitored(const Akonadi::Item &item, bool monitored);
710
711 /**
712 * This signal is emitted if the Monitor starts or stops monitoring the resource with the identifier @p identifier explicitly.
713 * @param identifier The identifier of the resource.
714 * @param monitored Whether the resource is now being monitored or not.
715 *
716 * @since 4.3
717 */
718 void resourceMonitored(const QByteArray &identifier, bool monitored);
719
720 /**
721 * This signal is emitted if the Monitor starts or stops monitoring @p mimeType explicitly.
722 * @param mimeType The mimeType.
723 * @param monitored Whether the mimeType is now being monitored or not.
724 *
725 * @since 4.3
726 */
727 void mimeTypeMonitored(const QString &mimeType, bool monitored);
728
729 /**
730 * This signal is emitted if the Monitor starts or stops monitoring everything.
731 * @param monitored Whether everything is now being monitored or not.
732 *
733 * @since 4.3
734 */
735 void allMonitored(bool monitored);
736
737 /**
738 * This signal is emitted if the Monitor starts or stops monitoring @p tag explicitly.
739 * @param tag The tag.
740 * @param monitored Whether the tag is now being monitored or not.
741 * @since 4.13
742 */
743 void tagMonitored(const Akonadi::Tag &tag, bool monitored);
744
745 /**
746 * This signal is emitted if the Monitor starts or stops monitoring @p type explicitly
747 * @param type The type.
748 * @param monitored Whether the type is now being monitored or not.
749 * @since 4.13
750 */
751 void typeMonitored(const Akonadi::Monitor::Type type, bool monitored);
752
753 void monitorReady();
754
755protected:
756 /// @cond PRIVATE
757 void connectNotify(const QMetaMethod &signal) override;
758 void disconnectNotify(const QMetaMethod &signal) override;
759
760 friend class EntityTreeModel;
761 friend class EntityTreeModelPrivate;
762 std::unique_ptr<MonitorPrivate> const d_ptr;
763 explicit Monitor(MonitorPrivate *d, QObject *parent = nullptr);
764 /// @endcond
765
766private:
767 Q_DECLARE_PRIVATE(Monitor)
768
769 /// @cond PRIVATE
770 Q_PRIVATE_SLOT(d_ptr, void handleCommands())
771 Q_PRIVATE_SLOT(d_ptr, void invalidateCollectionCache(qint64))
772 Q_PRIVATE_SLOT(d_ptr, void invalidateItemCache(qint64))
773 Q_PRIVATE_SLOT(d_ptr, void invalidateTagCache(qint64))
774
775 friend class ResourceBasePrivate;
776 /// @endcond
777};
778
779}
Emitted by Monitor::debugNotification() signal.
Specifies which parts of a collection should be fetched from the Akonadi storage.
Provides statistics information of a Collection.
Represents a collection of PIM items.
Definition collection.h:62
qint64 Id
Describes the unique id type.
Definition collection.h:79
A model for collections and items together.
Specifies which parts of an item should be fetched from the Akonadi storage.
Represents a PIM item stored in Akonadi storage.
Definition item.h:100
Monitors an item or collection for changes.
Definition monitor.h:71
void itemsTagsChanged(const Akonadi::Item::List &items, const QSet< Akonadi::Tag > &addedTags, const QSet< Akonadi::Tag > &removedTags)
This signal is emitted if tags of monitored items have changed.
void itemChanged(const Akonadi::Item &item, const QSet< QByteArray > &partIdentifiers)
This signal is emitted if a monitored item has changed, e.g.
void collectionMoved(const Akonadi::Collection &collection, const Akonadi::Collection &source, const Akonadi::Collection &destination)
This signals is emitted if a monitored collection has been moved.
void collectionUnsubscribed(const Akonadi::Collection &collection)
This signal is emitted if a user unsubscribes from a collection.
void allMonitored(bool monitored)
This signal is emitted if the Monitor starts or stops monitoring everything.
void itemLinked(const Akonadi::Item &item, const Akonadi::Collection &collection)
This signal is emitted if a reference to an item is added to a virtual collection.
void collectionMonitored(const Akonadi::Collection &collection, bool monitored)
This signal is emitted if the Monitor starts or stops monitoring collection explicitly.
void itemRemoved(const Akonadi::Item &item)
This signal is emitted if.
void tagRemoved(const Akonadi::Tag &tag)
This signal is emitted if a monitored tag is removed from the server storage.
void itemMonitored(const Akonadi::Item &item, bool monitored)
This signal is emitted if the Monitor starts or stops monitoring item explicitly.
void tagChanged(const Akonadi::Tag &tag)
This signal is emitted if a monitored tag is changed on the server.
void collectionSubscribed(const Akonadi::Collection &collection, const Akonadi::Collection &parent)
This signal is emitted if a collection has been subscribed to by the user.
void tagAdded(const Akonadi::Tag &tag)
This signal is emitted if a tag has been added to Akonadi storage.
void itemsFlagsChanged(const Akonadi::Item::List &items, const QSet< QByteArray > &addedFlags, const QSet< QByteArray > &removedFlags)
This signal is emitted if flags of monitored items have changed.
void notificationSubscriberChanged(const Akonadi::NotificationSubscriber &subscriber)
This signal is emitted when Subscribers are monitored and an existing subscriber changes its subscrip...
void resourceMonitored(const QByteArray &identifier, bool monitored)
This signal is emitted if the Monitor starts or stops monitoring the resource with the identifier ide...
void collectionRemoved(const Akonadi::Collection &collection)
This signal is emitted if a monitored collection has been removed from the Akonadi storage.
void collectionChanged(const Akonadi::Collection &collection, const QSet< QByteArray > &attributeNames)
This signal is emitted if a monitored collection has been changed (properties or attributes).
void itemsRemoved(const Akonadi::Item::List &items)
This signal is emitted if monitored items have been removed from Akonadi storage of items have been r...
void itemAdded(const Akonadi::Item &item, const Akonadi::Collection &collection)
This signal is emitted if an item has been added to a monitored collection in the Akonadi storage.
void itemsUnlinked(const Akonadi::Item::List &items, const Akonadi::Collection &collection)
This signal is emitted if a reference to items is removed from a virtual collection.
void mimeTypeMonitored(const QString &mimeType, bool monitored)
This signal is emitted if the Monitor starts or stops monitoring mimeType explicitly.
void debugNotification(const Akonadi::ChangeNotification &notification)
This signal is emitted when Notifications are monitored and the server emits any change notification.
void collectionStatisticsChanged(Akonadi::Collection::Id id, const Akonadi::CollectionStatistics &statistics)
This signal is emitted if the statistics information of a monitored collection has changed.
void notificationSubscriberAdded(const Akonadi::NotificationSubscriber &subscriber)
This signal is emitted when Subscribers are monitored and a new subscriber subscribers to the server.
void notificationSubscriberRemoved(const Akonadi::NotificationSubscriber &subscriber)
This signal is emitted when Subscribers are monitored and an existing subscriber unsubscribes from th...
@ Subscribers
Listen to subscription changes of other Monitors connected to Akonadi.
Definition monitor.h:88
void typeMonitored(const Akonadi::Monitor::Type type, bool monitored)
This signal is emitted if the Monitor starts or stops monitoring type explicitly.
void collectionAdded(const Akonadi::Collection &collection, const Akonadi::Collection &parent)
This signal is emitted if a new collection has been added to a monitored collection in the Akonadi st...
void itemMoved(const Akonadi::Item &item, const Akonadi::Collection &collectionSource, const Akonadi::Collection &collectionDestination)
This signal is emitted if a monitored item has been moved between two collections.
void itemsLinked(const Akonadi::Item::List &items, const Akonadi::Collection &collection)
This signal is emitted if a reference to multiple items is added to a virtual collection.
void tagMonitored(const Akonadi::Tag &tag, bool monitored)
This signal is emitted if the Monitor starts or stops monitoring tag explicitly.
void collectionChanged(const Akonadi::Collection &collection)
This signal is emitted if a monitored collection has been changed (properties or content).
void itemsMoved(const Akonadi::Item::List &items, const Akonadi::Collection &collectionSource, const Akonadi::Collection &collectionDestination)
This is signal is emitted when multiple monitored items have been moved between two collections.
void itemUnlinked(const Akonadi::Item &item, const Akonadi::Collection &collection)
This signal is emitted if a reference to an item is removed from a virtual collection.
A communication session with the Akonadi storage.
Specifies which parts of a tag should be fetched from the Akonadi storage.
An Akonadi Tag.
Definition tag.h:26
ASAP CLI session.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:29 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.