CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Signals | Public Member Functions | List of all members
ctkDicomAbstractHost Class Reference

Provides a basic implementation for an application host. More...

#include <Plugins/org.commontk.dah.host/ctkDicomAbstractHost.h>

Inheritance diagram for ctkDicomAbstractHost:
Inheritance graph
[legend]
Collaboration diagram for ctkDicomAbstractHost:
Collaboration graph
[legend]

Signals

void appReady ()
 Emitted when the ctkDicomAppHosting::IDLE state notification has been received, and the previous state was EXIT, IDLE or CANCELED. More...
 
void canceled ()
 Emitted when the ctkDicomAppHosting::CANCELED state notification has been received. More...
 
void completed ()
 Emitted when the ctkDicomAppHosting::COMPLETED state notification has been received. More...
 
void exited ()
 Emitted when the ctkDicomAppHosting::EXIT state notification has been received. More...
 
void releaseAvailableResources ()
 Emitted when the ctkDicomAppHosting::IDLE state notification has been received, and the previous state was COMPLETED. More...
 
void resumed ()
 Emitted when the ctkDicomAppHosting::INPROGRESS state notification has been received, and previous state SUSPENDED. More...
 
void startProgress ()
 Emitted when the ctkDicomAppHosting::INPROGRESS state notification has been received, and previous state IDLE. More...
 
void stateChangedReceived (ctkDicomAppHosting::State state)
 Emitted after any new state has been received. The event is sent after all the others have been sent through the state machine. More...
 
void statusReceived (const ctkDicomAppHosting::Status &status)
 
void suspended ()
 Emitted when the ctkDicomAppHosting::SUSPENDED state notification has been received. More...
 
- Signals inherited from ctkDicomAbstractExchangeCache
void dataAvailable ()
 
void internalDataAvailable ()
 

Public Member Functions

 ctkDicomAbstractHost (int hostPort=0, int appPort=0)
 Starts the soap server on the specified port or choose port automatically. More...
 
ctkDicomAppHosting::State getApplicationState () const
 Gets the internal representation of the application state. Does not call the client. For that purpose call ctkDicomAppInterface::getState() instead. More...
 
int getAppPort () const
 Gets the hosted application port. More...
 
ctkDicomAppInterfacegetDicomAppService () const
 Gets the application service in order to call methods on the hosted app. More...
 
int getHostPort () const
 Gets the host port. More...
 
ctkDicomExchangeInterfacegetOtherSideExchangeService () const
 Gets the exchange service of the other side. More...
 
virtual void notifyStateChanged (ctkDicomAppHosting::State state)
 Handles transitions form one state to the other. When a new state notification arrives from the hosted app, it goes through a state machine check and triggers signals depending on the appropriate response. More...
 
virtual ~ctkDicomAbstractHost ()
 
- Public Member Functions inherited from ctkDicomAbstractExchangeCache
void cleanIncomingData ()
 Clean internal data stucture that keeps the incoming data. More...
 
 ctkDicomAbstractExchangeCache ()
 Construct object. More...
 
virtual QList< ctkDicomAppHosting::ObjectLocatorgetData (const QList< QUuid > &objectUUIDs, const QList< QString > &acceptableTransferSyntaxUIDs, bool includeBulkData)
 Provide ctkDicomAppHosting::ObjectLocators to the other side. More...
 
const ctkDicomAppHosting::AvailableDatagetIncomingAvailableData () const
 Return the incoming available data. More...
 
bool lastIncomingData () const
 Return whether the incoming data was marked as lastData. More...
 
bool notifyDataAvailable (const ctkDicomAppHosting::AvailableData &data, bool lastData)
 Receive notification from other side. More...
 
ctkDicomObjectLocatorCacheobjectLocatorCache () const
 Return the cache for outgoing data. More...
 
bool publishData (const ctkDicomAppHosting::AvailableData &availableData, bool lastData)
 Publish data to other side. More...
 
void releaseData (const QList< QUuid > &objectUUIDs)
 
virtual ~ctkDicomAbstractExchangeCache ()
 Destructor. More...
 
- Public Member Functions inherited from ctkDicomExchangeInterface
virtual ~ctkDicomExchangeInterface ()
 
- Public Member Functions inherited from ctkDicomHostInterface
virtual QString generateUID ()=0
 
virtual QRect getAvailableScreen (const QRect &preferredScreen)=0
 
virtual QString getOutputLocation (const QStringList &preferredProtocols)=0
 
