当前位置: 首页>>代码示例>>C++>>正文


C++ Utf8Str::equals方法代码示例

本文整理汇总了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;
}
开发者ID:jeppeter,项目名称:vbox,代码行数:29,代码来源:SystemPropertiesImpl.cpp

示例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;
}
开发者ID:sobomax,项目名称:virtualbox_64bit_edd,代码行数:53,代码来源:VRDEServerImpl.cpp


注:本文中的com::Utf8Str::equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。