VirtualBox

Changeset 75926 in vbox


Ignore:
Timestamp:
Dec 3, 2018 9:52:50 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
127132
Message:

Main,Frontends: s/FileName/Filename/g (API); Took a shot a completing the code for populating IGuestFsObjInfo. bugref:9320

Location:
trunk/src/VBox
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp

    r75361 r75926  
    482482 * @param pulFrameHeight may be updated with a desired frame height
    483483 * @param pulBitRate may be updated with a desired bit rate
    484  * @param ppszFileName may be updated with a desired file name
     484 * @param ppszFilename may be updated with a desired file name
    485485 */
    486486static void parse_environ(uint32_t *pulFrameWidth, uint32_t *pulFrameHeight,
    487                           uint32_t *pulBitRate, const char **ppszFileName)
     487                          uint32_t *pulBitRate, const char **ppszFilename)
    488488{
    489489    const char *pszEnvTemp;
     
    522522    }
    523523    if ((pszEnvTemp = RTEnvGet("VBOX_RECORDFILE")) != 0)
    524         *ppszFileName = pszEnvTemp;
     524        *ppszFilename = pszEnvTemp;
    525525}
    526526#endif /* VBOX_WITH_RECORDING defined */
     
    631631    uint32_t ulRecordVideoHeight = 600;
    632632    uint32_t ulRecordVideoRate = 300000;
    633     char szRecordFileName[RTPATH_MAX];
    634     const char *pszRecordFileNameTemplate = "VBox-%d.webm"; /* .webm container by default. */
     633    char szRecordFilename[RTPATH_MAX];
     634    const char *pszRecordFilenameTemplate = "VBox-%d.webm"; /* .webm container by default. */
    635635#endif /* VBOX_WITH_RECORDING */
    636636#ifdef RT_OS_WINDOWS
     
    645645#ifdef VBOX_WITH_RECORDING
    646646    /* Parse the environment */
    647     parse_environ(&ulRecordVideoWidth, &ulRecordVideoHeight, &ulRecordVideoRate, &pszRecordFileNameTemplate);
     647    parse_environ(&ulRecordVideoWidth, &ulRecordVideoHeight, &ulRecordVideoRate, &pszRecordFilenameTemplate);
    648648#endif
    649649
     
    791791                break;
    792792            case 'f':
    793                 pszRecordFileNameTemplate = ValueUnion.psz;
     793                pszRecordFilenameTemplate = ValueUnion.psz;
    794794                break;
    795795#endif /* VBOX_WITH_RECORDING defined */
     
    834834    }
    835835    /* Make sure we only have %d or %u (or none) in the file name specified */
    836     char *pcPercent = (char*)strchr(pszRecordFileNameTemplate, '%');
     836    char *pcPercent = (char*)strchr(pszRecordFilenameTemplate, '%');
    837837    if (pcPercent != 0 && *(pcPercent + 1) != 'd' && *(pcPercent + 1) != 'u')
    838838    {
     
    846846        return 1;
    847847    }
    848     RTStrPrintf(&szRecordFileName[0], RTPATH_MAX, pszRecordFileNameTemplate, RTProcSelf());
     848    RTStrPrintf(&szRecordFilename[0], RTPATH_MAX, pszRecordFilenameTemplate, RTProcSelf());
    849849#endif /* defined VBOX_WITH_RECORDING */
    850850
     
    972972            {
    973973                CHECK_ERROR_BREAK(saRecordScreenScreens[i], COMSETTER(Enabled)(TRUE));
    974                 CHECK_ERROR_BREAK(saRecordScreenScreens[i], COMSETTER(FileName)(Bstr(szRecordFileName).raw()));
     974                CHECK_ERROR_BREAK(saRecordScreenScreens[i], COMSETTER(Filename)(Bstr(szRecordFilename).raw()));
    975975                CHECK_ERROR_BREAK(saRecordScreenScreens[i], COMSETTER(VideoWidth)(ulRecordVideoWidth));
    976976                CHECK_ERROR_BREAK(saRecordScreenScreens[i], COMSETTER(VideoHeight)(ulRecordVideoHeight));
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp

    r75390 r75926  
    19431943
    19441944                for (size_t i = 0; i < saRecordingScreenScreens.size(); ++i)
    1945                     CHECK_ERROR_BREAK(saRecordingScreenScreens[i], COMSETTER(FileName)(Bstr(a->argv[3]).raw()));
     1945                    CHECK_ERROR_BREAK(saRecordingScreenScreens[i], COMSETTER(Filename)(Bstr(a->argv[3]).raw()));
    19461946            }
    19471947            else if (   !strcmp(a->argv[2], "videores")
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp

    r75849 r75926  
    192192typedef struct DESTFILEENTRY
    193193{
    194     DESTFILEENTRY(Utf8Str strFileName) : mFileName(strFileName) {}
    195     Utf8Str mFileName;
     194    DESTFILEENTRY(Utf8Str strFilename) : mFilename(strFilename) {}
     195    Utf8Str mFilename;
    196196} DESTFILEENTRY, *PDESTFILEENTRY;
    197197/*
     
    571571}
    572572
     573/**
     574 * Translates a file system objec type to a string.
     575 */
     576const char *gctlFsObjTypeToName(FsObjType_T enmType)
     577{
     578    switch (enmType)
     579    {
     580        case FsObjType_Unknown:     return "unknown";
     581        case FsObjType_Fifo:        return "fifo";
     582        case FsObjType_DevChar:     return "char-device";
     583        case FsObjType_Directory:   return "directory";
     584        case FsObjType_DevBlock:    return "block-device";
     585        case FsObjType_File:        return "file";
     586        case FsObjType_Symlink:     return "symlink";
     587        case FsObjType_Socket:      return "socket";
     588        case FsObjType_WhiteOut:    return "white-out";
     589#ifdef VBOX_WITH_XPCOM_CPP_ENUM_HACK
     590        case FsObjType_32BitHack: break;
     591#endif
     592    }
     593    return "unknown";
     594}
     595
    573596static int gctlPrintError(com::ErrorInfo &errorInfo)
    574597{
     
    25192542        if (FAILED(hrc))
    25202543        {
    2521             /* If there's at least one element which does not exist on the guest,
    2522              * drop out with exitcode 1. */
     2544            /** @todo r=bird: There might be other reasons why we end up here than
     2545             * non-existing "element" (object or file, please, nobody calls it elements). */
    25232546            if (pCtx->cVerbose)
    2524                 RTPrintf("Cannot stat for element \"%s\": No such element\n", ValueUnion.psz);
     2547                RTPrintf("Failed to stat '%s': No such file\n", ValueUnion.psz);
    25252548            rcExit = RTEXITCODE_FAILURE;
    25262549        }
    25272550        else
    25282551        {
    2529             FsObjType_T objType;
    2530             pFsObjInfo->COMGETTER(Type)(&objType); /** @todo What about error checking? */
    2531             switch (objType)
    2532             {
    2533                 case FsObjType_File:
    2534                     RTPrintf("Element \"%s\" found: Is a file\n", ValueUnion.psz);
    2535                     break;
    2536 
    2537                 case FsObjType_Directory:
    2538                     RTPrintf("Element \"%s\" found: Is a directory\n", ValueUnion.psz);
    2539                     break;
    2540 
    2541                 case FsObjType_Symlink:
    2542                     RTPrintf("Element \"%s\" found: Is a symlink\n", ValueUnion.psz);
    2543                     break;
    2544 
    2545                 default:
    2546                     RTPrintf("Element \"%s\" found, type unknown (%ld)\n", ValueUnion.psz, objType);
    2547                     break;
    2548             }
    2549 
    2550             /** @todo Show more information about this element. */
     2552            RTPrintf("  File: '%s'\n", ValueUnion.psz); /** @todo escape this name. */
     2553
     2554            FsObjType_T enmType = FsObjType_Unknown;
     2555            CHECK_ERROR2I(pFsObjInfo, COMGETTER(Type)(&enmType));
     2556            LONG64      cbObject = 0;
     2557            CHECK_ERROR2I(pFsObjInfo, COMGETTER(ObjectSize)(&cbObject));
     2558            LONG64      cbAllocated = 0;
     2559            CHECK_ERROR2I(pFsObjInfo, COMGETTER(AllocatedSize)(&cbAllocated));
     2560            LONG        uid = 0;
     2561            CHECK_ERROR2I(pFsObjInfo, COMGETTER(UID)(&uid));
     2562            LONG        gid = 0;
     2563            CHECK_ERROR2I(pFsObjInfo, COMGETTER(GID)(&gid));
     2564            Bstr        bstrUsername;
     2565            CHECK_ERROR2I(pFsObjInfo, COMGETTER(UserName)(bstrUsername.asOutParam()));
     2566            Bstr        bstrGroupName;
     2567            CHECK_ERROR2I(pFsObjInfo, COMGETTER(GroupName)(bstrGroupName.asOutParam()));
     2568            Bstr        bstrAttribs;
     2569            CHECK_ERROR2I(pFsObjInfo, COMGETTER(FileAttributes)(bstrAttribs.asOutParam()));
     2570            LONG64      idNode = 0;
     2571            CHECK_ERROR2I(pFsObjInfo, COMGETTER(NodeId)(&idNode));
     2572            ULONG       uDevNode = 0;
     2573            CHECK_ERROR2I(pFsObjInfo, COMGETTER(NodeIdDevice)(&uDevNode));
     2574            ULONG       uDeviceNo = 0;
     2575            CHECK_ERROR2I(pFsObjInfo, COMGETTER(DeviceNumber)(&uDeviceNo));
     2576            ULONG       cHardLinks = 1;
     2577            CHECK_ERROR2I(pFsObjInfo, COMGETTER(HardLinks)(&cHardLinks));
     2578            LONG64      nsBirthTime = 0;
     2579            CHECK_ERROR2I(pFsObjInfo, COMGETTER(BirthTime)(&nsBirthTime));
     2580            LONG64      nsChangeTime = 0;
     2581            CHECK_ERROR2I(pFsObjInfo, COMGETTER(ChangeTime)(&nsChangeTime));
     2582            LONG64      nsModificationTime = 0;
     2583            CHECK_ERROR2I(pFsObjInfo, COMGETTER(ModificationTime)(&nsModificationTime));
     2584            LONG64      nsAccessTime = 0;
     2585            CHECK_ERROR2I(pFsObjInfo, COMGETTER(AccessTime)(&nsAccessTime));
     2586
     2587            RTPrintf("  Size: %-17RU64 Alloc: %-19RU64 Type: %s\n", cbObject, cbAllocated, gctlFsObjTypeToName(enmType));
     2588            RTPrintf("Device: %#-17RX32 INode: %-18RU64 Links: %u\n", uDevNode, idNode, cHardLinks);
     2589
     2590            Utf8Str strAttrib(bstrAttribs);
     2591            char *pszMode    = strAttrib.mutableRaw();
     2592            char *pszAttribs = strchr(pszMode, ' ');
     2593            if (pszAttribs)
     2594                do *pszAttribs++ = '\0';
     2595                while (*pszAttribs == ' ');
     2596            else
     2597                pszAttribs = "";
     2598            if (uDeviceNo != 0)
     2599                RTPrintf("  Mode: %-16s Attrib: %-17s Dev ID: %#RX32\n", pszMode, pszAttribs, uDeviceNo);
     2600            else
     2601                RTPrintf("  Mode: %-16s Attrib: %s\n", pszMode, pszAttribs);
     2602
     2603            RTPrintf(" Owner: %4d/%-12ls Group: %4d/%ls\n", uid, bstrUsername.raw(),  gid, bstrGroupName.raw());
     2604
     2605            RTTIMESPEC  TimeSpec;
     2606            char        szTmp[RTTIME_STR_LEN];
     2607            RTPrintf(" Birth: %s\n", RTTimeSpecToString(RTTimeSpecSetNano(&TimeSpec, nsBirthTime), szTmp, sizeof(szTmp)));
     2608            RTPrintf("Change: %s\n", RTTimeSpecToString(RTTimeSpecSetNano(&TimeSpec, nsChangeTime), szTmp, sizeof(szTmp)));
     2609            RTPrintf("Modify: %s\n", RTTimeSpecToString(RTTimeSpecSetNano(&TimeSpec, nsModificationTime), szTmp, sizeof(szTmp)));
     2610            RTPrintf("Access: %s\n", RTTimeSpecToString(RTTimeSpecSetNano(&TimeSpec, nsAccessTime), szTmp, sizeof(szTmp)));
     2611
     2612            /* Skiping: Generation ID - only the ISO9660 VFS sets this.  FreeBSD user flags. */
    25512613        }
    25522614
     
    28222884                                    CHECK_ERROR_BREAK(pCurFile, COMGETTER(Id)(&idFile));
    28232885                                    Bstr strName;
    2824                                     CHECK_ERROR_BREAK(pCurFile, COMGETTER(FileName)(strName.asOutParam()));
     2886                                    CHECK_ERROR_BREAK(pCurFile, COMGETTER(Filename)(strName.asOutParam()));
    28252887                                    FileStatus_T fileStatus;
    28262888                                    CHECK_ERROR_BREAK(pCurFile, COMGETTER(Status)(&fileStatus));
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrlListener.cpp

    r69500 r75926  
    9696                CHECK_ERROR_BREAK(pEvent, COMGETTER(Status)(&fileSts));
    9797                Bstr strPath;
    98                 CHECK_ERROR_BREAK(pProcess, COMGETTER(FileName)(strPath.asOutParam()));
     98                CHECK_ERROR_BREAK(pProcess, COMGETTER(Filename)(strPath.asOutParam()));
    9999                ULONG uID;
    100100                CHECK_ERROR_BREAK(pProcess, COMGETTER(Id)(&uID));
     
    248248                CHECK_ERROR_BREAK(pEvent, COMGETTER(Registered)(&fRegistered));
    249249                Bstr strPath;
    250                 CHECK_ERROR_BREAK(pFile, COMGETTER(FileName)(strPath.asOutParam()));
     250                CHECK_ERROR_BREAK(pFile, COMGETTER(Filename)(strPath.asOutParam()));
    251251
    252252                RTPrintf("File \"%s\" %s\n",
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp

    r75382 r75926  
    23962396        CHECK_ERROR_RET(saRecordingScreenScreens[0], COMGETTER(VideoFPS)(&Fps), rc);
    23972397        Bstr  bstrFile;
    2398         CHECK_ERROR_RET(saRecordingScreenScreens[0], COMGETTER(FileName)(bstrFile.asOutParam()), rc);
     2398        CHECK_ERROR_RET(saRecordingScreenScreens[0], COMGETTER(Filename)(bstrFile.asOutParam()), rc);
    23992399        Bstr  bstrOptions;
    24002400        CHECK_ERROR_RET(saRecordingScreenScreens[0], COMGETTER(Options)(bstrOptions.asOutParam()), rc);
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp

    r75390 r75926  
    30003000
    30013001                        for (size_t i = 0; i < saRecordingScreenScreens.size(); ++i)
    3002                             CHECK_ERROR(saRecordingScreenScreens[i], COMSETTER(FileName)(bstr.raw()));
     3002                            CHECK_ERROR(saRecordingScreenScreens[i], COMSETTER(Filename)(bstr.raw()));
    30033003                        break;
    30043004                    }
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElements.cpp

    r75615 r75926  
    507507                /** @todo r=andy Refine these texts (wrt audio and/or video). */
    508508                table << UITextTableLine(QApplication::translate("UIDetails", "Recording File", "details (display/recording)"),
    509                                          comRecordingScreen0Settings.GetFileName());
     509                                         comRecordingScreen0Settings.GetFilename());
    510510                table << UITextTableLine(QApplication::translate("UIDetails", "Recording Attributes", "details (display/recording)"),
    511511                                         QApplication::translate("UIDetails", "Frame Size: %1x%2, Frame Rate: %3fps, Bit Rate: %4kbps")
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp

    r75645 r75926  
    923923                strFullData += s_strTableRow2
    924924                    .arg(strToolTip)
    925                     .arg(comRecordingScreen0Settings.GetFileName());
     925                    .arg(comRecordingScreen0Settings.GetFilename());
    926926                break;
    927927            }
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp

    r75886 r75926  
    395395    {
    396396        oldDisplayData.m_strRecordingFolder = QFileInfo(m_machine.GetSettingsFilePath()).absolutePath();
    397         oldDisplayData.m_strRecordingFilePath = recordingScreen0Settings.GetFileName();
     397        oldDisplayData.m_strRecordingFilePath = recordingScreen0Settings.GetFilename();
    398398        oldDisplayData.m_iRecordingVideoFrameWidth = recordingScreen0Settings.GetVideoWidth();
    399399        oldDisplayData.m_iRecordingVideoFrameHeight = recordingScreen0Settings.GetVideoHeight();
     
    15841584                    if (fSuccess && newDisplayData.m_strRecordingFilePath != oldDisplayData.m_strRecordingFilePath)
    15851585                    {
    1586                         recordingScreenSettings.SetFileName(newDisplayData.m_strRecordingFilePath);
     1586                        recordingScreenSettings.SetFilename(newDisplayData.m_strRecordingFilePath);
    15871587                        Assert(recordingScreenSettings.isOk());
    15881588                        fSuccess = recordingScreenSettings.isOk();
     
    16541654                if (fSuccess && newDisplayData.m_strRecordingFilePath != oldDisplayData.m_strRecordingFilePath)
    16551655                {
    1656                     recordingScreenSettings.SetFileName(newDisplayData.m_strRecordingFilePath);
     1656                    recordingScreenSettings.SetFilename(newDisplayData.m_strRecordingFilePath);
    16571657                    Assert(recordingScreenSettings.isOk());
    16581658                    fSuccess = recordingScreenSettings.isOk();
  • trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotDetailsWidget.cpp

    r75361 r75926  
    17541754    {
    17551755        /* Recording file: */
    1756         aReport << comRecordingScreen0Settings.GetFileName();
     1756        aReport << comRecordingScreen0Settings.GetFilename();
    17571757        /* Recording attributes: */
    17581758        aReport << QApplication::translate("UIGDetails", "Frame Size: %1x%2, Frame Rate: %3fps, Bit Rate: %4kbps")
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r75920 r75926  
    48704870  <interface
    48714871    name="IRecordingScreenSettings" extends="$unknown"
    4872     uuid="B036627B-9922-4056-8A95-94C60D3BA48A"
     4872    uuid="678fbd9a-93af-42a7-7f13-79ad6ef1a18d"
    48734873    wsmap="managed"
    48744874    >
     
    49134913    </attribute>
    49144914
    4915     <attribute name="fileName" type="wstring">
     4915    <attribute name="filename" type="wstring">
    49164916      <desc>
    49174917        This setting determines the filename VirtualBox uses to save
     
    1394713947  <interface
    1394813948    name="IFile" extends="$unknown"
    13949     uuid="5395b543-0ee9-4d6a-9ecd-580e3a1d0dbb"
     13949    uuid="59a235ac-2f1a-4d6c-81fc-e3fa843f49ae"
    1395013950    wsmap="managed"
    1395113951    reservedMethods="4" reservedAttributes="8"
     
    1399213992    <!-- The following attributes just remembers the fileOpen parameters for you.
    1399313993         Nice for introspection and probably doesn't cost us much. -->
    13994     <attribute name="fileName" type="wstring" readonly="yes">
     13994    <attribute name="filename" type="wstring" readonly="yes">
    1399513995      <desc>Full path of the actual file name of this file.
    1399613996        <!-- r=bird: The 'actual' file name is too tough, we cannot guarentee
     
    1420514205  <interface
    1420614206    name="IFsObjInfo" extends="$unknown"
    14207     uuid="ae34e3d5-f884-4141-8d62-618300658805"
     14207    uuid="081fc833-c6fa-430e-6020-6a505d086387"
    1420814208    wsmap="managed"
    1420914209    reservedAttributes="8"
     
    1421314213      This can be information about a file or a directory, for example.
    1421414214    </desc>
    14215 
    14216     <attribute name="accessTime" type="long long" readonly="yes">
    14217       <desc>
    14218         Time of last access (st_atime).
    14219       </desc>
    14220     </attribute>
    14221     <attribute name="allocatedSize" type="long long" readonly="yes">
    14222       <desc>
    14223         Disk allocation size (st_blocks * DEV_BSIZE).
    14224       </desc>
    14225     </attribute>
    14226     <attribute name="birthTime" type="long long" readonly="yes">
    14227       <desc>
    14228         Time of file birth (st_birthtime).
    14229       </desc>
    14230     </attribute>
    14231         <attribute name="changeTime" type="long long" readonly="yes">
    14232       <desc>
    14233         Time of last status change (st_ctime).
    14234       </desc>
    14235     </attribute>
    14236     <attribute name="deviceNumber" type="unsigned long" readonly="yes">
    14237       <desc>
    14238         The device number of a character or block device type object (st_rdev).
     14215    <attribute name="name" type="wstring" readonly="yes">
     14216      <desc>
     14217        The object's name.
     14218      </desc>
     14219    </attribute>
     14220    <attribute name="type" type="FsObjType" readonly="yes">
     14221      <desc>
     14222        The object type. See <link to="FsObjType" /> for more.
    1423914223      </desc>
    1424014224    </attribute>
     
    1424214226      <desc>
    1424314227        File attributes. Not implemented yet.
    14244       </desc>
    14245     </attribute>
    14246     <attribute name="generationId" type="unsigned long" readonly="yes">
    14247       <desc>
    14248         The current generation number (st_gen).
    14249       </desc>
    14250     </attribute>
    14251     <attribute name="GID" type="unsigned long" readonly="yes">
    14252       <desc>
    14253         The group the filesystem object is assigned (st_gid).
    14254       </desc>
    14255     </attribute>
    14256     <attribute name="groupName" type="wstring" readonly="yes">
    14257       <desc>
    14258         The group name.
    14259       </desc>
    14260     </attribute>
    14261     <attribute name="hardLinks" type="unsigned long" readonly="yes">
    14262       <desc>
    14263         Number of hard links to this filesystem object (st_nlink).
    14264       </desc>
    14265     </attribute>
    14266     <attribute name="modificationTime" type="long long" readonly="yes">
    14267       <desc>
    14268         Time of last data modification (st_mtime).
    14269       </desc>
    14270     </attribute>
    14271     <attribute name="name" type="wstring" readonly="yes">
    14272       <desc>
    14273         The object's name.
    14274       </desc>
    14275     </attribute>
    14276     <attribute name="nodeId" type="long long" readonly="yes">
    14277       <desc>
    14278         The unique identifier (within the filesystem) of this filesystem object (st_ino).
    14279       </desc>
    14280     </attribute>
    14281     <attribute name="nodeIdDevice" type="unsigned long" readonly="yes">
    14282       <desc>
    14283         The device number of the device which this filesystem object resides on (st_dev).
    1428414228      </desc>
    1428514229    </attribute>
     
    1429114235      </desc>
    1429214236    </attribute>
    14293     <attribute name="type" type="FsObjType" readonly="yes">
    14294       <desc>
    14295         The object type. See <link to="FsObjType" /> for more.
    14296       </desc>
    14297     </attribute>
    14298     <attribute name="UID" type="unsigned long" readonly="yes">
    14299       <desc>
    14300         The user owning the filesystem object (st_uid).
     14237    <attribute name="allocatedSize" type="long long" readonly="yes">
     14238      <desc>
     14239        Disk allocation size (st_blocks * DEV_BSIZE).
     14240      </desc>
     14241    </attribute>
     14242    <!-- Time attributes: -->
     14243    <attribute name="accessTime" type="long long" readonly="yes">
     14244      <desc>
     14245        Time of last access (st_atime).
     14246      </desc>
     14247    </attribute>
     14248    <attribute name="birthTime" type="long long" readonly="yes">
     14249      <desc>
     14250        Time of file birth (st_birthtime).
     14251      </desc>
     14252    </attribute>
     14253    <attribute name="changeTime" type="long long" readonly="yes">
     14254      <desc>
     14255        Time of last status change (st_ctime).
     14256      </desc>
     14257    </attribute>
     14258    <attribute name="modificationTime" type="long long" readonly="yes">
     14259      <desc>
     14260        Time of last data modification (st_mtime).
     14261      </desc>
     14262    </attribute>
     14263    <!-- Ownership attributes: -->
     14264    <attribute name="UID" type="long" readonly="yes">
     14265      <desc>
     14266        The user owning the filesystem object (st_uid).  This is -1 if not available.
     14267      </desc>
     14268    </attribute>
     14269    <attribute name="userName" type="wstring" readonly="yes">
     14270      <desc>
     14271        The user name.
     14272      </desc>
     14273    </attribute>
     14274    <attribute name="GID" type="long" readonly="yes">
     14275      <desc>
     14276        The group the filesystem object is assigned (st_gid).  This is -1 if not available.
     14277      </desc>
     14278    </attribute>
     14279    <attribute name="groupName" type="wstring" readonly="yes">
     14280      <desc>
     14281        The group name.
     14282      </desc>
     14283    </attribute>
     14284    <!-- More esoteric attributes: -->
     14285    <attribute name="nodeId" type="long long" readonly="yes">
     14286      <desc>
     14287        The unique identifier (within the filesystem) of this filesystem object (st_ino).
     14288        This is zero if not availalbe.
     14289      </desc>
     14290    </attribute>
     14291    <attribute name="nodeIdDevice" type="unsigned long" readonly="yes">
     14292      <desc>
     14293        The device number of the device which this filesystem object resides on (st_dev).
     14294      </desc>
     14295    </attribute>
     14296    <attribute name="hardLinks" type="unsigned long" readonly="yes">
     14297      <desc>
     14298        Number of hard links to this filesystem object (st_nlink).
     14299      </desc>
     14300    </attribute>
     14301    <attribute name="deviceNumber" type="unsigned long" readonly="yes">
     14302      <desc>
     14303        The device number of a character or block device type object (st_rdev).
     14304      </desc>
     14305    </attribute>
     14306    <attribute name="generationId" type="unsigned long" readonly="yes">
     14307      <desc>
     14308        The current generation number (st_gen).
    1430114309      </desc>
    1430214310    </attribute>
     
    1430614314      </desc>
    1430714315    </attribute>
    14308     <attribute name="userName" type="wstring" readonly="yes">
    14309       <desc>
    14310         The user name.
    14311       </desc>
    14312     </attribute>
    14313 
    1431414316  </interface>
    1431514317
  • trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h

    r75861 r75926  
    611611{
    612612    /** The filename. */
    613     Utf8Str                 mFileName;
     613    Utf8Str                 mFilename;
    614614    /** The file access mode. */
    615615    FileAccessMode_T        mAccessMode;
     
    636636     * @{ */
    637637    int FromLs(const GuestProcessStreamBlock &strmBlk, bool fLong);
     638    int FromStat(const GuestProcessStreamBlock &strmBlk);
    638639    int FromMkTemp(const GuestProcessStreamBlock &strmBlk);
    639     int FromStat(const GuestProcessStreamBlock &strmBlk);
    640640    /** @}  */
    641641
     
    651651    /** @}  */
    652652
     653    Utf8Str              mName;
     654    FsObjType_T          mType;
     655    Utf8Str              mFileAttrs;
     656    int64_t              mObjectSize;
     657    int64_t              mAllocatedSize;
    653658    int64_t              mAccessTime;
    654     int64_t              mAllocatedSize;
    655659    int64_t              mBirthTime;
    656660    int64_t              mChangeTime;
    657     uint32_t             mDeviceNumber;
    658     Utf8Str              mFileAttrs;
    659     uint32_t             mGenerationID;
    660     uint32_t             mGID;
     661    int64_t              mModificationTime;
     662    Utf8Str              mUserName;
     663    int32_t              mUID;
     664    int32_t              mGID;
    661665    Utf8Str              mGroupName;
    662     uint32_t             mNumHardLinks;
    663     int64_t              mModificationTime;
    664     Utf8Str              mName;
     666    Utf8Str              mACL;
    665667    int64_t              mNodeID;
    666668    uint32_t             mNodeIDDevice;
    667     int64_t              mObjectSize;
    668     FsObjType_T          mType;
    669     uint32_t             mUID;
     669    uint32_t             mNumHardLinks;
     670    uint32_t             mDeviceNumber;
     671    uint32_t             mGenerationID;
    670672    uint32_t             mUserFlags;
    671     Utf8Str              mUserName;
    672     Utf8Str              mACL;
    673673};
    674674
     
    781781#endif
    782782
    783     int GetInt64Ex(const char *pszKey, int64_t *piVal) const;
    784 
    785     int64_t GetInt64(const char *pszKey) const;
    786 
    787     size_t GetCount(void) const;
    788 
    789     int GetRc(void) const;
    790 
    791     const char* GetString(const char *pszKey) const;
    792 
    793     int GetUInt32Ex(const char *pszKey, uint32_t *puVal) const;
    794 
    795     uint32_t GetUInt32(const char *pszKey) const;
    796 
    797     bool IsEmpty(void) { return mPairs.empty(); }
    798 
    799     int SetValue(const char *pszKey, const char *pszValue);
     783    const char *GetString(const char *pszKey) const;
     784    size_t      GetCount(void) const;
     785    int         GetRc(void) const;
     786    int         GetInt64Ex(const char *pszKey, int64_t *piVal) const;
     787    int64_t     GetInt64(const char *pszKey) const;
     788    int         GetUInt32Ex(const char *pszKey, uint32_t *puVal) const;
     789    uint32_t    GetUInt32(const char *pszKey, uint32_t uDefault = 0) const;
     790    int32_t     GetInt32(const char *pszKey, int32_t iDefault = 0) const;
     791
     792    bool        IsEmpty(void) { return mPairs.empty(); }
     793
     794    int         SetValue(const char *pszKey, const char *pszValue);
    800795
    801796protected:
  • trunk/src/VBox/Main/include/GuestFileImpl.h

    r71782 r75926  
    8181    HRESULT getOffset(LONG64 *aOffset);
    8282    HRESULT getStatus(FileStatus_T *aStatus);
    83     HRESULT getFileName(com::Utf8Str &aFileName);
     83    HRESULT getFilename(com::Utf8Str &aFilename);
    8484    HRESULT getAccessMode(FileAccessMode_T *aAccessMode);
    8585    HRESULT getOpenAction(FileOpenAction_T *aOpenAction);
  • trunk/src/VBox/Main/include/GuestFsObjInfoImpl.h

    r71972 r75926  
    2222#include "GuestCtrlImplPrivate.h"
    2323
    24 class ATL_NO_VTABLE GuestFsObjInfo :
    25     public GuestFsObjInfoWrap
     24class ATL_NO_VTABLE GuestFsObjInfo
     25    : public GuestFsObjInfoWrap
    2626{
    2727public:
     
    4545    /** Wrapped @name IGuestFsObjInfo properties.
    4646     * @{ */
     47    HRESULT getName(com::Utf8Str &aName);
     48    HRESULT getType(FsObjType_T *aType);
     49    HRESULT getFileAttributes(com::Utf8Str &aFileAttributes);
     50    HRESULT getObjectSize(LONG64 *aObjectSize);
     51    HRESULT getAllocatedSize(LONG64 *aAllocatedSize);
    4752    HRESULT getAccessTime(LONG64 *aAccessTime);
    48     HRESULT getAllocatedSize(LONG64 *aAllocatedSize);
    4953    HRESULT getBirthTime(LONG64 *aBirthTime);
    5054    HRESULT getChangeTime(LONG64 *aChangeTime);
    51     HRESULT getDeviceNumber(ULONG *aDeviceNumber);
    52     HRESULT getFileAttributes(com::Utf8Str &aFileAttributes);
    53     HRESULT getGenerationId(ULONG *aGenerationId);
    54     HRESULT getGID(ULONG *aGID);
     55    HRESULT getModificationTime(LONG64 *aModificationTime);
     56    HRESULT getUID(LONG *aUID);
     57    HRESULT getUserName(com::Utf8Str &aUserName);
     58    HRESULT getGID(LONG *aGID);
    5559    HRESULT getGroupName(com::Utf8Str &aGroupName);
    56     HRESULT getHardLinks(ULONG *aHardLinks);
    57     HRESULT getModificationTime(LONG64 *aModificationTime);
    58     HRESULT getName(com::Utf8Str &aName);
    5960    HRESULT getNodeId(LONG64 *aNodeId);
    6061    HRESULT getNodeIdDevice(ULONG *aNodeIdDevice);
    61     HRESULT getObjectSize(LONG64 *aObjectSize);
    62     HRESULT getType(FsObjType_T *aType);
    63     HRESULT getUID(ULONG *aUID);
     62    HRESULT getHardLinks(ULONG *aHardLinks);
     63    HRESULT getDeviceNumber(ULONG *aDeviceNumber);
     64    HRESULT getGenerationId(ULONG *aGenerationId);
    6465    HRESULT getUserFlags(ULONG *aUserFlags);
    65     HRESULT getUserName(com::Utf8Str &aUserName);
    6666    /** @}  */
    6767
  • trunk/src/VBox/Main/include/RecordingScreenSettingsImpl.h

    r75489 r75926  
    6969    HRESULT setDestination(RecordingDestination_T aDestination);
    7070
    71     HRESULT getFileName(com::Utf8Str &aFileName);
    72     HRESULT setFileName(const com::Utf8Str &aFileName);
     71    HRESULT getFilename(com::Utf8Str &aFilename);
     72    HRESULT setFilename(const com::Utf8Str &aFilename);
    7373    HRESULT getMaxTime(ULONG *aMaxTimeS);
    7474    HRESULT setMaxTime(ULONG aMaxTimeS);
  • trunk/src/VBox/Main/include/RecordingSettingsImpl.h

    r75418 r75926  
    11/* $Id$ */
    2 
    32/** @file
    4  *
    5  * VirtualBox COM class implementation - Machine capture settings.
     3 * VirtualBox COM class implementation - Machine recording screen settings.
    64 */
    75
     
    3129class RecordingScreenSettings;
    3230
    33 class ATL_NO_VTABLE RecordingSettings :
    34     public RecordingSettingsWrap
     31class ATL_NO_VTABLE RecordingSettings
     32    : public RecordingSettingsWrap
    3533{
    3634public:
     
    5654    void i_applyDefaults(void);
    5755
    58     int i_getDefaultFileName(Utf8Str &strFile, bool fWithFileExtension);
     56    int i_getDefaultFilename(Utf8Str &strFile, bool fWithFileExtension);
    5957    bool i_canChangeSettings(void);
    6058    void i_onSettingsChanged(void);
     
    8684    Data *m;
    8785};
    88 #endif // ____H_RecordSettings
    8986
     87#endif // !____H_RecordSettings
     88
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r75737 r75926  
    69436943        AssertComRCReturn(hrc, VERR_INVALID_PARAMETER);
    69446944        Bstr bstrTemp;
    6945         hrc = pRecordScreenSettings->COMGETTER(FileName)(bstrTemp.asOutParam());
     6945        hrc = pRecordScreenSettings->COMGETTER(Filename)(bstrTemp.asOutParam());
    69466946        AssertComRCReturn(hrc, VERR_INVALID_PARAMETER);
    69476947        RecordScreenSettings.File.strName = bstrTemp;
  • trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp

    r75913 r75926  
    8585 * Initializes this object data with a stream block from VBOXSERVICE_TOOL_LS.
    8686 *
     87 * This is also used by FromStat since the output should be identical given that
     88 * they use the same output function on the guest side when fLong is true.
     89 *
    8790 * @return VBox status code.
    8891 * @param  strmBlk              Stream block to use for initialization.
     
    9295{
    9396    LogFlowFunc(("\n"));
    94 
    9597#ifdef DEBUG
    9698    strmBlk.DumpToLog();
    9799#endif
    98         /* Object name. */
     100
     101    /* Object name. */
    99102    mName = strmBlk.GetString("name");
    100103    ASSERT_GUEST_RETURN(mName.isNotEmpty(), VERR_NOT_FOUND);
    101104
    102     /* Type. */
     105    /* Type & attributes. */
     106    bool fHaveAttribs = false;
     107    char szAttribs[32];
     108    memset(szAttribs, '?', sizeof(szAttribs) - 1);
    103109    mType = FsObjType_Unknown;
    104     const char *pszType = strmBlk.GetString("ftype");
    105     if (pszType)
    106         switch (*pszType)
     110    const char *psz = strmBlk.GetString("ftype");
     111    if (psz)
     112    {
     113        fHaveAttribs = true;
     114        szAttribs[0] = *psz;
     115        switch (*psz)
    107116        {
    108117            case '-':   mType = FsObjType_File; break;
     
    114123            case 's':   mType = FsObjType_Socket; break;
    115124            case 'w':   mType = FsObjType_WhiteOut; break;
    116             default: AssertMsgFailed(("%s\n", pszType));
    117         }
    118 
    119     /* Dates. */
     125            default:
     126                AssertMsgFailed(("%s\n", psz));
     127                szAttribs[0] = '?';
     128                fHaveAttribs = false;
     129                break;
     130        }
     131    }
     132    psz = strmBlk.GetString("owner_mask");
     133    if (   psz
     134        && (psz[0] == '-' || psz[0] == 'r')
     135        && (psz[1] == '-' || psz[1] == 'w')
     136        && (psz[2] == '-' || psz[2] == 'x'))
     137    {
     138        szAttribs[1] = psz[0];
     139        szAttribs[2] = psz[1];
     140        szAttribs[3] = psz[2];
     141        fHaveAttribs = true;
     142    }
     143    psz = strmBlk.GetString("group_mask");
     144    if (   psz
     145        && (psz[0] == '-' || psz[0] == 'r')
     146        && (psz[1] == '-' || psz[1] == 'w')
     147        && (psz[2] == '-' || psz[2] == 'x'))
     148    {
     149        szAttribs[4] = psz[0];
     150        szAttribs[5] = psz[1];
     151        szAttribs[6] = psz[2];
     152        fHaveAttribs = true;
     153    }
     154    psz = strmBlk.GetString("other_mask");
     155    if (   psz
     156        && (psz[0] == '-' || psz[0] == 'r')
     157        && (psz[1] == '-' || psz[1] == 'w')
     158        && (psz[2] == '-' || psz[2] == 'x'))
     159    {
     160        szAttribs[7] = psz[0];
     161        szAttribs[8] = psz[1];
     162        szAttribs[9] = psz[2];
     163        fHaveAttribs = true;
     164    }
     165    szAttribs[10] = ' '; /* Reserve three chars for sticky bits. */
     166    szAttribs[11] = ' ';
     167    szAttribs[12] = ' ';
     168    szAttribs[13] = ' '; /* Separator. */
     169    psz = strmBlk.GetString("dos_mask");
     170    if (   psz
     171        && (psz[ 0] == '-' || psz[ 0] == 'R')
     172        && (psz[ 1] == '-' || psz[ 1] == 'H')
     173        && (psz[ 2] == '-' || psz[ 2] == 'S')
     174        && (psz[ 3] == '-' || psz[ 3] == 'D')
     175        && (psz[ 4] == '-' || psz[ 4] == 'A')
     176        && (psz[ 5] == '-' || psz[ 5] == 'd')
     177        && (psz[ 6] == '-' || psz[ 6] == 'N')
     178        && (psz[ 7] == '-' || psz[ 7] == 'T')
     179        && (psz[ 8] == '-' || psz[ 8] == 'P')
     180        && (psz[ 9] == '-' || psz[ 9] == 'J')
     181        && (psz[10] == '-' || psz[10] == 'C')
     182        && (psz[11] == '-' || psz[11] == 'O')
     183        && (psz[12] == '-' || psz[12] == 'I')
     184        && (psz[13] == '-' || psz[13] == 'E'))
     185    {
     186        memcpy(&szAttribs[14], psz, 14);
     187        fHaveAttribs = true;
     188    }
     189    szAttribs[28] = '\0';
     190    if (fHaveAttribs)
     191        mFileAttrs = szAttribs;
     192
     193    /* Object size. */
     194    int rc = strmBlk.GetInt64Ex("st_size", &mObjectSize);
     195    ASSERT_GUEST_RC_RETURN(rc, rc);
     196    strmBlk.GetInt64Ex("alloc", &mAllocatedSize);
     197
     198    /* INode number and device. */
     199    psz = strmBlk.GetString("node_id");
     200    if (!psz)
     201        psz = strmBlk.GetString("cnode_id"); /* copy & past error fixed in 6.0 RC1 */
     202    if (psz)
     203        mNodeID = RTStrToInt64(psz);
     204    mNodeIDDevice = strmBlk.GetUInt32("inode_dev"); /* (Produced by GAs prior to 6.0 RC1.) */
     205
    120206    if (fLong)
    121207    {
     208        /* Dates. */
    122209        mAccessTime       = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_atime");
    123210        mBirthTime        = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_birthtime");
    124211        mChangeTime       = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_ctime");
    125212        mModificationTime = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_mtime");
    126     }
    127 
    128     /* Object size. */
    129     int rc = strmBlk.GetInt64Ex("st_size", &mObjectSize);
    130     ASSERT_GUEST_RC_RETURN(rc, rc);
    131 
    132     /* Owner. */
    133     mUID = strmBlk.GetUInt32("uid");
    134     mGID = strmBlk.GetUInt32("gid");
    135 
    136     /** @todo Add complete stat info!
    137      * int64_t              mAllocatedSize;
    138      * uint32_t             mDeviceNumber;
    139      * Utf8Str              mFileAttrs;
    140      * uint32_t             mGenerationID;
    141      * Utf8Str              mGroupName;
    142      * uint32_t             mNumHardLinks;
    143      * uint32_t             mNodeIDDevice;
    144      * uint32_t             mUserFlags;
    145      * Utf8Str              mUserName;
    146      * Utf8Str              mACL;
    147      */
     213
     214        /* Owner & group. */
     215        mUID = strmBlk.GetInt32("uid");
     216        psz = strmBlk.GetString("username");
     217        if (psz)
     218            mUserName = psz;
     219        mGID = strmBlk.GetInt32("gid");
     220        psz = strmBlk.GetString("groupname");
     221        if (psz)
     222            mGroupName = psz;
     223
     224        /* Misc attributes: */
     225        mNumHardLinks = strmBlk.GetUInt32("hlinks", 1);
     226        mDeviceNumber = strmBlk.GetUInt32("st_rdev");
     227        mGenerationID = strmBlk.GetUInt32("st_gen");
     228        mUserFlags    = strmBlk.GetUInt32("st_flags");
     229
     230        /** @todo ACL */
     231    }
    148232
    149233    LogFlowFuncLeave();
    150234    return VINF_SUCCESS;
     235}
     236
     237int GuestFsObjData::FromStat(const GuestProcessStreamBlock &strmBlk)
     238{
     239    /* Should be identical output. */
     240    return GuestFsObjData::FromLs(strmBlk, true /*fLong*/);
    151241}
    152242
     
    169259}
    170260
    171 int GuestFsObjData::FromStat(const GuestProcessStreamBlock &strmBlk)
    172 {
    173     LogFlowFunc(("\n"));
    174 
    175 #ifdef DEBUG
    176     strmBlk.DumpToLog();
    177 #endif
    178     /* Node ID, optional because we don't include this in older VBoxService (< 4.2) versions. */
    179     mNodeID = strmBlk.GetInt64("node_id");
    180 
    181     /* Object name. */
    182     mName = strmBlk.GetString("name");
    183     ASSERT_GUEST_RETURN(mName.isNotEmpty(), VERR_NOT_FOUND);
    184 
    185     /* Type. */
    186     const char *pszType = strmBlk.GetString("ftype");
    187     if (pszType)
    188         switch (*pszType)
    189         {
    190             case '-':   mType = FsObjType_File; break;
    191             case 'd':   mType = FsObjType_Directory; break;
    192             case 'l':   mType = FsObjType_Symlink; break;
    193             case 'c':   mType = FsObjType_DevChar; break;
    194             case 'b':   mType = FsObjType_DevBlock; break;
    195             case 'f':   mType = FsObjType_Fifo; break;
    196             case 's':   mType = FsObjType_Socket; break;
    197             case 'w':   mType = FsObjType_WhiteOut; break;
    198             default: AssertMsgFailed(("%s\n", pszType));
    199         }
    200 
    201     /* Dates. */
    202     mAccessTime       = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_atime");
    203     mBirthTime        = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_birthtime");
    204     mChangeTime       = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_ctime");
    205     mModificationTime = GuestFsObjData::UnixEpochNsFromKey(strmBlk, "st_mtime");
    206 
    207     /* Object size. */
    208     int rc = strmBlk.GetInt64Ex("st_size", &mObjectSize);
    209     ASSERT_GUEST_RC_RETURN(rc, rc);
    210 
    211     /* Owner. */
    212     mUID = strmBlk.GetUInt32("uid");
    213     mGID = strmBlk.GetUInt32("gid");
    214 
    215     /** @todo Add complete stat info!
    216      * int64_t              mAllocatedSize;
    217      * uint32_t             mDeviceNumber;
    218      * Utf8Str              mFileAttrs;
    219      * uint32_t             mGenerationID;
    220      * Utf8Str              mGroupName;
    221      * uint32_t             mNumHardLinks;
    222      * uint32_t             mNodeIDDevice;
    223      * uint32_t             mUserFlags;
    224      * Utf8Str              mUserName;
    225      * Utf8Str              mACL;
    226      */
    227 
    228     LogFlowFuncLeave();
    229     return VINF_SUCCESS;
    230 }
     261
    231262
    232263/**
     
    382413 * @param   pszKey              Name of key to get the value for.
    383414 */
    384 const char* GuestProcessStreamBlock::GetString(const char *pszKey) const
     415const char *GuestProcessStreamBlock::GetString(const char *pszKey) const
    385416{
    386417    AssertPtrReturn(pszKey, NULL);
     
    388419    try
    389420    {
    390         GuestCtrlStreamPairMapIterConst itPairs = mPairs.find(Utf8Str(pszKey));
     421        GuestCtrlStreamPairMapIterConst itPairs = mPairs.find(Utf8Str(pszKey)); /** @todo r=bird: this string conversion is excellent performance wise... */
    391422        if (itPairs != mPairs.end())
    392423            return itPairs->second.mValue.c_str();
     
    403434 *
    404435 * @return  IPRT status code. VERR_NOT_FOUND if key was not found.
    405  * @param  pszKey               Name of key to get the value for.
    406  * @param  puVal                Pointer to value to return.
     436 * @param   pszKey              Name of key to get the value for.
     437 * @param   puVal               Pointer to value to return.
    407438 */
    408439int GuestProcessStreamBlock::GetUInt32Ex(const char *pszKey, uint32_t *puVal) const
    409440{
    410     AssertPtrReturn(pszKey, VERR_INVALID_POINTER);
    411     AssertPtrReturn(puVal, VERR_INVALID_POINTER);
    412441    const char *pszValue = GetString(pszKey);
    413442    if (pszValue)
     
    420449
    421450/**
     451 * Returns a 32-bit signed integer of a specified key.
     452 *
     453 * @returns 32-bit signed value
     454 * @param   pszKey              Name of key to get the value for.
     455 * @param   iDefault            The default to return on error if not found.
     456 */
     457int32_t GuestProcessStreamBlock::GetInt32(const char *pszKey, int32_t iDefault) const
     458{
     459    const char *pszValue = GetString(pszKey);
     460    if (pszValue)
     461    {
     462        int32_t iRet;
     463        int rc = RTStrToInt32Full(pszValue, 0, &iRet);
     464        if (RT_SUCCESS(rc))
     465            return iRet;
     466        ASSERT_GUEST_MSG_FAILED(("%s=%s\n", pszKey, pszValue));
     467    }
     468    return iDefault;
     469}
     470
     471/**
    422472 * Returns a 32-bit unsigned integer of a specified key.
    423473 *
    424474 * @return  uint32_t            Value to return, 0 if not found / on failure.
    425475 * @param   pszKey              Name of key to get the value for.
    426  */
    427 uint32_t GuestProcessStreamBlock::GetUInt32(const char *pszKey) const
     476 * @param   uDefault            The default value to return.
     477 */
     478uint32_t GuestProcessStreamBlock::GetUInt32(const char *pszKey, uint32_t uDefault /*= 0*/) const
    428479{
    429480    uint32_t uVal;
    430481    if (RT_SUCCESS(GetUInt32Ex(pszKey, &uVal)))
    431482        return uVal;
    432     return 0;
     483    return uDefault;
    433484}
    434485
  • trunk/src/VBox/Main/src-client/GuestFileImpl.cpp

    r75861 r75926  
    142142{
    143143    LogFlowThisFunc(("pConsole=%p, pSession=%p, aObjectID=%RU32, strPath=%s\n",
    144                      pConsole, pSession, aObjectID, openInfo.mFileName.c_str()));
     144                     pConsole, pSession, aObjectID, openInfo.mFilename.c_str()));
    145145
    146146    AssertPtrReturn(pConsole, VERR_INVALID_POINTER);
     
    264264}
    265265
    266 HRESULT GuestFile::getFileName(com::Utf8Str &aFileName)
     266HRESULT GuestFile::getFilename(com::Utf8Str &aFilename)
    267267{
    268268    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    269269
    270     aFileName = mData.mOpenInfo.mFileName;
     270    aFilename = mData.mOpenInfo.mFilename;
    271271
    272272    return S_OK;
     
    333333
    334334    LogFlowThisFunc(("strName=%s, uContextID=%RU32, uFunction=%RU32, pSvcCb=%p\n",
    335                      mData.mOpenInfo.mFileName.c_str(), pCbCtx->uContextID, pCbCtx->uFunction, pSvcCb));
     335                     mData.mOpenInfo.mFilename.c_str(), pCbCtx->uContextID, pCbCtx->uFunction, pSvcCb));
    336336
    337337    int vrc;
     
    360360int GuestFile::i_closeFile(int *prcGuest)
    361361{
    362     LogFlowThisFunc(("strFile=%s\n", mData.mOpenInfo.mFileName.c_str()));
     362    LogFlowThisFunc(("strFile=%s\n", mData.mOpenInfo.mFilename.c_str()));
    363363
    364364    int vrc;
     
    645645int GuestFile::i_openFile(uint32_t uTimeoutMS, int *prcGuest)
    646646{
    647     AssertReturn(mData.mOpenInfo.mFileName.isNotEmpty(), VERR_INVALID_PARAMETER);
     647    AssertReturn(mData.mOpenInfo.mFilename.isNotEmpty(), VERR_INVALID_PARAMETER);
    648648
    649649    LogFlowThisFuncEnter();
     
    652652
    653653    LogFlowThisFunc(("strFile=%s, enmAccessMode=0x%x, enmOpenAction=0x%x, uCreationMode=%RU32, mfOpenEx=%RU32\n",
    654                      mData.mOpenInfo.mFileName.c_str(), mData.mOpenInfo.mAccessMode, mData.mOpenInfo.mOpenAction,
     654                     mData.mOpenInfo.mFilename.c_str(), mData.mOpenInfo.mAccessMode, mData.mOpenInfo.mOpenAction,
    655655                     mData.mOpenInfo.mCreationMode, mData.mOpenInfo.mfOpenEx));
    656656
     
    719719    int i = 0;
    720720    HGCMSvcSetU32(&paParms[i++], pEvent->ContextID());
    721     HGCMSvcSetPv(&paParms[i++], (void*)mData.mOpenInfo.mFileName.c_str(),
    722                  (ULONG)mData.mOpenInfo.mFileName.length() + 1);
     721    HGCMSvcSetPv(&paParms[i++], (void*)mData.mOpenInfo.mFilename.c_str(),
     722                 (ULONG)mData.mOpenInfo.mFilename.length() + 1);
    723723    HGCMSvcSetStr(&paParms[i++], pszAccessMode);
    724724    HGCMSvcSetStr(&paParms[i++], pszOpenAction);
     
    743743{
    744744    AssertPtr(mSession);
    745     return mSession->i_fsQueryInfo(mData.mOpenInfo.mFileName, FALSE /* fFollowSymlinks */, objData, prcGuest);
     745    return mSession->i_fsQueryInfo(mData.mOpenInfo.mFilename, FALSE /* fFollowSymlinks */, objData, prcGuest);
    746746}
    747747
     
    13801380
    13811381        hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Reading from file \"%s\" failed: %Rrc"),
    1382                           mData.mOpenInfo.mFileName.c_str(), vrc);
     1382                          mData.mOpenInfo.mFilename.c_str(), vrc);
    13831383    }
    13841384
     
    14141414
    14151415        hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Reading from file \"%s\" (at offset %RU64) failed: %Rrc"),
    1416                           mData.mOpenInfo.mFileName.c_str(), aOffset, vrc);
     1416                          mData.mOpenInfo.mFilename.c_str(), aOffset, vrc);
    14171417    }
    14181418
     
    14561456    else
    14571457        hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Seeking file \"%s\" (to offset %RI64) failed: %Rrc"),
    1458                           mData.mOpenInfo.mFileName.c_str(), aOffset, vrc);
     1458                          mData.mOpenInfo.mFilename.c_str(), aOffset, vrc);
    14591459
    14601460    LogFlowFuncLeaveRC(vrc);
     
    14881488    if (RT_FAILURE(vrc))
    14891489        hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Writing %zubytes to file \"%s\" failed: %Rrc"),
    1490                           aData.size(), mData.mOpenInfo.mFileName.c_str(), vrc);
     1490                          aData.size(), mData.mOpenInfo.mFilename.c_str(), vrc);
    14911491
    14921492    LogFlowFuncLeaveRC(vrc);
     
    15081508    if (RT_FAILURE(vrc))
    15091509        hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Writing %zubytes to file \"%s\" (at offset %RU64) failed: %Rrc"),
    1510                           aData.size(), mData.mOpenInfo.mFileName.c_str(), aOffset, vrc);
     1510                          aData.size(), mData.mOpenInfo.mFilename.c_str(), aOffset, vrc);
    15111511
    15121512    LogFlowFuncLeaveRC(vrc);
  • trunk/src/VBox/Main/src-client/GuestFsObjInfoImpl.cpp

    r71567 r75926  
    142142}
    143143
    144 HRESULT GuestFsObjInfo::getGID(ULONG *aGID)
     144HRESULT GuestFsObjInfo::getGID(LONG *aGID)
    145145{
    146146    *aGID = mData.mGID;
     
    205205}
    206206
    207 HRESULT GuestFsObjInfo::getUID(ULONG *aUID)
     207HRESULT GuestFsObjInfo::getUID(LONG *aUID)
    208208{
    209209    *aUID = mData.mUID;
  • trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp

    r75891 r75926  
    14861486    RT_ZERO(openInfo);
    14871487
    1488     openInfo.mFileName     = aPath;
     1488    openInfo.mFilename     = aPath;
    14891489    openInfo.mCreationMode = aCreationMode;
    14901490    openInfo.mAccessMode   = aAccessMode;
     
    15061506{
    15071507    LogFlowThisFunc(("strFile=%s, enmAccessMode=0x%x, enmOpenAction=0x%x, uCreationMode=%RU32, mfOpenEx=%RU32\n",
    1508                      openInfo.mFileName.c_str(), openInfo.mAccessMode, openInfo.mOpenAction, openInfo.mCreationMode,
     1508                     openInfo.mFilename.c_str(), openInfo.mAccessMode, openInfo.mOpenAction, openInfo.mCreationMode,
    15091509                     openInfo.mfOpenEx));
    15101510
     
    15501550
    15511551        LogFlowFunc(("Added new guest file \"%s\" (Session: %RU32) (now total %zu files)\n",
    1552                      openInfo.mFileName.c_str(), mData.mSession.mID, mData.mFiles.size()));
     1552                     openInfo.mFilename.c_str(), mData.mSession.mID, mData.mFiles.size()));
    15531553
    15541554        alock.release(); /* Release lock before firing off event. */
     
    36183618
    36193619    GuestFileOpenInfo openInfo;
    3620     openInfo.mFileName = aPath;
     3620    openInfo.mFilename = aPath;
    36213621    openInfo.mCreationMode = aCreationMode;
    36223622
  • trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp

    r75095 r75926  
    389389    GuestFileOpenInfo srcOpenInfo;
    390390    RT_ZERO(srcOpenInfo);
    391     srcOpenInfo.mFileName     = strSource;
     391    srcOpenInfo.mFilename     = strSource;
    392392    srcOpenInfo.mOpenAction   = FileOpenAction_OpenExisting;
    393393    srcOpenInfo.mAccessMode   = FileAccessMode_ReadOnly;
     
    788788    GuestFileOpenInfo dstOpenInfo;
    789789    RT_ZERO(dstOpenInfo);
    790     dstOpenInfo.mFileName        = strDestFinal;
     790    dstOpenInfo.mFilename        = strDestFinal;
    791791    if (fFileCopyFlags & FileCopyFlag_NoReplace)
    792792        dstOpenInfo.mOpenAction  = FileOpenAction_CreateNew;
     
    19361936            GuestFileOpenInfo dstOpenInfo;
    19371937            RT_ZERO(dstOpenInfo);
    1938             dstOpenInfo.mFileName    = strFileDest;
     1938            dstOpenInfo.mFilename    = strFileDest;
    19391939            dstOpenInfo.mOpenAction  = FileOpenAction_CreateOrReplace;
    19401940            dstOpenInfo.mAccessMode  = FileAccessMode_WriteOnly;
  • trunk/src/VBox/Main/src-server/RecordingScreenSettingsImpl.cpp

    r75489 r75926  
    364364}
    365365
    366 HRESULT RecordingScreenSettings::getFileName(com::Utf8Str &aFileName)
     366HRESULT RecordingScreenSettings::getFilename(com::Utf8Str &aFilename)
    367367{
    368368    AutoCaller autoCaller(this);
     
    375375        || m->bd->File.strName.equals("."))
    376376    {
    377         int vrc = m->pParent->i_getDefaultFileName(m->bd->File.strName, true /* fWithFileExtension */);
     377        int vrc = m->pParent->i_getDefaultFilename(m->bd->File.strName, true /* fWithFileExtension */);
    378378        if (RT_FAILURE(vrc))
    379379            return setError(E_INVALIDARG, tr("Error retrieving default file name"));
    380380    }
    381381
    382     aFileName = m->bd->File.strName;
    383 
    384     return S_OK;
    385 }
    386 
    387 HRESULT RecordingScreenSettings::setFileName(const com::Utf8Str &aFileName)
     382    aFilename = m->bd->File.strName;
     383
     384    return S_OK;
     385}
     386
     387HRESULT RecordingScreenSettings::setFilename(const com::Utf8Str &aFilename)
    388388{
    389389    AutoCaller autoCaller(this);
     
    393393        return setError(E_INVALIDARG, tr("Cannot change file name while recording is enabled"));
    394394
    395     Utf8Str strFile(aFileName);
     395    Utf8Str strFile(aFilename);
    396396    if (!RTPathStartsWithRoot(strFile.c_str()))
    397397        return setError(E_INVALIDARG, tr("Recording file name '%s' is not absolute"), strFile.c_str());
     
    819819        {
    820820            if (m->bd->File.strName.isEmpty())
    821                 rc = m->pParent->i_getDefaultFileName(m->bd->File.strName, true /* fWithExtension */);
     821                rc = m->pParent->i_getDefaultFilename(m->bd->File.strName, true /* fWithExtension */);
    822822            break;
    823823        }
  • trunk/src/VBox/Main/src-server/RecordingSettingsImpl.cpp

    r75488 r75926  
    556556 * Returns the full path to the default video capture file.
    557557 */
    558 int RecordingSettings::i_getDefaultFileName(Utf8Str &strFile, bool fWithFileExtension)
     558int RecordingSettings::i_getDefaultFilename(Utf8Str &strFile, bool fWithFileExtension)
    559559{
    560560    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
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