struct P1::CameraSdk::ISubscription

Overview

Interface common to all subscriptions. More…

#include <C_P1CameraCommonSubscriptions.h>

struct ISubscription
{
    // methods

    virtual bool IsSupported() const = 0;
    virtual bool IsSubscribed() const = 0;
    virtual void Subscribe() = 0;
    virtual void Unsubscribe() = 0;
};

// direct descendants

class IFullImageSubscription;
class ILiveViewSubscription;
class IPreviewSubscription;

Detailed Documentation

Interface common to all subscriptions.

A subscription allows the camera to send you notifications in response to events in the camera. Suscribing just means that you enable this event delivery.

To receive the notifications from the subscribed events, you must still enable notifications for the actual events, related to the subscription.

Further, when activating a subscription (by subscribing), you might change state in the camera or enable certain hardware.

Version 3.0

Methods

virtual bool IsSupported() const = 0

Check if the camera supports this subscription

virtual bool IsSubscribed() const = 0

Check if we are currently subscribed

virtual void Subscribe() = 0

Begin subscribing and receive notifications for the related events.

virtual void Unsubscribe() = 0

Cancel the subscription, no new notifications will be posted.

Note that there might still be a backlog of pending notifications from previous posted events. Unsubscribing does not clear that queue.