VirtualBox

Ignore:
Timestamp:
Dec 11, 2017 3:32:07 PM (7 years ago)
Author:
vboxsync
Message:

GuestPropertySvc.h: Working on making it usable from C (VBoxGuest, ++)

Location:
trunk/src/VBox/HostServices/GuestProperties
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/GuestProperties/service.cpp

    r70058 r70063  
    14561456        {
    14571457            /* The host wishes to set a block of properties */
    1458             case GUEST_PROP_FN_SET_PROPS_HOST:
     1458            case GUEST_PROP_FN_HOST_SET_PROPS:
    14591459                LogFlowFunc(("SET_PROPS_HOST\n"));
    14601460                rc = setPropertyBlock(cParms, paParms);
     
    14621462
    14631463            /* The host wishes to read a configuration value */
    1464             case GUEST_PROP_FN_GET_PROP_HOST:
     1464            case GUEST_PROP_FN_HOST_GET_PROP:
    14651465                LogFlowFunc(("GET_PROP_HOST\n"));
    14661466                rc = getProperty(cParms, paParms);
     
    14681468
    14691469            /* The host wishes to set a configuration value */
    1470             case GUEST_PROP_FN_SET_PROP_HOST:
     1470            case GUEST_PROP_FN_HOST_SET_PROP:
    14711471                LogFlowFunc(("SET_PROP_HOST\n"));
    14721472                rc = setProperty(cParms, paParms, false);
     
    14741474
    14751475            /* The host wishes to set a configuration value */
    1476             case GUEST_PROP_FN_SET_PROP_VALUE_HOST:
     1476            case GUEST_PROP_FN_HOST_SET_PROP_VALUE:
    14771477                LogFlowFunc(("SET_PROP_VALUE_HOST\n"));
    14781478                rc = setProperty(cParms, paParms, false);
     
    14801480
    14811481            /* The host wishes to remove a configuration value */
    1482             case GUEST_PROP_FN_DEL_PROP_HOST:
     1482            case GUEST_PROP_FN_HOST_DEL_PROP:
    14831483                LogFlowFunc(("DEL_PROP_HOST\n"));
    14841484                rc = delProperty(cParms, paParms, false);
     
    14861486
    14871487            /* The host wishes to enumerate all properties */
    1488             case GUEST_PROP_FN_ENUM_PROPS_HOST:
     1488            case GUEST_PROP_FN_HOST_ENUM_PROPS:
    14891489                LogFlowFunc(("ENUM_PROPS\n"));
    14901490                rc = enumProps(cParms, paParms);
     
    14921492
    14931493            /* The host wishes to set global flags for the service */
    1494             case GUEST_PROP_FN_SET_GLOBAL_FLAGS_HOST:
     1494            case GUEST_PROP_FN_HOST_SET_GLOBAL_FLAGS:
    14951495                LogFlowFunc(("SET_GLOBAL_FLAGS_HOST\n"));
    14961496                if (cParms == 1)
     
    15051505                break;
    15061506
    1507             case GUEST_PROP_FN_GET_DBGF_INFO_FN:
     1507            case GUEST_PROP_FN_HOST_GET_DBGF_INFO:
    15081508                if (cParms != 2)
    15091509                    return VERR_INVALID_PARAMETER;
  • trunk/src/VBox/HostServices/GuestProperties/testcase/tstGuestPropSvc.cpp

    r70061 r70063  
    229229    aParms[2].setPointer((void *)g_au64TimestampBlock, 0);
    230230    aParms[3].setPointer((void *)g_apcszFlagsBlock, 0);
    231     RTTESTI_CHECK_RC(ptable->pfnHostCall(ptable->pvService, GUEST_PROP_FN_SET_PROPS_HOST, 4, &aParms[0]), VINF_SUCCESS);
     231    RTTESTI_CHECK_RC(ptable->pfnHostCall(ptable->pvService, GUEST_PROP_FN_HOST_SET_PROPS, 4, &aParms[0]), VINF_SUCCESS);
    232232}
    233233
     
    340340        aParms[1].setPointer((void *)abBuffer, g_aEnumStrings[i].cbBuffer - 1);
    341341        memset(abBuffer, 0x55, sizeof(abBuffer));
    342         int rc2 = ptable->pfnHostCall(ptable->pvService, GUEST_PROP_FN_ENUM_PROPS_HOST, 3, aParms);
     342        int rc2 = ptable->pfnHostCall(ptable->pvService, GUEST_PROP_FN_HOST_ENUM_PROPS, 3, aParms);
    343343        if (rc2 == VERR_BUFFER_OVERFLOW)
    344344        {
     
    356356        aParms[1].setPointer((void *)abBuffer, g_aEnumStrings[i].cbBuffer);
    357357        memset(abBuffer, 0x55, sizeof(abBuffer));
    358         rc2 = ptable->pfnHostCall(ptable->pvService, GUEST_PROP_FN_ENUM_PROPS_HOST, 3, aParms);
     358        rc2 = ptable->pfnHostCall(ptable->pvService, GUEST_PROP_FN_HOST_ENUM_PROPS, 3, aParms);
    359359        if (rc2 == VINF_SUCCESS)
    360360        {
     
    401401    {
    402402        if (useSetProp)
    403             command = GUEST_PROP_FN_SET_PROP_HOST;
     403            command = GUEST_PROP_FN_HOST_SET_PROP;
    404404        else
    405             command = GUEST_PROP_FN_SET_PROP_VALUE_HOST;
     405            command = GUEST_PROP_FN_HOST_SET_PROP_VALUE;
    406406    }
    407407    else if (useSetProp)
     
    498498    int command = GUEST_PROP_FN_DEL_PROP;
    499499    if (isHost)
    500         command = GUEST_PROP_FN_DEL_PROP_HOST;
     500        command = GUEST_PROP_FN_HOST_DEL_PROP;
    501501    VBOXHGCMSVCPARM aParms[1];
    502502    aParms[0].setString(pcszName);
     
    604604        memset(szBuffer, 0x55, sizeof(szBuffer));
    605605        aParms[1].setPointer(szBuffer, sizeof(szBuffer));
    606         int rc2 = pTable->pfnHostCall(pTable->pvService, GUEST_PROP_FN_GET_PROP_HOST, 4, aParms);
     606        int rc2 = pTable->pfnHostCall(pTable->pvService, GUEST_PROP_FN_HOST_GET_PROP, 4, aParms);
    607607
    608608        if (s_aGetProperties[i].exists && RT_FAILURE(rc2))
     
    824824    VBOXHGCMSVCPARM paParm;
    825825    paParm.setUInt32(fFlags);
    826     int rc = pTable->pfnHostCall(pTable->pvService, GUEST_PROP_FN_SET_GLOBAL_FLAGS_HOST, 1, &paParm);
     826    int rc = pTable->pfnHostCall(pTable->pvService, GUEST_PROP_FN_HOST_SET_GLOBAL_FLAGS, 1, &paParm);
    827827    if (RT_FAILURE(rc))
    828828    {
     
    10091009            aParms[0].setString(s_szProp);
    10101010            aParms[1].setPointer(pvBuf, cbBuf);
    1011             svcTable.pfnHostCall(svcTable.pvService, GUEST_PROP_FN_GET_PROP_HOST, RT_ELEMENTS(aParms), aParms);
     1011            svcTable.pfnHostCall(svcTable.pvService, GUEST_PROP_FN_HOST_GET_PROP, RT_ELEMENTS(aParms), aParms);
    10121012
    10131013            RTTestGuardedFree(g_hTest, pvBuf);
     
    10451045            aParms[0].setString("*");
    10461046            aParms[1].setPointer(pvBuf, cbBuf);
    1047             svcTable.pfnHostCall(svcTable.pvService, GUEST_PROP_FN_ENUM_PROPS_HOST, RT_ELEMENTS(aParms), aParms);
     1047            svcTable.pfnHostCall(svcTable.pvService, GUEST_PROP_FN_HOST_ENUM_PROPS, RT_ELEMENTS(aParms), aParms);
    10481048
    10491049            RTTestGuardedFree(g_hTest, pvBuf);
     
    11141114            aParms[0].setPointer(szProp, (uint32_t)cchProp + 1);
    11151115            aParms[1].setPointer(szBuffer, sizeof(szBuffer));
    1116             RTTESTI_CHECK_RC_BREAK(svcTable.pfnHostCall(svcTable.pvService, GUEST_PROP_FN_GET_PROP_HOST, 4, aParms), VINF_SUCCESS);
     1116            RTTESTI_CHECK_RC_BREAK(svcTable.pfnHostCall(svcTable.pvService, GUEST_PROP_FN_HOST_GET_PROP, 4, aParms), VINF_SUCCESS);
    11171117        }
    11181118        cNsElapsed = RTTimeNanoTS() - cNsElapsed;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette