本文整理汇总了C++中CHeaderData::setFlag2方法的典型用法代码示例。如果您正苦于以下问题:C++ CHeaderData::setFlag2方法的具体用法?C++ CHeaderData::setFlag2怎么用?C++ CHeaderData::setFlag2使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CHeaderData
的用法示例。
在下文中一共展示了CHeaderData::setFlag2方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: process
bool CStarNetHandler::process(CHeaderData &header, AUDIO_SOURCE source)
{
if (m_id != 0x00U)
return false;
wxString my = header.getMyCall1();
m_id = header.getId();
m_linkTimer.start();
// Change the Your callsign to CQCQCQ
header.setCQCQCQ();
header.setFlag1(0x00);
header.setFlag2(0x00);
header.setFlag3(0x00);
// Build new repeater list
for (CStarNetUsersHashMap::const_iterator it = m_users.begin(); it != m_users.end(); ++it) {
CStarNetUser* user = it->second;
if (user != NULL) {
// Find the user in the cache
CUserData* userData = m_cache->findUser(user->getCallsign());
if (userData != NULL) {
// Find the users repeater in the repeater list, add it otherwise
CStarNetRepeater* repeater = m_repeaters[userData->getRepeater()];
if (repeater == NULL) {
// Add a new repeater entry
repeater = new CStarNetRepeater;
repeater->m_destination = wxT("/") + userData->getRepeater().Left(6U) + userData->getRepeater().Right(1U);
repeater->m_repeater = userData->getRepeater();
repeater->m_gateway = userData->getGateway();
repeater->m_address = userData->getAddress();
repeater->m_local = CRepeaterHandler::findDVRepeater(userData->getRepeater());
m_repeaters[userData->getRepeater()] = repeater;
}
delete userData;
userData = NULL;
}
}
}
switch (m_callsignSwitch) {
case SCS_GROUP_CALLSIGN:
// Change the My Callsign 1 to be that of the StarNet group
header.setMyCall1(m_groupCallsign);
header.setMyCall2(wxT("SNET"));
break;
case SCS_USER_CALLSIGN:
// Change the My Callsign 2 to be that of the StarNet group
header.setMyCall1(my);
header.setMyCall2(m_shortCallsign);
break;
default:
break;
}
sendToRepeaters(header);
if (m_txMsgSwitch)
sendFromText(my);
return true;
}