virtual void notifyStatus (const ctkDicomAppHosting::Status &status)=0
 

Detailed Description

Provides a basic implementation for an application host.

It starts a http server and serves one hosted application. Multiple instances can be used for hosting multiple applications.

The methods of the ctkDicomHostInterface have to be implemented for the business logic,

Definition at line 49 of file ctkDicomAbstractHost.h.

Constructor & Destructor Documentation

◆ ctkDicomAbstractHost()

ctkDicomAbstractHost::ctkDicomAbstractHost ( int  hostPort = 0,
int  appPort = 0 
)

Starts the soap server on the specified port or choose port automatically.

Parameters
hostPort
appPort

◆ ~ctkDicomAbstractHost()

virtual ctkDicomAbstractHost::~ctkDicomAbstractHost ( )
virtual

Member Function Documentation

◆ appReady

void ctkDicomAbstractHost::appReady ( )
signal

Emitted when the ctkDicomAppHosting::IDLE state notification has been received, and the previous state was EXIT, IDLE or CANCELED.

Todo:
: perhaps also send this when completed. Needs discussion.

◆ canceled

void ctkDicomAbstractHost::canceled ( )
signal

Emitted when the ctkDicomAppHosting::CANCELED state notification has been received.

◆ completed

void ctkDicomAbstractHost::completed ( )
signal

Emitted when the ctkDicomAppHosting::COMPLETED state notification has been received.

◆ exited

void ctkDicomAbstractHost::exited ( )
signal

Emitted when the ctkDicomAppHosting::EXIT state notification has been received.

◆ getApplicationState()

ctkDicomAppHosting::State ctkDicomAbstractHost::getApplicationState ( ) const

Gets the internal representation of the application state. Does not call the client. For that purpose call ctkDicomAppInterface::getState() instead.

Returns
ctkDicomAppHosting::State

◆ getAppPort()

int ctkDicomAbstractHost::getAppPort ( ) const

Gets the hosted application port.

Returns
int

◆ getDicomAppService()

ctkDicomAppInterface* ctkDicomAbstractHost::getDicomAppService ( ) const

Gets the application service in order to call methods on the hosted app.

Returns
ctkDicomAppInterface *

◆ getHostPort()

int ctkDicomAbstractHost::getHostPort ( ) const

Gets the host port.

Returns
int

◆ getOtherSideExchangeService()

ctkDicomExchangeInterface* ctkDicomAbstractHost::getOtherSideExchangeService ( ) const
virtual

Gets the exchange service of the other side.

If we are a host, this must return the exchange service of the hosted app and vice versa.

Returns
ctkDicomExchangeService * of the other side

Implements ctkDicomAbstractExchangeCache.

◆ notifyStateChanged()

virtual void ctkDicomAbstractHost::notifyStateChanged ( ctkDicomAppHosting::State  state)
virtual

Handles transitions form one state to the other. When a new state notification arrives from the hosted app, it goes through a state machine check and triggers signals depending on the appropriate response.

The developer must connect to these signals to react to new state. The signal stateChangedReceived is not to be used for this, it is just there for propagating new states for information only.

See also
appReady() releaseAvailableResources() startProgress() resumed() completed() suspended() canceled() exited() stateChangedReceived()
Parameters
state

Implements ctkDicomHostInterface.

◆ releaseAvailableResources

void ctkDicomAbstractHost::releaseAvailableResources ( )
signal

Emitted when the ctkDicomAppHosting::IDLE state notification has been received, and the previous state was COMPLETED.

◆ resumed

void ctkDicomAbstractHost::resumed ( )
signal

Emitted when the ctkDicomAppHosting::INPROGRESS state notification has been received, and previous state SUSPENDED.

◆ startProgress

void ctkDicomAbstractHost::startProgress ( )
signal

Emitted when the ctkDicomAppHosting::INPROGRESS state notification has been received, and previous state IDLE.

◆ stateChangedReceived

void ctkDicomAbstractHost::stateChangedReceived ( ctkDicomAppHosting::State  state)
signal

Emitted after any new state has been received. The event is sent after all the others have been sent through the state machine.

Parameters
state

◆ statusReceived

void ctkDicomAbstractHost::statusReceived ( const ctkDicomAppHosting::Status status)
signal
Parameters
status

◆ suspended

void ctkDicomAbstractHost::suspended ( )
signal

Emitted when the ctkDicomAppHosting::SUSPENDED state notification has been received.


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