]> git.mxchange.org Git - hub.git/commitdiff
Also here ???? ;-(
authorRoland Haeder <roland@mxchange.org>
Sun, 24 May 2015 20:37:02 +0000 (22:37 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 24 May 2015 20:37:02 +0000 (22:37 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
application/hub/main/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php
application/hub/main/filter/tags/class_PackageAnnouncementTagFilter.php
application/hub/main/handler/message-types/announcement/class_NodeMessageAnnouncementHandler.php
application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php

index 7daf9ee59f162b2ec3120ea981db24b9436125ae..3c9129bfb1f43e970ec353825137c56bce507c83 100644 (file)
@@ -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                              => '',
                );
index 2c92ba1ccbc809b2358a4e1a1018534411d0c97c..7b992b654a75746835b3619d24c579974c4d9189 100644 (file)
@@ -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 => '',
                );
index b4e4224be6c39c0fecbc5eb19ce16ae0dcac5f4e..6e4b5030035b99a8fdb15621a66d085f6974e86f 100644 (file)
@@ -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',
                );
index 110ddf1602e7ca4607666eddf790ef546de87cfc..d087929a17b9a1fe4e649f6477c8737596f60ca6 100644 (file)
@@ -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
         *