/**
* Some XML nodes must be available for later data extraction
*/
+ const ANNOUNCEMENT_DATA_NODE_ID = 'my-node-id';
const ANNOUNCEMENT_DATA_SESSION_ID = 'my-session-id';
+ const ANNOUNCEMENT_DATA_PRIVATE_KEY_HASH = 'my-private-key-hash';
const ANNOUNCEMENT_DATA_NODE_STATUS = 'my-status';
const ANNOUNCEMENT_DATA_EXTERNAL_ADDRESS = 'my-external-address';
const ANNOUNCEMENT_DATA_INTERNAL_ADDRESS = 'my-internal-address';
self::ANNOUNCEMENT_DATA_EXTERNAL_ADDRESS,
self::ANNOUNCEMENT_DATA_INTERNAL_ADDRESS,
self::ANNOUNCEMENT_DATA_NODE_STATUS,
+ self::ANNOUNCEMENT_DATA_NODE_ID,
self::ANNOUNCEMENT_DATA_SESSION_ID,
+ self::ANNOUNCEMENT_DATA_PRIVATE_KEY_HASH,
// Data from other node
'your-external-address',
'your-internal-address',
+ 'your-node-id',
'your-session-id',
+ 'your-private-key-hash',
// Answer status (generic field)
self::ANSWER_STATUS,
));
$this->getStackInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_INTERNAL_ADDRESS);
}
+ /**
+ * Starts the my-node-id
+ *
+ * @return void
+ */
+ protected function startMyNodeId () {
+ // Push the node name on the stacker
+ $this->getStackInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_NODE_ID);
+ }
+
/**
* Starts the my-session-id
*
$this->getStackInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_SESSION_ID);
}
+ /**
+ * Starts the my-private-key-hash
+ *
+ * @return void
+ */
+ protected function startMyPrivateKeyHash () {
+ // Push the node name on the stacker
+ $this->getStackInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_PRIVATE_KEY_HASH);
+ }
+
/**
* Starts the my-status
*
$this->getStackInstance()->popNamed('node_announcement_answer');
}
+ /**
+ * Finishes the my-private-key-hash
+ *
+ * @return void
+ */
+ protected function finishMyPrivateKeyhash () {
+ // Pop the last entry
+ $this->getStackInstance()->popNamed('node_announcement_answer');
+ }
+
/**
* Finishes the my-session-id
*
$this->getStackInstance()->popNamed('node_announcement_answer');
}
+ /**
+ * Finishes the my-node-id
+ *
+ * @return void
+ */
+ protected function finishMyNodeId () {
+ // Pop the last entry
+ $this->getStackInstance()->popNamed('node_announcement_answer');
+ }
+
/**
* Finishes the my-internal-address
*
$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
+ *
+ * @return void
+ */
+ protected function startYourPrivateKeyHash () {
+ // Push the node name on the stacker
+ $this->getStackInstance()->pushNamed('node_announcement_answer', 'your-private-key-hash');
+ }
+
+ /**
+ * Finishes the your-private-key-hash
+ *
+ * @return void
+ */
+ protected function finishYourPrivateKeyHash () {
+ // Pop the last entry
+ $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
*