当前位置: 首页>>代码示例>>C++>>正文


C++ SetServiceType函数代码示例

本文整理汇总了C++中SetServiceType函数的典型用法代码示例。如果您正苦于以下问题:C++ SetServiceType函数的具体用法?C++ SetServiceType怎么用?C++ SetServiceType使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SetServiceType函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SmallMessage

// Default ctor
SMsgCommStatusReply::SMsgCommStatusReply(void) :
	SmallMessage(),
	mStatus(WONMsg::StatusCommon_Success)
{
	SetServiceType(WONMsg::CommonService);
	SetMessageType(WONMsg::SmallCommStatusReply);
}
开发者ID:SOLARIC,项目名称:world-opponent-network,代码行数:8,代码来源:SMsgCommStatusReply.cpp

示例2: SmallMessage

// Default ctor
SMsgDirG2GetNumEntities::SMsgDirG2GetNumEntities(void) :
	SmallMessage(),
	mPaths()
{
	SetServiceType(WONMsg::SmallDirServerG2);
	SetMessageType(WONMsg::DirG2GetNumEntities);
}
开发者ID:SOLARIC,项目名称:world-opponent-network,代码行数:8,代码来源:SMsgDirG2GetNumEntities.cpp

示例3: SMsgDirG2UpdateExtendBase

// Default ctor
SMsgDirG2SetDataObjects::SMsgDirG2SetDataObjects(KeyType theType) :
	SMsgDirG2UpdateExtendBase(theType, true, false),
	mSetMode(WONMsg::DOSM_ADDREPLACE)
{
	SetServiceType(WONMsg::SmallDirServerG2);
	SetMessageType(mKeyType == KT_SERVICE ? WONMsg::DirG2ServiceSetDataObjects : WONMsg::DirG2DirectorySetDataObjects);
}
开发者ID:vgck,项目名称:opendr2,代码行数:8,代码来源:SMsgDirG2SetDataObjects.cpp

示例4: m_i_data_source_id

SMsgUsrRemoveDataSource::SMsgUsrRemoveDataSource(const unsigned long &i_data_source_id)
    :SmallMessage(),
     m_i_data_source_id(i_data_source_id)
{
    SetServiceType(USER_SEARCH_SERVER_TYPE);
    SetMessageType(SMsgUsrRemoveDataSourceTYPE);
}
开发者ID:vgck,项目名称:opendr2,代码行数:7,代码来源:SMsgUsrRemoveDataSource.cpp

示例5: WTRACE

void* MMsgRoutingCreateGroup::Pack(void)
{
	WTRACE("MMsgRoutingCreateGroup::Pack");

	SetServiceType(WONMsg::MiniRoutingServer);
	SetMessageType(WONMsg::RoutingCreateGroup);
	RoutingServerMessage::Pack();

	WDBG_LL("MMsgRoutingCreateGroup::Pack Appending message data");

	// append group name
	AppendGroupName(mGroupName);

	// append flags
	unsigned char aFlags = 0;
	if (mIsPublic)             aFlags |= 0x01;
	if (mAnnounceGroupChanges) aFlags |= 0x02;
	AppendByte(aFlags);

	// append client count
	_ASSERT(mClientList.size() <= USHRT_MAX);
	AppendShort(mClientList.size());

	// append client list
	std::list<unsigned short>::iterator itr = mClientList.begin();
	while (itr != mClientList.end())
		AppendClientId(*(itr++));

	return GetDataPtr();
}
开发者ID:SOLARIC,项目名称:world-opponent-network,代码行数:30,代码来源:MMsgRoutingCreateGroup.cpp

示例6: MiniMessage

// Default
MMsgObsPublishRequested::MMsgObsPublishRequested(void) :
	MiniMessage(),
	mPublicationName()
{
	SetServiceType(WONMsg::MiniObsServer);
	SetMessageType(WONMsg::ObsMsg_PublishRequested);
}
开发者ID:vgck,项目名称:opendr2,代码行数:8,代码来源:MMsgObsPublishRequested.cpp

示例7: WTRACE

// TMsgDirFindServiceReply::Pack
// Virtual method from TMessage.  Packs data into message buffer and
// sets the new message length.
void*
TMsgDirFindServiceReply::Pack(void)
{
	WTRACE("TMsgDirFindServiceReply::Pack");
	SetServiceType(WONMsg::DirServer);
	SetMessageType(WONMsg::DirFindServiceReply);
	TMessage::Pack();

	WDBG_LL("TMsgDirFindServiceReply::Pack Appending message data");
	AppendShort(static_cast<short>(mStatus));

	// Service info only sent if status is ok
	if (mStatus == WONMsg::StatusCommon_Success)
	{
		Append_PW_STRING(mService.mPath);
		Append_PW_STRING(mService.mName);
		Append_PW_STRING(mService.mDisplayName);
		Append_PW_STRING(mService.mVersion);
		Append_PW_STRING(mService.mProtoName);
		Append_PW_STRING(mService.mProtoVersion);
		Append_PW_STRING(mService.mNetAddress);
		AppendLong(mService.mLifespan);
		AppendLong(mService.mCreated);
		AppendShort(mService.mBlobLen);
		AppendBytes(mService.mBlobLen, mService.mBlob);
	}

	return GetDataPtr();
}
开发者ID:SOLARIC,项目名称:world-opponent-network,代码行数:32,代码来源:TMsgDirFindService.cpp

