本文整理汇总了C++中cgcresponse::pointer::setAttachInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ pointer::setAttachInfo方法的具体用法?C++ pointer::setAttachInfo怎么用?C++ pointer::setAttachInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cgcresponse::pointer
的用法示例。
在下文中一共展示了pointer::setAttachInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sendMsgImage
bool sendMsgImage(cgcResponse::pointer response, CUserInfo::pointer fromUser, CFromInfo::pointer fromInfo, long mid, long width, long height, long type, cgcAttachment::pointer attachment, bool bNew, time_t offeventTime)
{
BOOST_ASSERT (response.get() != 0);
BOOST_ASSERT (fromUser.get() != 0);
BOOST_ASSERT (fromInfo.get() != 0);
BOOST_ASSERT (attachment.get() != 0);
if (response->isInvalidate()) return false;
response->lockResponse();
if (fromInfo->fromType() == CFromInfo::FromDialogInfo)
{
response->setParameter(cgcParameter::create(_T("DID"), fromInfo->fromDialog()->dialogId()));
}
response->setParameter(cgcParameter::create(_T("FromAccount"), fromUser->getAccount()));
response->setParameter(cgcParameter::create(_T("MID"), mid));
response->setParameter(cgcParameter::create(_T("Type"), type));
response->setParameter(cgcParameter::create(_T("Width"), width));
response->setParameter(cgcParameter::create(_T("Height"), height));
response->setParameter(cgcParameter::create2(_T("New"), bNew));
if (offeventTime > 0)
{
char buffer[20];
sprintf(buffer, "%ld", offeventTime);
response->setParameter(cgcParameter::create(cgcParameter::PT_DATETIME, _T("Time"), buffer));
}
response->setAttachInfo(attachment->getTotal(), attachment->getIndex());
response->setAttachData(attachment->getAttachData(), attachment->getAttachSize());
response->sendResponse(0, 501);
return true;
}
示例2: sendMsg
bool sendMsg(cgcResponse::pointer response, CUserInfo::pointer fromUser, CFromInfo::pointer fromInfo, long mid, cgcAttachment::pointer attachment)
{
BOOST_ASSERT (response.get() != 0);
BOOST_ASSERT (fromUser.get() != 0);
BOOST_ASSERT (fromInfo.get() != 0);
BOOST_ASSERT (attachment.get() != 0);
if (response->isInvalidate()) return false;
response->lockResponse();
if (fromInfo->fromType() == CFromInfo::FromDialogInfo)
{
response->setParameter(cgcParameter::create(_T("DID"), fromInfo->fromDialog()->dialogId()));
}
response->setParameter(cgcParameter::create(_T("FromAccount"), fromUser->getAccount()));
response->setParameter(cgcParameter::create(_T("MID"), mid));
response->setAttachInfo(attachment->getTotal(), attachment->getIndex());
response->setAttachData(attachment->getAttachData(), attachment->getAttachSize());
response->sendResponse(0, 501);
return true;
}