RAMSES Documentation  27.0.130
Information for RAMSES users and developers
Public Member Functions | Public Attributes | List of all members
ramses::DcsmConsumer Class Reference

Class representing DCSM consumer side. More...

#include <DcsmConsumer.h>

Inheritance diagram for ramses::DcsmConsumer:
[legend]
Collaboration diagram for ramses::DcsmConsumer:
[legend]

Public Member Functions

status_t dispatchEvents (IDcsmConsumerEventHandler &handler)
 Calls handler functions synchronously in the caller context for DCSM events which were received asynchronously. This function must be called regularly to avoid buffer overflow of the internal queue. More...
 
status_t assignContentToConsumer (ContentID contentID, const CategoryInfoUpdate &categoryInfo)
 Exclusively assign an offered content to this consumer. Sends a DCSM canvasSizeEvent for the given content ID. May only be called for offered content IDs. More...
 
status_t contentSizeChange (ContentID contentID, const CategoryInfoUpdate &categoryInfo, AnimationInformation animationInformation)
 Send a DCSM contentSizeEvent for the given content ID. May only be called on assigned content IDs. Informs provider about canvas size change so it can adapt its content if needed. To allow a smooth transition animation start and end timestamp can be given during which the size change should be applied. More...
 
status_t contentStateChange (ContentID contentID, EDcsmState state, AnimationInformation animationInformation)
 Send a DCSM contentStateChange for the given content ID. May only be called on assigned content IDs. Requests switch to a different content state from provider side. For more information refer to EDcsmState enum and DCSM documentation. More...
 
status_t acceptStopOffer (ContentID contentID, AnimationInformation animationInformation)
 Accept a provider requesting to stop offering a content assigned to this consumer. May only be called as an answer to contentStopOfferRequest callback. The content may not be used after the given animation time any longer and also may not be assigned again until offered again. More...
 
status_t sendContentStatus (ContentID contentID, DcsmStatusMessage const &message)
 Send a message to the provider of the content assigned to this consumer. More...
 
 DcsmConsumer ()=delete
 Deleted default constructor. More...
 
 DcsmConsumer (const DcsmConsumer &other)=delete
 Deleted copy constructor. More...
 
DcsmConsumeroperator= (const DcsmConsumer &other)=delete
 Deleted copy assignment. More...
 
 DcsmConsumer (DcsmConsumerImpl &impl_)
 Constructor from impl. More...
 
 ~DcsmConsumer () override
 Destructor. More...
 
- Public Member Functions inherited from ramses::StatusObject
status_t validate () const
 Generates verbose validation of the object. More...
 
const char * getValidationReport (EValidationSeverity minSeverity=EValidationSeverity_Info) const
 Provides verbose report in human readable form generated by validate. More...
 
const char * getStatusMessage (status_t status) const
 Get the string description for a status provided by a RAMSES API function. More...
 
 StatusObject (const StatusObject &other)=delete
 Deleted copy constructor. More...
 
StatusObjectoperator= (const StatusObject &other)=delete
 Deleted copy assignment. More...
 

Public Attributes

DcsmConsumerImpl & impl
 
- Public Attributes inherited from ramses::StatusObject
class StatusObjectImpl & impl
 

Additional Inherited Members

- Protected Member Functions inherited from ramses::StatusObject
 StatusObject (StatusObjectImpl &pimpl)
 Constructor for StatusObject. More...
 
virtual ~StatusObject ()
 Destructor of the StatusObject. More...
 

Detailed Description

Class representing DCSM consumer side.

Constructor & Destructor Documentation

◆ DcsmConsumer() [1/3]

ramses::DcsmConsumer::DcsmConsumer ( )
delete

Deleted default constructor.

◆ DcsmConsumer() [2/3]

ramses::DcsmConsumer::DcsmConsumer ( const DcsmConsumer other)
delete

Deleted copy constructor.

Parameters
otherunused

◆ DcsmConsumer() [3/3]

ramses::DcsmConsumer::DcsmConsumer ( DcsmConsumerImpl &  impl_)
explicit

Constructor from impl.

Parameters
impl_impl

◆ ~DcsmConsumer()

ramses::DcsmConsumer::~DcsmConsumer ( )
override

Destructor.

Member Function Documentation

◆ acceptStopOffer()

status_t ramses::DcsmConsumer::acceptStopOffer ( ContentID  contentID,
AnimationInformation  animationInformation 
)

Accept a provider requesting to stop offering a content assigned to this consumer. May only be called as an answer to contentStopOfferRequest callback. The content may not be used after the given animation time any longer and also may not be assigned again until offered again.

Parameters
contentIDcontent for which the stopOffer is being accepted
animationInformationstart and end times of the transition. May be null for immediate change.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ assignContentToConsumer()

status_t ramses::DcsmConsumer::assignContentToConsumer ( ContentID  contentID,
const CategoryInfoUpdate categoryInfo 
)

Exclusively assign an offered content to this consumer. Sends a DCSM canvasSizeEvent for the given content ID. May only be called for offered content IDs.

Parameters
contentIDcontent to assign to this consumer
categoryInfoexpected size of the assigned category
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ contentSizeChange()

status_t ramses::DcsmConsumer::contentSizeChange ( ContentID  contentID,
const CategoryInfoUpdate categoryInfo,
AnimationInformation  animationInformation 
)

Send a DCSM contentSizeEvent for the given content ID. May only be called on assigned content IDs. Informs provider about canvas size change so it can adapt its content if needed. To allow a smooth transition animation start and end timestamp can be given during which the size change should be applied.

This method has to be called after this consumer is assigned for the content and every time the rendering viewport size for this content changes while it is still using the content.

Parameters
contentIDcontent which is affected by the canvas size change
categoryInfoexpected size after the transition
animationInformationstart and end times of the transition. May be null for immediate change.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ contentStateChange()

status_t ramses::DcsmConsumer::contentStateChange ( ContentID  contentID,
EDcsmState  state,
AnimationInformation  animationInformation 
)

Send a DCSM contentStateChange for the given content ID. May only be called on assigned content IDs. Requests switch to a different content state from provider side. For more information refer to EDcsmState enum and DCSM documentation.

Parameters
contentIDcontent for which the state is about to change
stateexpected content state after the transition
animationInformationstart and end times of the transition. May be null for immediate change.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ dispatchEvents()

status_t ramses::DcsmConsumer::dispatchEvents ( IDcsmConsumerEventHandler handler)

Calls handler functions synchronously in the caller context for DCSM events which were received asynchronously. This function must be called regularly to avoid buffer overflow of the internal queue.

Parameters
handlerUser class that implements the callbacks that can be triggered if a corresponding event happened. Check IDcsmConsumerEventHandler documentation for more details.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ operator=()

DcsmConsumer& ramses::DcsmConsumer::operator= ( const DcsmConsumer other)
delete

Deleted copy assignment.

Parameters
otherunused
Returns
unused

◆ sendContentStatus()

status_t ramses::DcsmConsumer::sendContentStatus ( ContentID  contentID,
DcsmStatusMessage const &  message 
)

Send a message to the provider of the content assigned to this consumer.

Parameters
contentIDContent for which the message should be sent.
messageAn implementation of DcsmStatusMessage, containing data to be carried to the provider.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

Member Data Documentation

◆ impl

DcsmConsumerImpl& ramses::DcsmConsumer::impl

Stores internal data for implementation specifics of DcsmConsumer


The documentation for this class was generated from the following file: