本文整理汇总了C++中SyncItem::getDataType方法的典型用法代码示例。如果您正苦于以下问题:C++ SyncItem::getDataType方法的具体用法?C++ SyncItem::getDataType怎么用?C++ SyncItem::getDataType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SyncItem
的用法示例。
在下文中一共展示了SyncItem::getDataType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: deleteItem
int WebOsCalendarSyncSource::deleteItem(SyncItem &item)
{
int ret = STC_COMMAND_FAILED;
LOG.info("deleteItem called with %s data. And Type %s.",item.getKey(),item.getDataType());
LOG.info("Calling deleteEvent.");
std::vector<WString> result = BlockingServiceCall("deleteEvent",item.getKey());
if(result.empty())
{
LOG.error("delete event %s did not work.",item.getKey());
ret = STC_COMMAND_FAILED;
}
else
{
LOG.error("delete event was successful, received: %s.",result[0].c_str());
ret = STC_OK;
}
if (isErrorCode(ret))
{
report->setLastErrorCode(ERR_ITEM_ERROR);
report->setLastErrorMsg(ERRMSG_ITEM_ERROR);
report->setState(SOURCE_ERROR);
LOG.debug("Error deleting item: %", item.getKey());
}
return ret;
}
示例2: toString
QString AbstractSyncSource::toString(SyncItem& item)
{
QByteArray data((char *)item.getData());
QString ret("Key: ");
ret += item.getKey();
ret += " Mod.Time: ";
ret += QString::number(item.getModificationTime());
ret += " Encoding: ";
ret += item.getDataEncoding();
ret += " Size: ";
ret += QString::number(item.getDataSize());
ret += " Type: ";
ret += item.getDataType();
ret += " State: ";
ret += QString::number(item.getState());
ret += " Data:\n";
ret += data;
return ret;
}