![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
Provides a basic implementation for an application host. More...
#include <Plugins/org.commontk.dah.host/ctkDicomAbstractHost.h>
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... | |
![]() | |
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... | |
ctkDicomAppInterface * | getDicomAppService () const |
Gets the application service in order to call methods on the hosted app. More... | |
int | getHostPort () const |
Gets the host port. More... | |
ctkDicomExchangeInterface * | getOtherSideExchangeService () 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 () |
![]() | |
void | cleanIncomingData () |
Clean internal data stucture that keeps the incoming data. More... | |
ctkDicomAbstractExchangeCache () | |
Construct object. More... | |
virtual QList< ctkDicomAppHosting::ObjectLocator > | getData (const QList< QUuid > &objectUUIDs, const QList< QString > &acceptableTransferSyntaxUIDs, bool includeBulkData) |
Provide ctkDicomAppHosting::ObjectLocators to the other side. More... | |
const ctkDicomAppHosting::AvailableData & | getIncomingAvailableData () 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... | |
ctkDicomObjectLocatorCache * | objectLocatorCache () 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... | |
![]() | |
virtual | ~ctkDicomExchangeInterface () |
![]() | |
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 |
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.
ctkDicomAbstractHost::ctkDicomAbstractHost | ( | int | hostPort = 0 , |
int | appPort = 0 |
||
) |
Starts the soap server on the specified port or choose port automatically.
hostPort | |
appPort |
|
virtual |
|
signal |
Emitted when the ctkDicomAppHosting::IDLE state notification has been received, and the previous state was EXIT, IDLE or CANCELED.
|
signal |
Emitted when the ctkDicomAppHosting::CANCELED state notification has been received.
|
signal |
Emitted when the ctkDicomAppHosting::COMPLETED state notification has been received.
|
signal |
Emitted when the ctkDicomAppHosting::EXIT state notification has been received.
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.
int ctkDicomAbstractHost::getAppPort | ( | ) | const |
Gets the hosted application port.
ctkDicomAppInterface* ctkDicomAbstractHost::getDicomAppService | ( | ) | const |
Gets the application service in order to call methods on the hosted app.
int ctkDicomAbstractHost::getHostPort | ( | ) | const |
Gets the host port.
|
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.
Implements ctkDicomAbstractExchangeCache.
|
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.
state |
Implements ctkDicomHostInterface.
|
signal |
Emitted when the ctkDicomAppHosting::IDLE state notification has been received, and the previous state was COMPLETED.
|
signal |
Emitted when the ctkDicomAppHosting::INPROGRESS state notification has been received, and previous state SUSPENDED.
|
signal |
Emitted when the ctkDicomAppHosting::INPROGRESS state notification has been received, and previous state IDLE.
|
signal |
Emitted after any new state has been received. The event is sent after all the others have been sent through the state machine.
state |
|
signal |
status |
|
signal |
Emitted when the ctkDicomAppHosting::SUSPENDED state notification has been received.