本文整理汇总了C++中PVR_CLIENT::Destroy方法的典型用法代码示例。如果您正苦于以下问题:C++ PVR_CLIENT::Destroy方法的具体用法?C++ PVR_CLIENT::Destroy怎么用?C++ PVR_CLIENT::Destroy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PVR_CLIENT
的用法示例。
在下文中一共展示了PVR_CLIENT::Destroy方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StopClient
bool CPVRClients::StopClient(const AddonPtr &client, bool bRestart)
{
/* stop playback if needed */
if (IsPlaying())
CApplicationMessenger::GetInstance().SendMsg(TMSG_MEDIA_STOP);
CSingleLock lock(m_critSection);
int iId = GetClientId(client);
PVR_CLIENT mappedClient;
if (GetClient(iId, mappedClient))
{
if (bRestart)
mappedClient->ReCreate();
else
{
const auto it = m_clientMap.find(iId);
if (it != m_clientMap.end())
m_clientMap.erase(it);
mappedClient->Destroy();
}
return true;
}
return false;
}
示例2: StopClient
bool CPVRClients::StopClient(AddonPtr client, bool bRestart)
{
CSingleLock lock(m_critSection);
int iId = GetClientId(client);
PVR_CLIENT mappedClient;
if (GetConnectedClient(iId, mappedClient))
{
if (bRestart)
mappedClient->ReCreate();
else
mappedClient->Destroy();
return true;
}
return false;
}
示例3: StopClient
bool CPVRClients::StopClient(AddonPtr client, bool bRestart)
{
int iId = GetClientId(client);
PVR_CLIENT mappedClient;
if (GetConnectedClient(iId, mappedClient))
{
g_PVRManager.StopUpdateThreads();
if (bRestart)
mappedClient->ReCreate();
else
mappedClient->Destroy();
g_PVRManager.StartUpdateThreads();
return true;
}
return false;
}