Merge branch 'dynamic_node_id'

This commit is contained in:
Pavel Kirienko
2015-04-26 07:51:05 +03:00
27 changed files with 707 additions and 24 deletions
@@ -60,6 +60,15 @@ public:
MonotonicDuration getTxTimeout() const { return tx_timeout_; }
void setTxTimeout(MonotonicDuration tx_timeout);
/**
* By default, attempt to send a transfer from passive mode will result in an error @ref ErrPassive.
* This option allows to enable sending anonymous transfers from passive mode.
*/
void allowAnonymousTransfers()
{
sender_->allowAnonymousTransfers();
}
INode& getNode() const { return node_; }
};
@@ -67,6 +67,7 @@ public:
TransferID getTransferID() const { return safeget<TransferID, &IncomingTransfer::getTransferID>(); }
NodeID getSrcNodeID() const { return safeget<NodeID, &IncomingTransfer::getSrcNodeID>(); }
uint8_t getIfaceIndex() const { return safeget<uint8_t, &IncomingTransfer::getIfaceIndex>(); }
bool isAnonymousTransfer() const { return safeget<bool, &IncomingTransfer::isAnonymousTransfer>(); }
};
/**
@@ -200,6 +201,15 @@ protected:
return genericStart(&Dispatcher::registerServiceResponseListener);
}
/**
* By default, anonymous transfers will be ignored.
* This option allows to enable reception of anonymous transfers.
*/
void allowAnonymousTransfers()
{
forwarder_->allowAnonymousTransfers();
}
/**
* Terminate the subscription.
* Dispatcher core will remove this instance from the subscribers list.
@@ -87,6 +87,7 @@ public:
*/
using BaseType::init;
using BaseType::allowAnonymousTransfers;
using BaseType::getTransferSender;
using BaseType::getMinTxTimeout;
using BaseType::getMaxTxTimeout;
@@ -111,6 +111,7 @@ public:
return BaseType::startAsMessageListener();
}
using BaseType::allowAnonymousTransfers;
using BaseType::stop;
using BaseType::getFailureCount;
};