#include "ExternalServicesComponent.h"
Public Types | |
| enum | RequestType { EXECUTE , QUEUE } |
Public Slots | |
| char * | performAction (const char *json, const char *senderIP) |
| void | queueAction (const char *json, const char *senderIP) |
| void | deallocateData (const char *data) |
| void | shutdownAfterSessionServiceDisconnected (void) |
| void | sendExecuteRequest (const char *url, const char *message) |
| char * | sendExecuteRequestWithAnswer (const char *url, const char *message) |
| void | setProgressState (bool visible, const char *message, bool continuous) |
| void | setProgressValue (int percentage) |
| void | lockGui (void) |
| void | unlockGui (void) |
| void | showError (const char *message) |
| void | showInformation (const char *message) |
| void | activateModelVersion (const char *version) |
| void | keepAlive () |
Public Member Functions | |
| ExternalServicesComponent (AppBase *_owner) | |
| virtual | ~ExternalServicesComponent (void) |
| void | shutdown (void) |
| const std::string & | sessionServiceURL (void) const |
| const std::string & | uiServiceURL (void) const |
| ControlsManager * | controlsManager (void) |
| LockManager * | lockManager (void) |
| void | setSessionServiceURL (const std::string &_url) |
| void | setUiServiceURL (const std::string &_url) |
| void | setRelayServiceIsRequired (void) |
| void | setMessagingRelay (const std::string &_relayAddress) |
| KeyboardCommandHandler * | addShortcut (ServiceDataUi *_sender, const std::string &_keySequence) |
| std::list< std::string > | GetAllUserProjects () |
| ModelUIDtype | createModel (const std::string &_projectName, const std::string &_collectionName) |
| bool | deleteModel (ModelUIDtype modelID) |
| void | setVisualizationModel (ModelUIDtype modelID, ModelUIDtype visualizationModelID) |
| ModelUIDtype | getVisualizationModel (ModelUIDtype modelID) |
| bool | isModelModified (ModelUIDtype modelID) |
| bool | isCurrentModelModified (void) |
| virtual void | notify (ak::UID _senderId, ak::eventType _event, int _info1, int _info2) override |
| Will notify this receiver that a message was received by a sender. | |
| void | fillPropertyGrid (const std::string &_settings) |
| void | modelSelectionChangedNotification (ModelUIDtype modelID, std::list< ModelUIDtype > &selectedEntityID, std::list< ModelUIDtype > &selectedVisibleEntityID) |
| void | itemRenamed (ModelUIDtype modelID, const std::string &newName) |
| ot::Property * | createCleanedProperty (const ot::Property *const _item) |
| void | propertyGridValueChanged (const ot::Property *_property) |
| void | propertyGridValueDeleteRequested (const ot::Property *_property) |
| void | executeAction (ModelUIDtype modelID, ModelUIDtype buttonID) |
| void | entitiesSelected (ModelUIDtype modelID, ot::serviceID_t replyToServiceID, const std::string &selectionAction, const std::string &selectionInfo, std::list< std::string > &optionNames, std::list< std::string > &optionValues) |
| void | prefetchDataThread (const std::string &projectName, std::list< std::pair< unsigned long long, unsigned long long > > prefetchIDs) |
| void | sendToModelService (const std::string &_message, std::string _response) |
| bool | sendHttpRequest (RequestType operation, const std::string &url, ot::JsonDocument &doc, std::string &response) |
| bool | sendHttpRequest (RequestType operation, ot::OwnerService _service, ot::JsonDocument &doc, std::string &response) |
| bool | sendHttpRequest (RequestType operation, const ot::BasicServiceInformation &_service, ot::JsonDocument &doc, std::string &response) |
| bool | sendHttpRequest (RequestType operation, const std::string &url, const std::string &message, std::string &response) |
| bool | sendRelayedRequest (RequestType operation, const std::string &url, const std::string &json, std::string &response) |
| bool | sendKeySequenceActivatedMessage (KeyboardCommandHandler *_sender) |
| void | sendRubberbandResultsToService (ot::serviceID_t _serviceId, const std::string &_note, const std::string &_pointJson, const std::vector< double > &transform) |
| void | requestUpdateVTKEntity (unsigned long long modelEntityID) |
| void | versionSelected (const std::string &_version) |
| void | versionDeselected (void) |
| void | activateVersion (const std::string &_version) |
| std::list< ot::ProjectTemplateInformation > | getListOfProjectTemplates (void) |
| void | openProject (const std::string &projectName, const std::string &projectType, const std::string &collectionName) |
| void | closeProject (bool saveChanges) |
| void | saveProject () |
| bool | projectIsOpened (const std::string &projectName, std::string &projectUser) |
| std::list< std::string > | RequestFileNames (const std::string &dialogTitle, const std::string &fileMask) |
| void | ReadFileContent (const std::string &fileName, std::string &fileContent, unsigned long long &uncompressedDataLength) |
| void | InformSenderAboutFinishedAction (std::string URL, std::string subsequentFunction) |
| ServiceDataUi * | getServiceFromName (const std::string &_serviceName) |
| ServiceDataUi * | getServiceFromNameType (const ot::BasicServiceInformation &_info) |
| ServiceDataUi * | getServiceFromNameType (const std::string &_serviceName, const std::string &_serviceType) |
| OT_HANDLER (handleStudioSuiteAction, ExternalServicesComponent, OT_ACTIONLIST(OT_ACTION_CMD_UI_SS_IMPORT, OT_ACTION_CMD_UI_SS_COMMIT, OT_ACTION_CMD_UI_SS_GET, OT_ACTION_CMD_UI_SS_UPLOAD, OT_ACTION_CMD_UI_SS_DOWNLOAD, OT_ACTION_CMD_UI_SS_COPY, OT_ACTION_CMD_UI_SS_INFORMATION, OT_ACTION_CMD_UI_SS_SETCSTFILE), ot::MessageType::ALL_MESSAGE_TYPES) OT_HANDLER(handleLTSpiceAction | |
| OT_ACTIONLIST (OT_ACTION_CMD_UI_LTS_IMPORT, OT_ACTION_CMD_UI_LTS_COMMIT, OT_ACTION_CMD_UI_LTS_GET, OT_ACTION_CMD_UI_LTS_UPLOAD, OT_ACTION_CMD_UI_LTS_DOWNLOAD, OT_ACTION_CMD_UI_LTS_COPY, OT_ACTION_CMD_UI_LTS_INFORMATION, OT_ACTION_CMD_UI_LTS_SETLTSPICEFILE) | |
Public Member Functions inherited from ak::aNotifier | |
| aNotifier () | |
| Will initialize the notifier. | |
| virtual | ~aNotifier () |
| Destructor. | |
| void | enable (void) |
| Will enable this notifier. | |
| void | disable (void) |
| Will disable this notifier. | |
| bool | isEnabled (void) const |
| Will return true if this notifier is enabled. | |
Public Member Functions inherited from ot::ActionHandler | |
| ActionHandler () | |
| ActionHandler (const ActionHandler &_other)=default | |
| ActionHandler (ActionHandler &&_other)=default | |
| virtual | ~ActionHandler () |
| ActionHandler & | operator= (const ActionHandler &_other)=default |
| ActionHandler & | operator= (ActionHandler &&_other)=default |
Public Attributes | |
| ExternalServicesComponent | |
Additional Inherited Members | |
Protected Attributes inherited from ak::aNotifier | |
| bool | m_isEnabled |
| ExternalServicesComponent::ExternalServicesComponent | ( | AppBase * | _owner | ) |
|
virtual |
|
slot |
| void ExternalServicesComponent::activateVersion | ( | const std::string & | _version | ) |
| KeyboardCommandHandler * ExternalServicesComponent::addShortcut | ( | ServiceDataUi * | _sender, |
| const std::string & | _keySequence ) |
| void ExternalServicesComponent::closeProject | ( | bool | saveChanges | ) |
|
inline |
| ot::Property * ExternalServicesComponent::createCleanedProperty | ( | const ot::Property *const | _item | ) |
| ModelUIDtype ExternalServicesComponent::createModel | ( | const std::string & | _projectName, |
| const std::string & | _collectionName ) |
|
slot |
| bool ExternalServicesComponent::deleteModel | ( | ModelUIDtype | modelID | ) |
| void ExternalServicesComponent::entitiesSelected | ( | ModelUIDtype | modelID, |
| ot::serviceID_t | replyToServiceID, | ||
| const std::string & | selectionAction, | ||
| const std::string & | selectionInfo, | ||
| std::list< std::string > & | optionNames, | ||
| std::list< std::string > & | optionValues ) |
| void ExternalServicesComponent::executeAction | ( | ModelUIDtype | modelID, |
| ModelUIDtype | buttonID ) |
| void ExternalServicesComponent::fillPropertyGrid | ( | const std::string & | _settings | ) |
| std::list< std::string > ExternalServicesComponent::GetAllUserProjects | ( | ) |
| std::list< ot::ProjectTemplateInformation > ExternalServicesComponent::getListOfProjectTemplates | ( | void | ) |
| ServiceDataUi * ExternalServicesComponent::getServiceFromName | ( | const std::string & | _serviceName | ) |
| ServiceDataUi * ExternalServicesComponent::getServiceFromNameType | ( | const ot::BasicServiceInformation & | _info | ) |
| ServiceDataUi * ExternalServicesComponent::getServiceFromNameType | ( | const std::string & | _serviceName, |
| const std::string & | _serviceType ) |
| ModelUIDtype ExternalServicesComponent::getVisualizationModel | ( | ModelUIDtype | modelID | ) |
| void ExternalServicesComponent::InformSenderAboutFinishedAction | ( | std::string | URL, |
| std::string | subsequentFunction ) |
| bool ExternalServicesComponent::isCurrentModelModified | ( | void | ) |
| bool ExternalServicesComponent::isModelModified | ( | ModelUIDtype | modelID | ) |
| void ExternalServicesComponent::itemRenamed | ( | ModelUIDtype | modelID, |
| const std::string & | newName ) |
|
slot |
|
slot |
|
inline |
| void ExternalServicesComponent::modelSelectionChangedNotification | ( | ModelUIDtype | modelID, |
| std::list< ModelUIDtype > & | selectedEntityID, | ||
| std::list< ModelUIDtype > & | selectedVisibleEntityID ) |
|
overridevirtual |
Will notify this receiver that a message was received by a sender.
| _senderId | The id of the sender the message was sent from |
| _event | The event message |
| _info1 | Message addition 1 |
| _info2 | Message addition 2 |
| std::exception | on any error occuring during the execution |
Implements ak::aNotifier.
| void ExternalServicesComponent::openProject | ( | const std::string & | projectName, |
| const std::string & | projectType, | ||
| const std::string & | collectionName ) |
| ExternalServicesComponent::OT_ACTIONLIST | ( | OT_ACTION_CMD_UI_LTS_IMPORT | , |
| OT_ACTION_CMD_UI_LTS_COMMIT | , | ||
| OT_ACTION_CMD_UI_LTS_GET | , | ||
| OT_ACTION_CMD_UI_LTS_UPLOAD | , | ||
| OT_ACTION_CMD_UI_LTS_DOWNLOAD | , | ||
| OT_ACTION_CMD_UI_LTS_COPY | , | ||
| OT_ACTION_CMD_UI_LTS_INFORMATION | , | ||
| OT_ACTION_CMD_UI_LTS_SETLTSPICEFILE | ) |
| ExternalServicesComponent::OT_HANDLER | ( | handleStudioSuiteAction | , |
| ExternalServicesComponent | , | ||
| OT_ACTIONLIST( OT_ACTION_CMD_UI_SS_IMPORT, OT_ACTION_CMD_UI_SS_COMMIT, OT_ACTION_CMD_UI_SS_GET, OT_ACTION_CMD_UI_SS_UPLOAD, OT_ACTION_CMD_UI_SS_DOWNLOAD, OT_ACTION_CMD_UI_SS_COPY, OT_ACTION_CMD_UI_SS_INFORMATION, OT_ACTION_CMD_UI_SS_SETCSTFILE) | , | ||
| ot::MessageType::ALL_MESSAGE_TYPES | ) |
|
slot |
| void ExternalServicesComponent::prefetchDataThread | ( | const std::string & | projectName, |
| std::list< std::pair< unsigned long long, unsigned long long > > | prefetchIDs ) |
| bool ExternalServicesComponent::projectIsOpened | ( | const std::string & | projectName, |
| std::string & | projectUser ) |
| void ExternalServicesComponent::propertyGridValueChanged | ( | const ot::Property * | _property | ) |
| void ExternalServicesComponent::propertyGridValueDeleteRequested | ( | const ot::Property * | _property | ) |
|
slot |
| void ExternalServicesComponent::ReadFileContent | ( | const std::string & | fileName, |
| std::string & | fileContent, | ||
| unsigned long long & | uncompressedDataLength ) |
| std::list< std::string > ExternalServicesComponent::RequestFileNames | ( | const std::string & | dialogTitle, |
| const std::string & | fileMask ) |
| void ExternalServicesComponent::requestUpdateVTKEntity | ( | unsigned long long | modelEntityID | ) |
| void ExternalServicesComponent::saveProject | ( | ) |
|
slot |
|
slot |
| bool ExternalServicesComponent::sendHttpRequest | ( | RequestType | operation, |
| const ot::BasicServiceInformation & | _service, | ||
| ot::JsonDocument & | doc, | ||
| std::string & | response ) |
| bool ExternalServicesComponent::sendHttpRequest | ( | RequestType | operation, |
| const std::string & | url, | ||
| const std::string & | message, | ||
| std::string & | response ) |
| bool ExternalServicesComponent::sendHttpRequest | ( | RequestType | operation, |
| const std::string & | url, | ||
| ot::JsonDocument & | doc, | ||
| std::string & | response ) |
| bool ExternalServicesComponent::sendHttpRequest | ( | RequestType | operation, |
| ot::OwnerService | _service, | ||
| ot::JsonDocument & | doc, | ||
| std::string & | response ) |
| bool ExternalServicesComponent::sendKeySequenceActivatedMessage | ( | KeyboardCommandHandler * | _sender | ) |
| bool ExternalServicesComponent::sendRelayedRequest | ( | RequestType | operation, |
| const std::string & | url, | ||
| const std::string & | json, | ||
| std::string & | response ) |
| void ExternalServicesComponent::sendRubberbandResultsToService | ( | ot::serviceID_t | _serviceId, |
| const std::string & | _note, | ||
| const std::string & | _pointJson, | ||
| const std::vector< double > & | transform ) |
| void ExternalServicesComponent::sendToModelService | ( | const std::string & | _message, |
| std::string | _response ) |
|
inline |
| void ExternalServicesComponent::setMessagingRelay | ( | const std::string & | _relayAddress | ) |
|
slot |
|
slot |
| void ExternalServicesComponent::setRelayServiceIsRequired | ( | void | ) |
|
inline |
|
inline |
| void ExternalServicesComponent::setVisualizationModel | ( | ModelUIDtype | modelID, |
| ModelUIDtype | visualizationModelID ) |
|
slot |
|
slot |
| void ExternalServicesComponent::shutdown | ( | void | ) |
|
slot |
|
inline |
|
slot |
| void ExternalServicesComponent::versionDeselected | ( | void | ) |
| void ExternalServicesComponent::versionSelected | ( | const std::string & | _version | ) |
| ExternalServicesComponent::ExternalServicesComponent |