本文整理汇总了C++中com::Utf8Str::equals方法的典型用法代码示例。如果您正苦于以下问题:C++ Utf8Str::equals方法的具体用法?C++ Utf8Str::equals怎么用?C++ Utf8Str::equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com::Utf8Str
的用法示例。
在下文中一共展示了Utf8Str::equals方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setDefaultVRDEExtPack
HRESULT SystemProperties::setDefaultVRDEExtPack(const com::Utf8Str &aExtPack)
{
HRESULT hrc = S_OK;
if (aExtPack.isNotEmpty())
{
if (aExtPack.equals(VBOXVRDP_KLUDGE_EXTPACK_NAME))
hrc = S_OK;
else
#ifdef VBOX_WITH_EXTPACK
hrc = mParent->i_getExtPackManager()->i_checkVrdeExtPack(&aExtPack);
#else
hrc = setError(E_FAIL, tr("The extension pack '%s' does not exist"), aExtPack.c_str());
#endif
}
if (SUCCEEDED(hrc))
{
AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
hrc = i_setDefaultVRDEExtPack(aExtPack);
if (SUCCEEDED(hrc))
{
/* VirtualBox::i_saveSettings() needs the VirtualBox write lock. */
alock.release();
AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS);
hrc = mParent->i_saveSettings();
}
}
return hrc;
}
示例2: setVRDEExtPack
// public methods only for internal purposes
/////////////////////////////////////////////////////////////////////////////
HRESULT VRDEServer::setVRDEExtPack(const com::Utf8Str &aExtPack)
{
HRESULT hrc = S_OK;
/* the machine can also be in saved state for this property to change */
AutoMutableOrSavedOrRunningStateDependency adep(mParent);
hrc = adep.rc();
if (SUCCEEDED(hrc))
{
/*
* If not empty, check the specific extension pack.
*/
if (!aExtPack.isEmpty())
{
if (aExtPack.equals(VBOXVRDP_KLUDGE_EXTPACK_NAME))
hrc = S_OK;
else
{
#ifdef VBOX_WITH_EXTPACK
ExtPackManager *pExtPackMgr = mParent->i_getVirtualBox()->i_getExtPackManager();
hrc = pExtPackMgr->i_checkVrdeExtPack(&aExtPack);
#else
hrc = setError(E_FAIL, tr("Extension pack '%s' does not exist"), aExtPack.c_str());
#endif
}
}
if (SUCCEEDED(hrc))
{
/*
* Update the setting if there is an actual change, post an
* change event to trigger a VRDE server restart.
*/
AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
if (aExtPack != mData->mVrdeExtPack)
{
mData.backup();
mData->mVrdeExtPack = aExtPack;
/* leave the lock before informing callbacks */
alock.release();
AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);
mParent->i_setModified(Machine::IsModified_VRDEServer);
mlock.release();
mParent->i_onVRDEServerChange(/* aRestart */ TRUE);
}
}
}
return hrc;
}