Changeset 77116 in vbox for trunk/src/VBox
- Timestamp:
- Feb 1, 2019 2:20:52 PM (6 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h
r77079 r77116 65 65 Utf8Str mDomain; 66 66 }; 67 68 67 69 68 … … 224 223 } 225 224 226 227 225 /** 228 226 * See RTEnvQueryUtf8Block for details. … … 291 289 return rc; 292 290 } 293 294 291 295 292 /** -
trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp
r77113 r77116 65 65 * 66 66 * @returns VBox status code. 67 * @param pvExtension Pointer to HGCM service extension. 68 * @param idMessage HGCM message ID the callback was called for. 69 * @param pvData Pointer to user-supplied callback data. 70 * @param cbData Size (in bytes) of user-supplied callback data. 67 71 */ 68 72 /* static */ … … 118 122 ///////////////////////////////////////////////////////////////////////////// 119 123 124 /** 125 * Dispatches a host service callback to the appropriate guest control session object. 126 * 127 * @returns VBox status code. 128 * @param pCtxCb Pointer to host callback context. 129 * @param pSvcCb Pointer to callback parameters. 130 */ 120 131 int Guest::i_dispatchToSession(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb) 121 132 { … … 211 222 } 212 223 224 /** 225 * Removes a guest control session from the internal list and destroys the session. 226 * 227 * @returns VBox status code. 228 * @param uSessionID ID of the guest control session to remove. 229 */ 213 230 int Guest::i_sessionRemove(uint32_t uSessionID) 214 231 { … … 244 261 } 245 262 263 /** 264 * Creates a new guest session. 265 * This will invoke VBoxService running on the guest creating a new (dedicated) guest session 266 * On older Guest Additions this call has no effect on the guest, and only the credentials will be 267 * used for starting/impersonating guest processes. 268 * 269 * @returns VBox status code. 270 * @param ssInfo Guest session startup information. 271 * @param guestCreds Guest OS (user) credentials to use on the guest for creating the session. 272 * The specified user must be able to logon to the guest and able to start new processes. 273 * @param pGuestSession Where to store the created guest session on success. 274 */ 246 275 int Guest::i_sessionCreate(const GuestSessionStartupInfo &ssInfo, 247 276 const GuestCredentials &guestCreds, ComObjPtr<GuestSession> &pGuestSession) … … 325 354 } 326 355 356 /** 357 * Returns whether a guest control session with a specific ID exists or not. 358 * 359 * @returns Returns \c true if the session exists, \c false if not. 360 * @param uSessionID ID to check for. 361 */ 327 362 inline bool Guest::i_sessionExists(uint32_t uSessionID) 328 363 { -
trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp
r77097 r77116 235 235 } 236 236 237 /** 238 * Parses stream block output data which came from the 'stat' (vbox_stat) 239 * VBoxService toolbox command. The result will be stored in this object. 240 * 241 * @returns VBox status code. 242 * @param strmBlk Stream block output data to parse. 243 */ 237 244 int GuestFsObjData::FromStat(const GuestProcessStreamBlock &strmBlk) 238 245 { … … 241 248 } 242 249 250 /** 251 * Parses stream block output data which came from the 'mktemp' (vbox_mktemp) 252 * VBoxService toolbox command. The result will be stored in this object. 253 * 254 * @returns VBox status code. 255 * @param strmBlk Stream block output data to parse. 256 */ 243 257 int GuestFsObjData::FromMkTemp(const GuestProcessStreamBlock &strmBlk) 244 258 { … … 259 273 } 260 274 261 262 263 275 /** 264 276 * Returns the IPRT-compatible file mode. … … 304 316 } 305 317 306 /*307 GuestProcessStreamBlock::GuestProcessStreamBlock(const GuestProcessStreamBlock &otherBlock)308 {309 for (GuestCtrlStreamPairsIter it = otherBlock.mPairs.begin();310 it != otherBlock.end(); ++it)311 {312 mPairs[it->first] = new313 if (it->second.pszValue)314 {315 RTMemFree(it->second.pszValue);316 it->second.pszValue = NULL;317 }318 }319 }*/320 321 318 GuestProcessStreamBlock::~GuestProcessStreamBlock() 322 319 { … … 325 322 326 323 /** 327 * Destroys the currently stored stream pairs. 328 * 329 * @return IPRT status code. 324 * Clears (destroys) the currently stored stream pairs. 330 325 */ 331 326 void GuestProcessStreamBlock::Clear(void) … … 335 330 336 331 #ifdef DEBUG 332 /** 333 * Dumps the currently stored stream pairs to the (debug) log. 334 */ 337 335 void GuestProcessStreamBlock::DumpToLog(void) const 338 336 { … … 351 349 * Returns a 64-bit signed integer of a specified key. 352 350 * 353 * @return IPRTstatus code. VERR_NOT_FOUND if key was not found.351 * @return VBox status code. VERR_NOT_FOUND if key was not found. 354 352 * @param pszKey Name of key to get the value for. 355 353 * @param piVal Pointer to value to return. … … 395 393 * Gets the return code (name = "rc") of this stream block. 396 394 * 397 * @return IPRTstatus code.395 * @return VBox status code. 398 396 */ 399 397 int GuestProcessStreamBlock::GetRc(void) const … … 433 431 * Returns a 32-bit unsigned integer of a specified key. 434 432 * 435 * @return IPRTstatus code. VERR_NOT_FOUND if key was not found.433 * @return VBox status code. VERR_NOT_FOUND if key was not found. 436 434 * @param pszKey Name of key to get the value for. 437 435 * @param puVal Pointer to value to return. … … 487 485 * Sets a value to a key or deletes a key by setting a NULL value. 488 486 * 489 * @return IPRTstatus code.487 * @return VBox status code. 490 488 * @param pszKey Key name to process. 491 489 * @param pszValue Value to set. Set NULL for deleting the key. … … 542 540 * are multiple rounds of adding data needed. 543 541 * 544 * @return IPRTstatus code.542 * @return VBox status code. 545 543 * @param pbData Pointer to data to add. 546 544 * @param cbData Size (in bytes) of data to add. … … 627 625 628 626 #ifdef DEBUG 627 /** 628 * Dumps the raw guest process output to a file on the host. 629 * If the file on the host already exists, it will be overwritten. 630 * 631 * @param pszFile Absolute path to host file to dump the output to. 632 */ 629 633 void GuestProcessStream::Dump(const char *pszFile) 630 634 { … … 656 660 * block (with zero or more pairs stored in stream block). 657 661 * 658 * @return IPRTstatus code.662 * @return VBox status code. 659 663 * @param streamBlock Reference to guest stream block to fill. 660 *661 664 */ 662 665 int GuestProcessStream::ParseBlock(GuestProcessStreamBlock &streamBlock) … … 736 739 } 737 740 741 /** 742 * Separate initialization function for the base class. 743 * 744 * @returns VBox status code. 745 */ 738 746 int GuestBase::baseInit(void) 739 747 { … … 744 752 } 745 753 754 /** 755 * Separate uninitialization function for the base class. 756 */ 746 757 void GuestBase::baseUninit(void) 747 758 { … … 755 766 } 756 767 768 /** 769 * Cancels all outstanding wait events. 770 * 771 * @returns VBox status code. 772 */ 757 773 int GuestBase::cancelWaitEvents(void) 758 774 { … … 861 877 } 862 878 879 /** 880 * Generates a context ID (CID) by incrementing the object's count. 881 * A CID consists of a session ID, an object ID and a count. 882 * 883 * Note: This function does not guarantee that the returned CID is unique; 884 * the caller has to take care of that and eventually retry. 885 * 886 * @returns VBox status code. 887 * @param uSessionID Session ID to use for CID generation. 888 * @param uObjectID Object ID to use for CID generation. 889 * @param puContextID Where to store the generated CID on success. 890 */ 863 891 int GuestBase::generateContextID(uint32_t uSessionID, uint32_t uObjectID, uint32_t *puContextID) 864 892 { … … 890 918 * around once at a time. 891 919 * 892 * @returns IPRTstatus code.920 * @returns VBox status code. 893 921 * @retval VERR_GSTCTL_MAX_CID_COUNT_REACHED if unable to generate a free context ID (CID, the count part (bits 15:0)). 894 922 * @param uSessionID Session ID to register wait event for. … … 1025 1053 } 1026 1054 1055 /** 1056 * Signals all wait events of a specific type (if found) 1057 * and notifies external events accordingly. 1058 * 1059 * @returns VBox status code. 1060 * @param aType Event type to signal. 1061 * @param aEvent Which external event to notify. 1062 */ 1027 1063 int GuestBase::signalWaitEvent(VBoxEventType_T aType, IEvent *aEvent) 1028 1064 { … … 1081 1117 } 1082 1118 1119 /** 1120 * Signals a wait event which is registered to a specific callback (bound to a context ID (CID)). 1121 * 1122 * @returns VBox status code. 1123 * @param pCbCtx Pointer to host service callback context. 1124 * @param rcGuest Guest return code (rc) to set additionally, if rc is set to VERR_GSTCTL_GUEST_ERROR. 1125 * @param pPayload Additional wait event payload data set set on return. Optional. 1126 */ 1083 1127 int GuestBase::signalWaitEventInternal(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, 1084 1128 int rcGuest, const GuestWaitEventPayload *pPayload) … … 1092 1136 } 1093 1137 1138 /** 1139 * Signals a wait event which is registered to a specific callback (bound to a context ID (CID)). 1140 * Extended version. 1141 * 1142 * @returns VBox status code. 1143 * @param pCbCtx Pointer to host service callback context. 1144 * @param rc Return code (rc) to set as wait result. 1145 * @param rcGuest Guest return code (rc) to set additionally, if rc is set to VERR_GSTCTL_GUEST_ERROR. 1146 * @param pPayload Additional wait event payload data set set on return. Optional. 1147 */ 1094 1148 int GuestBase::signalWaitEventInternalEx(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, 1095 1149 int rc, int rcGuest, … … 1127 1181 * After successful unregistration the event will not be valid anymore. 1128 1182 * 1129 * @returns IPRTstatus code.1183 * @returns VBox status code. 1130 1184 * @param pWaitEvt Wait event to unregister (delete). 1131 1185 */ … … 1207 1261 * Waits for an already registered guest wait event. 1208 1262 * 1209 * @return IPRTstatus code.1263 * @return VBox status code. 1210 1264 * @param pWaitEvt Pointer to event to wait for. 1211 1265 * @param msTimeout Timeout (in ms) for waiting. … … 1268 1322 } 1269 1323 1324 /** 1325 * Binds this guest (control) object to a specific guest (control) session. 1326 * 1327 * @returns VBox status code. 1328 * @param pConsole Pointer to console object to use. 1329 * @param pSession Pointer to session to bind this object to. 1330 * @param uObjectID Object ID for this object to use within that specific session. 1331 * Each object ID must be unique per session. 1332 */ 1270 1333 int GuestObject::bindToSession(Console *pConsole, GuestSession *pSession, uint32_t uObjectID) 1271 1334 { … … 1280 1343 } 1281 1344 1345 /** 1346 * Registers (creates) a new wait event. 1347 * 1348 * @returns VBox status code. 1349 * @param lstEvents List of events which the new wait event gets triggered at. 1350 * @param ppEvent Returns the new wait event on success. 1351 */ 1282 1352 int GuestObject::registerWaitEvent(const GuestEventTypes &lstEvents, 1283 1353 GuestWaitEvent **ppEvent) … … 1287 1357 } 1288 1358 1359 /** 1360 * Sends a HGCM message to the guest (via the guest control host service). 1361 * 1362 * @returns VBox status code. 1363 * @param uMessage Message ID of message to send. 1364 * @param cParms Number of HGCM message parameters to send. 1365 * @param paParms Array of HGCM message parameters to send. 1366 */ 1289 1367 int GuestObject::sendMessage(uint32_t uMessage, uint32_t cParms, PVBOXHGCMSVCPARM paParms) 1290 1368 { … … 1341 1419 } 1342 1420 1421 /** 1422 * Initializes a wait event with a specific context ID (CID). 1423 * 1424 * @returns VBox status code. 1425 * @param uCID Context ID (CID) to initialize wait event with. 1426 */ 1343 1427 int GuestWaitEventBase::Init(uint32_t uCID) 1344 1428 { … … 1348 1432 } 1349 1433 1434 /** 1435 * Signals a wait event. 1436 * 1437 * @returns VBox status code. 1438 * @param rc Return code (rc) to set as wait result. 1439 * @param rcGuest Guest return code (rc) to set additionally, if rc is set to VERR_GSTCTL_GUEST_ERROR. 1440 * @param pPayload Additional wait event payload data set set on return. Optional. 1441 */ 1350 1442 int GuestWaitEventBase::SignalInternal(int rc, int rcGuest, 1351 1443 const GuestWaitEventPayload *pPayload) … … 1377 1469 } 1378 1470 1471 /** 1472 * Waits for the event to get triggered. Will return success if the 1473 * wait was successufl (e.g. was being triggered), otherwise an error will be returned. 1474 * 1475 * @returns VBox status code. 1476 * @param msTimeout Timeout (in ms) to wait. 1477 * Specifiy 0 to wait indefinitely. 1478 */ 1379 1479 int GuestWaitEventBase::Wait(RTMSINTERVAL msTimeout) 1380 1480 { … … 1428 1528 * Initializes a wait event with a given context ID (CID). 1429 1529 * 1430 * @returns IPRTstatus code.1530 * @returns VBox status code. 1431 1531 * @param uCID Context ID to initialize wait event with. 1432 1532 */ … … 1439 1539 * Initializes a wait event with a given context ID (CID) and a list of event types to wait for. 1440 1540 * 1441 * @returns IPRTstatus code.1541 * @returns VBox status code. 1442 1542 * @param uCID Context ID to initialize wait event with. 1443 1543 * @param lstEvents List of event types to wait for this wait event to get signalled. … … 1457 1557 * Signals the event. 1458 1558 * 1459 * @return IPRTstatus code.1559 * @return VBox status code. 1460 1560 * @param pEvent Public IEvent to associate. 1461 1561 * Optional.
Note:
See TracChangeset
for help on using the changeset viewer.