本文整理汇总了C++中BaseType::getTransferSender方法的典型用法代码示例。如果您正苦于以下问题:C++ BaseType::getTransferSender方法的具体用法?C++ BaseType::getTransferSender怎么用?C++ BaseType::getTransferSender使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseType
的用法示例。
在下文中一共展示了BaseType::getTransferSender方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getPriority
/**
* Returns priority of outgoing transfers.
* TODO: Make const.
*/
TransferPriority getPriority()
{
// TODO probably TransferSender must be transformed into regular field?
TransferSender* const ts = getTransferSender();
if (ts != NULL)
{
return ts->getPriority();
}
else
{
return TransferPriorityNormal; // This is default
}
}
示例2: setPriority
/**
* Allows to change the priority of outgoing transfers.
* Note that only High, Normal and Low priorities can be used; Service priority is not available for messages.
* Returns negative error code if priority cannot be set, non-negative on success.
*/
int setPriority(const TransferPriority prio)
{
if (prio < NumTransferPriorities && prio != TransferPriorityService)
{
TransferSender* const ts = getTransferSender(); // TODO: Static TransferSender?
if (ts != NULL)
{
ts->setPriority(prio);
return 0;
}
else
{
return -ErrLogic;
}
}
else
{
return -ErrInvalidParam;
}
}