From bca98777e2bc45e047eda05a83faba5c61f23860 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sun, 24 May 2015 22:37:02 +0200 Subject: [PATCH] Also here ???? ;-( Signed-off-by: Roland Haeder --- ...ass_PackageAnnouncementAnswerTagFilter.php | 1 + .../class_PackageAnnouncementTagFilter.php | 1 + .../class_NodeMessageAnnouncementHandler.php | 1 + ...ss_XmlAnnouncementAnswerTemplateEngine.php | 21 +++++++++++++++++++ 4 files changed, 24 insertions(+) diff --git a/application/hub/main/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php b/application/hub/main/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php index 7daf9ee59..3c9129bfb 100644 --- a/application/hub/main/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php +++ b/application/hub/main/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php @@ -36,6 +36,7 @@ class PackageAnnouncementAnswerTagFilter extends BaseNodeFilter implements Filte XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_EXTERNAL_ADDRESS => '', XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_INTERNAL_ADDRESS => '', XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_NODE_STATUS => '', + XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_NODE_ID => '', XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_SESSION_ID => '', BaseXmlAnswerTemplateEngine::ANSWER_STATUS => '', ); diff --git a/application/hub/main/filter/tags/class_PackageAnnouncementTagFilter.php b/application/hub/main/filter/tags/class_PackageAnnouncementTagFilter.php index 2c92ba1cc..7b992b654 100644 --- a/application/hub/main/filter/tags/class_PackageAnnouncementTagFilter.php +++ b/application/hub/main/filter/tags/class_PackageAnnouncementTagFilter.php @@ -37,6 +37,7 @@ class PackageAnnouncementTagFilter extends BaseNodeFilter implements FilterableP XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_INTERNAL_ADDRESS => '', XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_NODE_STATUS => '', XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_NODE_MODE => '', + XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_NODE_ID => '', XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_SESSION_ID => '', XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_PRIVATE_KEY_HASH => '', ); diff --git a/application/hub/main/handler/message-types/announcement/class_NodeMessageAnnouncementHandler.php b/application/hub/main/handler/message-types/announcement/class_NodeMessageAnnouncementHandler.php index b4e4224be..6e4b50300 100644 --- a/application/hub/main/handler/message-types/announcement/class_NodeMessageAnnouncementHandler.php +++ b/application/hub/main/handler/message-types/announcement/class_NodeMessageAnnouncementHandler.php @@ -49,6 +49,7 @@ class NodeMessageAnnouncementHandler extends BaseMessageHandler implements Handl $this->messageToConfig = array( XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_EXTERNAL_ADDRESS => 'your_external_address', XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_INTERNAL_ADDRESS => 'your_internal_address', + XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_NODE_ID => 'your_node_id', XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_SESSION_ID => 'your_session_id', XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_PRIVATE_KEY_HASH => 'your_private_key_hash', ); diff --git a/application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php b/application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php index 110ddf160..d087929a1 100644 --- a/application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php +++ b/application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php @@ -55,6 +55,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine im // Data from other node 'your-external-address', 'your-internal-address', + 'your-node-id', 'your-session-id', 'your-private-key-hash', // Answer status (generic field) @@ -288,6 +289,16 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine im $this->getStackInstance()->pushNamed('node_announcement_answer', 'your-session-id'); } + /** + * Starts the your-node-id + * + * @return void + */ + protected function startYourNodeId () { + // Push the node name on the stacker + $this->getStackInstance()->pushNamed('node_announcement_answer', 'your-node-id'); + } + /** * Starts the your-private-key-hash * @@ -308,6 +319,16 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlAnswerTemplateEngine im $this->getStackInstance()->popNamed('node_announcement_answer'); } + /** + * Finishes the your-node-id + * + * @return void + */ + protected function finishYourNodeId () { + // Pop the last entry + $this->getStackInstance()->popNamed('node_announcement_answer'); + } + /** * Finishes the your-session-id * -- 2.39.5