class P1::CameraSdk::INotificationEvent

Overview

Notification interface that encapsulate all types of notifications. More…

#include <C_P1CameraCommonStructs.h>

class INotificationEvent
{
public:
    // methods

    virtual bool operator == (INotificationEvent const& other) const = 0;
    virtual bool operator != (INotificationEvent const& other) const = 0;
    virtual BaseEventType const& Type() const = 0;
    virtual bool HasImageFilename() const = 0;
    virtual uint32_t ImageId() const = 0;
    virtual bool HasCamId() const = 0;
    virtual CameraId CamId() const = 0;
    virtual uint32_t PropertyId() const = 0;
    virtual bool IsCameraEvent() const = 0;
    virtual bool IsSdkEvent() const = 0;
    virtual bool IsPropertyEvent() const = 0;
    virtual bool IsTransferEvent() const = 0;
    virtual bool IsImageEvent() const = 0;
    virtual std::shared_ptr<IImageFileBasicInfo const> BasicImageInfo() const = 0;
    virtual std::shared_ptr<IPreview const> Preview() const = 0;
    virtual std::shared_ptr<ITile const> Tile() const = 0;
    virtual std::shared_ptr<ILiveView const> LiveView() const = 0;
    virtual std::shared_ptr<IFullImage const> FullImage() const = 0;
    virtual std::shared_ptr<IStoredImageHandle> StoredImageHandle() const = 0;
    virtual CameraInfo const& CamInfo() const = 0;
    virtual uint8_t TransferProgressPercent() const = 0;
    virtual std::string ImageFilename() const = 0;
    virtual std::string ToString() const = 0;
    virtual QueueingStrategy QueueMode() const = 0;
};

// direct descendants

class NotificationEvent;

Detailed Documentation

Notification interface that encapsulate all types of notifications.

Notifications relate to specific events. These events might come with data attached. This notification interface, handles all types of data events can provide.

Events have a type and a category. Multiple types shares the same category. Like the types: CameraImageReady and CameraLiveViewStarted are both in the Camera category. The category says something about what auxiliary data is provided with the notification.

You can use the Is**Event() helper methods to query what kind of category a notification event belongs to.

Version 3.0

Methods

virtual BaseEventType const& Type() const = 0

Get a reference the EventType this notification comes from.

virtual bool HasImageFilename() const = 0

true if this notification event has filename data attached

virtual uint32_t ImageId() const = 0

Gets the image id of the image this event relates to, or zero (0) if this is not an image related event.

virtual bool HasCamId() const = 0

true if this notification event relates to specific camera

virtual CameraId CamId() const = 0

Gets the id of the camera that the notification relates to.

virtual uint32_t PropertyId() const = 0

If this is a property related event (category is ‘Property’), then this is the id of that property.

virtual bool IsCameraEvent() const = 0

true if this notification event is of category Camera

virtual bool IsSdkEvent() const = 0

true if this notification event is of category Sdk

virtual bool IsPropertyEvent() const = 0

true if this notification event is of category Property

virtual bool IsTransferEvent() const = 0

true if this notification event is of category Transfer

virtual bool IsImageEvent() const = 0

true if this notification event is of category Image

virtual std::shared_ptr<IImageFileBasicInfo const> BasicImageInfo() const = 0

If event type is CameraImageBasicImageInfo, this holds the basic info data object.

virtual std::shared_ptr<IPreview const> Preview() const = 0

If event type is CameraPreviewReady, this holds the image buffer data object.

virtual std::shared_ptr<ITile const> Tile() const = 0

If event type is CameraTileReady, this holds the image buffer data object.

virtual std::shared_ptr<ILiveView const> LiveView() const = 0

If event type is CameraNewLiveViewImage, this holds the image buffer data object.

virtual std::shared_ptr<IFullImage const> FullImage() const = 0

If event type is CameraImageReady, this holds the full image.

virtual std::shared_ptr<IStoredImageHandle> StoredImageHandle() const = 0

If event type is CameraImageAdded, CameraImageRemoved or CameraImageEdited this holds the image list item object.

virtual CameraInfo const& CamInfo() const = 0

If event type is of Sdk category, this holds basic camera info data object.

virtual uint8_t TransferProgressPercent() const = 0

If event type is ImageTransferProgress, this returns the percent progress.

virtual std::string ImageFilename() const = 0

If event type is of Transfer category, this contains the image file’s filename.

virtual std::string ToString() const = 0

Returns a short (human readable) description of the notification event.

This string description include the event type and any auxiliary data

virtual QueueingStrategy QueueMode() const = 0

Returns how this notification is queued in Listener.

Each NotificationEvent implementation defines a strategy of how it is added to notification queues.

See also:

QueueMode