RAMSES Documentation  27.0.130
Information for RAMSES users and developers
IDcsmContentControlEventHandler.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // Copyright (C) 2019 BMW AG
3 // -------------------------------------------------------------------------
4 // This Source Code Form is subject to the terms of the Mozilla Public
5 // License, v. 2.0. If a copy of the MPL was not distributed with this
6 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
7 // -------------------------------------------------------------------------
8 
9 #ifndef RAMSES_IDCSMCONTENTCONTROLEVENTHANDLER_H
10 #define RAMSES_IDCSMCONTENTCONTROLEVENTHANDLER_H
11 
14 
15 namespace ramses
16 {
17  class DcsmMetadataUpdate;
18 
21  {
22  OK,
23  TimedOut
24  };
25 
32  {
33  public:
35  virtual ~IDcsmContentControlEventHandler() = default;
36 
45  virtual void contentAvailable(ContentID contentID, Category categoryID) = 0;
46 
54  virtual void contentReady(ContentID contentID, DcsmContentControlEventResult result) = 0;
55 
61  virtual void contentShown(ContentID contentID) = 0;
62 
74  virtual void contentEnableFocusRequest(ramses::ContentID contentID, int32_t focusRequest) = 0;
75 
82  virtual void contentDisableFocusRequest(ramses::ContentID contentID, int32_t focusRequest) = 0;
83 
91  virtual void contentStopOfferRequested(ContentID contentID) = 0;
92 
97  virtual void contentNotAvailable(ContentID contentID) = 0;
98 
109  virtual void contentMetadataUpdated(ContentID contentID, const DcsmMetadataUpdate& metadataUpdate) = 0;
110 
123  virtual void offscreenBufferLinked(displayBufferId_t offscreenBufferId, ContentID consumerContent, dataConsumerId_t consumerId, bool success) = 0;
124 
138  virtual void contentLinkedToTextureConsumer(ContentID providerContent, ContentID consumerContent, dataConsumerId_t consumerId, bool success) = 0;
139 
153  virtual void dataLinked(ContentID providerContent, dataProviderId_t providerId, ContentID consumerContent, dataConsumerId_t consumerId, bool success) = 0;
154 
166  virtual void dataUnlinked(ContentID consumerContent, dataConsumerId_t consumerId, bool success) = 0;
167 
178  virtual void objectsPicked(ContentID content, const pickableObjectId_t* pickedObjects, uint32_t pickedObjectsCount) = 0;
179 
187  virtual void dataProviderCreated(ContentID contentID, dataProviderId_t dataProviderId) = 0;
188 
198  virtual void dataProviderDestroyed(ContentID contentID, dataProviderId_t dataProviderId) = 0;
199 
208  virtual void dataConsumerCreated(ContentID contentID, dataConsumerId_t dataConsumerId) = 0;
209 
219  virtual void dataConsumerDestroyed(ContentID contentID, dataConsumerId_t dataConsumerId) = 0;
220 
230  virtual void contentFlushed(ContentID contentID, sceneVersionTag_t version) = 0;
231 
242  virtual void contentExpirationMonitoringEnabled(ContentID contentID) = 0;
243 
257  virtual void contentExpirationMonitoringDisabled(ContentID contentID) = 0;
258 
269  virtual void contentExpired(ContentID contentID) = 0;
270 
281  virtual void contentRecoveredFromExpiration(ContentID contentID) = 0;
282 
297  virtual void streamAvailabilityChanged(waylandIviSurfaceId_t streamId, bool available) = 0;
298  };
299 
305  {
306  public:
308  virtual void contentAvailable(ContentID contentID, Category categoryID) override
309  {
310  (void)contentID;
311  (void)categoryID;
312  }
313 
315  virtual void contentReady(ContentID contentID, DcsmContentControlEventResult result) override
316  {
317  (void)contentID;
318  (void)result;
319  }
320 
322  virtual void contentShown(ContentID contentID) override
323  {
324  (void)contentID;
325  }
326 
328  virtual void contentStopOfferRequested(ContentID contentID) override
329  {
330  (void)contentID;
331  }
332 
334  virtual void contentNotAvailable(ContentID contentID) override
335  {
336  (void)contentID;
337  }
338 
340  virtual void contentMetadataUpdated(ContentID contentID, const DcsmMetadataUpdate& metadataUpdate) override
341  {
342  (void)contentID;
343  (void)metadataUpdate;
344  }
345 
347  virtual void offscreenBufferLinked(displayBufferId_t offscreenBufferId, ContentID consumerContent, dataConsumerId_t consumerId, bool success) override
348  {
349  (void)offscreenBufferId;
350  (void)consumerContent;
351  (void)consumerId;
352  (void)success;
353  }
354 
356  void contentLinkedToTextureConsumer(ContentID providerContent, ContentID consumerContent, dataConsumerId_t consumerId, bool success) override
357  {
358  (void)providerContent;
359  (void)consumerContent;
360  (void)consumerId;
361  (void)success;
362  }
363 
365  virtual void dataLinked(ContentID providerContent, dataProviderId_t providerId, ContentID consumerContent, dataConsumerId_t consumerId, bool success) override
366  {
367  (void)providerContent;
368  (void)providerId;
369  (void)consumerContent;
370  (void)consumerId;
371  (void)success;
372  }
373 
375  virtual void dataUnlinked(ContentID consumerContent, dataConsumerId_t consumerId, bool success) override
376  {
377  (void)consumerContent;
378  (void)consumerId;
379  (void)success;
380  }
381 
383  virtual void objectsPicked(ContentID content, const pickableObjectId_t* pickedObjects, uint32_t pickedObjectsCount) override
384  {
385  (void)content;
386  (void)pickedObjects;
387  (void)pickedObjectsCount;
388  }
389 
393  virtual void dataProviderCreated(ContentID contentID, dataProviderId_t dataProviderId) override
394  {
395  (void)contentID;
396  (void)dataProviderId;
397  }
398 
402  virtual void dataProviderDestroyed(ContentID contentID, dataProviderId_t dataProviderId) override
403  {
404  (void)contentID;
405  (void)dataProviderId;
406  }
407 
411  virtual void dataConsumerCreated(ContentID contentID, dataConsumerId_t dataConsumerId) override
412  {
413  (void)contentID;
414  (void)dataConsumerId;
415  }
416 
420  virtual void dataConsumerDestroyed(ContentID contentID, dataConsumerId_t dataConsumerId) override
421  {
422  (void)contentID;
423  (void)dataConsumerId;
424  }
425 
427  virtual void contentFlushed(ContentID contentID, sceneVersionTag_t version) override
428  {
429  (void)contentID;
430  (void)version;
431  }
432 
434  virtual void contentExpirationMonitoringEnabled(ContentID contentID) override
435  {
436  (void)contentID;
437  }
438 
440  virtual void contentExpirationMonitoringDisabled(ContentID contentID) override
441  {
442  (void)contentID;
443  }
444 
446  virtual void contentExpired(ContentID contentID) override
447  {
448  (void)contentID;
449  }
450 
452  virtual void contentRecoveredFromExpiration(ContentID contentID) override
453  {
454  (void)contentID;
455  }
456 
458  virtual void streamAvailabilityChanged(waylandIviSurfaceId_t streamId, bool available) override
459  {
460  (void)streamId;
461  (void)available;
462  }
464  void contentEnableFocusRequest(ramses::ContentID contentID, int32_t focusRequest) override
465  {
466  (void) contentID;
467  (void) focusRequest;
468  }
469 
471  void contentDisableFocusRequest(ramses::ContentID contentID, int32_t focusRequest) override
472  {
473  (void) contentID;
474  (void) focusRequest;
475  }
476  };
477 }
478 
479 #endif
#define RAMSES_API
Definition: APIExport.h:35
Convenience empty implementation of IDcsmContentControlEventHandler that can be used to derive from w...
Definition: IDcsmContentControlEventHandler.h:305
virtual void objectsPicked(ContentID content, const pickableObjectId_t *pickedObjects, uint32_t pickedObjectsCount) override
This method will be called when there were scene objects picked as a result of ramses::DcsmContentCon...
Definition: IDcsmContentControlEventHandler.h:383
virtual void contentRecoveredFromExpiration(ContentID contentID) override
This method will be called if a content's scene which previously expired (ramses::Scene::setExpiratio...
Definition: IDcsmContentControlEventHandler.h:452
virtual void dataProviderDestroyed(ContentID contentID, dataProviderId_t dataProviderId) override
This method will be called when a data provider is removed from content's scene.
Definition: IDcsmContentControlEventHandler.h:402
virtual void streamAvailabilityChanged(waylandIviSurfaceId_t streamId, bool available) override
This method will be called when a new IVI video stream becomes available, or when an existing stream ...
Definition: IDcsmContentControlEventHandler.h:458
virtual void contentAvailable(ContentID contentID, Category categoryID) override
New content is available. This is a result of Dcsm content offer that requested category registered i...
Definition: IDcsmContentControlEventHandler.h:308
virtual void contentExpirationMonitoringDisabled(ContentID contentID) override
This method will be called whenever a content's scene which was previously monitored for expiration h...
Definition: IDcsmContentControlEventHandler.h:440
virtual void contentReady(ContentID contentID, DcsmContentControlEventResult result) override
Content became ready or timed out to get ready. See ramses::DcsmContentControl::requestContentReady f...
Definition: IDcsmContentControlEventHandler.h:315
virtual void dataConsumerDestroyed(ContentID contentID, dataConsumerId_t dataConsumerId) override
This method will be called when a data consumer is removed from content's scene.
Definition: IDcsmContentControlEventHandler.h:420
virtual void contentNotAvailable(ContentID contentID) override
Content became unavailable unexpectedly. Application logic should react as fast as possible if this a...
Definition: IDcsmContentControlEventHandler.h:334
void contentEnableFocusRequest(ramses::ContentID contentID, int32_t focusRequest) override
Provider requested to switch to/focus this content within the category. Consumer may or may not follo...
Definition: IDcsmContentControlEventHandler.h:464
virtual void dataLinked(ContentID providerContent, dataProviderId_t providerId, ContentID consumerContent, dataConsumerId_t consumerId, bool success) override
Data provider and consumer were linked (or failed to be linked) as result of calling ramses::DcsmCont...
Definition: IDcsmContentControlEventHandler.h:365
virtual void dataUnlinked(ContentID consumerContent, dataConsumerId_t consumerId, bool success) override
Data consumer was unlinked from provider (or failed to be linked) as result of calling ramses::DcsmCo...
Definition: IDcsmContentControlEventHandler.h:375
virtual void contentShown(ContentID contentID) override
Content is shown (its scene is rendered on corresponding display). This callback comes at start time ...
Definition: IDcsmContentControlEventHandler.h:322
virtual void contentStopOfferRequested(ContentID contentID) override
Called when Dcsm provider requests that its content is not used anymore and it would like to stop off...
Definition: IDcsmContentControlEventHandler.h:328
virtual void contentExpired(ContentID contentID) override
This method will be called if a content's scene which is enabled for expiration monitoring (contentEx...
Definition: IDcsmContentControlEventHandler.h:446
virtual void contentFlushed(ContentID contentID, sceneVersionTag_t version) override
Scene associated with content was flushed with a version tag.
Definition: IDcsmContentControlEventHandler.h:427
virtual void dataProviderCreated(ContentID contentID, dataProviderId_t dataProviderId) override
This method will be called whenever a data provider is created in content's scene.
Definition: IDcsmContentControlEventHandler.h:393
virtual void dataConsumerCreated(ContentID contentID, dataConsumerId_t dataConsumerId) override
This method will be called whenever a data consumer is created in content's scene.
Definition: IDcsmContentControlEventHandler.h:411
virtual void contentExpirationMonitoringEnabled(ContentID contentID) override
This method will be called whenever a content's scene which was not previously monitored for expirati...
Definition: IDcsmContentControlEventHandler.h:434
void contentLinkedToTextureConsumer(ContentID providerContent, ContentID consumerContent, dataConsumerId_t consumerId, bool success) override
Content and consumer were linked (or failed to be linked) as result of calling ramses::DcsmContentCon...
Definition: IDcsmContentControlEventHandler.h:356
virtual void contentMetadataUpdated(ContentID contentID, const DcsmMetadataUpdate &metadataUpdate) override
Update metadata for given content. This callback provides metadata given to by DcsmProvider::offerCon...
Definition: IDcsmContentControlEventHandler.h:340
virtual void offscreenBufferLinked(displayBufferId_t offscreenBufferId, ContentID consumerContent, dataConsumerId_t consumerId, bool success) override
Offscreen buffer and consumer were linked (or failed to be linked) as result of calling ramses::DcsmC...
Definition: IDcsmContentControlEventHandler.h:347
void contentDisableFocusRequest(ramses::ContentID contentID, int32_t focusRequest) override
Provider requested to no longer focus this content within the category. Consumer may or may not follo...
Definition: IDcsmContentControlEventHandler.h:471
Class to extract DCSM metadata entries from. Objects of this type will be provided by ramses callback...
Definition: DcsmMetadataUpdate.h:31
Callback handler interface for events emitted by ramses::DcsmContentControl.
Definition: IDcsmContentControlEventHandler.h:32
virtual void contentNotAvailable(ContentID contentID)=0
Content became unavailable unexpectedly. Application logic should react as fast as possible if this a...
virtual void contentLinkedToTextureConsumer(ContentID providerContent, ContentID consumerContent, dataConsumerId_t consumerId, bool success)=0
Content and consumer were linked (or failed to be linked) as result of calling ramses::DcsmContentCon...
virtual void dataConsumerCreated(ContentID contentID, dataConsumerId_t dataConsumerId)=0
This method will be called whenever a data consumer is created in content's scene.
virtual void contentFlushed(ContentID contentID, sceneVersionTag_t version)=0
Scene associated with content was flushed with a version tag.
virtual void dataProviderCreated(ContentID contentID, dataProviderId_t dataProviderId)=0
This method will be called whenever a data provider is created in content's scene.
virtual void contentAvailable(ContentID contentID, Category categoryID)=0
New content is available. This is a result of Dcsm content offer that requested category registered i...
virtual void contentStopOfferRequested(ContentID contentID)=0
Called when Dcsm provider requests that its content is not used anymore and it would like to stop off...
virtual void contentExpirationMonitoringDisabled(ContentID contentID)=0
This method will be called whenever a content's scene which was previously monitored for expiration h...
virtual void contentDisableFocusRequest(ramses::ContentID contentID, int32_t focusRequest)=0
Provider requested to no longer focus this content within the category. Consumer may or may not follo...
virtual void contentEnableFocusRequest(ramses::ContentID contentID, int32_t focusRequest)=0
Provider requested to switch to/focus this content within the category. Consumer may or may not follo...
virtual void offscreenBufferLinked(displayBufferId_t offscreenBufferId, ContentID consumerContent, dataConsumerId_t consumerId, bool success)=0
Offscreen buffer and consumer were linked (or failed to be linked) as result of calling ramses::DcsmC...
virtual void dataLinked(ContentID providerContent, dataProviderId_t providerId, ContentID consumerContent, dataConsumerId_t consumerId, bool success)=0
Data provider and consumer were linked (or failed to be linked) as result of calling ramses::DcsmCont...
virtual void dataUnlinked(ContentID consumerContent, dataConsumerId_t consumerId, bool success)=0
Data consumer was unlinked from provider (or failed to be linked) as result of calling ramses::DcsmCo...
virtual void contentMetadataUpdated(ContentID contentID, const DcsmMetadataUpdate &metadataUpdate)=0
Update metadata for given content. This callback provides metadata given to by DcsmProvider::offerCon...
virtual void contentReady(ContentID contentID, DcsmContentControlEventResult result)=0
Content became ready or timed out to get ready. See ramses::DcsmContentControl::requestContentReady f...
virtual void contentShown(ContentID contentID)=0
Content is shown (its scene is rendered on corresponding display). This callback comes at start time ...
virtual void contentExpirationMonitoringEnabled(ContentID contentID)=0
This method will be called whenever a content's scene which was not previously monitored for expirati...
virtual ~IDcsmContentControlEventHandler()=default
Destructor.
virtual void contentExpired(ContentID contentID)=0
This method will be called if a content's scene which is enabled for expiration monitoring (contentEx...
virtual void objectsPicked(ContentID content, const pickableObjectId_t *pickedObjects, uint32_t pickedObjectsCount)=0
This method will be called when there were scene objects picked as a result of ramses::DcsmContentCon...
virtual void dataConsumerDestroyed(ContentID contentID, dataConsumerId_t dataConsumerId)=0
This method will be called when a data consumer is removed from content's scene.
virtual void contentRecoveredFromExpiration(ContentID contentID)=0
This method will be called if a content's scene which previously expired (ramses::Scene::setExpiratio...
virtual void dataProviderDestroyed(ContentID contentID, dataProviderId_t dataProviderId)=0
This method will be called when a data provider is removed from content's scene.
virtual void streamAvailabilityChanged(waylandIviSurfaceId_t streamId, bool available)=0
This method will be called when a new IVI video stream becomes available, or when an existing stream ...
Helper class to create strongly typed values out of various types.
Definition: StronglyTypedValue.h:23
The RAMSES namespace contains all client side objects and functions used to implement RAMSES applicat...
Definition: AnimatedProperty.h:15
DcsmContentControlEventResult
ramses::DcsmContentControl event result used in some event handler callbacks
Definition: IDcsmContentControlEventHandler.h:21
@ TimedOut
The event (state change) did not happen in given time period and is considered as failed - no change ...
@ OK
The event (state change) was successful.
uint64_t sceneVersionTag_t
Scene version tag used to refer to content versions of a scene. A scene version may be updated along ...
Definition: RamsesFrameworkTypes.h:49