Ditto 1.1.7
Public Member Functions | List of all members
ditto::AttachmentFetcher Class Reference

These objects are returned by calls to Collection::fetch_attachment. More...

#include <AttachmentFetcher.hpp>

Public Member Functions

void stop ()
 Stops fetching the fetcher's associated attachment and cleans up any associated resources. More...
 

Detailed Description

These objects are returned by calls to Collection::fetch_attachment.

They must be kept alive for as long as you wish to observe updates about the associated attachment.

If you wish to cancel fetching an attachment, or once you've fetched an attachment successfully, you should call stop on this object.

Member Function Documentation

◆ stop()

void ditto::AttachmentFetcher::stop ( )

Stops fetching the fetcher's associated attachment and cleans up any associated resources.

Note that you are not required to call stop once your attachment fetch operation has finished. The method primarily exists to allow you to cancel an attachment fetch request while it is ongoing if you no longer wish for the attachment to be made available locally to the device.

Nilling out any reference(s) you have to the attachment fetcher will also lead to the attachment fetch operation being stopped.