本文整理汇总了C++中Utf8Str::equals方法的典型用法代码示例。如果您正苦于以下问题:C++ Utf8Str::equals方法的具体用法?C++ Utf8Str::equals怎么用?C++ Utf8Str::equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Utf8Str
的用法示例。
在下文中一共展示了Utf8Str::equals方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: COMGETTER
STDMETHODIMP VRDEServer::COMGETTER(VRDEExtPack) (BSTR *aExtPack)
{
CheckComArgOutPointerValid(aExtPack);
AutoCaller autoCaller(this);
HRESULT hrc = autoCaller.rc();
if (SUCCEEDED(hrc))
{
AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
Utf8Str strExtPack = mData->mVrdeExtPack;
alock.release();
if (strExtPack.isNotEmpty())
{
if (strExtPack.equals(VBOXVRDP_KLUDGE_EXTPACK_NAME))
hrc = S_OK;
else
{
#ifdef VBOX_WITH_EXTPACK
ExtPackManager *pExtPackMgr = mParent->getVirtualBox()->getExtPackManager();
hrc = pExtPackMgr->checkVrdeExtPack(&strExtPack);
#else
hrc = setError(E_FAIL, tr("Extension pack '%s' does not exist"), strExtPack.c_str());
#endif
}
if (SUCCEEDED(hrc))
strExtPack.cloneTo(aExtPack);
}
else
{
/* Get the global setting. */
ComPtr<ISystemProperties> systemProperties;
hrc = mParent->getVirtualBox()->COMGETTER(SystemProperties)(systemProperties.asOutParam());
if (SUCCEEDED(hrc))
hrc = systemProperties->COMGETTER(DefaultVRDEExtPack)(aExtPack);
}
}
return hrc;
}
示例2: getVRDEExtPack
HRESULT VRDEServer::getVRDEExtPack(com::Utf8Str &aExtPack)
{
AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
Utf8Str strExtPack = mData->mVrdeExtPack;
alock.release();
HRESULT hrc = S_OK;
if (strExtPack.isNotEmpty())
{
if (strExtPack.equals(VBOXVRDP_KLUDGE_EXTPACK_NAME))
hrc = S_OK;
else
{
#ifdef VBOX_WITH_EXTPACK
ExtPackManager *pExtPackMgr = mParent->i_getVirtualBox()->i_getExtPackManager();
hrc = pExtPackMgr->i_checkVrdeExtPack(&strExtPack);
#else
hrc = setError(E_FAIL, tr("Extension pack '%s' does not exist"), strExtPack.c_str());
#endif
}
if (SUCCEEDED(hrc))
aExtPack = strExtPack;
}
else
{
/* Get the global setting. */
ComPtr<ISystemProperties> systemProperties;
hrc = mParent->i_getVirtualBox()->COMGETTER(SystemProperties)(systemProperties.asOutParam());
if (SUCCEEDED(hrc))
{
BSTR bstr;
hrc = systemProperties->COMGETTER(DefaultVRDEExtPack)(&bstr);
if (SUCCEEDED(hrc))
aExtPack = Utf8Str(bstr);
}
}
return hrc;
}