示例8: TMessage

TMsgCommShutDownConfirmationReply::TMsgCommShutDownConfirmationReply(void) : 
   TMessage(), mStatus(0){

	SetServiceType(WONMsg::CommonService);
	SetMessageType(WONMsg::CommShutDownConfReply);

}
开发者ID:vgck,项目名称:opendr2,代码行数:7,代码来源:TMsgCommShutDownCnfrmReply.cpp

示例9: MiniMessage

// Default
MMsgObsRemovePublisher::MMsgObsRemovePublisher(void) :
	MiniMessage(),
	mPublisherId()
{
	SetServiceType(WONMsg::MiniObsServer);
	SetMessageType(WONMsg::ObsMsg_RemovePublisher);
}
开发者ID:SOLARIC,项目名称:world-opponent-network,代码行数:8,代码来源:MMsgObsRemovePublisher.cpp

示例10: MiniMessage

// Default ctor
MMsgCommNoOp::MMsgCommNoOp(void) :
	MiniMessage()
{
	WTRACE("MMsgCommNoOp::ctor(def)");
	SetServiceType(WONMsg::MiniCommonService);
	SetMessageType(WONMsg::MiniCommNoOp);
}
开发者ID:vgck,项目名称:opendr2,代码行数:8,代码来源:MMsgCommNoOp.cpp

示例11: m_i_data_source_id

SMsgUsrRegisterDataSourceReply::SMsgUsrRegisterDataSourceReply(const unsigned long &i_data_source_id)
							   :SmallMessage(),
								m_i_data_source_id(i_data_source_id)
	{
	SetServiceType(USER_SEARCH_SERVER_TYPE);
	SetMessageType(SMsgUsrRegisterDataSourceReplyTYPE);
	}
开发者ID:SOLARIC,项目名称:world-opponent-network,代码行数:7,代码来源:SMsgUsrRegisterDataSourceReply.cpp

示例12: WTRACE

// SMsgDirG2ExplicitSetDataObjects::Pack
// Virtual method from SmallMessage.  Packs data into message buffer.
void*
SMsgDirG2ExplicitSetDataObjects::Pack(void)
{
	WTRACE("SMsgDirG2ExplicitSetDataObjects::Pack");
	SetServiceType(WONMsg::SmallDirServerG2);
	SetMessageType(mKeyType == KT_SERVICE ? WONMsg::DirG2ServiceExplicitSetDataObjects : WONMsg::DirG2DirectoryExplicitSetDataObjects);
	SMsgDirG2UpdateBase::Pack();

	PackKey(*this);

	AppendShort(mObjects.size());
	ExplicitDOInfoList::iterator anItr(mObjects.begin());
	for (; anItr != mObjects.end(); anItr++)
	{
		AppendByte(static_cast<unsigned char>(anItr->mSetMode));

		unsigned char aTypeLen = anItr->mData.GetDataType().size();
		AppendByte(aTypeLen);
		if (aTypeLen > 0)
			AppendBytes(aTypeLen, anItr->mData.GetDataType().data());

		unsigned short aDataLen = anItr->mData.GetData().size();
		AppendShort(aDataLen);
		if (aDataLen > 0)
			AppendBytes(aDataLen, anItr->mData.GetData().data());
	}

	PackPeerData();
	return GetDataPtr();
}
开发者ID:SOLARIC,项目名称:world-opponent-network,代码行数:32,代码来源:SMsgDirG2ExplicitSetDOs.cpp

示例13: SMsgDirG2UpdateBase

// Default ctor
SMsgDirG2ExplicitSetDataObjects::SMsgDirG2ExplicitSetDataObjects(KeyType theType) :
	SMsgDirG2UpdateBase(theType),
	mObjects()
{
	SetServiceType(WONMsg::SmallDirServerG2);
	SetMessageType(mKeyType == KT_SERVICE ? WONMsg::DirG2ServiceExplicitSetDataObjects : WONMsg::DirG2DirectoryExplicitSetDataObjects);
}
开发者ID:SOLARIC,项目名称:world-opponent-network,代码行数:8,代码来源:SMsgDirG2ExplicitSetDOs.cpp

示例14: MiniMessage

// Default ctor
MMsgCommGetNetStat::MMsgCommGetNetStat(bool getExtended) :
	MiniMessage()
{
	WTRACE("MMsgCommGetNetStat::ctor(def)");
	SetServiceType(WONMsg::MiniCommonService);
	SetMessageType(WONMsg::MiniCommGetNetStat);
}
开发者ID:vgck,项目名称:opendr2,代码行数:8,代码来源:MMsgCommGetNetStat.cpp

示例15: RoutingServerMessage

MMsgRoutingSendDataBroadcast::MMsgRoutingSendDataBroadcast(void) : 
	RoutingServerMessage(),
	mShouldSendReply(true)
{
	SetServiceType(WONMsg::MiniRoutingServer);
	SetMessageType(WONMsg::RoutingSendDataBroadcast);
}
开发者ID:vgck,项目名称:opendr2,代码行数:7,代码来源:MMsgRoutingSendDataBrdcst.cpp


注:本文中的SetServiceType函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。