Beispiel #1
0
	return amsg;
}
THttpCtrlMsg& THttpCtrlMsg::operator=(const THttpCtrlMsg &r)
{
	transid                   = r.transid;
	status                    = r.status;
	dialogid                  = r.dialogid;
	return *this;
}

BOOL THttpCtrlMsg::operator == (TMsgPara& msg)
{
	COMPARE_MSG_BEGIN(THttpCtrlMsg,msg)

	COMPARE_FORCE_VCHAR(THttpCtrlMsg,transid)
	COMPARE_FORCE_INT(THttpCtrlMsg,status)
	COMPARE_FORCE_VCHAR(THttpCtrlMsg,dialogid)

	COMPARE_END
}

INT THttpCtrlMsg::size()
{
	INT tmpSize = 0;

	tmpSize += sizeof(UINT); //for optionSet

	if( optionSet & orgAddr_flag )	tmpSize += orgAddr.size();

	tmpSize += transid.size();
	tmpSize += sizeof(INT);
	amsg->content_length            = content_length;
	amsg->content                   = content;
	return amsg;
}
TSipBody& TSipBody::operator=(const TSipBody &r)
{
	content_length            = r.content_length;
	content                   = r.content;
	return *this;
}

BOOL TSipBody::operator == (TMsgPara& msg)
{
	COMPARE_MSG_BEGIN(TSipBody,msg)

	COMPARE_FORCE_INT(TSipBody,content_length)
	COMPARE_FORCE_VCHAR(TSipBody,content)

	COMPARE_END
}

INT TSipBody::size()
{
	INT tmpSize = 0;

	tmpSize += sizeof(INT);
	tmpSize += content.size();

	return tmpSize;
}