Changeset 102654 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- Dec 20, 2023 4:10:26 PM (13 months ago)
- Location:
- trunk/src/VBox/Main/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h
r99740 r102654 1211 1211 } 1212 1212 1213 /** 1214 * Returns the payload as a vector of strings, validated. 1215 * 1216 * @returns VBox status code. 1217 * @param vecStrings Where to return the vector of strings on success. 1218 */ 1219 int ToStringVector(std::vector<Utf8Str> &vecStrings) 1220 { 1221 int vrc = VINF_SUCCESS; 1222 1223 vecStrings.clear(); 1224 1225 const char *psz = (const char *)pvData; 1226 AssertPtrReturn(psz, vrc = VERR_INVALID_PARAMETER); 1227 size_t cb = cbData; 1228 while (cb) 1229 { 1230 size_t const cch = strlen(psz); 1231 if (!cch) 1232 break; 1233 size_t const cbStr = cch + 1 /* String terminator */; 1234 vrc = RTStrValidateEncodingEx(psz, cbStr, 1235 RTSTR_VALIDATE_ENCODING_ZERO_TERMINATED | RTSTR_VALIDATE_ENCODING_EXACT_LENGTH); 1236 if (RT_FAILURE(vrc)) 1237 break; 1238 AssertBreakStmt(cb >= cbStr, vrc = VERR_INVALID_PARAMETER); 1239 cb -= cbStr; 1240 psz += cbStr; 1241 } 1242 1243 if (RT_SUCCESS(vrc)) 1244 AssertStmt(cb <= 1 /* Ending terminator */, vrc = VERR_INVALID_PARAMETER); 1245 return vrc; 1246 } 1247 1213 1248 protected: 1214 1249 -
trunk/src/VBox/Main/include/GuestSessionImpl.h
r102614 r102654 87 87 HRESULT getUserDocuments(com::Utf8Str &aUserDocuments); 88 88 HRESULT getUserHome(com::Utf8Str &aUserHome); 89 HRESULT getMountPoints(std::vector<com::Utf8Str> &aMountPoints); 89 90 HRESULT getDirectories(std::vector<ComPtr<IGuestDirectory> > &aDirectories); 90 91 HRESULT getFiles(std::vector<ComPtr<IGuestFile> > &aFiles); … … 345 346 int i_pathRename(const Utf8Str &strSource, const Utf8Str &strDest, uint32_t uFlags, int *pvrcGuest); 346 347 int i_pathUserDocuments(Utf8Str &strPath, int *pvrcGuest); 348 int i_getMountPoints(std::vector<com::Utf8Str> &vecMountPoints, int *pvrcGuest); 347 349 int i_pathUserHome(Utf8Str &strPath, int *pvrcGuest); 348 350 int i_processUnregister(GuestProcess *pProcess);
Note:
See TracChangeset
for help on using the changeset viewer.