本文整理汇总了C++中CPVRClient::ID方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRClient::ID方法的具体用法?C++ CPVRClient::ID怎么用?C++ CPVRClient::ID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRClient
的用法示例。
在下文中一共展示了CPVRClient::ID方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Delete
bool CPVRDatabase::Delete(const CPVRClient &client)
{
/* invalid client uid */
if (client.ID().IsEmpty())
{
CLog::Log(LOGERROR, "PVR - %s - invalid client uid", __FUNCTION__);
return false;
}
CStdString strWhereClause = FormatSQL("sUid = '%s'", client.ID().c_str());
return DeleteValues("clients", strWhereClause);
}
示例2: Delete
bool CPVRDatabase::Delete(const CPVRClient &client)
{
/* invalid client uid */
if (client.ID().empty())
{
CLog::Log(LOGERROR, "PVR - %s - invalid client uid", __FUNCTION__);
return false;
}
Filter filter;
filter.AppendWhere(PrepareSQL("sUid = '%s'", client.ID().c_str()));
return DeleteValues("clients", filter);
}
示例3: Delete
bool CPVRDatabase::Delete(const CPVRClient &client)
{
if (client.GetID() == PVR_INVALID_CLIENT_ID)
return false;
CLog::LogFC(LOGDEBUG, LOGPVR, "Deleting client '%s' from the database", client.ID().c_str());
CSingleLock lock(m_critSection);
Filter filter;
filter.AppendWhere(PrepareSQL("idClient = '%i'", client.GetID()));
return DeleteValues("clients", filter);
}
示例4: Persist
bool CPVRDatabase::Persist(const CPVRClient &client)
{
if (client.GetID() == PVR_INVALID_CLIENT_ID)
return false;
CLog::LogFC(LOGDEBUG, LOGPVR, "Persisting client '%s' to database", client.ID().c_str());
CSingleLock lock(m_critSection);
const std::string strQuery = PrepareSQL("REPLACE INTO clients (idClient, iPriority) VALUES (%i, %i);",
client.GetID(), client.GetPriority());
return ExecuteQuery(strQuery);
}
示例5: GetPriority
int CPVRDatabase::GetPriority(const CPVRClient &client)
{
if (client.GetID() == PVR_INVALID_CLIENT_ID)
return 0;
CLog::LogFC(LOGDEBUG, LOGPVR, "Getting priority for client '%s' from the database", client.ID().c_str());
CSingleLock lock(m_critSection);
const std::string strWhereClause = PrepareSQL("idClient = '%i'", client.GetID());
const std::string strValue = GetSingleValue("clients", "iPriority", strWhereClause);
if (strValue.empty())
return 0;
return atoi(strValue.c_str());
}