Skip to content

Commit

Permalink
[EN-7588] Implement PublishProfiles sample
Browse files Browse the repository at this point in the history
addChangeListener
removeChangeListener
  • Loading branch information
AnatolyKalin committed May 6, 2024
1 parent da5f44f commit 92cdb72
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions include/dxfeed_graal_cpp_api/api/osub/ObservableSubscription.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,28 @@ struct DXFCPP_EXPORT ObservableSubscription {
* @see #getEventTypes()
*/
virtual bool containsEventType(const EventTypeEnum &eventType) = 0;

/**
* Adds subscription change listener. This method does nothing if subscription is closed.
* Otherwise, it installs the corresponding listener and immediately
* invokes ObservableSubscriptionChangeListener::symbolsAdded() on the given listener while holding the lock for
* this subscription. This way the given listener synchronously receives existing subscription state and is
* synchronously notified on all changes in subscription afterwards.
*
* @param listener The subscription change listener.
* @return The listener id
*/
virtual std::size_t addChangeListener(ObservableSubscriptionChangeListener &&listener) = 0;

/**
* Removes subscription change listener by id. This method does nothing if the listener with the given id was not
* installed or was already removed as subscription change listener for this subscription. Otherwise it removes the
* corresponding listener and immediately invokes ObservableSubscriptionChangeListener::subscriptionClosed() on the
* given listener while holding the lock for this subscription.
*
* @param id The subscription change listener id.
*/
virtual void removeChangeListener(std::size_t id) = 0;
};

DXFCPP_END_NAMESPACE
Expand Down

0 comments on commit 92cdb72

Please sign in to comment.