Changeset 19239 in vbox for trunk/src/VBox
- Timestamp:
- Apr 28, 2009 1:19:14 PM (16 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 101 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
r19134 r19239 446 446 VBOX_VERSION_STRING); 447 447 448 Guidid;448 Bstr id; 449 449 /* the below cannot be Bstr because on Linux Bstr doesn't work until XPCOM (nsMemory) is initialized */ 450 450 const char *name = NULL; … … 518 518 { 519 519 case 's': 520 id = ValueUnion.psz;520 id = asGuidStr(ValueUnion.psz); 521 521 /* If the argument was not a UUID, then it must be a name. */ 522 522 if (!id) … … 693 693 694 694 Log (("VBoxHeadless: Opening a session with machine (id={%s})...\n", 695 id.toString().raw()));695 Utf8Str(id).raw())); 696 696 697 697 // open a session -
trunk/src/VBox/Frontends/VBoxHeadless/testcase/tstHeadless.cpp
r16530 r19239 94 94 95 95 // find ID by name 96 Guidid;96 Bstr id; 97 97 { 98 98 ComPtr <IMachine> m; -
trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
r18491 r19239 414 414 ComPtr<IMachine> machine; 415 415 /* assume it's a UUID */ 416 rc = aVirtualBox->GetMachine( Guid(argv[0]), machine.asOutParam());416 rc = aVirtualBox->GetMachine(Bstr(argv[0]), machine.asOutParam()); 417 417 if (FAILED(rc) || !machine) 418 418 { -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r18901 r19239 281 281 ComPtr<IMachine> machine; 282 282 /* assume it's a UUID */ 283 rc = a->virtualBox->GetMachine(Guid(VMName) , machine.asOutParam());283 rc = a->virtualBox->GetMachine(Guid(VMName).toUtf16(), machine.asOutParam()); 284 284 if (FAILED(rc) || !machine) 285 285 { … … 289 289 if (machine) 290 290 { 291 Guiduuid;291 Bstr uuid; 292 292 machine->COMGETTER(Id)(uuid.asOutParam()); 293 293 machine = NULL; … … 373 373 if (!settingsFile) 374 374 CHECK_ERROR_BREAK(a->virtualBox, 375 CreateMachine(name, osTypeId, baseFolder, Guid(id) , machine.asOutParam()));375 CreateMachine(name, osTypeId, baseFolder, Guid(id).toUtf16(), machine.asOutParam())); 376 376 else 377 377 CHECK_ERROR_BREAK(a->virtualBox, 378 CreateLegacyMachine(name, osTypeId, settingsFile, Guid(id) , machine.asOutParam()));378 CreateLegacyMachine(name, osTypeId, settingsFile, Guid(id).toUtf16(), machine.asOutParam())); 379 379 380 380 CHECK_ERROR_BREAK(machine, SaveSettings()); … … 383 383 CHECK_ERROR_BREAK(a->virtualBox, RegisterMachine(machine)); 384 384 } 385 Guiduuid;385 Bstr uuid; 386 386 CHECK_ERROR_BREAK(machine, COMGETTER(Id)(uuid.asOutParam())); 387 387 CHECK_ERROR_BREAK(machine, COMGETTER(SettingsFilePath)(settingsFile.asOutParam())); … … 390 390 "Settings file: '%ls'\n", 391 391 name.raw(), fRegister ? " and registered" : "", 392 uuid.toString().raw(), settingsFile.raw());392 Utf8Str(uuid).raw(), settingsFile.raw()); 393 393 } 394 394 while (0); … … 500 500 ComPtr<IMachine> machine; 501 501 /* assume it's a UUID */ 502 rc = a->virtualBox->GetMachine(Guid(VMName) , machine.asOutParam());502 rc = a->virtualBox->GetMachine(Guid(VMName).toUtf16(), machine.asOutParam()); 503 503 if (FAILED(rc) || !machine) 504 504 { … … 508 508 if (machine) 509 509 { 510 Guiduuid;510 Bstr uuid; 511 511 machine->COMGETTER(Id)(uuid.asOutParam()); 512 512 … … 561 561 /* try to find the given machine */ 562 562 ComPtr <IMachine> machine; 563 Guiduuid (a->argv[0]);564 if (! uuid.isEmpty())563 Bstr uuid (a->argv[0]); 564 if (!Guid(uuid).isEmpty()) 565 565 { 566 566 CHECK_ERROR (a->virtualBox, GetMachine (uuid, machine.asOutParam())); … … 568 568 else 569 569 { 570 CHECK_ERROR (a->virtualBox, FindMachine ( Bstr(a->argv[0]), machine.asOutParam()));570 CHECK_ERROR (a->virtualBox, FindMachine (uuid, machine.asOutParam())); 571 571 if (SUCCEEDED (rc)) 572 572 machine->COMGETTER(Id) (uuid.asOutParam()); … … 788 788 bool attach = !strcmp(a->argv[1], "usbattach"); 789 789 790 GuidusbId = a->argv [2];791 if ( usbId.isEmpty())790 Bstr usbId = a->argv [2]; 791 if (Guid(usbId).isEmpty()) 792 792 { 793 793 // assume address … … 904 904 { 905 905 /* first assume it's a UUID */ 906 Guiduuid(a->argv[2]);906 Bstr uuid(a->argv[2]); 907 907 ComPtr<IDVDImage> dvdImage; 908 908 rc = a->virtualBox->GetDVDImage(uuid, dvdImage.asOutParam()); … … 914 914 if (!dvdImage) 915 915 { 916 GuidemptyUUID;916 Bstr emptyUUID; 917 917 CHECK_ERROR(a->virtualBox, OpenDVDImage(Bstr(a->argv[2]), emptyUUID, dvdImage.asOutParam())); 918 918 } … … 966 966 { 967 967 /* first assume it's a UUID */ 968 Guiduuid(a->argv[2]);968 Bstr uuid(a->argv[2]); 969 969 ComPtr<IFloppyImage> floppyImage; 970 970 rc = a->virtualBox->GetFloppyImage(uuid, floppyImage.asOutParam()); … … 976 976 if (!floppyImage) 977 977 { 978 GuidemptyUUID;978 Bstr emptyUUID; 979 979 CHECK_ERROR(a->virtualBox, OpenFloppyImage(Bstr(a->argv[2]), emptyUUID, floppyImage.asOutParam())); 980 980 } … … 1065 1065 ComPtr<IMachine> machine; 1066 1066 /* assume it's a UUID */ 1067 rc = a->virtualBox->GetMachine( Guid(a->argv[0]), machine.asOutParam());1067 rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam()); 1068 1068 if (FAILED(rc) || !machine) 1069 1069 { … … 1076 1076 { 1077 1077 /* we have to open a session for this task */ 1078 Guidguid;1078 Bstr guid; 1079 1079 machine->COMGETTER(Id)(guid.asOutParam()); 1080 1080 CHECK_ERROR_BREAK(a->virtualBox, OpenSession(a->session, guid)); … … 1103 1103 ComPtr<IMachine> machine; 1104 1104 /* assume it's a UUID */ 1105 rc = a->virtualBox->GetMachine( Guid(a->argv[0]), machine.asOutParam());1105 rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam()); 1106 1106 if (FAILED(rc) || !machine) 1107 1107 { … … 1114 1114 { 1115 1115 /* we have to open a session for this task */ 1116 Guidguid;1116 Bstr guid; 1117 1117 machine->COMGETTER(Id)(guid.asOutParam()); 1118 1118 CHECK_ERROR_BREAK(a->virtualBox, OpenSession(a->session, guid)); … … 1173 1173 ComPtr<IMachine> machine; 1174 1174 /* assume it's a UUID */ 1175 rc = a->virtualBox->GetMachine( Guid(a->argv[0]), machine.asOutParam());1175 rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam()); 1176 1176 if (FAILED(rc) || !machine) 1177 1177 { … … 1235 1235 ComPtr<IMachine> machine; 1236 1236 /* assume it's a UUID */ 1237 rc = a->virtualBox->GetMachine( Guid(a->argv[0]), machine.asOutParam());1237 rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam()); 1238 1238 if (FAILED(rc) || !machine) 1239 1239 { … … 1331 1331 ComPtr<IMachine> machine; 1332 1332 /* assume it's a UUID */ 1333 rc = a->virtualBox->GetMachine( Guid(a->argv[1]), machine.asOutParam());1333 rc = a->virtualBox->GetMachine(Bstr(a->argv[1]), machine.asOutParam()); 1334 1334 if (FAILED(rc) || !machine) 1335 1335 { … … 1339 1339 if (!machine) 1340 1340 return 1; 1341 Guiduuid;1341 Bstr uuid; 1342 1342 machine->COMGETTER(Id)(uuid.asOutParam()); 1343 1343 … … 1505 1505 /* try to find the given machine */ 1506 1506 ComPtr <IMachine> machine; 1507 Guiduuid (a->argv[0]);1507 Bstr uuid (a->argv[0]); 1508 1508 if (!uuid.isEmpty()) 1509 1509 CHECK_ERROR(a->virtualBox, GetMachine(uuid, machine.asOutParam())); … … 1700 1700 m != cvtMachines.end(); ++ m) 1701 1701 { 1702 Guidid;1702 Bstr id; 1703 1703 CHECK_ERROR_BREAK((*m), COMGETTER(Id) (id.asOutParam())); 1704 1704 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
r19172 r19239 289 289 doClose = !fRemember; 290 290 291 Guiduuid;291 Bstr uuid; 292 292 CHECK_ERROR(hardDisk, COMGETTER(Id)(uuid.asOutParam())); 293 293 … … 297 297 } 298 298 299 RTPrintf("Disk image created. UUID: %s\n", uuid.toString().raw());299 RTPrintf("Disk image created. UUID: %s\n", Utf8Str(uuid).raw()); 300 300 } 301 301 } … … 409 409 /* first guess is that it's a UUID */ 410 410 Guid uuid(FilenameOrUuid); 411 rc = a->virtualBox->GetHardDisk(uuid , hardDisk.asOutParam());411 rc = a->virtualBox->GetHardDisk(uuid.toUtf16(), hardDisk.asOutParam()); 412 412 /* no? then it must be a filename */ 413 413 if (!hardDisk) … … 582 582 583 583 /* first guess is that it's a UUID */ 584 Guid uuid(Utf8Str(src).raw()); 585 rc = a->virtualBox->GetHardDisk(uuid, srcDisk.asOutParam()); 584 rc = a->virtualBox->GetHardDisk(src, srcDisk.asOutParam()); 586 585 /* no? then it must be a filename */ 587 586 if (FAILED (rc)) … … 640 639 } 641 640 641 Bstr uuid; 642 642 CHECK_ERROR_BREAK(dstDisk, COMGETTER(Id)(uuid.asOutParam())); 643 643 644 644 RTPrintf("Clone hard disk created in format '%ls'. UUID: %s\n", 645 format.raw(), uuid.toString().raw());645 format.raw(), Utf8Str(uuid).raw()); 646 646 } 647 647 while (0); … … 1037 1037 } 1038 1038 1039 Guidguid;1039 Bstr guid; 1040 1040 CHECK_ERROR(hardDisk, COMGETTER(Id)(guid.asOutParam())); 1041 RTPrintf("iSCSI disk created. UUID: %s\n", guid.toString().raw());1041 RTPrintf("iSCSI disk created. UUID: %s\n", Utf8Str(guid).raw()); 1042 1042 } 1043 1043 while (0); … … 1096 1096 bool unknown = false; 1097 1097 /* first guess is that it's a UUID */ 1098 Guiduuid(FilenameOrUuid);1098 Bstr uuid(FilenameOrUuid); 1099 1099 rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam()); 1100 1100 /* no? then it must be a filename */ … … 1131 1131 1132 1132 hardDisk->COMGETTER(Id)(uuid.asOutParam()); 1133 RTPrintf("UUID: %s\n", uuid.toString().raw());1133 RTPrintf("UUID: %s\n", Utf8Str(uuid).raw()); 1134 1134 1135 1135 /* check for accessibility */ … … 1190 1190 if (!unknown) 1191 1191 { 1192 com::Safe GUIDArraymachineIds;1192 com::SafeArray<BSTR> machineIds; 1193 1193 hardDisk->COMGETTER(MachineIds)(ComSafeArrayAsOutParam(machineIds)); 1194 1194 for (size_t j = 0; j < machineIds.size(); ++ j) … … 1200 1200 machine->COMGETTER(Name)(name.asOutParam()); 1201 1201 machine->COMGETTER(Id)(uuid.asOutParam()); 1202 RTPrintf("%s%lS (UUID: % RTuuid)\n",1202 RTPrintf("%s%lS (UUID: %lS)\n", 1203 1203 j == 0 ? "In use by VMs: " : " ", 1204 name.raw(), &machineIds[j]);1204 name.raw(), machineIds[j]); 1205 1205 } 1206 1206 /// @todo NEWMEDIA check usage in snapshots too … … 1356 1356 return errorSyntax(USAGE_OPENMEDIUM, "Invalid option for DVD images"); 1357 1357 ComPtr<IDVDImage> dvdImage; 1358 rc = a->virtualBox->OpenDVDImage(Bstr(Filename), Guid(), dvdImage.asOutParam());1358 rc = a->virtualBox->OpenDVDImage(Bstr(Filename), Bstr(), dvdImage.asOutParam()); 1359 1359 if (rc == VBOX_E_FILE_ERROR) 1360 1360 { … … 1366 1366 return 1; 1367 1367 } 1368 CHECK_ERROR(a->virtualBox, OpenDVDImage(Bstr(szFilenameAbs), Guid(), dvdImage.asOutParam()));1368 CHECK_ERROR(a->virtualBox, OpenDVDImage(Bstr(szFilenameAbs), Bstr(), dvdImage.asOutParam())); 1369 1369 } 1370 1370 else if (FAILED(rc)) 1371 CHECK_ERROR(a->virtualBox, OpenDVDImage(Bstr(Filename), Guid(), dvdImage.asOutParam()));1371 CHECK_ERROR(a->virtualBox, OpenDVDImage(Bstr(Filename), Bstr(), dvdImage.asOutParam())); 1372 1372 } 1373 1373 else if (cmd == CMD_FLOPPY) … … 1376 1376 return errorSyntax(USAGE_OPENMEDIUM, "Invalid option for DVD images"); 1377 1377 ComPtr<IFloppyImage> floppyImage; 1378 rc = a->virtualBox->OpenFloppyImage(Bstr(Filename), Guid(), floppyImage.asOutParam());1378 rc = a->virtualBox->OpenFloppyImage(Bstr(Filename), Bstr(), floppyImage.asOutParam()); 1379 1379 if (rc == VBOX_E_FILE_ERROR) 1380 1380 { … … 1386 1386 return 1; 1387 1387 } 1388 CHECK_ERROR(a->virtualBox, OpenFloppyImage(Bstr(szFilenameAbs), Guid(), floppyImage.asOutParam()));1388 CHECK_ERROR(a->virtualBox, OpenFloppyImage(Bstr(szFilenameAbs), Bstr(), floppyImage.asOutParam())); 1389 1389 } 1390 1390 else if (FAILED(rc)) 1391 CHECK_ERROR(a->virtualBox, OpenFloppyImage(Bstr(Filename), Guid(), floppyImage.asOutParam()));1391 CHECK_ERROR(a->virtualBox, OpenFloppyImage(Bstr(Filename), Bstr(), floppyImage.asOutParam())); 1392 1392 } 1393 1393 … … 1471 1471 1472 1472 /* first guess is that it's a UUID */ 1473 Guiduuid(FilenameOrUuid);1473 Bstr uuid(FilenameOrUuid); 1474 1474 1475 1475 if (cmd == CMD_DISK) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp
r19134 r19239 96 96 NS_DECL_ISUPPORTS 97 97 98 STDMETHOD(OnMachineStateChange)(IN_ GUIDmachineId,98 STDMETHOD(OnMachineStateChange)(IN_BSTR machineId, 99 99 MachineState_T state) 100 100 { … … 102 102 } 103 103 104 STDMETHOD(OnMachineDataChange)(IN_ GUIDmachineId)105 { 106 return S_OK; 107 } 108 109 STDMETHOD(OnExtraDataCanChange)(IN_ GUIDmachineId, IN_BSTR key,104 STDMETHOD(OnMachineDataChange)(IN_BSTR machineId) 105 { 106 return S_OK; 107 } 108 109 STDMETHOD(OnExtraDataCanChange)(IN_BSTR machineId, IN_BSTR key, 110 110 IN_BSTR value, BSTR *error, 111 111 BOOL *changeAllowed) … … 118 118 } 119 119 120 STDMETHOD(OnExtraDataChange)(IN_ GUIDmachineId, IN_BSTR key,120 STDMETHOD(OnExtraDataChange)(IN_BSTR machineId, IN_BSTR key, 121 121 IN_BSTR value) 122 122 { … … 124 124 } 125 125 126 STDMETHOD(OnMediaRegistered)(IN_ GUIDmediaId,126 STDMETHOD(OnMediaRegistered)(IN_BSTR mediaId, 127 127 DeviceType_T mediaType, BOOL registered) 128 128 { … … 133 133 } 134 134 135 STDMETHOD(OnMachineRegistered)(IN_ GUIDmachineId, BOOL registered)136 { 137 return S_OK; 138 } 139 140 STDMETHOD(OnSessionStateChange)(IN_ GUIDmachineId,135 STDMETHOD(OnMachineRegistered)(IN_BSTR machineId, BOOL registered) 136 { 137 return S_OK; 138 } 139 140 STDMETHOD(OnSessionStateChange)(IN_BSTR machineId, 141 141 SessionState_T state) 142 142 { … … 144 144 } 145 145 146 STDMETHOD(OnSnapshotTaken)(IN_ GUIDaMachineId,147 IN_ GUIDaSnapshotId)148 { 149 return S_OK; 150 } 151 152 STDMETHOD(OnSnapshotDiscarded)(IN_ GUIDaMachineId,153 IN_ GUIDaSnapshotId)154 { 155 return S_OK; 156 } 157 158 STDMETHOD(OnSnapshotChange)(IN_ GUIDaMachineId,159 IN_ GUIDaSnapshotId)160 { 161 return S_OK; 162 } 163 164 STDMETHOD(OnGuestPropertyChange)(IN_ GUIDmachineId,146 STDMETHOD(OnSnapshotTaken)(IN_BSTR aMachineId, 147 IN_BSTR aSnapshotId) 148 { 149 return S_OK; 150 } 151 152 STDMETHOD(OnSnapshotDiscarded)(IN_BSTR aMachineId, 153 IN_BSTR aSnapshotId) 154 { 155 return S_OK; 156 } 157 158 STDMETHOD(OnSnapshotChange)(IN_BSTR aMachineId, 159 IN_BSTR aSnapshotId) 160 { 161 return S_OK; 162 } 163 164 STDMETHOD(OnGuestPropertyChange)(IN_BSTR machineId, 165 165 IN_BSTR name, IN_BSTR value, 166 166 IN_BSTR flags) … … 230 230 ComPtr<IMachine> machine; 231 231 /* assume it's a UUID */ 232 rc = a->virtualBox->GetMachine( Guid(a->argv[0]), machine.asOutParam());232 rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam()); 233 233 if (FAILED(rc) || !machine) 234 234 { … … 238 238 if (machine) 239 239 { 240 Guiduuid;240 Bstr uuid; 241 241 machine->COMGETTER(Id)(uuid.asOutParam()); 242 242 … … 299 299 ComPtr<IMachine> machine; 300 300 /* assume it's a UUID */ 301 rc = a->virtualBox->GetMachine( Guid(a->argv[0]), machine.asOutParam());301 rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam()); 302 302 if (FAILED(rc) || !machine) 303 303 { … … 307 307 if (machine) 308 308 { 309 Guiduuid;309 Bstr uuid; 310 310 machine->COMGETTER(Id)(uuid.asOutParam()); 311 311 … … 363 363 ComPtr<IMachine> machine; 364 364 /* assume it's a UUID */ 365 HRESULT rc = a->virtualBox->GetMachine( Guid(a->argv[0]), machine.asOutParam());365 HRESULT rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam()); 366 366 if (FAILED(rc) || !machine) 367 367 { … … 371 371 if (machine) 372 372 { 373 Guiduuid;373 Bstr uuid; 374 374 machine->COMGETTER(Id)(uuid.asOutParam()); 375 375 … … 422 422 ComPtr<IMachine> machine; 423 423 /* assume it's a UUID */ 424 HRESULT rc = a->virtualBox->GetMachine( Guid(a->argv[0]), machine.asOutParam());424 HRESULT rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam()); 425 425 if (FAILED(rc) || !machine) 426 426 { … … 452 452 * Set up the callback and wait. 453 453 */ 454 Guiduuid;454 Bstr uuid; 455 455 machine->COMGETTER(Id)(uuid.asOutParam()); 456 456 GuestPropertyCallback *callback = new GuestPropertyCallback(pszPatterns, uuid); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp
r18843 r19239 114 114 CHECK_ERROR(host, FindHostNetworkInterfaceByName(name, hif.asOutParam())); 115 115 116 GUIDguid;117 CHECK_ERROR(hif, COMGETTER(Id)( &guid));116 Bstr guid; 117 CHECK_ERROR(hif, COMGETTER(Id)(guid.asOutParam())); 118 118 119 119 ComPtr<IProgress> progress; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageImport.cpp
r18809 r19239 767 767 ComPtr<IMachine> machine; 768 768 /* assume it's a UUID */ 769 rc = a->virtualBox->GetMachine( Guid(strMachine), machine.asOutParam());769 rc = a->virtualBox->GetMachine(Bstr(strMachine), machine.asOutParam()); 770 770 if (FAILED(rc) || !machine) 771 771 { -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r18829 r19239 52 52 /* start with the root */ 53 53 Bstr name; 54 Guiduuid;54 Bstr uuid; 55 55 rootSnapshot->COMGETTER(Name)(name.asOutParam()); 56 56 rootSnapshot->COMGETTER(Id)(uuid.asOutParam()); … … 59 59 /* print with hierarchical numbering */ 60 60 RTPrintf("SnapshotName%lS=\"%lS\"\n", prefix.raw(), name.raw()); 61 RTPrintf("SnapshotUUID%lS=\"%s\"\n", prefix.raw(), uuid.toString().raw());61 RTPrintf("SnapshotUUID%lS=\"%s\"\n", prefix.raw(), Utf8Str(uuid).raw()); 62 62 } 63 63 else 64 64 { 65 65 /* print with indentation */ 66 RTPrintf(" %lSName: %lS (UUID: %s)\n", prefix.raw(), name.raw(), uuid.toString().raw());66 RTPrintf(" %lSName: %lS (UUID: %s)\n", prefix.raw(), name.raw(), Utf8Str(uuid).raw()); 67 67 } 68 68 … … 136 136 CheckComRCReturnRC (rc); 137 137 138 Guiduuid;138 Bstr uuid; 139 139 rc = machine->COMGETTER(Id) (uuid.asOutParam()); 140 140 … … 142 142 { 143 143 if (details == VMINFO_COMPACT) 144 RTPrintf("\"<inaccessible>\" {%s}\n", uuid.toString().raw());144 RTPrintf("\"<inaccessible>\" {%s}\n", Utf8Str(uuid).raw()); 145 145 else 146 146 { … … 150 150 RTPrintf ("Name: <inaccessible!>\n"); 151 151 if (details == VMINFO_MACHINEREADABLE) 152 RTPrintf ("UUID=\"%s\"\n", uuid.toString().raw());152 RTPrintf ("UUID=\"%s\"\n", Utf8Str(uuid).raw()); 153 153 else 154 RTPrintf ("UUID: %s\n", uuid.toString().raw());154 RTPrintf ("UUID: %s\n", Utf8Str(uuid).raw()); 155 155 if (details != VMINFO_MACHINEREADABLE) 156 156 { … … 174 174 if (details == VMINFO_COMPACT) 175 175 { 176 RTPrintf("\"%lS\" {%s}\n", machineName.raw(), uuid.toString().raw());176 RTPrintf("\"%lS\" {%s}\n", machineName.raw(), Utf8Str(uuid).raw()); 177 177 return S_OK; 178 178 } … … 195 195 196 196 if (details == VMINFO_MACHINEREADABLE) 197 RTPrintf("UUID=\"%s\"\n", uuid.toString().raw());198 else 199 RTPrintf("UUID: %s\n", uuid.toString().raw());197 RTPrintf("UUID=\"%s\"\n", Utf8Str(uuid).raw()); 198 else 199 RTPrintf("UUID: %s\n", Utf8Str(uuid).raw()); 200 200 201 201 Bstr settingsFilePath; … … 398 398 Bstr imagePath; 399 399 floppyImage->COMGETTER(Location)(imagePath.asOutParam()); 400 GuidimageGuid;400 Bstr imageGuid; 401 401 floppyImage->COMGETTER(Id)(imageGuid.asOutParam()); 402 402 if (details == VMINFO_MACHINEREADABLE) 403 403 { 404 RTPrintf("FloppyImageUUID=\"%s\"\n", imageGuid.toString().raw());404 RTPrintf("FloppyImageUUID=\"%s\"\n", Utf8Str(imageGuid).raw()); 405 405 pszFloppy = Utf8StrFmt("%lS", imagePath.raw()); 406 406 } 407 407 else 408 pszFloppy = Utf8StrFmt("%lS (UUID: %s)", imagePath.raw(), imageGuid.toString().raw());408 pszFloppy = Utf8StrFmt("%lS (UUID: %s)", imagePath.raw(), Utf8Str(imageGuid).raw()); 409 409 } 410 410 break; … … 482 482 { 483 483 RTPrintf("sataport%d=\"%lS\"\n", i, filePath.raw()); 484 RTPrintf("SataPortImageUUID%d=\"%s\"\n", i, uuid.toString().raw());484 RTPrintf("SataPortImageUUID%d=\"%s\"\n", i, Utf8Str(uuid).raw()); 485 485 } 486 486 else 487 RTPrintf("SATA %d: %lS (UUID: %s)\n", i, filePath.raw(), uuid.toString().raw());487 RTPrintf("SATA %d: %lS (UUID: %s)\n", i, filePath.raw(), Utf8Str(uuid).raw()); 488 488 } 489 489 else … … 539 539 { 540 540 RTPrintf("hda=\"%lS\"\n", filePath.raw()); 541 RTPrintf("HdaImageUUID=\"%s\"\n", uuid.toString().raw());542 } 543 else 544 RTPrintf("Primary master: %lS (UUID: %s)\n", filePath.raw(), uuid.toString().raw());541 RTPrintf("HdaImageUUID=\"%s\"\n", Utf8Str(uuid).raw()); 542 } 543 else 544 RTPrintf("Primary master: %lS (UUID: %s)\n", filePath.raw(), Utf8Str(uuid).raw()); 545 545 } 546 546 else … … 557 557 { 558 558 RTPrintf("hdb=\"%lS\"\n", filePath.raw()); 559 RTPrintf("HdbImageUUID=\"%s\"\n", uuid.toString().raw());560 } 561 else 562 RTPrintf("Primary slave: %lS (UUID: %s)\n", filePath.raw(), uuid.toString().raw());559 RTPrintf("HdbImageUUID=\"%s\"\n", Utf8Str(uuid).raw()); 560 } 561 else 562 RTPrintf("Primary slave: %lS (UUID: %s)\n", filePath.raw(), Utf8Str(uuid).raw()); 563 563 } 564 564 else … … 575 575 { 576 576 RTPrintf("hdd=\"%lS\"\n", filePath.raw()); 577 RTPrintf("HddImageUUID=\"%s\"\n", uuid.toString().raw());578 } 579 else 580 RTPrintf("Secondary slave: %lS (UUID: %s)\n", filePath.raw(), uuid.toString().raw());577 RTPrintf("HddImageUUID=\"%s\"\n", Utf8Str(uuid).raw()); 578 } 579 else 580 RTPrintf("Secondary slave: %lS (UUID: %s)\n", filePath.raw(), Utf8Str(uuid).raw()); 581 581 } 582 582 else … … 600 600 { 601 601 RTPrintf("dvd=\"%lS\"\n", filePath.raw()); 602 RTPrintf("DvdImageUUID=\"%s\"\n", uuid.toString().raw());602 RTPrintf("DvdImageUUID=\"%s\"\n", Utf8Str(uuid).raw()); 603 603 } 604 604 else 605 RTPrintf("DVD: %lS (UUID: %s)\n", filePath.raw(), uuid.toString().raw());605 RTPrintf("DVD: %lS (UUID: %s)\n", filePath.raw(), Utf8Str(uuid).raw()); 606 606 } 607 607 } … … 1225 1225 1226 1226 /* Query info. */ 1227 Guidid;1227 Bstr id; 1228 1228 CHECK_ERROR_RET (dev, COMGETTER(Id)(id.asOutParam()), rc); 1229 1229 USHORT usVendorId; … … 1239 1239 "USBRemoteProductId%zu=\"%#06x\"\n" 1240 1240 "USBRemoteRevision%zu=\"%#04x%02x\"\n", 1241 index + 1, id.toString().raw(),1241 index + 1, Utf8Str(id).raw(), 1242 1242 index + 1, usVendorId, 1243 1243 index + 1, usProductId, … … 1248 1248 "ProductId: 0x%04x (%04X)\n" 1249 1249 "Revision: %u.%u (%02u%02u)\n", 1250 id.toString().raw(),1250 Utf8Str(id).raw(), 1251 1251 usVendorId, usVendorId, usProductId, usProductId, 1252 1252 bcdRevision >> 8, bcdRevision & 0xff, … … 1314 1314 1315 1315 /* Query info. */ 1316 Guidid;1316 Bstr id; 1317 1317 CHECK_ERROR_RET (dev, COMGETTER(Id)(id.asOutParam()), rc); 1318 1318 USHORT usVendorId; … … 1328 1328 "USBAttachedProductId%zu=\"%#06x\"\n" 1329 1329 "USBAttachedRevision%zu=\"%#04x%02x\"\n", 1330 index + 1, id.toString().raw(),1330 index + 1, Utf8Str(id).raw(), 1331 1331 index + 1, usVendorId, 1332 1332 index + 1, usProductId, … … 1337 1337 "ProductId: 0x%04x (%04X)\n" 1338 1338 "Revision: %u.%u (%02u%02u)\n", 1339 id.toString().raw(),1339 Utf8Str(id).raw(), 1340 1340 usVendorId, usVendorId, usProductId, usProductId, 1341 1341 bcdRevision >> 8, bcdRevision & 0xff, … … 1826 1826 */ 1827 1827 ComPtr<ISnapshot> snapshot; 1828 rc = machine->GetSnapshot( Guid(), snapshot.asOutParam());1828 rc = machine->GetSnapshot(Bstr(), snapshot.asOutParam()); 1829 1829 if (SUCCEEDED(rc) && snapshot) 1830 1830 { … … 1912 1912 /* try to find the given machine */ 1913 1913 ComPtr <IMachine> machine; 1914 Guiduuid (VMNameOrUuid);1914 Bstr uuid (VMNameOrUuid); 1915 1915 if (!uuid.isEmpty()) 1916 1916 { -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r19216 r19239 336 336 networkInterface->COMGETTER(Name)(interfaceName.asOutParam()); 337 337 RTPrintf("Name: %lS\n", interfaceName.raw()); 338 GuidinterfaceGuid;338 Bstr interfaceGuid; 339 339 networkInterface->COMGETTER(Id)(interfaceGuid.asOutParam()); 340 RTPrintf("GUID: %lS\n", Bstr(interfaceGuid.toString()).raw());340 RTPrintf("GUID: %lS\n", interfaceGuid); 341 341 BOOL bDhcpEnabled; 342 342 networkInterface->COMGETTER(DhcpEnabled)(&bDhcpEnabled); … … 511 511 { 512 512 ComPtr<IHardDisk> hdd = hdds[i]; 513 Guiduuid;513 Bstr uuid; 514 514 hdd->COMGETTER(Id)(uuid.asOutParam()); 515 RTPrintf("UUID: %s\n", uuid.toString().raw());515 RTPrintf("UUID: %s\n", Utf8Str(uuid).raw()); 516 516 Bstr format; 517 517 hdd->COMGETTER(Format)(format.asOutParam()); … … 525 525 hdd->COMGETTER(State)(&enmState); 526 526 RTPrintf("Accessible: %s\n", enmState != MediaState_Inaccessible ? "yes" : "no"); 527 com::Safe GUIDArraymachineIds;527 com::SafeArray<BSTR> machineIds; 528 528 hdd->COMGETTER(MachineIds)(ComSafeArrayAsOutParam(machineIds)); 529 529 for (size_t j = 0; j < machineIds.size(); ++ j) … … 535 535 machine->COMGETTER(Name)(name.asOutParam()); 536 536 machine->COMGETTER(Id)(uuid.asOutParam()); 537 RTPrintf("%s%lS (UUID: % RTuuid)\n",537 RTPrintf("%s%lS (UUID: %lS)\n", 538 538 j == 0 ? "Usage: " : " ", 539 name.raw(), &machineIds[j]);539 name.raw(), machineIds[j]); 540 540 } 541 541 /// @todo NEWMEDIA check usage in snapshots too … … 554 554 { 555 555 ComPtr<IDVDImage> dvdImage = dvds[i]; 556 Guiduuid;556 Bstr uuid; 557 557 dvdImage->COMGETTER(Id)(uuid.asOutParam()); 558 RTPrintf("UUID: %s\n", uuid.toString().raw());558 RTPrintf("UUID: %s\n", Utf8Str(uuid).raw()); 559 559 Bstr filePath; 560 560 dvdImage->COMGETTER(Location)(filePath.asOutParam()); … … 576 576 { 577 577 ComPtr<IFloppyImage> floppyImage = floppies[i]; 578 Guiduuid;578 Bstr uuid; 579 579 floppyImage->COMGETTER(Id)(uuid.asOutParam()); 580 RTPrintf("UUID: %s\n", uuid.toString().raw());580 RTPrintf("UUID: %s\n", Utf8Str(uuid).raw()); 581 581 Bstr filePath; 582 582 floppyImage->COMGETTER(Location)(filePath.asOutParam()); … … 612 612 613 613 /* Query info. */ 614 Guidid;614 Bstr id; 615 615 CHECK_ERROR_RET (dev, COMGETTER(Id)(id.asOutParam()), 1); 616 616 USHORT usVendorId; … … 625 625 "ProductId: 0x%04x (%04X)\n" 626 626 "Revision: %u.%u (%02u%02u)\n", 627 id.toString().raw(),627 Utf8Str(id).raw(), 628 628 usVendorId, usVendorId, usProductId, usProductId, 629 629 bcdRevision >> 8, bcdRevision & 0xff, -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r19023 r19239 839 839 /* try to find the given machine */ 840 840 ComPtr <IMachine> machine; 841 Guiduuid (a->argv[0]);842 if (! uuid.isEmpty())841 Bstr uuid (a->argv[0]); 842 if (!Guid(uuid).isEmpty()) 843 843 { 844 844 CHECK_ERROR (a->virtualBox, GetMachine (uuid, machine.asOutParam())); … … 1106 1106 { 1107 1107 /* first guess is that it's a UUID */ 1108 Guiduuid(hdds[0]);1108 Bstr uuid(hdds[0]); 1109 1109 ComPtr<IHardDisk> hardDisk; 1110 1110 rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam()); … … 1139 1139 { 1140 1140 /* first guess is that it's a UUID */ 1141 Guiduuid(hdds[1]);1141 Bstr uuid(hdds[1]); 1142 1142 ComPtr<IHardDisk> hardDisk; 1143 1143 rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam()); … … 1172 1172 { 1173 1173 /* first guess is that it's a UUID */ 1174 Guiduuid(hdds[2]);1174 Bstr uuid(hdds[2]); 1175 1175 ComPtr<IHardDisk> hardDisk; 1176 1176 rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam()); … … 1240 1240 { 1241 1241 /* first assume it's a UUID */ 1242 Guiduuid(dvd);1242 Bstr uuid(dvd); 1243 1243 ComPtr<IDVDImage> dvdImage; 1244 1244 rc = a->virtualBox->GetDVDImage(uuid, dvdImage.asOutParam()); … … 1250 1250 if (!dvdImage) 1251 1251 { 1252 GuidemptyUUID;1252 Bstr emptyUUID; 1253 1253 CHECK_ERROR(a->virtualBox, OpenDVDImage(Bstr(dvd), emptyUUID, dvdImage.asOutParam())); 1254 1254 } … … 1338 1338 { 1339 1339 /* first assume it's a UUID */ 1340 Guiduuid(floppy);1340 Bstr uuid(floppy); 1341 1341 ComPtr<IFloppyImage> floppyImage; 1342 1342 rc = a->virtualBox->GetFloppyImage(uuid, floppyImage.asOutParam()); … … 1348 1348 if (!floppyImage) 1349 1349 { 1350 GuidemptyUUID;1350 Bstr emptyUUID; 1351 1351 CHECK_ERROR(a->virtualBox, OpenFloppyImage(Bstr(floppy), emptyUUID, floppyImage.asOutParam())); 1352 1352 } … … 1889 1889 { 1890 1890 /* first guess is that it's a UUID */ 1891 Guiduuid(hdds[i]);1891 Bstr uuid(hdds[i]); 1892 1892 ComPtr<IHardDisk> hardDisk; 1893 1893 rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam()); … … 1978 1978 { 1979 1979 /* first guess is that it's a UUID */ 1980 Guiduuid(hdds[i]);1980 Bstr uuid(hdds[i]); 1981 1981 ComPtr<IHardDisk> hardDisk; 1982 1982 rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam()); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageSnapshot.cpp
r18777 r19239 47 47 ComPtr<IMachine> machine; 48 48 /* assume it's a UUID */ 49 rc = a->virtualBox->GetMachine( Guid(a->argv[0]), machine.asOutParam());49 rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam()); 50 50 if (FAILED(rc) || !machine) 51 51 { … … 55 55 if (!machine) 56 56 return 1; 57 Guidguid;57 Bstr guid; 58 58 machine->COMGETTER(Id)(guid.asOutParam()); 59 59 … … 117 117 118 118 /* assume it's a UUID */ 119 Guidguid(a->argv[2]);119 Bstr guid(a->argv[2]); 120 120 if (!guid.isEmpty()) 121 121 { … … 203 203 { 204 204 /* assume it's a UUID */ 205 Guidguid(a->argv[2]);205 Bstr guid(a->argv[2]); 206 206 if (!guid.isEmpty()) 207 207 { … … 266 266 267 267 /* assume it's a UUID */ 268 Guidguid(a->argv[2]);268 Bstr guid(a->argv[2]); 269 269 if (!guid.isEmpty()) 270 270 { -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp
r18779 r19239 234 234 { 235 235 /* assume it's a UUID of a machine */ 236 rc = a->virtualBox->GetMachine( Guid(a->argv[i]), cmd.mMachine.asOutParam());236 rc = a->virtualBox->GetMachine(Bstr(a->argv[i]), cmd.mMachine.asOutParam()); 237 237 if (FAILED(rc) || !cmd.mMachine) 238 238 { … … 388 388 { 389 389 /* assume it's a UUID of a machine */ 390 rc = a->virtualBox->GetMachine( Guid(a->argv[i]), cmd.mMachine.asOutParam());390 rc = a->virtualBox->GetMachine(Bstr(a->argv[i]), cmd.mMachine.asOutParam()); 391 391 if (FAILED(rc) || !cmd.mMachine) 392 392 { … … 416 416 else 417 417 { 418 Guiduuid;418 Bstr uuid; 419 419 cmd.mMachine->COMGETTER(Id)(uuid.asOutParam()); 420 420 /* open a session for the VM */ -
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r19134 r19239 286 286 NS_DECL_ISUPPORTS 287 287 288 STDMETHOD(OnMachineStateChange)(IN_ GUIDmachineId, MachineState_T state)288 STDMETHOD(OnMachineStateChange)(IN_BSTR machineId, MachineState_T state) 289 289 { 290 290 return S_OK; 291 291 } 292 292 293 STDMETHOD(OnMachineDataChange)(IN_ GUIDmachineId)293 STDMETHOD(OnMachineDataChange)(IN_BSTR machineId) 294 294 { 295 295 return S_OK; 296 296 } 297 297 298 STDMETHOD(OnExtraDataCanChange)(IN_ GUIDmachineId, IN_BSTR key, IN_BSTR value,298 STDMETHOD(OnExtraDataCanChange)(IN_BSTR machineId, IN_BSTR key, IN_BSTR value, 299 299 BSTR *error, BOOL *changeAllowed) 300 300 { … … 306 306 } 307 307 308 STDMETHOD(OnExtraDataChange)(IN_ GUIDmachineId, IN_BSTR key, IN_BSTR value)308 STDMETHOD(OnExtraDataChange)(IN_BSTR machineId, IN_BSTR key, IN_BSTR value) 309 309 { 310 310 #ifdef VBOX_SECURELABEL … … 315 315 * check if we're interested in the message 316 316 */ 317 Guid ourGuid; 318 Guid messageGuid = machineId; 317 Bstr ourGuid; 319 318 gMachine->COMGETTER(Id)(ourGuid.asOutParam()); 320 if (ourGuid == m essageGuid)319 if (ourGuid == machineId) 321 320 { 322 321 Bstr keyString = key; … … 337 336 } 338 337 339 STDMETHOD(OnMediaRegistered) (IN_ GUIDmediaId, DeviceType_T mediaType,338 STDMETHOD(OnMediaRegistered) (IN_BSTR mediaId, DeviceType_T mediaType, 340 339 BOOL registered) 341 340 { … … 346 345 } 347 346 348 STDMETHOD(OnMachineRegistered)(IN_ GUIDmachineId, BOOL registered)347 STDMETHOD(OnMachineRegistered)(IN_BSTR machineId, BOOL registered) 349 348 { 350 349 return S_OK; 351 350 } 352 351 353 STDMETHOD(OnSessionStateChange)(IN_ GUIDmachineId, SessionState_T state)352 STDMETHOD(OnSessionStateChange)(IN_BSTR machineId, SessionState_T state) 354 353 { 355 354 return S_OK; 356 355 } 357 356 358 STDMETHOD(OnSnapshotTaken) (IN_ GUID aMachineId, IN_GUIDaSnapshotId)357 STDMETHOD(OnSnapshotTaken) (IN_BSTR aMachineId, IN_BSTR aSnapshotId) 359 358 { 360 359 return S_OK; 361 360 } 362 361 363 STDMETHOD(OnSnapshotDiscarded) (IN_ GUID aMachineId, IN_GUIDaSnapshotId)362 STDMETHOD(OnSnapshotDiscarded) (IN_BSTR aMachineId, IN_BSTR aSnapshotId) 364 363 { 365 364 return S_OK; 366 365 } 367 366 368 STDMETHOD(OnSnapshotChange) (IN_ GUID aMachineId, IN_GUIDaSnapshotId)367 STDMETHOD(OnSnapshotChange) (IN_BSTR aMachineId, IN_BSTR aSnapshotId) 369 368 { 370 369 return S_OK; 371 370 } 372 371 373 STDMETHOD(OnGuestPropertyChange)(IN_ GUIDmachineId, IN_BSTR key, IN_BSTR value, IN_BSTR flags)372 STDMETHOD(OnGuestPropertyChange)(IN_BSTR machineId, IN_BSTR key, IN_BSTR value, IN_BSTR flags) 374 373 { 375 374 return S_OK; … … 916 915 m != cvtMachines.end(); ++ m) 917 916 { 918 Guidid;917 Bstr id; 919 918 CHECK_ERROR_BREAK((*m), COMGETTER(Id) (id.asOutParam())); 920 919 … … 1664 1663 if ((rc == S_OK) && aMachine) 1665 1664 { 1666 aMachine->COMGETTER(Id)(uuid.asOutParam()); 1665 Bstr id; 1666 aMachine->COMGETTER(Id)(id.asOutParam()); 1667 uuid = Guid(id); 1667 1668 } 1668 1669 else … … 1682 1683 AssertReleaseRC(rc); 1683 1684 1684 rc = virtualBox->OpenSession(session, uuid );1685 rc = virtualBox->OpenSession(session, uuid.toUtf16()); 1685 1686 if (FAILED(rc)) 1686 1687 { … … 1743 1744 * Go and attach it! 1744 1745 */ 1745 Guiduuid;1746 Bstr uuid; 1746 1747 hardDisk->COMGETTER(Id)(uuid.asOutParam()); 1747 1748 gMachine->DetachHardDisk(Bstr("IDE"), 0, 0); … … 1802 1803 /* try to add to the list */ 1803 1804 RTPrintf ("Adding floppy image '%S'...\n", fdaFile); 1804 Guid uuid; 1805 CHECK_ERROR_BREAK (virtualBox, OpenFloppyImage (medium, uuid, 1805 CHECK_ERROR_BREAK (virtualBox, OpenFloppyImage (medium, Bstr(), 1806 1806 image.asOutParam())); 1807 1807 } 1808 1808 1809 1809 /* attach */ 1810 Guiduuid;1810 Bstr uuid; 1811 1811 image->COMGETTER(Id)(uuid.asOutParam()); 1812 1812 CHECK_ERROR_BREAK (drive, MountImage (uuid)); … … 1863 1863 /* try to add to the list */ 1864 1864 RTPrintf ("Adding ISO image '%S'...\n", cdromFile); 1865 Guid uuid; 1866 CHECK_ERROR_BREAK (virtualBox, OpenDVDImage (medium, uuid, 1865 CHECK_ERROR_BREAK (virtualBox, OpenDVDImage (medium, Bstr(), 1867 1866 image.asOutParam())); 1868 1867 } 1869 1868 1870 1869 /* attach */ 1871 Guiduuid;1870 Bstr uuid; 1872 1871 image->COMGETTER(Id)(uuid.asOutParam()); 1873 1872 CHECK_ERROR_BREAK (drive, MountImage (uuid)); -
trunk/src/VBox/Frontends/VBoxShell/mscom/vboxshell.py
r18705 r19239 39 39 sys.exit(1) 40 40 41 ctx = {'mgr':mgr, 'vb':vbox, 'ifaces':win32com.client.constants, 42 'remote':False, 'perf':PerfCollector(vbox) } 41 # fake constants, while get resolved constants issues for real 42 # win32com.client.constants doesn't work for some reasons 43 class DummyInterfaces: pass 44 class SessionState:pass 45 46 DummyInterfaces.SessionState=SessionState() 47 DummyInterfaces.SessionState.Open = 2 48 49 ctx = {'mgr':mgr, 'vb':vbox, 'ifaces':DummyInterfaces(), 50 #'ifaces':win32com.client.constants, 51 'remote':False, 'type':'mscom' } 43 52 44 53 interpret(ctx) -
trunk/src/VBox/Frontends/VBoxShell/shellcommon.py
r18693 r19239 177 177 # we ignore exceptions to allow starting VM even if 178 178 # perf collector cannot be started 179 try: 179 if perf: 180 try: 180 181 perf.setup(['*'], [mach], 10, 15) 181 except:182 except Exception,e: 182 183 print e 183 184 if g_verbose: … … 192 193 193 194 def getMachines(ctx): 194 return ctx['vb'].getMachines() 195 # XPCOM brigde has trouble with array attributes 196 if ctx['type'] == 'xpcom': 197 return ctx['vb'].getMachines() 198 else: 199 return ctx['vb'].machines 195 200 196 201 def asState(var): … … 201 206 202 207 def guestStats(ctx,mach): 208 if not ctx['perf']: 209 return 203 210 for metric in ctx['perf'].query(["*"], [mach]): 204 211 print metric['name'], metric['values_as_string'] … … 427 434 print "Processor #%d speed: %dMHz" %(i,host.getProcessorSpeed(i)) 428 435 429 for metric in ctx['perf'].query(["*"], [host]): 436 if ctx['perf']: 437 for metric in ctx['perf'].query(["*"], [host]): 430 438 print metric['name'], metric['values_as_string'] 431 439 … … 488 496 print "Running VirtualBox version %s" %(vbox.version) 489 497 490 ctx['perf'] = PerfCollector(vbox) 498 # MSCOM doesn't work with collector yet 499 if ctx['type'] != 'mscom': 500 ctx['perf'] = PerfCollector(vbox) 501 else: 502 ctx['perf'] = None 491 503 492 504 autoCompletion(commands, ctx) … … 494 506 # to allow to print actual host information, we collect info for 495 507 # last 150 secs maximum, (sample every 10 secs and keep up to 15 samples) 496 try: 508 if ctx['perf']: 509 try: 497 510 ctx['perf'].setup(['*'], [vbox.host], 10, 15) 498 except:511 except: 499 512 pass 500 513 … … 516 529 try: 517 530 # There is no need to disable metric collection. This is just an example. 518 ctx['perf'].disable(['*'], [vbox.host]) 531 if ct['perf']: 532 ctx['perf'].disable(['*'], [vbox.host]) 519 533 except: 520 534 pass -
trunk/src/VBox/Frontends/VBoxShell/ws/vboxshell.py
r18693 r19239 32 32 33 33 ctx = {'mgr':mgr, 'vb':vbox, 'ifaces': g_reflectionInfo, 'remote': True, 34 ' perf':PerfCollector(vbox)}34 'type':'ws'} 35 35 36 36 interpret(ctx) -
trunk/src/VBox/Frontends/VBoxShell/xpcom/vboxshell.py
r18705 r19239 43 43 44 44 ctx = {'mgr':mgr, 'vb':vbox, 'ifaces':xpcom.components.interfaces, 45 'remote':False, ' perf':PerfCollector(vbox)}45 'remote':False, 'type':'xpcom' } 46 46 47 47 interpret(ctx) -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h
r19203 r19239 25 25 26 26 #include "COMDefs.h" 27 #include "VBox/com/Guid.h" 27 28 28 29 #include "VBoxGlobalSettings.h" … … 51 52 { 52 53 public: 53 VBoxMachineStateChangeEvent (const Q Uuid&aId, KMachineState aState)54 VBoxMachineStateChangeEvent (const QString &aId, KMachineState aState) 54 55 : QEvent ((QEvent::Type) VBoxDefs::MachineStateChangeEventType) 55 56 , id (aId), state (aState) 56 57 {} 57 58 58 const Q Uuidid;59 const QString id; 59 60 const KMachineState state; 60 61 }; … … 63 64 { 64 65 public: 65 VBoxMachineDataChangeEvent (const Q Uuid&aId)66 VBoxMachineDataChangeEvent (const QString &aId) 66 67 : QEvent ((QEvent::Type) VBoxDefs::MachineDataChangeEventType) 67 68 , id (aId) 68 69 {} 69 70 70 const Q Uuidid;71 const QString id; 71 72 }; 72 73 … … 74 75 { 75 76 public: 76 VBoxMachineRegisteredEvent (const Q Uuid&aId, bool aRegistered)77 VBoxMachineRegisteredEvent (const QString &aId, bool aRegistered) 77 78 : QEvent ((QEvent::Type) VBoxDefs::MachineRegisteredEventType) 78 79 , id (aId), registered (aRegistered) 79 80 {} 80 81 81 const Q Uuidid;82 const QString id; 82 83 const bool registered; 83 84 }; … … 86 87 { 87 88 public: 88 VBoxSessionStateChangeEvent (const Q Uuid&aId, KSessionState aState)89 VBoxSessionStateChangeEvent (const QString &aId, KSessionState aState) 89 90 : QEvent ((QEvent::Type) VBoxDefs::SessionStateChangeEventType) 90 91 , id (aId), state (aState) 91 92 {} 92 93 93 const Q Uuidid;94 const QString id; 94 95 const KSessionState state; 95 96 }; … … 101 102 enum What { Taken, Discarded, Changed }; 102 103 103 VBoxSnapshotEvent (const Q Uuid &aMachineId, const QUuid&aSnapshotId,104 VBoxSnapshotEvent (const QString &aMachineId, const QString &aSnapshotId, 104 105 What aWhat) 105 106 : QEvent ((QEvent::Type) VBoxDefs::SnapshotEventType) … … 110 111 const What what; 111 112 112 const Q UuidmachineId;113 const Q UuidsnapshotId;113 const QString machineId; 114 const QString snapshotId; 114 115 }; 115 116 … … 285 286 bool trayIconInstall(); 286 287 #endif 287 Q UuidmanagedVMUuid() const { return vmUuid; }288 QString managedVMUuid() const { return vmUuid; } 288 289 289 290 VBoxDefs::RenderMode vmRenderMode() const { return vm_render_mode; } … … 609 610 { checkForAutoConvertedSettings (true); } 610 611 611 CSession openSession (const Q Uuid&aId, bool aExisting = false);612 CSession openSession (const QString &aId, bool aExisting = false); 612 613 613 614 /** Shortcut to openSession (aId, true). */ 614 CSession openExistingSession (const Q Uuid&aId) { return openSession (aId, true); }615 616 bool startMachine (const Q Uuid&id);615 CSession openExistingSession (const QString &aId) { return openSession (aId, true); } 616 617 bool startMachine (const QString &id); 617 618 618 619 void startEnumeratingMedia(); … … 634 635 void addMedium (const VBoxMedium &); 635 636 void updateMedium (const VBoxMedium &); 636 void removeMedium (VBoxDefs::MediaType, const Q Uuid&);637 void removeMedium (VBoxDefs::MediaType, const QString &); 637 638 638 639 bool findMedium (const CMedium &, VBoxMedium &) const; … … 795 796 796 797 /** Emitted when the media is removed using #removeMedia(). */ 797 void mediumRemoved (VBoxDefs::MediaType, const Q Uuid&);798 void mediumRemoved (VBoxDefs::MediaType, const QString &); 798 799 799 800 /* signals emitted when the VirtualBox callback is called by the server … … 852 853 VBoxUpdateDlg *mUpdDlg; 853 854 854 Q UuidvmUuid;855 QString vmUuid; 855 856 856 857 #ifdef VBOX_GUI_WITH_SYSTRAY -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxMediaComboBox.h
r13580 r19239 35 35 public: 36 36 37 typedef QMap <Q Uuid, QUuid> BaseToDiffMap;37 typedef QMap <QString, QString> BaseToDiffMap; 38 38 39 39 VBoxMediaComboBox (QWidget *aParent); … … 42 42 void repopulate(); 43 43 44 Q Uuidid (int = -1) const;44 QString id (int = -1) const; 45 45 QString location (int = -1) const; 46 46 47 void setCurrentItem (const Q Uuid&aItemId);47 void setCurrentItem (const QString &aItemId); 48 48 void setType (VBoxDefs::MediaType aMediaType); 49 void setMachineId (const Q Uuid &aMachineId = QUuid());49 void setMachineId (const QString &aMachineId = QString::null); 50 50 51 51 void setShowDiffs (bool aShowDiffs); … … 59 59 void mediumAdded (const VBoxMedium &); 60 60 void mediumUpdated (const VBoxMedium &); 61 void mediumRemoved (VBoxDefs::MediaType, const Q Uuid&);61 void mediumRemoved (VBoxDefs::MediaType, const QString &); 62 62 63 63 void processActivated (int aIndex); … … 75 75 void replaceItem (int, const VBoxMedium &); 76 76 77 bool findMediaIndex (const Q Uuid&aId, int &aIndex);77 bool findMediaIndex (const QString &aId, int &aIndex); 78 78 79 79 VBoxDefs::MediaType mType; … … 83 83 { 84 84 Medium() {} 85 Medium (const Q Uuid&aId, const QString &aLocation,85 Medium (const QString &aId, const QString &aLocation, 86 86 const QString aToolTip) 87 87 : id (aId), location (aLocation), toolTip (aToolTip) {} 88 88 89 Q Uuidid;89 QString id; 90 90 QString location; 91 91 QString toolTip; … … 95 95 Media mMedia; 96 96 97 Q UuidmLastId;97 QString mLastId; 98 98 99 99 bool mShowDiffs : 1; 100 100 101 Q UuidmMachineId;101 QString mMachineId; 102 102 }; 103 103 -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxMediaManagerDlg.h
r13580 r19239 52 52 bool aRefresh = true, 53 53 const CMachine &aSessionMachine = CMachine(), 54 const Q Uuid &aSelectId = QUuid(),54 const QString &aSelectId = QString::null, 55 55 bool aShowDiffs = true); 56 56 57 57 static void showModeless (QWidget *aParent = NULL, bool aRefresh = true); 58 58 59 Q UuidselectedId() const;59 QString selectedId() const; 60 60 QString selectedLocation() const; 61 61 … … 77 77 void mediumAdded (const VBoxMedium &aMedium); 78 78 void mediumUpdated (const VBoxMedium &aMedium); 79 void mediumRemoved (VBoxDefs::MediaType aType, const Q Uuid&aId);79 void mediumRemoved (VBoxDefs::MediaType aType, const QString &aId); 80 80 81 81 void mediumEnumStarted(); … … 88 88 void doReleaseMedium(); 89 89 90 bool releaseMediumFrom (const VBoxMedium &aMedium, const Q Uuid&aMachineId);90 bool releaseMediumFrom (const VBoxMedium &aMedium, const QString &aMachineId); 91 91 92 92 void processCurrentChanged (int index = -1); … … 117 117 void updateTabIcons (MediaItem *aItem, ItemAction aAction); 118 118 119 MediaItem* searchItem (QTreeWidget *aTree, const Q Uuid&aId) const;119 MediaItem* searchItem (QTreeWidget *aTree, const QString &aId) const; 120 120 121 121 bool checkMediumFor (MediaItem *aItem, Action aAction); … … 162 162 /* Machine */ 163 163 CMachine mSessionMachine; 164 Q UuidmSessionMachineId;164 QString mSessionMachineId; 165 165 bool mHardDisksInaccessible; 166 166 bool mDVDImagesInaccessible; 167 167 bool mFloppyImagesInaccessible; 168 Q UuidmHDSelectedId;169 Q UuidmDVDSelectedId;170 Q UuidmFloppySelectedId;168 QString mHDSelectedId; 169 QString mDVDSelectedId; 170 QString mFloppySelectedId; 171 171 }; 172 172 -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxMedium.h
r17385 r19239 135 135 const CFloppyImage &floppyImage() const { return mFloppyImage; } 136 136 137 Q Uuidid() const { return mId; }137 QString id() const { return mId; } 138 138 139 139 QString location (bool aNoDiffs = false) const … … 179 179 * current state. 180 180 */ 181 bool isAttachedInCurStateTo (const Q Uuid&aMachineId) const181 bool isAttachedInCurStateTo (const QString &aMachineId) const 182 182 { return mCurStateMachineIds.indexOf (aMachineId) >= 0; } 183 183 … … 186 186 * to in their current state (i.e. excluding snapshots). 187 187 */ 188 const QList <Q Uuid> &curStateMachineIds() const188 const QList <QString> &curStateMachineIds() const 189 189 { return mCurStateMachineIds; } 190 190 … … 235 235 CFloppyImage mFloppyImage; 236 236 237 Q UuidmId;237 QString mId; 238 238 QString mLocation; 239 239 QString mName; … … 250 250 bool mIsUsedInSnapshots : 1; 251 251 252 QList <Q Uuid> mCurStateMachineIds;252 QList <QString> mCurStateMachineIds; 253 253 254 254 VBoxMedium *mParent; -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxSelectorWnd.h
r17730 r19239 77 77 void vmSettings (const QString &aCategory = QString::null, 78 78 const QString &aControl = QString::null, 79 const Q Uuid & = QUuid_null);80 void vmDelete (const Q Uuid & = QUuid_null);81 void vmStart (const Q Uuid & = QUuid_null);82 void vmDiscard (const Q Uuid & = QUuid_null);83 void vmPause (bool, const Q Uuid & = QUuid_null);84 void vmRefresh (const Q Uuid & = QUuid_null);85 void vmShowLogs (const Q Uuid & = QUuid_null);79 const QString & = QString::null); 80 void vmDelete (const QString & = QString::null); 81 void vmStart (const QString & = QString::null); 82 void vmDiscard (const QString & = QString::null); 83 void vmPause (bool, const QString & = QString::null); 84 void vmRefresh (const QString & = QString::null); 85 void vmShowLogs (const QString & = QString::null); 86 86 87 87 void refreshVMList(); 88 void refreshVMItem (const Q Uuid&aID, bool aDetails,88 void refreshVMItem (const QString &aID, bool aDetails, 89 89 bool aSnapshots, 90 90 bool aDescription); … … 189 189 #ifdef VBOX_GUI_WITH_SYSTRAY 190 190 191 Q_DECLARE_METATYPE(Q Uuid);191 Q_DECLARE_METATYPE(QString); 192 192 193 193 class VBoxTrayIcon : public QSystemTrayIcon -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxSnapshotsWgt.h
r10852 r19239 73 73 74 74 void refreshAll (bool aKeepSelected = true); 75 SnapshotWgtItem* findItem (const Q Uuid&aSnapshotId);75 SnapshotWgtItem* findItem (const QString &aSnapshotId); 76 76 SnapshotWgtItem* curStateItem(); 77 77 void populateSnapshots (const CSnapshot &aSnapshot, QTreeWidgetItem *aItem); 78 78 79 79 CMachine mMachine; 80 Q UuidmMachineId;80 QString mMachineId; 81 81 KSessionState mSessionState; 82 82 SnapshotWgtItem *mCurSnapshotItem; -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMListView.h
r17412 r19239 44 44 QString name() const { return mName; } 45 45 QIcon osIcon() const { return mAccessible ? vboxGlobal().vmGuestOSTypeIcon (mOSTypeId) : QPixmap (":/os_other.png"); } 46 Q Uuidid() const { return mId; }46 QString id() const { return mId; } 47 47 48 48 QString sessionStateName() const; … … 70 70 71 71 /* Cached machine data (to minimize server requests) */ 72 Q UuidmId;72 QString mId; 73 73 QString mSettingsFile; 74 74 … … 113 113 void clear(); 114 114 115 VBoxVMItem *itemById (const Q Uuid&aId) const;115 VBoxVMItem *itemById (const QString &aId) const; 116 116 VBoxVMItem *itemByRow (int aRow) const; 117 QModelIndex indexById (const Q Uuid&aId) const;118 119 int rowById (const Q Uuid&aId) const;;117 QModelIndex indexById (const QString &aId) const; 118 119 int rowById (const QString &aId) const;; 120 120 121 121 void sort (Qt::SortOrder aOrder = Qt::AscendingOrder) { sort (0, aOrder); } … … 148 148 149 149 void selectItemByRow (int row); 150 void selectItemById (const Q Uuid&aID);150 void selectItemById (const QString &aID); 151 151 void ensureSomeRowSelected (int aRowHint); 152 152 VBoxVMItem * selectedItem() const; -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsCD.h
r13580 r19239 65 65 QIWidgetValidator *mValidator; 66 66 QVector<CHostDVDDrive> mHostCDs; 67 Q UuidmUuidIsoCD;67 QString mUuidIsoCD; 68 68 QRadioButton *mLastSelected; 69 69 }; -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsFD.h
r13580 r19239 65 65 QIWidgetValidator *mValidator; 66 66 QVector<CHostFloppyDrive> mHostFDs; 67 Q UuidmUuidIsoFD;67 QString mUuidIsoFD; 68 68 QRadioButton *mLastSelected; 69 69 }; -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsHD.h
r17884 r19239 79 79 public: 80 80 DiskValue() 81 : id (Q Uuid())81 : id (QString::null) 82 82 , name (QString::null), tip (QString::null), pix (QPixmap()) {} 83 DiskValue (const Q Uuid&aId);83 DiskValue (const QString &aId); 84 84 DiskValue (const DiskValue &aOther) 85 85 : id (aOther.id) … … 105 105 } 106 106 107 Q Uuidid;107 QString id; 108 108 QString name; 109 109 QString tip; … … 382 382 383 383 /* private functions */ 384 Q Uuid getWithMediaManager (const QUuid &aInitialId = QUuid());385 Q UuidgetWithNewHDWizard();384 QString getWithMediaManager (const QString &aInitialId = QString::null); 385 QString getWithNewHDWizard(); 386 386 int maxNameLength() const; 387 387 void prepareComboboxes(); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r19191 r19239 2663 2663 QString snapShotName = tr ("Snapshot %1"); 2664 2664 QRegExp regExp (QString ("^") + snapShotName.arg ("([0-9]+)") + QString ("$")); 2665 CSnapshot index = cmachine.GetSnapshot (Q Uuid());2665 CSnapshot index = cmachine.GetSnapshot (QString::null); 2666 2666 while (!index.isNull()) 2667 2667 { … … 2893 2893 { 2894 2894 CVirtualBox vbox = vboxGlobal().virtualBox(); 2895 Q Uuiduuid;2895 QString uuid; 2896 2896 2897 2897 CDVDImage image = vbox.FindDVDImage (aSource); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxExportApplianceWzd.cpp
r18625 r19239 228 228 icon = vboxGlobal().vmGuestOSTypeIcon (m->GetOSTypeId()).scaled (16, 16, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); 229 229 name = m->GetName(); 230 uuid = m->GetId() .toString();230 uuid = m->GetId(); 231 231 enabled = m->GetSessionState() == KSessionState_Closed; 232 232 } -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
r19215 r19239 85 85 86 86 #include <VBox/sup.h> 87 #include <VBox/com/Guid.h> 87 88 88 89 #include <iprt/asm.h> … … 211 212 // a deadlock. 212 213 213 STDMETHOD(OnMachineStateChange) (IN_ GUIDid, MachineState_T state)214 { 215 postEvent (new VBoxMachineStateChangeEvent ( COMBase::ToQUuid(id),214 STDMETHOD(OnMachineStateChange) (IN_BSTR id, MachineState_T state) 215 { 216 postEvent (new VBoxMachineStateChangeEvent (QString::fromUtf16(id), 216 217 (KMachineState) state)); 217 218 return S_OK; 218 219 } 219 220 220 STDMETHOD(OnMachineDataChange) (IN_ GUIDid)221 { 222 postEvent (new VBoxMachineDataChangeEvent ( COMBase::ToQUuid(id)));221 STDMETHOD(OnMachineDataChange) (IN_BSTR id) 222 { 223 postEvent (new VBoxMachineDataChangeEvent (QString::fromUtf16(id))); 223 224 return S_OK; 224 225 } 225 226 226 STDMETHOD(OnExtraDataCanChange)(IN_ GUIDid,227 STDMETHOD(OnExtraDataCanChange)(IN_BSTR id, 227 228 IN_BSTR key, IN_BSTR value, 228 229 BSTR *error, BOOL *allowChange) … … 231 232 return E_INVALIDARG; 232 233 233 if ( COMBase::ToQUuid(id).isNull())234 if (com::asGuidStr(id).isNull()) 234 235 { 235 236 /* it's a global extra data key someone wants to change */ … … 310 311 } 311 312 312 STDMETHOD(OnExtraDataChange) (IN_ GUIDid,313 STDMETHOD(OnExtraDataChange) (IN_BSTR id, 313 314 IN_BSTR key, IN_BSTR value) 314 315 { 315 if ( COMBase::ToQUuid(id).isNull())316 if (com::asGuidStr(id).isNull()) 316 317 { 317 318 QString sKey = QString::fromUtf16 (key); … … 394 395 } 395 396 396 STDMETHOD(OnMediaRegistered) (IN_ GUIDid, DeviceType_T type,397 STDMETHOD(OnMediaRegistered) (IN_BSTR id, DeviceType_T type, 397 398 BOOL registered) 398 399 { … … 404 405 } 405 406 406 STDMETHOD(OnMachineRegistered) (IN_ GUIDid, BOOL registered)407 { 408 postEvent (new VBoxMachineRegisteredEvent ( COMBase::ToQUuid(id),407 STDMETHOD(OnMachineRegistered) (IN_BSTR id, BOOL registered) 408 { 409 postEvent (new VBoxMachineRegisteredEvent (QString::fromUtf16(id), 409 410 registered)); 410 411 return S_OK; 411 412 } 412 413 413 STDMETHOD(OnSessionStateChange) (IN_ GUIDid, SessionState_T state)414 { 415 postEvent (new VBoxSessionStateChangeEvent ( COMBase::ToQUuid(id),414 STDMETHOD(OnSessionStateChange) (IN_BSTR id, SessionState_T state) 415 { 416 postEvent (new VBoxSessionStateChangeEvent (QString::fromUtf16(id), 416 417 (KSessionState) state)); 417 418 return S_OK; 418 419 } 419 420 420 STDMETHOD(OnSnapshotTaken) (IN_ GUID aMachineId, IN_GUIDaSnapshotId)421 { 422 postEvent (new VBoxSnapshotEvent ( COMBase::ToQUuid(aMachineId),423 COMBase::ToQUuid(aSnapshotId),421 STDMETHOD(OnSnapshotTaken) (IN_BSTR aMachineId, IN_BSTR aSnapshotId) 422 { 423 postEvent (new VBoxSnapshotEvent (QString::fromUtf16(aMachineId), 424 QString::fromUtf16(aSnapshotId), 424 425 VBoxSnapshotEvent::Taken)); 425 426 return S_OK; 426 427 } 427 428 428 STDMETHOD(OnSnapshotDiscarded) (IN_ GUID aMachineId, IN_GUIDaSnapshotId)429 { 430 postEvent (new VBoxSnapshotEvent ( COMBase::ToQUuid(aMachineId),431 COMBase::ToQUuid(aSnapshotId),429 STDMETHOD(OnSnapshotDiscarded) (IN_BSTR aMachineId, IN_BSTR aSnapshotId) 430 { 431 postEvent (new VBoxSnapshotEvent (QString::fromUtf16(aMachineId), 432 QString::fromUtf16(aSnapshotId), 432 433 VBoxSnapshotEvent::Discarded)); 433 434 return S_OK; 434 435 } 435 436 436 STDMETHOD(OnSnapshotChange) (IN_ GUID aMachineId, IN_GUIDaSnapshotId)437 { 438 postEvent (new VBoxSnapshotEvent ( COMBase::ToQUuid(aMachineId),439 COMBase::ToQUuid(aSnapshotId),437 STDMETHOD(OnSnapshotChange) (IN_BSTR aMachineId, IN_BSTR aSnapshotId) 438 { 439 postEvent (new VBoxSnapshotEvent (QString::fromUtf16(aMachineId), 440 QString::fromUtf16(aSnapshotId), 440 441 VBoxSnapshotEvent::Changed)); 441 442 return S_OK; 442 443 } 443 444 444 STDMETHOD(OnGuestPropertyChange) (IN_ GUID/* id */,445 STDMETHOD(OnGuestPropertyChange) (IN_BSTR /* id */, 445 446 IN_BSTR /* key */, 446 447 IN_BSTR /* value */, … … 2369 2370 * session. 2370 2371 */ 2371 CSession VBoxGlobal::openSession (const Q Uuid&aId, bool aExisting /* = false */)2372 CSession VBoxGlobal::openSession (const QString &aId, bool aExisting /* = false */) 2372 2373 { 2373 2374 CSession session; … … 2405 2406 * Starts a machine with the given ID. 2406 2407 */ 2407 bool VBoxGlobal::startMachine (const Q Uuid&id)2408 bool VBoxGlobal::startMachine (const QString &id) 2408 2409 { 2409 2410 AssertReturn (mValid, false); … … 2702 2703 * @sa #currentMediaList() 2703 2704 */ 2704 void VBoxGlobal::removeMedium (VBoxDefs::MediaType aType, const Q Uuid&aId)2705 void VBoxGlobal::removeMedium (VBoxDefs::MediaType aType, const QString &aId) 2705 2706 { 2706 2707 VBoxMediaList::Iterator it; … … 5373 5374 { 5374 5375 QString param = QString (qApp->argv() [i]); 5375 QUuid uuid = QUuid (param);5376 QUuid uuid = QUuid(param); 5376 5377 if (!uuid.isNull()) 5377 5378 { 5378 vmUuid = uuid;5379 vmUuid = param; 5379 5380 } 5380 5381 else -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaComboBox.cpp
r13641 r19239 26 26 #include <QDir> 27 27 #include <QAbstractItemView> 28 #include <QUuid>29 28 30 29 VBoxMediaComboBox::VBoxMediaComboBox (QWidget *aParent) 31 30 : QComboBox (aParent) 32 31 , mType (VBoxDefs::MediaType_Invalid) 33 , mLastId (Q Uuid())32 , mLastId (QString::null) 34 33 , mShowDiffs (false) 35 , mMachineId (Q Uuid())34 , mMachineId (QString::null) 36 35 { 37 36 /* Setup the elide mode */ … … 52 51 connect (&vboxGlobal(), SIGNAL (mediumUpdated (const VBoxMedium &)), 53 52 this, SLOT (mediumUpdated (const VBoxMedium &))); 54 connect (&vboxGlobal(), SIGNAL (mediumRemoved (VBoxDefs::MediaType, const Q Uuid&)),55 this, SLOT (mediumRemoved (VBoxDefs::MediaType, const Q Uuid&)));53 connect (&vboxGlobal(), SIGNAL (mediumRemoved (VBoxDefs::MediaType, const QString &)), 54 this, SLOT (mediumRemoved (VBoxDefs::MediaType, const QString &))); 56 55 57 56 /* Setup other connections */ … … 101 100 } 102 101 103 Q UuidVBoxMediaComboBox::id (int aIndex /*= -1*/) const104 { 105 Q UuiduuidNull; /* gcc-3.3 hack */102 QString VBoxMediaComboBox::id (int aIndex /*= -1*/) const 103 { 104 QString uuidNull; /* gcc-3.3 hack */ 106 105 AssertReturn (aIndex == -1 || 107 106 (aIndex >= 0 && aIndex < mMedia.size()), … … 120 119 } 121 120 122 void VBoxMediaComboBox::setCurrentItem (const Q Uuid&aId)121 void VBoxMediaComboBox::setCurrentItem (const QString &aId) 123 122 { 124 123 mLastId = aId; … … 139 138 } 140 139 141 void VBoxMediaComboBox::setMachineId (const Q Uuid&aMachineId)140 void VBoxMediaComboBox::setMachineId (const QString &aMachineId) 142 141 { 143 142 mMachineId = aMachineId; … … 221 220 222 221 void VBoxMediaComboBox::mediumRemoved (VBoxDefs::MediaType aType, 223 const Q Uuid&aId)222 const QString &aId) 224 223 { 225 224 if (mType != aType) … … 258 257 259 258 mMedia.append ( 260 Medium (Q Uuid(), QString::null,259 Medium (QString::null, QString::null, 261 260 tr ("No media available. Use the Virtual Media " 262 261 "Manager to add media of the corresponding type."))); … … 339 338 * @param aIndex Where to store the found media index. 340 339 */ 341 bool VBoxMediaComboBox::findMediaIndex (const Q Uuid&aId, int &aIndex)340 bool VBoxMediaComboBox::findMediaIndex (const QString &aId, int &aIndex) 342 341 { 343 342 aIndex = 0; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp
r18177 r19239 88 88 KMediaState state() const { return mMedium.state (!mManager->showDiffs()); } 89 89 90 Q Uuidid() const { return mMedium.id(); }90 QString id() const { return mMedium.id(); } 91 91 QString location() const { return mMedium.location (!mManager->showDiffs()); } 92 92 … … 455 455 bool aRefresh /* = true */, 456 456 const CMachine &aSessionMachine /* = CMachine() */, 457 const Q Uuid &aSelectId /* = QUuid() */,457 const QString &aSelectId /* = QString() */, 458 458 bool aShowDiffs /* = true */) 459 459 { … … 465 465 466 466 mSessionMachine = aSessionMachine; 467 mSessionMachineId = mSessionMachine.isNull() ? Q Uuid(): mSessionMachine.GetId();467 mSessionMachineId = mSessionMachine.isNull() ? QString::null : mSessionMachine.GetId(); 468 468 mShowDiffs = mSessionMachine.isNull() ? true : aShowDiffs; 469 469 … … 509 509 this, SLOT (mediumUpdated (const VBoxMedium &))); 510 510 /* Listen to "media remove" signals */ 511 connect (&vboxGlobal(), SIGNAL (mediumRemoved (VBoxDefs::MediaType, const Q Uuid&)),512 this, SLOT (mediumRemoved (VBoxDefs::MediaType, const Q Uuid&)));511 connect (&vboxGlobal(), SIGNAL (mediumRemoved (VBoxDefs::MediaType, const QString &)), 512 this, SLOT (mediumRemoved (VBoxDefs::MediaType, const QString &))); 513 513 514 514 if (aRefresh && !vboxGlobal().isMediaEnumerationStarted()) … … 581 581 } 582 582 583 Q UuidVBoxMediaManagerDlg::selectedId() const583 QString VBoxMediaManagerDlg::selectedId() const 584 584 { 585 585 QTreeWidget *tree = currentTreeWidget(); 586 Q Uuiduuid;586 QString uuid; 587 587 588 588 MediaItem *item = toMediaItem (selectedItem (tree)); … … 786 786 { 787 787 setCurrentItem (mHardDiskView, item); 788 mHDSelectedId = Q Uuid();788 mHDSelectedId = QString::null; 789 789 } 790 790 break; … … 803 803 { 804 804 setCurrentItem (mDVDView, item); 805 mDVDSelectedId = Q Uuid();805 mDVDSelectedId = QString::null; 806 806 } 807 807 break; … … 820 820 { 821 821 setCurrentItem (mFloppyView, item); 822 mFloppySelectedId = Q Uuid();822 mFloppySelectedId = QString::null; 823 823 } 824 824 break; … … 888 888 889 889 void VBoxMediaManagerDlg::mediumRemoved (VBoxDefs::MediaType aType, 890 const Q Uuid&aId)890 const QString &aId) 891 891 { 892 892 /* Ignore non-interesting aMedium */ … … 1062 1062 1063 1063 /* Remember ID/type as they may get lost after the closure/deletion */ 1064 Q Uuidid = item->id();1064 QString id = item->id(); 1065 1065 AssertReturnVoid (!id.isNull()); 1066 1066 VBoxDefs::MediaType type = item->type(); … … 1163 1163 CMachineVector machines; 1164 1164 1165 const QList <Q Uuid> &machineIds = item->medium().curStateMachineIds();1166 for (QList <Q Uuid>::const_iterator it = machineIds.begin();1165 const QList <QString> &machineIds = item->medium().curStateMachineIds(); 1166 for (QList <QString>::const_iterator it = machineIds.begin(); 1167 1167 it != machineIds.end(); ++ it) 1168 1168 { … … 1191 1191 return; 1192 1192 1193 for (QList <Q Uuid>::const_iterator it = machineIds.begin();1193 for (QList <QString>::const_iterator it = machineIds.begin(); 1194 1194 it != machineIds.end(); ++ it) 1195 1195 { … … 1206 1206 1207 1207 bool VBoxMediaManagerDlg::releaseMediumFrom (const VBoxMedium &aMedium, 1208 const Q Uuid&aMachineId)1208 const QString &aMachineId) 1209 1209 { 1210 1210 CSession session; … … 1538 1538 AssertReturnVoid (!aLocation.isEmpty()); 1539 1539 1540 Q Uuiduuid;1540 QString uuid; 1541 1541 VBoxMedium medium; 1542 1542 … … 1705 1705 1706 1706 MediaItem* VBoxMediaManagerDlg::searchItem (QTreeWidget *aTree, 1707 const Q Uuid&aId) const1707 const QString &aId) const 1708 1708 { 1709 1709 if (aId.isNull()) … … 1855 1855 mi = toMediaItem (mHardDiskView->currentItem()); 1856 1856 if (mHDSelectedId.isNull()) 1857 mHDSelectedId = mi ? mi->id() : Q Uuid();1857 mHDSelectedId = mi ? mi->id() : QString::null; 1858 1858 1859 1859 mi = toMediaItem (mDVDView->currentItem()); 1860 1860 if (mDVDSelectedId.isNull()) 1861 mDVDSelectedId = mi ? mi->id() : Q Uuid();1861 mDVDSelectedId = mi ? mi->id() : QString::null; 1862 1862 1863 1863 mi = toMediaItem (mFloppyView->currentItem()); 1864 1864 if (mFloppySelectedId.isNull()) 1865 mFloppySelectedId = mi ? mi->id() : Q Uuid();1865 mFloppySelectedId = mi ? mi->id() : QString::null; 1866 1866 1867 1867 /* Finally, clear all the lists... -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxMedium.cpp
r17385 r19239 178 178 mCurStateMachineIds.clear(); 179 179 180 QVector <Q Uuid> machineIds = mMedium.GetMachineIds();180 QVector <QString> machineIds = mMedium.GetMachineIds(); 181 181 if (machineIds.size() > 0) 182 182 { … … 185 185 CVirtualBox vbox = vboxGlobal().virtualBox(); 186 186 187 for (QVector <Q Uuid>::ConstIterator it = machineIds.begin();187 for (QVector <QString>::ConstIterator it = machineIds.begin(); 188 188 it != machineIds.end(); ++ it) 189 189 { … … 193 193 QString snapshots; 194 194 195 QVector <Q Uuid> snapIds = mMedium.GetSnapshotIds (*it);196 for (QVector <Q Uuid>::ConstIterator jt = snapIds.begin();195 QVector <QString> snapIds = mMedium.GetSnapshotIds (*it); 196 for (QVector <QString>::ConstIterator jt = snapIds.begin(); 197 197 jt != snapIds.end(); ++ jt) 198 198 { -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxNewVMWzd.cpp
r18699 r19239 204 204 if (dlg.exec() == QDialog::Accepted) 205 205 { 206 Q UuidnewId = dlg.selectedId();206 QString newId = dlg.selectedId(); 207 207 if (mHDCombo->id() != newId) 208 208 { … … 355 355 if (mMachine.isNull()) 356 356 { 357 mMachine = vbox.CreateMachine (mLeName->text(), typeId, QString::null, Q Uuid());357 mMachine = vbox.CreateMachine (mLeName->text(), typeId, QString::null, QString::null); 358 358 if (!vbox.isOk()) 359 359 { … … 399 399 { 400 400 bool success = false; 401 Q UuidmachineId = mMachine.GetId();401 QString machineId = mMachine.GetId(); 402 402 CSession session = vboxGlobal().openSession (machineId); 403 403 if (!session.isNull()) … … 440 440 { 441 441 /* Remember ID as it may be lost after the deletion */ 442 Q Uuidid = mHardDisk.GetId();442 QString id = mHardDisk.GetId(); 443 443 444 444 bool success = false; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp
r19132 r19239 646 646 QString prevVMId = vbox.GetExtraData (VBoxDefs::GUI_LastVMSelected); 647 647 648 mVMListView->selectItemById ( QUuid (prevVMId));648 mVMListView->selectItemById (prevVMId); 649 649 } 650 650 … … 826 826 */ 827 827 void VBoxSelectorWnd::vmSettings (const QString &aCategory, const QString &aControl, 828 const Q Uuid&aUuid /*= QUuid_null*/)828 const QString &aUuid /*= QUuid_null*/) 829 829 { 830 830 if (!aCategory.isEmpty() && aCategory [0] != '#') … … 841 841 842 842 // open a direct session to modify VM settings 843 Q Uuidid = item->id();843 QString id = item->id(); 844 844 CSession session = vboxGlobal().openSession (id); 845 845 if (session.isNull()) … … 877 877 } 878 878 879 void VBoxSelectorWnd::vmDelete (const Q Uuid&aUuid /*= QUuid_null*/)879 void VBoxSelectorWnd::vmDelete (const QString &aUuid /*= QUuid_null*/) 880 880 { 881 881 VBoxVMItem *item = aUuid.isNull() ? mVMListView->selectedItem() : … … 887 887 { 888 888 CVirtualBox vbox = vboxGlobal().virtualBox(); 889 Q Uuidid = item->id();889 QString id = item->id(); 890 890 bool ok = false; 891 891 if (item->accessible()) … … 943 943 } 944 944 945 void VBoxSelectorWnd::vmStart (const QUuid &aUuid /*= QUuid_null*/) 946 { 947 VBoxVMItem *item = aUuid.isNull() ? mVMListView->selectedItem() : 945 void VBoxSelectorWnd::vmStart (const QString &aUuid /*= QUuid_null*/) 946 { 947 QUuid uuid (aUuid); 948 VBoxVMItem *item = uuid.isNull() ? mVMListView->selectedItem() : 948 949 mVMModel->itemById (aUuid); 949 950 … … 951 952 952 953 /* Are we called from the mVMListView's activated() signal? */ 953 if ( aUuid.isNull())954 if (uuid.isNull()) 954 955 { 955 956 /* We always get here when mVMListView emits the activated() signal, … … 974 975 ("Machine must be PoweredOff/Saved/Aborted")); 975 976 976 Q Uuidid = item->id();977 QString id = item->id(); 977 978 CVirtualBox vbox = vboxGlobal().virtualBox(); 978 979 CSession session; … … 1025 1026 } 1026 1027 1027 void VBoxSelectorWnd::vmDiscard (const Q Uuid&aUuid /*= QUuid_null*/)1028 void VBoxSelectorWnd::vmDiscard (const QString &aUuid /*= QUuid_null*/) 1028 1029 { 1029 1030 VBoxVMItem *item = aUuid.isNull() ? mVMListView->selectedItem() : … … 1036 1037 1037 1038 /* open a session to modify VM settings */ 1038 Q Uuidid = item->id();1039 QString id = item->id(); 1039 1040 CSession session; 1040 1041 CVirtualBox vbox = vboxGlobal().virtualBox(); … … 1060 1061 } 1061 1062 1062 void VBoxSelectorWnd::vmPause (bool aPause, const Q Uuid&aUuid /*= QUuid_null*/)1063 void VBoxSelectorWnd::vmPause (bool aPause, const QString &aUuid /*= QUuid_null*/) 1063 1064 { 1064 1065 VBoxVMItem *item = aUuid.isNull() ? mVMListView->selectedItem() : … … 1092 1093 } 1093 1094 1094 void VBoxSelectorWnd::vmRefresh (const Q Uuid&aUuid /*= QUuid_null*/)1095 void VBoxSelectorWnd::vmRefresh (const QString &aUuid /*= QUuid_null*/) 1095 1096 { 1096 1097 VBoxVMItem *item = aUuid.isNull() ? mVMListView->selectedItem() : … … 1110 1111 } 1111 1112 1112 void VBoxSelectorWnd::vmShowLogs (const Q Uuid&aUuid /*= QUuid_null*/)1113 void VBoxSelectorWnd::vmShowLogs (const QString &aUuid /*= QUuid_null*/) 1113 1114 { 1114 1115 VBoxVMItem *item = aUuid.isNull() ? mVMListView->selectedItem() : … … 1138 1139 } 1139 1140 1140 void VBoxSelectorWnd::refreshVMItem (const Q Uuid&aID, bool aDetails,1141 void VBoxSelectorWnd::refreshVMItem (const QString &aID, bool aDetails, 1141 1142 bool aSnapshots, 1142 1143 bool aDescription) … … 1817 1818 { 1818 1819 vID = pMenu->menuAction()->data(); 1819 if (vID.canConvert<Q Uuid>() && mVMModel)1820 pItem = mVMModel->itemById (qvariant_cast<Q Uuid>(vID));1820 if (vID.canConvert<QString>() && mVMModel) 1821 pItem = mVMModel->itemById (qvariant_cast<QString>(vID)); 1821 1822 } 1822 1823 … … 1935 1936 { 1936 1937 vID = pMenu->menuAction()->data(); 1937 if (vID.canConvert<Q Uuid>() && mVMModel)1938 pItem = mVMModel->itemById (qvariant_cast<Q Uuid>(vID));1938 if (vID.canConvert<QString>() && mVMModel) 1939 pItem = mVMModel->itemById (qvariant_cast<QString>(vID)); 1939 1940 } 1940 1941 … … 2010 2011 { 2011 2012 QVariant v = pAction->data(); 2012 if (v.canConvert<Q Uuid>() && mVMModel)2013 pItem = mVMModel->itemById (qvariant_cast<Q Uuid>(v));2013 if (v.canConvert<QString>() && mVMModel) 2014 pItem = mVMModel->itemById (qvariant_cast<QString>(v)); 2014 2015 } 2015 2016 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotsWgt.cpp
r18006 r19239 103 103 104 104 CSnapshot snapshot() const { return mSnapshot; } 105 Q UuidsnapshotId() const { return mId; }105 QString snapshotId() const { return mId; } 106 106 107 107 void recache() … … 210 210 CMachine mMachine; 211 211 212 Q UuidmId;212 QString mId; 213 213 bool mOnline; 214 214 QString mDesc; … … 346 346 if (aMachine.isNull()) 347 347 { 348 mMachineId = Q Uuid();348 mMachineId = QString::null; 349 349 mSessionState = KSessionState_Null; 350 350 } … … 456 456 AssertReturn (item, (void) 0); 457 457 458 Q UuidsnapId = item->snapshotId();458 QString snapId = item->snapshotId(); 459 459 AssertReturn (!snapId.isNull(), (void) 0); 460 460 … … 710 710 SnapshotEditBlocker guardBlock (mEditProtector); 711 711 712 Q Uuidselected, selectedFirstChild;712 QString selected, selectedFirstChild; 713 713 if (aKeepSelected) 714 714 { … … 735 735 if (mMachine.GetSnapshotCount() > 0) 736 736 { 737 CSnapshot snapshot = mMachine.GetSnapshot (Q Uuid());737 CSnapshot snapshot = mMachine.GetSnapshot (QString::null); 738 738 739 739 populateSnapshots (snapshot, 0); … … 769 769 } 770 770 771 SnapshotWgtItem* VBoxSnapshotsWgt::findItem (const Q Uuid&aSnapshotId)771 SnapshotWgtItem* VBoxSnapshotsWgt::findItem (const QString &aSnapshotId) 772 772 { 773 773 QTreeWidgetItemIterator it (mTreeWidget); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMListView.cpp
r17349 r19239 452 452 * Returns the list item with the given UUID. 453 453 */ 454 VBoxVMItem *VBoxVMModel::itemById (const Q Uuid&aId) const454 VBoxVMItem *VBoxVMModel::itemById (const QString &aId) const 455 455 { 456 456 foreach (VBoxVMItem *item, mVMItemList) … … 465 465 } 466 466 467 QModelIndex VBoxVMModel::indexById (const Q Uuid&aId) const467 QModelIndex VBoxVMModel::indexById (const QString &aId) const 468 468 { 469 469 int row = rowById (aId); … … 474 474 } 475 475 476 int VBoxVMModel::rowById (const Q Uuid&aId) const476 int VBoxVMModel::rowById (const QString &aId) const 477 477 { 478 478 for (int i=0; i < mVMItemList.count(); ++i) … … 624 624 } 625 625 626 void VBoxVMListView::selectItemById (const Q Uuid&aID)626 void VBoxVMListView::selectItemById (const QString &aID) 627 627 { 628 628 if (VBoxVMModel *m = qobject_cast <VBoxVMModel*> (model())) -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsCD.cpp
r17238 r19239 112 112 QFileInfo fi (src); 113 113 mRbIsoCD->setChecked (true); 114 mUuidIsoCD = Q Uuid(img.GetId());114 mUuidIsoCD = QString(img.GetId()); 115 115 mRbHostCD->setAutoExclusive (true); 116 116 mRbIsoCD->setAutoExclusive (true); … … 243 243 void VBoxVMSettingsCD::onCbChange() 244 244 { 245 mUuidIsoCD = mGbCD->isChecked() ? mCbIsoCD->id() : Q Uuid();245 mUuidIsoCD = mGbCD->isChecked() ? mCbIsoCD->id() : QString::null; 246 246 emit cdChanged(); 247 247 if (mValidator) … … 251 251 void VBoxVMSettingsCD::showMediaManager() 252 252 { 253 Q UuidoldId = mUuidIsoCD;253 QString oldId = mUuidIsoCD; 254 254 VBoxMediaManagerDlg dlg (this); 255 255 … … 257 257 false /* aRefresh */, mMachine, mCbIsoCD->id()); 258 258 259 Q UuidnewId = dlg.exec() == QDialog::Accepted ?259 QString newId = dlg.exec() == QDialog::Accepted ? 260 260 dlg.selectedId() : mCbIsoCD->id(); 261 261 if (oldId != newId) -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsFD.cpp
r17255 r19239 113 113 QFileInfo fi (src); 114 114 mRbIsoFD->setChecked (true); 115 mUuidIsoFD = Q Uuid(img.GetId());115 mUuidIsoFD = QString (img.GetId()); 116 116 mRbHostFD->setAutoExclusive (true); 117 117 mRbIsoFD->setAutoExclusive (true); … … 239 239 void VBoxVMSettingsFD::onCbChange() 240 240 { 241 mUuidIsoFD = mGbFD->isChecked() ? mCbIsoFD->id() : Q Uuid();241 mUuidIsoFD = mGbFD->isChecked() ? mCbIsoFD->id() : QString::null; 242 242 emit fdChanged(); 243 243 if (mValidator) … … 247 247 void VBoxVMSettingsFD::showMediaManager() 248 248 { 249 Q UuidoldId = mUuidIsoFD;249 QString oldId = mUuidIsoFD; 250 250 VBoxMediaManagerDlg dlg (this); 251 251 … … 253 253 false /* aRefresh */, mMachine, mCbIsoFD->id()); 254 254 255 Q UuidnewId = dlg.exec() == QDialog::Accepted ?255 QString newId = dlg.exec() == QDialog::Accepted ? 256 256 dlg.selectedId() : mCbIsoFD->id(); 257 257 if (oldId != newId) -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsHD.cpp
r18692 r19239 67 67 68 68 /** Type to store disk data */ 69 DiskValue::DiskValue (const Q Uuid&aId)69 DiskValue::DiskValue (const QString &aId) 70 70 : id (aId) 71 71 , name (QString::null), tip (QString::null), pix (QPixmap()) … … 634 634 connect (&vboxGlobal(), SIGNAL (mediumUpdated (const VBoxMedium &)), 635 635 HDSettings::instance(), SLOT (update())); 636 connect (&vboxGlobal(), SIGNAL (mediumRemoved (VBoxDefs::MediaType, const Q Uuid&)),636 connect (&vboxGlobal(), SIGNAL (mediumRemoved (VBoxDefs::MediaType, const QString &)), 637 637 HDSettings::instance(), SLOT (update())); 638 638 … … 841 841 mNewAction->setEnabled (false); 842 842 843 Q UuidnewId;843 QString newId; 844 844 845 845 { /* Clear the focus */ … … 862 862 int confirm = vboxProblem().confirmRunNewHDWzdOrVDM (this); 863 863 newId = confirm == QIMessageBox::Yes ? getWithNewHDWizard() : 864 confirm == QIMessageBox::No ? getWithMediaManager() : Q Uuid();864 confirm == QIMessageBox::No ? getWithMediaManager() : QString::null; 865 865 } 866 866 } /* Clear the focus */ … … 930 930 .value <DiskValue>()); 931 931 932 Q Uuidid = getWithMediaManager (current.id);932 QString id = getWithMediaManager (current.id); 933 933 934 934 if (!id.isNull()) … … 1148 1148 } 1149 1149 1150 Q Uuid VBoxVMSettingsHD::getWithMediaManager (const QUuid&aInitialId)1150 QString VBoxVMSettingsHD::getWithMediaManager (const QString &aInitialId) 1151 1151 { 1152 1152 /* Run Media Manager */ … … 1159 1159 HDSettings::instance()->showDiffs()); 1160 1160 1161 return dlg.exec() == QDialog::Accepted ? dlg.selectedId() : Q Uuid();1162 } 1163 1164 Q UuidVBoxVMSettingsHD::getWithNewHDWizard()1161 return dlg.exec() == QDialog::Accepted ? dlg.selectedId() : QString::null; 1162 } 1163 1164 QString VBoxVMSettingsHD::getWithNewHDWizard() 1165 1165 { 1166 1166 /* Run New HD Wizard */ 1167 1167 VBoxNewHDWzd dlg (this); 1168 1168 1169 return dlg.exec() == QDialog::Accepted ? dlg.hardDisk().GetId() : Q Uuid();1169 return dlg.exec() == QDialog::Accepted ? dlg.hardDisk().GetId() : QString::null; 1170 1170 } 1171 1171 -
trunk/src/VBox/Main/ApplianceImpl.cpp
r19165 r19239 1897 1897 const Utf8Str &strNameVBox = vsdeName.front()->strVbox; 1898 1898 rc = pVirtualBox->CreateMachine(Bstr(strNameVBox), Bstr(strOsTypeVBox), 1899 Bstr(), Guid(),1899 Bstr(), Bstr(), 1900 1900 pNewMachine.asOutParam()); 1901 1901 if (FAILED(rc)) throw rc; … … 2172 2172 if (FAILED(rc)) throw rc; 2173 2173 2174 Guid newMachineId;2175 rc = pNewMachine->COMGETTER(Id)(newMachineId .asOutParam());2174 Bstr newMachineId_; 2175 rc = pNewMachine->COMGETTER(Id)(newMachineId_.asOutParam()); 2176 2176 if (FAILED(rc)) throw rc; 2177 Guid newMachineId(newMachineId_); 2177 2178 2178 2179 // store new machine for roll-back in case of errors … … 2192 2193 /* In order to attach hard disks we need to open a session 2193 2194 * for the new machine */ 2194 rc = pVirtualBox->OpenSession(session, newMachineId );2195 rc = pVirtualBox->OpenSession(session, newMachineId_); 2195 2196 if (FAILED(rc)) throw rc; 2196 2197 fSessionOpen = true; … … 2318 2319 rc = session->COMGETTER(Machine)(sMachine.asOutParam()); 2319 2320 if (FAILED(rc)) throw rc; 2320 GuidhdId;2321 Bstr hdId; 2321 2322 rc = dstHdVBox->COMGETTER(Id)(hdId.asOutParam()); 2322 2323 if (FAILED(rc)) throw rc; 2323 2324 2324 2325 /* For now we assume we have one controller of every type only */ 2325 2326 HardDiskController hdc = (*vsysThis.mapControllers.find(vd.idController)).second; … … 2433 2434 { 2434 2435 const MyHardDiskAttachment &mhda = *itM; 2435 rc2 = pVirtualBox->OpenSession(session, mhda.uuid);2436 rc2 = pVirtualBox->OpenSession(session, Bstr(mhda.uuid)); 2436 2437 if (SUCCEEDED(rc2)) 2437 2438 { … … 2467 2468 const Guid &guid = *itID; 2468 2469 ComPtr<IMachine> failedMachine; 2469 rc2 = pVirtualBox->UnregisterMachine(guid , failedMachine.asOutParam());2470 rc2 = pVirtualBox->UnregisterMachine(guid.toUtf16(), failedMachine.asOutParam()); 2470 2471 if (SUCCEEDED(rc2)) 2471 2472 rc2 = failedMachine->DeleteSettings(); -
trunk/src/VBox/Main/ConsoleImpl.cpp
r19230 r19239 485 485 } 486 486 487 Guid uuid; 488 HRESULT hrc = mMachine->COMGETTER (Id) (uuid.asOutParam()); 487 Bstr id; 488 HRESULT hrc = mMachine->COMGETTER (Id) (id.asOutParam()); 489 Guid uuid = Guid(id); 490 489 491 AssertComRCReturn (hrc, VERR_ACCESS_DENIED); 490 492 … … 736 738 } 737 739 #endif /* VBOX_WITH_VRDP */ 738 739 Guiduuid;740 741 Bstr uuid; 740 742 HRESULT hrc = mMachine->COMGETTER (Id) (uuid.asOutParam()); 741 743 AssertComRC (hrc); … … 1952 1954 } 1953 1955 1954 STDMETHODIMP Console::AttachUSBDevice (IN_ GUIDaId)1956 STDMETHODIMP Console::AttachUSBDevice (IN_BSTR aId) 1955 1957 { 1956 1958 #ifdef VBOX_WITH_USB … … 1993 1995 } 1994 1996 1995 STDMETHODIMP Console::DetachUSBDevice (IN_ GUIDaId, IUSBDevice **aDevice)1997 STDMETHODIMP Console::DetachUSBDevice (IN_BSTR aId, IUSBDevice **aDevice) 1996 1998 { 1997 1999 #ifdef VBOX_WITH_USB … … 2006 2008 ComObjPtr <OUSBDevice> device; 2007 2009 USBDeviceList::iterator it = mUSBDevices.begin(); 2010 Guid uuid(aId); 2008 2011 while (it != mUSBDevices.end()) 2009 2012 { 2010 if ((*it)->id() == aId)2013 if ((*it)->id() == uuid) 2011 2014 { 2012 2015 device = *it; … … 2088 2091 } 2089 2092 2090 STDMETHODIMP Console::FindUSBDeviceById(IN_ GUIDaId, IUSBDevice **aDevice)2093 STDMETHODIMP Console::FindUSBDeviceById(IN_BSTR aId, IUSBDevice **aDevice) 2091 2094 { 2092 2095 #ifdef VBOX_WITH_USB … … 2102 2105 for (size_t i = 0; i < devsvec.size(); ++i) 2103 2106 { 2104 Guidid;2107 Bstr id; 2105 2108 rc = devsvec[i]->COMGETTER(Id) (id.asOutParam()); 2106 2109 CheckComRCReturnRC (rc); … … 2419 2422 } 2420 2423 2421 STDMETHODIMP Console::DiscardSnapshot (IN_ GUIDaId, IProgress **aProgress)2424 STDMETHODIMP Console::DiscardSnapshot (IN_BSTR aId, IProgress **aProgress) 2422 2425 { 2423 2426 CheckComArgExpr(aId, Guid (aId).isEmpty() == false); … … 3558 3561 * @note Locks this object for writing. 3559 3562 */ 3560 HRESULT Console::onUSBDeviceDetach (IN_ GUIDaId,3563 HRESULT Console::onUSBDeviceDetach (IN_BSTR aId, 3561 3564 IVirtualBoxErrorInfo *aError) 3562 3565 { … … 5469 5472 Utf8Str Address (BstrAddress); 5470 5473 5471 Guid Uuid;5472 hrc = aHostDevice->COMGETTER (Id) ( Uuid.asOutParam());5474 Bstr id; 5475 hrc = aHostDevice->COMGETTER (Id) (id.asOutParam()); 5473 5476 ComAssertComRCRetRC (hrc); 5477 Guid uuid(id); 5474 5478 5475 5479 BOOL fRemote = FALSE; … … 5482 5486 5483 5487 LogFlowThisFunc (("Proxying USB device '%s' {%RTuuid}...\n", 5484 Address.raw(), Uuid.ptr()));5488 Address.raw(), uuid.ptr())); 5485 5489 5486 5490 /* leave the lock before a VMR3* call (EMT will call us back)! */ … … 5490 5494 PVMREQ pReq = NULL; 5491 5495 int vrc = VMR3ReqCall (mpVM, VMREQDEST_ANY, &pReq, RT_INDEFINITE_WAIT, 5492 (PFNRT) usbAttachCallback, 6, this, aHostDevice, Uuid.ptr(), fRemote, Address.raw(), aMaskedIfs);5496 (PFNRT) usbAttachCallback, 6, this, aHostDevice, uuid.ptr(), fRemote, Address.raw(), aMaskedIfs); 5493 5497 if (VBOX_SUCCESS (vrc)) 5494 5498 vrc = pReq->iStatus; … … 5503 5507 { 5504 5508 LogWarningThisFunc (("Failed to create proxy device for '%s' {%RTuuid} (%Rrc)\n", 5505 Address.raw(), Uuid.ptr(), vrc));5509 Address.raw(), uuid.ptr(), vrc)); 5506 5510 5507 5511 switch (vrc) … … 6233 6237 if (device->captured ()) 6234 6238 { 6235 Guiduuid;6239 Bstr uuid; 6236 6240 device->COMGETTER (Id) (uuid.asOutParam()); 6237 6241 onUSBDeviceDetach (uuid, NULL); -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r19230 r19239 191 191 hrc = pMachine->COMGETTER(BIOSSettings)(biosSettings.asOutParam()); H(); 192 192 193 Guid uuid; 194 hrc = pMachine->COMGETTER(Id)(uuid.asOutParam()); H(); 193 Bstr id; 194 hrc = pMachine->COMGETTER(Id)(id.asOutParam()); H(); 195 Guid uuid(id); 195 196 PCRTUUID pUuid = uuid.raw(); 196 197 … … 1527 1528 } 1528 1529 1529 Guid hostIFGuid;1530 hrc = hostInterface->COMGETTER(Id)(hostIFGuid .asOutParam());1530 Bstr hostIFGuid_; 1531 hrc = hostInterface->COMGETTER(Id)(hostIFGuid_.asOutParam()); 1531 1532 if(FAILED(hrc)) 1532 1533 { … … 1534 1535 H(); 1535 1536 } 1537 Guid hostIFGuid(hostIFGuid_); 1536 1538 1537 1539 INetCfg *pNc; … … 1852 1854 1853 1855 1854 Guid hostIFGuid;1855 hrc = hostInterface->COMGETTER(Id)(hostIFGuid .asOutParam());1856 Bstr hostIFGuid_; 1857 hrc = hostInterface->COMGETTER(Id)(hostIFGuid_.asOutParam()); 1856 1858 if(FAILED(hrc)) 1857 1859 { … … 1859 1861 H(); 1860 1862 } 1863 Guid hostIFGuid(hostIFGuid_); 1861 1864 1862 1865 INetCfg *pNc; -
trunk/src/VBox/Main/DVDDriveImpl.cpp
r18210 r19239 247 247 //////////////////////////////////////////////////////////////////////////////// 248 248 249 STDMETHODIMP DVDDrive::MountImage (IN_ GUIDaImageId)250 { 251 Guid imageId = aImageId;249 STDMETHODIMP DVDDrive::MountImage (IN_BSTR aImageId) 250 { 251 Guid imageId(aImageId); 252 252 CheckComArgExpr(aImageId, !imageId.isEmpty()); 253 253 … … 444 444 { 445 445 Guid uuid = typeNode.value <Guid> ("uuid"); 446 rc = MountImage (uuid );446 rc = MountImage (uuid.toUtf16()); 447 447 CheckComRCReturnRC (rc); 448 448 } … … 514 514 Assert (!m->image.isNull()); 515 515 516 Guidid;516 Bstr id; 517 517 HRESULT rc = m->image->COMGETTER(Id) (id.asOutParam()); 518 518 AssertComRC (rc); … … 520 520 521 521 Key imageNode = node.createKey ("Image"); 522 imageNode.setValue <Guid> ("uuid", id);522 imageNode.setValue <Guid> ("uuid", Guid(id)); 523 523 break; 524 524 } -
trunk/src/VBox/Main/FloppyDriveImpl.cpp
r18210 r19239 254 254 ///////////////////////////////////////////////////////////////////////////// 255 255 256 STDMETHODIMP FloppyDrive::MountImage (IN_ GUIDaImageId)256 STDMETHODIMP FloppyDrive::MountImage (IN_BSTR aImageId) 257 257 { 258 258 Guid imageId = aImageId; … … 451 451 { 452 452 Guid uuid = typeNode.value <Guid> ("uuid"); 453 rc = MountImage (uuid );453 rc = MountImage (uuid.toUtf16()); 454 454 CheckComRCReturnRC (rc); 455 455 } … … 521 521 Assert (!m->image.isNull()); 522 522 523 Guidid;523 Bstr id; 524 524 HRESULT rc = m->image->COMGETTER(Id) (id.asOutParam()); 525 525 AssertComRC (rc); … … 527 527 528 528 Key imageNode = node.createKey ("Image"); 529 imageNode.setValue <Guid> ("uuid", id);529 imageNode.setValue <Guid> ("uuid", Guid(id)); 530 530 break; 531 531 } -
trunk/src/VBox/Main/HardDiskImpl.cpp
r19108 r19239 1538 1538 } 1539 1539 1540 STDMETHODIMP HardDisk::MergeTo (IN_ GUID/* aTargetId */, IProgress ** /* aProgress */)1540 STDMETHODIMP HardDisk::MergeTo (IN_BSTR /* aTargetId */, IProgress ** /* aProgress */) 1541 1541 { 1542 1542 AutoCaller autoCaller (this); -
trunk/src/VBox/Main/HostImpl.cpp
r19130 r19239 1237 1237 1238 1238 STDMETHODIMP 1239 Host::RemoveHostOnlyNetworkInterface (IN_ GUIDaId,1239 Host::RemoveHostOnlyNetworkInterface (IN_BSTR aId, 1240 1240 IHostNetworkInterface **aHostNetworkInterface, 1241 1241 IProgress **aProgress) … … 1256 1256 } 1257 1257 1258 int r = NetIfRemoveHostOnlyNetworkInterface (mParent, aId, aHostNetworkInterface, aProgress);1258 int r = NetIfRemoveHostOnlyNetworkInterface (mParent, Guid(aId), aHostNetworkInterface, aProgress); 1259 1259 if(RT_SUCCESS(r)) 1260 1260 { … … 2334 2334 } 2335 2335 2336 STDMETHODIMP Host::FindHostNetworkInterfaceById(IN_ GUIDid, IHostNetworkInterface **networkInterface)2336 STDMETHODIMP Host::FindHostNetworkInterfaceById(IN_BSTR id, IHostNetworkInterface **networkInterface) 2337 2337 { 2338 2338 #ifndef VBOX_WITH_HOSTNETIF_API … … 2356 2356 for (it = list.begin(); it != list.end(); ++it) 2357 2357 { 2358 Guidg;2358 Bstr g; 2359 2359 (*it)->COMGETTER(Id) (g.asOutParam()); 2360 if (g == Guid(id))2360 if (g == id) 2361 2361 found = *it; 2362 2362 } … … 2434 2434 } 2435 2435 2436 STDMETHODIMP Host::FindUSBDeviceById (IN_ GUIDaId, IHostUSBDevice **aDevice)2436 STDMETHODIMP Host::FindUSBDeviceById (IN_BSTR aId, IHostUSBDevice **aDevice) 2437 2437 { 2438 2438 #ifdef VBOX_WITH_USB … … 2448 2448 for (size_t i = 0; i < devsvec.size(); ++i) 2449 2449 { 2450 Guidid;2450 Bstr id; 2451 2451 rc = devsvec[i]->COMGETTER(Id) (id.asOutParam()); 2452 2452 CheckComRCReturnRC (rc); -
trunk/src/VBox/Main/HostNetworkInterfaceImpl.cpp
r19130 r19239 180 180 * @param aGuid address of result pointer 181 181 */ 182 STDMETHODIMP HostNetworkInterface::COMGETTER(Id) ( OUT_GUIDaGuid)182 STDMETHODIMP HostNetworkInterface::COMGETTER(Id) (BSTR *aGuid) 183 183 { 184 184 CheckComArgOutPointerValid(aGuid); … … 187 187 CheckComRCReturnRC (autoCaller.rc()); 188 188 189 mGuid. cloneTo (aGuid);189 mGuid.toUtf16().cloneTo (aGuid); 190 190 191 191 return S_OK; -
trunk/src/VBox/Main/MachineImpl.cpp
r19236 r19239 869 869 } 870 870 871 STDMETHODIMP Machine::COMGETTER(Id) ( OUT_GUIDaId)871 STDMETHODIMP Machine::COMGETTER(Id) (BSTR *aId) 872 872 { 873 873 CheckComArgOutPointerValid (aId); … … 878 878 AutoReadLock alock (this); 879 879 880 mData->mUuid. cloneTo (aId);880 mData->mUuid.toUtf16().cloneTo (aId); 881 881 882 882 return S_OK; … … 1887 1887 } 1888 1888 1889 STDMETHODIMP Machine::AttachHardDisk(IN_ GUIDaId,1889 STDMETHODIMP Machine::AttachHardDisk(IN_BSTR aId, 1890 1890 IN_BSTR aControllerName, LONG aControllerPort, 1891 1891 LONG aDevice) … … 1954 1954 } 1955 1955 1956 Guid id = aId;1956 Guid id(aId); 1957 1957 1958 1958 /* find a hard disk by UUID */ … … 2799 2799 } 2800 2800 2801 STDMETHODIMP Machine::GetSnapshot (IN_ GUIDaId, ISnapshot **aSnapshot)2801 STDMETHODIMP Machine::GetSnapshot (IN_BSTR aId, ISnapshot **aSnapshot) 2802 2802 { 2803 2803 CheckComArgOutPointerValid (aSnapshot); … … 2808 2808 AutoReadLock alock (this); 2809 2809 2810 Guid id = aId;2810 Guid id(aId); 2811 2811 ComObjPtr <Snapshot> snapshot; 2812 2812 … … 2835 2835 } 2836 2836 2837 STDMETHODIMP Machine::SetCurrentSnapshot (IN_ GUID/* aId */)2837 STDMETHODIMP Machine::SetCurrentSnapshot (IN_BSTR /* aId */) 2838 2838 { 2839 2839 /// @todo (dmik) don't forget to set … … 8737 8737 * @note Locks the same as Host::captureUSBDevice() does. 8738 8738 */ 8739 STDMETHODIMP SessionMachine::CaptureUSBDevice (IN_ GUIDaId)8739 STDMETHODIMP SessionMachine::CaptureUSBDevice (IN_BSTR aId) 8740 8740 { 8741 8741 LogFlowThisFunc (("\n")); … … 8751 8751 USBProxyService *service = mParent->host()->usbProxyService(); 8752 8752 AssertReturn (service, E_FAIL); 8753 return service->captureDeviceForVM (this, aId);8753 return service->captureDeviceForVM (this, Guid(aId)); 8754 8754 #else 8755 8755 return E_NOTIMPL; … … 8760 8760 * @note Locks the same as Host::detachUSBDevice() does. 8761 8761 */ 8762 STDMETHODIMP SessionMachine::DetachUSBDevice (IN_ GUIDaId, BOOL aDone)8762 STDMETHODIMP SessionMachine::DetachUSBDevice (IN_BSTR aId, BOOL aDone) 8763 8763 { 8764 8764 LogFlowThisFunc (("\n")); … … 8770 8770 USBProxyService *service = mParent->host()->usbProxyService(); 8771 8771 AssertReturn (service, E_FAIL); 8772 return service->detachDeviceFromVM (this, aId, !!aDone);8772 return service->detachDeviceFromVM (this, Guid(aId), !!aDone); 8773 8773 #else 8774 8774 return E_NOTIMPL; … … 8930 8930 8931 8931 /* memorize the progress ID and add it to the global collection */ 8932 GuidprogressId;8932 Bstr progressId; 8933 8933 HRESULT rc = aProgress->COMGETTER(Id) (progressId.asOutParam()); 8934 8934 AssertComRCReturn (rc, rc); … … 8947 8947 /* fill in the snapshot data */ 8948 8948 mSnapshotData.mLastState = mData->mMachineState; 8949 mSnapshotData.mProgressId = progressId;8949 mSnapshotData.mProgressId = Guid(progressId); 8950 8950 mSnapshotData.mStateFilePath = stateFilePath; 8951 8951 … … 9216 9216 */ 9217 9217 STDMETHODIMP SessionMachine::DiscardSnapshot ( 9218 IConsole *aInitiator, IN_ GUIDaId,9218 IConsole *aInitiator, IN_BSTR aId, 9219 9219 MachineState_T *aMachineState, IProgress **aProgress) 9220 9220 { 9221 9221 LogFlowThisFunc (("\n")); 9222 9222 9223 Guid id = aId;9223 Guid id(aId); 9224 9224 AssertReturn (aInitiator && !id.isEmpty(), E_INVALIDARG); 9225 9225 AssertReturn (aMachineState && aProgress, E_POINTER); … … 9982 9982 * @note The calls shall hold no locks. Will temporarily lock this object for reading. 9983 9983 */ 9984 HRESULT SessionMachine::onUSBDeviceDetach (IN_ GUIDaId,9984 HRESULT SessionMachine::onUSBDeviceDetach (IN_BSTR aId, 9985 9985 IVirtualBoxErrorInfo *aError) 9986 9986 { -
trunk/src/VBox/Main/MediumImpl.cpp
r18813 r19239 52 52 //////////////////////////////////////////////////////////////////////////////// 53 53 54 STDMETHODIMP MediumBase::COMGETTER(Id) ( OUT_GUIDaId)54 STDMETHODIMP MediumBase::COMGETTER(Id) (BSTR *aId) 55 55 { 56 56 CheckComArgOutPointerValid (aId); … … 61 61 AutoReadLock alock (this); 62 62 63 m.id. cloneTo (aId);63 m.id.toUtf16().cloneTo (aId); 64 64 65 65 return S_OK; … … 204 204 } 205 205 206 STDMETHODIMP MediumBase::COMGETTER(MachineIds) (ComSafe GUIDArrayOut (aMachineIds))206 STDMETHODIMP MediumBase::COMGETTER(MachineIds) (ComSafeArrayOut (BSTR,aMachineIds)) 207 207 { 208 208 if (ComSafeGUIDArrayOutIsNull (aMachineIds)) … … 214 214 AutoReadLock alock (this); 215 215 216 com::Safe GUIDArraymachineIds;216 com::SafeArray<BSTR> machineIds; 217 217 218 218 if (m.backRefs.size() != 0) … … 224 224 it != m.backRefs.end(); ++ it, ++ i) 225 225 { 226 machineIds [i] = it->machineId;227 } 228 } 229 230 machineIds.detachTo (ComSafe GUIDArrayOutArg (aMachineIds));226 it->machineId.toUtf16().detachTo(&machineIds [i]); 227 } 228 } 229 230 machineIds.detachTo (ComSafeArrayOutArg (aMachineIds)); 231 231 232 232 return S_OK; … … 236 236 //////////////////////////////////////////////////////////////////////////////// 237 237 238 STDMETHODIMP MediumBase::GetSnapshotIds (IN_ GUIDaMachineId,239 ComSafe GUIDArrayOut (aSnapshotIds))238 STDMETHODIMP MediumBase::GetSnapshotIds (IN_BSTR aMachineId, 239 ComSafeArrayOut (BSTR, aSnapshotIds)) 240 240 { 241 241 CheckComArgExpr (aMachineId, Guid (aMachineId).isEmpty() == false); … … 247 247 AutoReadLock alock (this); 248 248 249 com::SafeGUIDArray snapshotIds; 250 249 com::SafeArray<BSTR> snapshotIds; 250 251 Guid id(aMachineId); 251 252 for (BackRefList::const_iterator it = m.backRefs.begin(); 252 253 it != m.backRefs.end(); ++ it) 253 254 { 254 if (it->machineId == aMachineId)255 if (it->machineId == id) 255 256 { 256 257 size_t size = it->snapshotIds.size(); … … 267 268 size_t j = 0; 268 269 if (it->inCurState) 269 snapshotIds [j ++] = it->machineId;270 it->machineId.toUtf16().detachTo(&snapshotIds [j ++]); 270 271 271 272 for (BackRef::GuidList::const_iterator jt = … … 273 274 jt != it->snapshotIds.end(); ++ jt, ++ j) 274 275 { 275 snapshotIds [j] = *jt;276 (*jt).toUtf16().detachTo(&snapshotIds [j]); 276 277 } 277 278 } … … 281 282 } 282 283 283 snapshotIds.detachTo (ComSafe GUIDArrayOutArg (aSnapshotIds));284 snapshotIds.detachTo (ComSafeArrayOutArg (aSnapshotIds)); 284 285 285 286 return S_OK; -
trunk/src/VBox/Main/ProgressImpl.cpp
r18643 r19239 200 200 ///////////////////////////////////////////////////////////////////////////// 201 201 202 STDMETHODIMP ProgressBase::COMGETTER(Id) ( OUT_GUIDaId)202 STDMETHODIMP ProgressBase::COMGETTER(Id) (BSTR *aId) 203 203 { 204 204 CheckComArgOutPointerValid(aId); … … 208 208 209 209 /* mId is constant during life time, no need to lock */ 210 mId. cloneTo (aId);210 mId.toUtf16().cloneTo (aId); 211 211 212 212 return S_OK; -
trunk/src/VBox/Main/RemoteUSBDeviceImpl.cpp
r15051 r19239 132 132 ///////////////////////////////////////////////////////////////////////////// 133 133 134 STDMETHODIMP RemoteUSBDevice::COMGETTER(Id) ( OUT_GUIDaId)134 STDMETHODIMP RemoteUSBDevice::COMGETTER(Id) (BSTR *aId) 135 135 { 136 136 CheckComArgOutPointerValid(aId); … … 140 140 141 141 /* this is const, no need to lock */ 142 mData.id.cloneTo (aId);142 Bstr(mData.id).cloneTo (aId); 143 143 144 144 return S_OK; -
trunk/src/VBox/Main/SessionImpl.cpp
r17669 r19239 643 643 } 644 644 645 STDMETHODIMP Session::OnUSBDeviceDetach (IN_ GUIDaId,645 STDMETHODIMP Session::OnUSBDeviceDetach (IN_BSTR aId, 646 646 IVirtualBoxErrorInfo *aError) 647 647 { -
trunk/src/VBox/Main/SnapshotImpl.cpp
r18482 r19239 165 165 //////////////////////////////////////////////////////////////////////////////// 166 166 167 STDMETHODIMP Snapshot::COMGETTER(Id) ( OUT_GUIDaId)167 STDMETHODIMP Snapshot::COMGETTER(Id) (BSTR *aId) 168 168 { 169 169 CheckComArgOutPointerValid(aId); … … 172 172 CHECK_READY(); 173 173 174 mData.mId. cloneTo (aId);174 mData.mId.toUtf16().cloneTo (aId); 175 175 return S_OK; 176 176 } -
trunk/src/VBox/Main/USBDeviceImpl.cpp
r15051 r19239 94 94 ComAssertComRCRet (hrc, hrc); 95 95 96 hrc = aUSBDevice->COMGETTER(Id)(unconst (mData.id).asOutParam()); 97 ComAssertComRCRet (hrc, hrc); 96 Bstr id; 97 hrc = aUSBDevice->COMGETTER(Id)(id.asOutParam()); 98 ComAssertComRCRet (hrc, hrc); 99 unconst(mData.id) = Guid(id); 98 100 99 101 /* Confirm a successful initialization */ … … 144 146 * @param aId Address of result variable. 145 147 */ 146 STDMETHODIMP OUSBDevice::COMGETTER(Id)( OUT_GUIDaId)148 STDMETHODIMP OUSBDevice::COMGETTER(Id)(BSTR *aId) 147 149 { 148 150 CheckComArgOutPointerValid(aId); … … 152 154 153 155 /* this is const, no need to lock */ 154 mData.id.cloneTo (aId);156 Guid(mData.id).toString().cloneTo (aId); 155 157 156 158 return S_OK; -
trunk/src/VBox/Main/VirtualBoxImpl.cpp
r19236 r19239 784 784 IN_BSTR aOsTypeId, 785 785 IN_BSTR aBaseFolder, 786 IN_ GUIDaId,786 IN_BSTR aId, 787 787 IMachine **aMachine) 788 788 { … … 822 822 823 823 /* Create UUID if an empty one was specified. */ 824 Guid id = aId;824 Guid id(aId); 825 825 if (id.isEmpty()) 826 826 id.create(); … … 866 866 IN_BSTR aOsTypeId, 867 867 IN_BSTR aSettingsFile, 868 IN_ GUIDaId,868 IN_BSTR aId, 869 869 IMachine **aMachine) 870 870 { … … 889 889 890 890 /* Create UUID if an empty one was specified. */ 891 Guid id = aId;891 Guid id(aId); 892 892 if (id.isEmpty()) 893 893 id.create(); … … 1000 1000 1001 1001 /** @note Locks objects! */ 1002 STDMETHODIMP VirtualBox::GetMachine (IN_ GUIDaId, IMachine **aMachine)1002 STDMETHODIMP VirtualBox::GetMachine (IN_BSTR aId, IMachine **aMachine) 1003 1003 { 1004 1004 CheckComArgOutSafeArrayPointerValid(aMachine); … … 1068 1068 1069 1069 /** @note Locks objects! */ 1070 STDMETHODIMP VirtualBox::UnregisterMachine (IN_ GUIDaId,1070 STDMETHODIMP VirtualBox::UnregisterMachine (IN_BSTR aId, 1071 1071 IMachine **aMachine) 1072 1072 { 1073 Guid id = aId;1073 Guid id(aId); 1074 1074 if (id.isEmpty()) 1075 1075 return E_INVALIDARG; … … 1171 1171 } 1172 1172 1173 STDMETHODIMP VirtualBox::GetHardDisk(IN_ GUIDaId,1173 STDMETHODIMP VirtualBox::GetHardDisk(IN_BSTR aId, 1174 1174 IHardDisk **aHardDisk) 1175 1175 { … … 1179 1179 CheckComRCReturnRC (autoCaller.rc()); 1180 1180 1181 Guid id = aId;1181 Guid id(aId); 1182 1182 ComObjPtr<HardDisk> hardDisk; 1183 1183 HRESULT rc = findHardDisk(&id, NULL, true /* setError */, &hardDisk); … … 1208 1208 1209 1209 /** @note Doesn't lock anything. */ 1210 STDMETHODIMP VirtualBox::OpenDVDImage (IN_BSTR aLocation, IN_ GUIDaId,1210 STDMETHODIMP VirtualBox::OpenDVDImage (IN_BSTR aLocation, IN_BSTR aId, 1211 1211 IDVDImage **aDVDImage) 1212 1212 { … … 1219 1219 HRESULT rc = VBOX_E_FILE_ERROR; 1220 1220 1221 Guid id = aId;1221 Guid id(aId); 1222 1222 /* generate an UUID if not specified */ 1223 1223 if (id.isEmpty()) … … 1239 1239 1240 1240 /** @note Locks objects! */ 1241 STDMETHODIMP VirtualBox::GetDVDImage (IN_ GUIDaId, IDVDImage **aDVDImage)1241 STDMETHODIMP VirtualBox::GetDVDImage (IN_BSTR aId, IDVDImage **aDVDImage) 1242 1242 { 1243 1243 CheckComArgOutSafeArrayPointerValid(aDVDImage); … … 1246 1246 CheckComRCReturnRC (autoCaller.rc()); 1247 1247 1248 Guid id = aId;1248 Guid id(aId); 1249 1249 ComObjPtr <DVDImage> image; 1250 1250 HRESULT rc = findDVDImage (&id, NULL, true /* setError */, &image); … … 1275 1275 1276 1276 /** @note Doesn't lock anything. */ 1277 STDMETHODIMP VirtualBox::OpenFloppyImage (IN_BSTR aLocation, IN_ GUIDaId,1277 STDMETHODIMP VirtualBox::OpenFloppyImage (IN_BSTR aLocation, IN_BSTR aId, 1278 1278 IFloppyImage **aFloppyImage) 1279 1279 { … … 1286 1286 HRESULT rc = VBOX_E_FILE_ERROR; 1287 1287 1288 Guid id = aId;1288 Guid id(aId); 1289 1289 /* generate an UUID if not specified */ 1290 1290 if (id.isEmpty()) … … 1306 1306 1307 1307 /** @note Locks objects! */ 1308 STDMETHODIMP VirtualBox::GetFloppyImage (IN_ GUIDaId,1308 STDMETHODIMP VirtualBox::GetFloppyImage (IN_BSTR aId, 1309 1309 IFloppyImage **aFloppyImage) 1310 1310 … … 1315 1315 CheckComRCReturnRC (autoCaller.rc()); 1316 1316 1317 Guid id = aId;1317 Guid id(aId); 1318 1318 ComObjPtr<FloppyImage> image; 1319 1319 HRESULT rc = findFloppyImage (&id, NULL, true /* setError */, &image); … … 1696 1696 * @note Locks objects! 1697 1697 */ 1698 STDMETHODIMP VirtualBox::OpenSession (ISession *aSession, IN_ GUIDaMachineId)1698 STDMETHODIMP VirtualBox::OpenSession (ISession *aSession, IN_BSTR aMachineId) 1699 1699 { 1700 1700 CheckComArgNotNull(aSession); … … 1703 1703 CheckComRCReturnRC (autoCaller.rc()); 1704 1704 1705 Guid id = aMachineId;1705 Guid id(aMachineId); 1706 1706 ComObjPtr <Machine> machine; 1707 1707 1708 1708 HRESULT rc = findMachine (id, true /* setError */, &machine); 1709 1709 CheckComRCReturnRC (rc); … … 1734 1734 1735 1735 /* fire an event */ 1736 onSessionStateChange ( aMachineId, SessionState_Open);1736 onSessionStateChange (id, SessionState_Open); 1737 1737 } 1738 1738 … … 1744 1744 */ 1745 1745 STDMETHODIMP VirtualBox::OpenRemoteSession (ISession *aSession, 1746 IN_ GUIDaMachineId,1746 IN_BSTR aMachineId, 1747 1747 IN_BSTR aType, 1748 1748 IN_BSTR aEnvironment, 1749 1749 IProgress **aProgress) 1750 1750 { 1751 LogRel(("remotesession=%s\n", Utf8Str(aMachineId).c_str())); 1752 1753 CheckComArgNotNull(aMachineId); 1751 1754 CheckComArgNotNull(aSession); 1752 1755 CheckComArgNotNull(aType); … … 1756 1759 CheckComRCReturnRC (autoCaller.rc()); 1757 1760 1758 Guid id = aMachineId;1761 Guid id(aMachineId); 1759 1762 ComObjPtr <Machine> machine; 1760 1763 … … 1793 1796 1794 1797 /* fire an event */ 1795 onSessionStateChange ( aMachineId, SessionState_Spawning);1798 onSessionStateChange (id, SessionState_Spawning); 1796 1799 } 1797 1800 … … 1803 1806 */ 1804 1807 STDMETHODIMP VirtualBox::OpenExistingSession (ISession *aSession, 1805 IN_ GUIDaMachineId)1808 IN_BSTR aMachineId) 1806 1809 { 1807 1810 CheckComArgNotNull(aSession); … … 1810 1813 CheckComRCReturnRC (autoCaller.rc()); 1811 1814 1812 Guid id = aMachineId;1815 Guid id(aMachineId); 1813 1816 ComObjPtr <Machine> machine; 1814 1817 … … 1975 1978 CheckComRCReturnRC (autoCaller.rc()); 1976 1979 1977 Guidid;1980 Bstr id; 1978 1981 HRESULT rc = aProgress->COMGETTER(Id) (id.asOutParam()); 1979 1982 AssertComRCReturnRC (rc); … … 1982 1985 AutoWriteLock safeLock (mSafeLock); 1983 1986 1984 mData.mProgressOperations.insert (ProgressMap::value_type (id, aProgress)); 1987 printf("adding %s\n", Utf8Str(id).c_str()); 1988 1989 mData.mProgressOperations.insert (ProgressMap::value_type (Guid(id), aProgress)); 1985 1990 return S_OK; 1986 1991 } … … 2313 2318 case DataChanged: 2314 2319 LogFlow (("OnMachineDataChange: id={%RTuuid}\n", id.ptr())); 2315 aCallback->OnMachineDataChange (id );2320 aCallback->OnMachineDataChange (id.toUtf16()); 2316 2321 break; 2317 2322 … … 2319 2324 LogFlow (("OnMachineStateChange: id={%RTuuid}, state=%d\n", 2320 2325 id.ptr(), state)); 2321 aCallback->OnMachineStateChange (id , state);2326 aCallback->OnMachineStateChange (id.toUtf16(), state); 2322 2327 break; 2323 2328 … … 2325 2330 LogFlow (("OnMachineRegistered: id={%RTuuid}, registered=%d\n", 2326 2331 id.ptr(), registered)); 2327 aCallback->OnMachineRegistered (id , registered);2332 aCallback->OnMachineRegistered (id.toUtf16(), registered); 2328 2333 break; 2329 2334 } … … 2373 2378 BOOL allowChange = TRUE; 2374 2379 CallbackList::iterator it = list.begin(); 2380 Bstr id = aId.toUtf16(); 2375 2381 while ((it != list.end()) && allowChange) 2376 2382 { 2377 HRESULT rc = (*it++)->OnExtraDataCanChange ( aId, aKey, aValue,2383 HRESULT rc = (*it++)->OnExtraDataCanChange (id, aKey, aValue, 2378 2384 aError.asOutParam(), &allowChange); 2379 2385 if (FAILED (rc)) … … 2405 2411 LogFlow (("OnExtraDataChange: machineId={%RTuuid}, key='%ls', val='%ls'\n", 2406 2412 machineId.ptr(), key.raw(), val.raw())); 2407 aCallback->OnExtraDataChange (machineId , key, val);2413 aCallback->OnExtraDataChange (machineId.toUtf16(), key, val); 2408 2414 } 2409 2415 … … 2439 2445 LogFlow (("OnSessionStateChange: machineId={%RTuuid}, sessionState=%d\n", 2440 2446 machineId.ptr(), sessionState)); 2441 aCallback->OnSessionStateChange (machineId , sessionState);2447 aCallback->OnSessionStateChange (machineId.toUtf16(), sessionState); 2442 2448 } 2443 2449 … … 2468 2474 void handleCallback (const ComPtr <IVirtualBoxCallback> &aCallback) 2469 2475 { 2476 Bstr mid = machineId.toUtf16(); 2477 Bstr sid = snapshotId.toUtf16(); 2478 2470 2479 switch (what) 2471 2480 { … … 2473 2482 LogFlow (("OnSnapshotTaken: machineId={%RTuuid}, snapshotId={%RTuuid}\n", 2474 2483 machineId.ptr(), snapshotId.ptr())); 2475 aCallback->OnSnapshotTaken (m achineId, snapshotId);2484 aCallback->OnSnapshotTaken (mid, sid); 2476 2485 break; 2477 2486 … … 2479 2488 LogFlow (("OnSnapshotDiscarded: machineId={%RTuuid}, snapshotId={%RTuuid}\n", 2480 2489 machineId.ptr(), snapshotId.ptr())); 2481 aCallback->OnSnapshotDiscarded (m achineId, snapshotId);2490 aCallback->OnSnapshotDiscarded (mid, sid); 2482 2491 break; 2483 2492 … … 2485 2494 LogFlow (("OnSnapshotChange: machineId={%RTuuid}, snapshotId={%RTuuid}\n", 2486 2495 machineId.ptr(), snapshotId.ptr())); 2487 aCallback->OnSnapshotChange (m achineId, snapshotId);2496 aCallback->OnSnapshotChange (mid, sid); 2488 2497 break; 2489 2498 } … … 2533 2542 LogFlow (("OnGuestPropertyChange: machineId={%RTuuid}, name='%ls', value='%ls', flags='%ls'\n", 2534 2543 machineId.ptr(), name.raw(), value.raw(), flags.raw())); 2535 aCallback->OnGuestPropertyChange (machineId , name, value, flags);2544 aCallback->OnGuestPropertyChange (machineId.toUtf16(), name, value, flags); 2536 2545 } 2537 2546 -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r19176 r19239 1006 1006 <see>IMachine::state</see> 1007 1007 </desc> 1008 <param name="machineId" type=" uuid" dir="in">1008 <param name="machineId" type="wstring" dir="in"> 1009 1009 <desc>ID of the machine this event relates to.</desc> 1010 1010 </param> … … 1018 1018 Any of the settings of the given machine has changed. 1019 1019 </desc> 1020 <param name="machineId" type=" uuid" dir="in">1020 <param name="machineId" type="wstring" dir="in"> 1021 1021 <desc>ID of the machine this event relates to.</desc> 1022 1022 </param> … … 1029 1029 This gives the chance to veto against changes. 1030 1030 </desc> 1031 <param name="machineId" type=" uuid" dir="in">1031 <param name="machineId" type="wstring" dir="in"> 1032 1032 <desc> 1033 1033 ID of the machine this event relates to … … 1064 1064 has changed. 1065 1065 </desc> 1066 <param name="machineId" type=" uuid" dir="in">1066 <param name="machineId" type="wstring" dir="in"> 1067 1067 <desc> 1068 1068 ID of the machine this event relates to. … … 1109 1109 @a mediaId value. 1110 1110 </desc> 1111 <param name="mediaId" type=" uuid" dir="in">1111 <param name="mediaId" type="wstring" dir="in"> 1112 1112 <desc>ID of the media this event relates to.</desc> 1113 1113 </param> … … 1128 1128 within this VirtualBox installation. 1129 1129 </desc> 1130 <param name="machineId" type=" uuid" dir="in">1130 <param name="machineId" type="wstring" dir="in"> 1131 1131 <desc>ID of the machine this event relates to.</desc> 1132 1132 </param> … … 1144 1144 <see>IMachine::sessionState</see> 1145 1145 </desc> 1146 <param name="machineId" type=" uuid" dir="in">1146 <param name="machineId" type="wstring" dir="in"> 1147 1147 <desc>ID of the machine this event relates to.</desc> 1148 1148 </param> … … 1157 1157 <see>ISnapshot</see> 1158 1158 </desc> 1159 <param name="machineId" type=" uuid" dir="in">1159 <param name="machineId" type="wstring" dir="in"> 1160 1160 <desc>ID of the machine this event relates to.</desc> 1161 1161 </param> 1162 <param name="snapshotId" type=" uuid" dir="in">1162 <param name="snapshotId" type="wstring" dir="in"> 1163 1163 <desc>ID of the new snapshot.</desc> 1164 1164 </param> … … 1177 1177 <see>ISnapshot</see> 1178 1178 </desc> 1179 <param name="machineId" type=" uuid" dir="in">1179 <param name="machineId" type="wstring" dir="in"> 1180 1180 <desc>ID of the machine this event relates to.</desc> 1181 1181 </param> 1182 <param name="snapshotId" type=" uuid" dir="in">1182 <param name="snapshotId" type="wstring" dir="in"> 1183 1183 <desc> 1184 1184 ID of the discarded snapshot. <tt>null</tt> means the … … 1194 1194 <see>ISnapshot</see> 1195 1195 </desc> 1196 <param name="machineId" type=" uuid" dir="in">1196 <param name="machineId" type="wstring" dir="in"> 1197 1197 <desc>ID of the machine this event relates to.</desc> 1198 1198 </param> 1199 <param name="snapshotId" type=" uuid" dir="in">1199 <param name="snapshotId" type="wstring" dir="in"> 1200 1200 <desc>ID of the changed snapshot.</desc> 1201 1201 </param> … … 1206 1206 Notification when a guest property has changed. 1207 1207 </desc> 1208 <param name="machineId" type=" uuid" dir="in">1208 <param name="machineId" type="wstring" dir="in"> 1209 1209 <desc> 1210 1210 ID of the machine this event relates to. … … 1626 1626 <desc>Base machine folder (optional).</desc> 1627 1627 </param> 1628 <param name="id" type=" uuid" dir="in">1628 <param name="id" type="wstring" dir="in"> 1629 1629 <desc>Machine UUID (optional).</desc> 1630 1630 </param> … … 1686 1686 <desc>Name of the machine settings file.</desc> 1687 1687 </param> 1688 <param name="id" type=" uuid" dir="in">1688 <param name="id" type="wstring" dir="in"> 1689 1689 <desc>Machine UUID (optional).</desc> 1690 1690 </param> … … 1763 1763 1764 1764 </desc> 1765 <param name="id" type=" uuid" dir="in"/>1765 <param name="id" type="wstring" dir="in"/> 1766 1766 <param name="machine" type="IMachine" dir="return"/> 1767 1767 </method> … … 1820 1820 1821 1821 </desc> 1822 <param name="id" type=" uuid" dir="in">1822 <param name="id" type="wstring" dir="in"> 1823 1823 <desc>UUID of the machine to unregister.</desc> 1824 1824 </param> … … 1974 1974 1975 1975 </desc> 1976 <param name="id" type=" uuid" dir="in">1976 <param name="id" type="wstring" dir="in"> 1977 1977 <desc>UUID of the hard disk to look for.</desc> 1978 1978 </param> … … 2051 2051 </desc> 2052 2052 </param> 2053 <param name="id" type=" uuid" dir="in">2053 <param name="id" type="wstring" dir="in"> 2054 2054 <desc> 2055 2055 UUID to assign to the given image within this VirtualBox installation. … … 2076 2076 2077 2077 </desc> 2078 <param name="id" type=" uuid" dir="in">2078 <param name="id" type="wstring" dir="in"> 2079 2079 <desc>UUID of the image to look for.</desc> 2080 2080 </param> … … 2151 2151 </desc> 2152 2152 </param> 2153 <param name="id" type=" uuid" dir="in">2153 <param name="id" type="wstring" dir="in"> 2154 2154 <desc> 2155 2155 UUID to assign to the given image file within this VirtualBox … … 2176 2176 2177 2177 </desc> 2178 <param name="id" type=" uuid" dir="in">2178 <param name="id" type="wstring" dir="in"> 2179 2179 <desc>UUID of the image to look for.</desc> 2180 2180 </param> … … 2453 2453 </desc> 2454 2454 </param> 2455 <param name="machineId" type=" uuid" dir="in">2455 <param name="machineId" type="wstring" dir="in"> 2456 2456 <desc>ID of the virtual machine to open a session with.</desc> 2457 2457 </param> … … 2545 2545 </desc> 2546 2546 </param> 2547 <param name="machineId" type=" uuid" dir="in">2547 <param name="machineId" type="wstring" dir="in"> 2548 2548 <desc>ID of the virtual machine to open a session with.</desc> 2549 2549 </param> … … 2611 2611 </desc> 2612 2612 </param> 2613 <param name="machineId" type=" uuid" dir="in">2613 <param name="machineId" type="wstring" dir="in"> 2614 2614 <desc>ID of the virtual machine to open a session with.</desc> 2615 2615 </param> … … 3606 3606 notification. 3607 3607 </desc> 3608 <param name="id" type=" uuid" dir="in"/>3608 <param name="id" type="wstring" dir="in"/> 3609 3609 </method> 3610 3610 … … 3622 3622 </note> 3623 3623 </desc> 3624 <param name="id" type=" uuid" dir="in"/>3624 <param name="id" type="wstring" dir="in"/> 3625 3625 <param name="done" type="boolean" dir="in"/> 3626 3626 </method> … … 3782 3782 <desc>The console object that initiated this call.</desc> 3783 3783 </param> 3784 <param name="id" type=" uuid" dir="in">3784 <param name="id" type="wstring" dir="in"> 3785 3785 <desc>UUID of the snapshot to discard.</desc> 3786 3786 </param> … … 4156 4156 </attribute> 4157 4157 4158 <attribute name="id" type=" uuid" readonly="yes">4158 <attribute name="id" type="wstring" readonly="yes"> 4159 4159 <desc>UUID of the virtual machine.</desc> 4160 4160 </attribute> … … 4650 4650 4651 4651 </desc> 4652 <param name="id" type=" uuid" dir="in">4652 <param name="id" type="wstring" dir="in"> 4653 4653 <desc>UUID of the hard disk to attach.</desc> 4654 4654 </param> … … 5120 5120 5121 5121 </desc> 5122 <param name="id" type=" uuid" dir="in">5122 <param name="id" type="wstring" dir="in"> 5123 5123 <desc>UUID of the snapshot to get</desc> 5124 5124 </param> … … 5153 5153 </note> 5154 5154 </desc> 5155 <param name="id" type=" uuid" dir="in">5155 <param name="id" type="wstring" dir="in"> 5156 5156 <desc>UUID of the snapshot to set as the current snapshot.</desc> 5157 5157 </param> … … 6370 6370 </result> 6371 6371 </desc> 6372 <param name="id" type=" uuid" dir="in">6372 <param name="id" type="wstring" dir="in"> 6373 6373 <desc>UUID of the host USB device to attach.</desc> 6374 6374 </param> … … 6394 6394 </result> 6395 6395 </desc> 6396 <param name="id" type=" uuid" dir="in">6396 <param name="id" type="wstring" dir="in"> 6397 6397 <desc>UUID of the USB device to detach.</desc> 6398 6398 </param> … … 6433 6433 <see>IUSBDevice::id</see> 6434 6434 </desc> 6435 <param name="id" type=" uuid" dir="in">6435 <param name="id" type="wstring" dir="in"> 6436 6436 <desc>UUID of the USB device to search for.</desc> 6437 6437 </param> … … 6606 6606 </result> 6607 6607 </desc> 6608 <param name="id" type=" uuid" dir="in">6608 <param name="id" type="wstring" dir="in"> 6609 6609 <desc>UUID of the snapshot to discard.</desc> 6610 6610 </param> … … 6880 6880 </attribute> 6881 6881 6882 <attribute name="id" type=" uuid" readonly="yes">6882 <attribute name="id" type="wstring" readonly="yes"> 6883 6883 <desc>Returns the interface UUID.</desc> 6884 6884 </attribute> … … 7135 7135 </result> 7136 7136 </desc> 7137 <param name="id" type=" uuid" dir="in">7137 <param name="id" type="wstring" dir="in"> 7138 7138 <desc> 7139 7139 Adapter GUID. … … 7298 7298 </note> 7299 7299 </desc> 7300 <param name="id" type=" uuid" dir="in">7300 <param name="id" type="wstring" dir="in"> 7301 7301 <desc>GUID of the host network interface to search for.</desc> 7302 7302 </param> … … 7327 7327 <see>IHostUSBDevice::id</see> 7328 7328 </desc> 7329 <param name="id" type=" uuid" dir="in">7329 <param name="id" type="wstring" dir="in"> 7330 7330 <desc>UUID of the USB device to search for.</desc> 7331 7331 </param> … … 7860 7860 </desc> 7861 7861 7862 <attribute name="id" type=" uuid" readonly="yes">7862 <attribute name="id" type="wstring" readonly="yes"> 7863 7863 <desc>ID of the task.</desc> 7864 7864 </attribute> … … 7906 7906 </attribute> 7907 7907 7908 <attribute name="resultCode" type=" result" readonly="yes">7908 <attribute name="resultCode" type="long" readonly="yes"> 7909 7909 <desc> 7910 7910 Result code of the progress task. … … 8147 8147 </desc> 8148 8148 8149 <attribute name="id" type=" uuid" readonly="yes">8149 <attribute name="id" type="wstring" readonly="yes"> 8150 8150 <desc>UUID of the snapshot.</desc> 8151 8151 </attribute> … … 8359 8359 </desc> 8360 8360 8361 <attribute name="id" type=" uuid" readonly="yes">8361 <attribute name="id" type="wstring" readonly="yes"> 8362 8362 <desc> 8363 8363 UUID of the medium. For a newly created medium, this value is a randomly … … 8489 8489 </attribute> 8490 8490 8491 <attribute name="machineIds" type=" uuid" safearray="yes" readonly="yes">8491 <attribute name="machineIds" type="wstring" safearray="yes" readonly="yes"> 8492 8492 <desc> 8493 8493 Array of UUIDs of all machines this medium is attached to. … … 8522 8522 the snapshots. 8523 8523 </desc> 8524 <param name="machineId" type=" uuid" dir="in">8524 <param name="machineId" type="wstring" dir="in"> 8525 8525 <desc> 8526 8526 UUID of the machine to query. 8527 8527 </desc> 8528 8528 </param> 8529 <param name="snapshotIds" type=" uuid" safearray="yes" dir="return">8529 <param name="snapshotIds" type="wstring" safearray="yes" dir="return"> 8530 8530 <desc> 8531 8531 Array of snapshot UUIDs of the given machine using this medium. … … 9552 9552 </note> 9553 9553 </desc> 9554 <param name="targetId" type=" uuid" dir="in">9554 <param name="targetId" type="wstring" dir="in"> 9555 9555 <desc>UUID of the target ancestor or descendant hard disk.</desc> 9556 9556 </param> … … 9942 9942 9943 9943 </desc> 9944 <param name="imageId" type=" uuid" dir="in"/>9944 <param name="imageId" type="wstring" dir="in"/> 9945 9945 </method> 9946 9946 … … 10008 10008 10009 10009 </desc> 10010 <param name="imageId" type=" uuid" dir="in"/>10010 <param name="imageId" type="wstring" dir="in"/> 10011 10011 </method> 10012 10012 … … 11525 11525 </desc> 11526 11526 11527 <attribute name="id" type=" uuid" readonly="yes">11527 <attribute name="id" type="wstring" readonly="yes"> 11528 11528 <desc> 11529 11529 Unique USB device ID. This ID is built from #vendorId, … … 12443 12443 12444 12444 </desc> 12445 <param name="id" type=" uuid" dir="in"/>12445 <param name="id" type="wstring" dir="in"/> 12446 12446 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/> 12447 12447 </method> -
trunk/src/VBox/Main/include/ApplianceImpl.h
r19134 r19239 52 52 COM_INTERFACE_ENTRY(ISupportErrorInfo) 53 53 COM_INTERFACE_ENTRY(IAppliance) 54 COM_INTERFACE_ENTRY(IDispatch) 54 55 END_COM_MAP() 55 56 -
trunk/src/VBox/Main/include/AudioAdapterImpl.h
r19134 r19239 63 63 COM_INTERFACE_ENTRY(ISupportErrorInfo) 64 64 COM_INTERFACE_ENTRY(IAudioAdapter) 65 COM_INTERFACE_ENTRY(IDispatch) 65 66 END_COM_MAP() 66 67 -
trunk/src/VBox/Main/include/BIOSSettingsImpl.h
r19134 r19239 84 84 COM_INTERFACE_ENTRY(ISupportErrorInfo) 85 85 COM_INTERFACE_ENTRY(IBIOSSettings) 86 COM_INTERFACE_ENTRY(IDispatch) 86 87 END_COM_MAP() 87 88 -
trunk/src/VBox/Main/include/ConsoleImpl.h
r19134 r19239 93 93 COM_INTERFACE_ENTRY(ISupportErrorInfo) 94 94 COM_INTERFACE_ENTRY(IConsole) 95 COM_INTERFACE_ENTRY(IDispatch) 95 96 END_COM_MAP() 96 97 … … 137 138 STDMETHOD(GetDeviceActivity) (DeviceType_T aDeviceType, 138 139 DeviceActivity_T *aDeviceActivity); 139 STDMETHOD(AttachUSBDevice) (IN_ GUIDaId);140 STDMETHOD(DetachUSBDevice) (IN_ GUIDaId, IUSBDevice **aDevice);140 STDMETHOD(AttachUSBDevice) (IN_BSTR aId); 141 STDMETHOD(DetachUSBDevice) (IN_BSTR aId, IUSBDevice **aDevice); 141 142 STDMETHOD(FindUSBDeviceByAddress) (IN_BSTR aAddress, IUSBDevice **aDevice); 142 STDMETHOD(FindUSBDeviceById) (IN_ GUIDaId, IUSBDevice **aDevice);143 STDMETHOD(FindUSBDeviceById) (IN_BSTR aId, IUSBDevice **aDevice); 143 144 STDMETHOD(CreateSharedFolder) (IN_BSTR aName, IN_BSTR aHostPath, BOOL aWritable); 144 145 STDMETHOD(RemoveSharedFolder) (IN_BSTR aName); 145 146 STDMETHOD(TakeSnapshot) (IN_BSTR aName, IN_BSTR aDescription, 146 147 IProgress **aProgress); 147 STDMETHOD(DiscardSnapshot) (IN_ GUIDaId, IProgress **aProgress);148 STDMETHOD(DiscardSnapshot) (IN_BSTR aId, IProgress **aProgress); 148 149 STDMETHOD(DiscardCurrentState) (IProgress **aProgress); 149 150 STDMETHOD(DiscardCurrentSnapshotAndState) (IProgress **aProgress); … … 184 185 HRESULT onSharedFolderChange (BOOL aGlobal); 185 186 HRESULT onUSBDeviceAttach (IUSBDevice *aDevice, IVirtualBoxErrorInfo *aError, ULONG aMaskedIfs); 186 HRESULT onUSBDeviceDetach (IN_ GUIDaId, IVirtualBoxErrorInfo *aError);187 HRESULT onUSBDeviceDetach (IN_BSTR aId, IVirtualBoxErrorInfo *aError); 187 188 HRESULT getGuestProperty (IN_BSTR aKey, BSTR *aValue, ULONG64 *aTimestamp, BSTR *aFlags); 188 189 HRESULT setGuestProperty (IN_BSTR aKey, IN_BSTR aValue, IN_BSTR aFlags); -
trunk/src/VBox/Main/include/ConsoleVRDPServer.h
r19134 r19239 249 249 COM_INTERFACE_ENTRY(ISupportErrorInfo) 250 250 COM_INTERFACE_ENTRY(IRemoteDisplayInfo) 251 COM_INTERFACE_ENTRY(IDispatch) 251 252 END_COM_MAP() 252 253 -
trunk/src/VBox/Main/include/DHCPServerImpl.h
r19134 r19239 51 51 COM_INTERFACE_ENTRY (ISupportErrorInfo) 52 52 COM_INTERFACE_ENTRY (IDHCPServer) 53 COM_INTERFACE_ENTRY (IDispatch) 53 54 END_COM_MAP() 54 55 -
trunk/src/VBox/Main/include/DVDDriveImpl.h
r19134 r19239 70 70 COM_INTERFACE_ENTRY(ISupportErrorInfo) 71 71 COM_INTERFACE_ENTRY(IDVDDrive) 72 COM_INTERFACE_ENTRY(IDispatch) 72 73 END_COM_MAP() 73 74 … … 91 92 92 93 // IDVDDrive methods 93 STDMETHOD(MountImage) (IN_ GUIDaImageId);94 STDMETHOD(MountImage) (IN_BSTR aImageId); 94 95 STDMETHOD(CaptureHostDrive) (IHostDVDDrive *aHostDVDDrive); 95 96 STDMETHOD(Unmount)(); -
trunk/src/VBox/Main/include/DisplayImpl.h
r19134 r19239 101 101 COM_INTERFACE_ENTRY(ISupportErrorInfo) 102 102 COM_INTERFACE_ENTRY(IDisplay) 103 COM_INTERFACE_ENTRY2(IDispatch,IDisplay) 103 104 END_COM_MAP() 104 105 -
trunk/src/VBox/Main/include/FloppyDriveImpl.h
r19134 r19239 70 70 COM_INTERFACE_ENTRY(ISupportErrorInfo) 71 71 COM_INTERFACE_ENTRY(IFloppyDrive) 72 COM_INTERFACE_ENTRY(IDispatch) 72 73 END_COM_MAP() 73 74 … … 91 92 92 93 // IFloppyDrive methods 93 STDMETHOD(MountImage) (IN_ GUIDaImageId);94 STDMETHOD(MountImage) (IN_BSTR aImageId); 94 95 STDMETHOD(CaptureHostDrive) (IHostFloppyDrive *aHostFloppyDrive); 95 96 STDMETHOD(Unmount)(); -
trunk/src/VBox/Main/include/FramebufferImpl.h
r19134 r19239 40 40 BEGIN_COM_MAP(InternalFramebuffer) 41 41 COM_INTERFACE_ENTRY(IFramebuffer) 42 COM_INTERFACE_ENTRY(IDispatch) 42 43 END_COM_MAP() 43 44 -
trunk/src/VBox/Main/include/GuestImpl.h
r19134 r19239 45 45 COM_INTERFACE_ENTRY(ISupportErrorInfo) 46 46 COM_INTERFACE_ENTRY(IGuest) 47 COM_INTERFACE_ENTRY(IDispatch) 47 48 END_COM_MAP() 48 49 -
trunk/src/VBox/Main/include/GuestOSTypeImpl.h
r19134 r19239 45 45 COM_INTERFACE_ENTRY(ISupportErrorInfo) 46 46 COM_INTERFACE_ENTRY(IGuestOSType) 47 COM_INTERFACE_ENTRY(IDispatch) 47 48 END_COM_MAP() 48 49 -
trunk/src/VBox/Main/include/HardDiskAttachmentImpl.h
r19134 r19239 74 74 COM_INTERFACE_ENTRY(ISupportErrorInfo) 75 75 COM_INTERFACE_ENTRY(IHardDiskAttachment) 76 COM_INTERFACE_ENTRY(IDispatch) 76 77 END_COM_MAP() 77 78 -
trunk/src/VBox/Main/include/HardDiskFormatImpl.h
r19134 r19239 82 82 COM_INTERFACE_ENTRY (ISupportErrorInfo) 83 83 COM_INTERFACE_ENTRY (IHardDiskFormat) 84 COM_INTERFACE_ENTRY (IDispatch) 84 85 END_COM_MAP() 85 86 -
trunk/src/VBox/Main/include/HardDiskImpl.h
r19134 r19239 65 65 66 66 BEGIN_COM_MAP (HardDisk) 67 COM_INTERFACE_ENTRY (ISupportErrorInfo)67 COM_INTERFACE_ENTRY (ISupportErrorInfo) 68 68 COM_INTERFACE_ENTRY2 (IMedium, MediumBase) 69 COM_INTERFACE_ENTRY (IHardDisk) 69 COM_INTERFACE_ENTRY (IHardDisk) 70 COM_INTERFACE_ENTRY2 (IDispatch, IHardDisk) 71 COM_INTERFACE_ENTRY2 (IDispatch, MediumBase) 70 72 END_COM_MAP() 71 73 … … 124 126 HardDiskVariant_T aVariant, 125 127 IProgress **aProgress); 126 STDMETHOD(MergeTo) (IN_ GUIDaTargetId, IProgress **aProgress);128 STDMETHOD(MergeTo) (IN_BSTR aTargetId, IProgress **aProgress); 127 129 STDMETHOD(CloneTo) (IHardDisk *aTarget, HardDiskVariant_T aVariant, 128 130 IHardDisk *aParent, IProgress **aProgress); -
trunk/src/VBox/Main/include/HostDVDDriveImpl.h
r19134 r19239 42 42 COM_INTERFACE_ENTRY(ISupportErrorInfo) 43 43 COM_INTERFACE_ENTRY(IHostDVDDrive) 44 COM_INTERFACE_ENTRY(IDispatch) 44 45 END_COM_MAP() 45 46 -
trunk/src/VBox/Main/include/HostFloppyDriveImpl.h
r19134 r19239 42 42 COM_INTERFACE_ENTRY(ISupportErrorInfo) 43 43 COM_INTERFACE_ENTRY(IHostFloppyDrive) 44 COM_INTERFACE_ENTRY(IDispatch) 44 45 END_COM_MAP() 45 46 -
trunk/src/VBox/Main/include/HostImpl.h
r19134 r19239 65 65 COM_INTERFACE_ENTRY(ISupportErrorInfo) 66 66 COM_INTERFACE_ENTRY(IHost) 67 COM_INTERFACE_ENTRY(IDispatch) 67 68 END_COM_MAP() 68 69 … … 96 97 STDMETHOD(CreateHostOnlyNetworkInterface) (IHostNetworkInterface **aHostNetworkInterface, 97 98 IProgress **aProgress); 98 STDMETHOD(RemoveHostOnlyNetworkInterface) (IN_ GUIDaId,99 STDMETHOD(RemoveHostOnlyNetworkInterface) (IN_BSTR aId, 99 100 IHostNetworkInterface **aHostNetworkInterface, 100 101 IProgress **aProgress); … … 106 107 STDMETHOD(FindHostFloppyDrive) (IN_BSTR aName, IHostFloppyDrive **aDrive); 107 108 STDMETHOD(FindHostNetworkInterfaceByName) (IN_BSTR aName, IHostNetworkInterface **networkInterface); 108 STDMETHOD(FindHostNetworkInterfaceById) (IN_ GUIDid, IHostNetworkInterface **networkInterface);109 STDMETHOD(FindHostNetworkInterfaceById) (IN_BSTR id, IHostNetworkInterface **networkInterface); 109 110 STDMETHOD(FindHostNetworkInterfacesOfType) (HostNetworkInterfaceType_T type, ComSafeArrayOut (IHostNetworkInterface *, aNetworkInterfaces)); 110 111 STDMETHOD(FindUSBDeviceByAddress) (IN_BSTR aAddress, IHostUSBDevice **aDevice); 111 STDMETHOD(FindUSBDeviceById) (IN_ GUIDaId, IHostUSBDevice **aDevice);112 STDMETHOD(FindUSBDeviceById) (IN_BSTR aId, IHostUSBDevice **aDevice); 112 113 113 114 // public methods only for internal purposes -
trunk/src/VBox/Main/include/HostNetworkInterfaceImpl.h
r19134 r19239 51 51 COM_INTERFACE_ENTRY (ISupportErrorInfo) 52 52 COM_INTERFACE_ENTRY (IHostNetworkInterface) 53 COM_INTERFACE_ENTRY (IDispatch) 53 54 END_COM_MAP() 54 55 … … 69 70 // IHostNetworkInterface properties 70 71 STDMETHOD(COMGETTER(Name)) (BSTR *aInterfaceName); 71 STDMETHOD(COMGETTER(Id)) ( OUT_GUIDaGuid);72 STDMETHOD(COMGETTER(Id)) (BSTR *aGuid); 72 73 STDMETHOD(COMGETTER(DhcpEnabled)) (BOOL *aDhcpEnabled); 73 74 STDMETHOD(COMGETTER(IPAddress)) (BSTR *aIPAddress); -
trunk/src/VBox/Main/include/KeyboardImpl.h
r19134 r19239 65 65 COM_INTERFACE_ENTRY(ISupportErrorInfo) 66 66 COM_INTERFACE_ENTRY(IKeyboard) 67 COM_INTERFACE_ENTRY(IDispatch) 67 68 END_COM_MAP() 68 69 -
trunk/src/VBox/Main/include/MachineDebuggerImpl.h
r19134 r19239 46 46 COM_INTERFACE_ENTRY (ISupportErrorInfo) 47 47 COM_INTERFACE_ENTRY (IMachineDebugger) 48 COM_INTERFACE_ENTRY (IDispatch) 48 49 END_COM_MAP() 49 50 -
trunk/src/VBox/Main/include/MachineImpl.h
r19236 r19239 456 456 COM_INTERFACE_ENTRY(ISupportErrorInfo) 457 457 COM_INTERFACE_ENTRY(IMachine) 458 COM_INTERFACE_ENTRY(IDispatch) 458 459 END_COM_MAP() 459 460 … … 482 483 STDMETHOD(COMGETTER(Description))(BSTR *aDescription); 483 484 STDMETHOD(COMSETTER(Description))(IN_BSTR aDescription); 484 STDMETHOD(COMGETTER(Id))( OUT_GUIDaId);485 STDMETHOD(COMGETTER(Id))(BSTR *aId); 485 486 STDMETHOD(COMGETTER(OSTypeId)) (BSTR *aOSTypeId); 486 487 STDMETHOD(COMSETTER(OSTypeId)) (IN_BSTR aOSTypeId); … … 541 542 STDMETHOD(SetBootOrder)(ULONG aPosition, DeviceType_T aDevice); 542 543 STDMETHOD(GetBootOrder)(ULONG aPosition, DeviceType_T *aDevice); 543 STDMETHOD(AttachHardDisk)(IN_ GUIDaId, IN_BSTR aControllerName,544 STDMETHOD(AttachHardDisk)(IN_BSTR aId, IN_BSTR aControllerName, 544 545 LONG aControllerPort, LONG aDevice); 545 546 STDMETHOD(GetHardDisk)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice, … … 557 558 STDMETHOD(DeleteSettings)(); 558 559 STDMETHOD(Export)(IAppliance *aAppliance, IVirtualSystemDescription **aDescription); 559 STDMETHOD(GetSnapshot) (IN_ GUIDaId, ISnapshot **aSnapshot);560 STDMETHOD(GetSnapshot) (IN_BSTR aId, ISnapshot **aSnapshot); 560 561 STDMETHOD(FindSnapshot) (IN_BSTR aName, ISnapshot **aSnapshot); 561 STDMETHOD(SetCurrentSnapshot) (IN_ GUIDaId);562 STDMETHOD(SetCurrentSnapshot) (IN_BSTR aId); 562 563 STDMETHOD(CreateSharedFolder) (IN_BSTR aName, IN_BSTR aHostPath, BOOL aWritable); 563 564 STDMETHOD(RemoveSharedFolder) (IN_BSTR aName); … … 906 907 STDMETHOD(GetIPCId)(BSTR *id); 907 908 STDMETHOD(RunUSBDeviceFilters) (IUSBDevice *aUSBDevice, BOOL *aMatched, ULONG *aMaskedIfs); 908 STDMETHOD(CaptureUSBDevice) (IN_ GUIDaId);909 STDMETHOD(DetachUSBDevice) (IN_ GUIDaId, BOOL aDone);909 STDMETHOD(CaptureUSBDevice) (IN_BSTR aId); 910 STDMETHOD(DetachUSBDevice) (IN_BSTR aId, BOOL aDone); 910 911 STDMETHOD(AutoCaptureUSBDevices)(); 911 912 STDMETHOD(DetachAllUSBDevices)(BOOL aDone); … … 919 920 IProgress **aServerProgress); 920 921 STDMETHOD(EndTakingSnapshot) (BOOL aSuccess); 921 STDMETHOD(DiscardSnapshot) (IConsole *aInitiator, IN_ GUIDaId,922 STDMETHOD(DiscardSnapshot) (IConsole *aInitiator, IN_BSTR aId, 922 923 MachineState_T *aMachineState, IProgress **aProgress); 923 924 STDMETHOD(DiscardCurrentState) ( … … 948 949 IVirtualBoxErrorInfo *aError, 949 950 ULONG aMaskedIfs); 950 HRESULT onUSBDeviceDetach (IN_ GUIDaId,951 HRESULT onUSBDeviceDetach (IN_BSTR aId, 951 952 IVirtualBoxErrorInfo *aError); 952 953 HRESULT onSharedFolderChange(); -
trunk/src/VBox/Main/include/MediumImpl.h
r19134 r19239 92 92 93 93 // IMedium properties 94 STDMETHOD(COMGETTER(Id)) ( OUT_GUIDaId);94 STDMETHOD(COMGETTER(Id)) (BSTR *aId); 95 95 STDMETHOD(COMGETTER(Description)) (BSTR *aDescription); 96 96 STDMETHOD(COMSETTER(Description)) (IN_BSTR aDescription); … … 101 101 STDMETHOD(COMGETTER(Size)) (ULONG64 *aSize); 102 102 STDMETHOD(COMGETTER(LastAccessError)) (BSTR *aLastAccessError); 103 STDMETHOD(COMGETTER(MachineIds)) (ComSafe GUIDArrayOut (aMachineIds));103 STDMETHOD(COMGETTER(MachineIds)) (ComSafeArrayOut (BSTR, aMachineIds)); 104 104 105 105 // IMedium methods 106 STDMETHOD(GetSnapshotIds) (IN_ GUIDaMachineId,107 ComSafe GUIDArrayOut (aSnapshotIds));106 STDMETHOD(GetSnapshotIds) (IN_BSTR aMachineId, 107 ComSafeArrayOut (BSTR, aSnapshotIds)); 108 108 STDMETHOD(LockRead) (MediaState_T *aState); 109 109 STDMETHOD(UnlockRead) (MediaState_T *aState); … … 254 254 255 255 BEGIN_COM_MAP (DVDImage) 256 COM_INTERFACE_ENTRY (ISupportErrorInfo)256 COM_INTERFACE_ENTRY (ISupportErrorInfo) 257 257 COM_INTERFACE_ENTRY2 (IMedium, ImageMediumBase) 258 COM_INTERFACE_ENTRY (IDVDImage) 258 COM_INTERFACE_ENTRY (IDVDImage) 259 COM_INTERFACE_ENTRY2 (IDispatch, IDVDImage) 259 260 END_COM_MAP() 260 261 … … 307 308 308 309 BEGIN_COM_MAP (FloppyImage) 309 COM_INTERFACE_ENTRY (ISupportErrorInfo)310 COM_INTERFACE_ENTRY (ISupportErrorInfo) 310 311 COM_INTERFACE_ENTRY2 (IMedium, ImageMediumBase) 311 COM_INTERFACE_ENTRY (IFloppyImage) 312 COM_INTERFACE_ENTRY (IFloppyImage) 313 COM_INTERFACE_ENTRY2 (IDispatch, IFloppyImage) 312 314 END_COM_MAP() 313 315 -
trunk/src/VBox/Main/include/MouseImpl.h
r19134 r19239 64 64 65 65 BEGIN_COM_MAP(Mouse) 66 COM_INTERFACE_ENTRY(ISupportErrorInfo) 67 COM_INTERFACE_ENTRY(IMouse) 66 COM_INTERFACE_ENTRY (ISupportErrorInfo) 67 COM_INTERFACE_ENTRY (IMouse) 68 COM_INTERFACE_ENTRY2 (IDispatch, IMouse) 68 69 END_COM_MAP() 69 70 -
trunk/src/VBox/Main/include/NetworkAdapterImpl.h
r19134 r19239 83 83 84 84 BEGIN_COM_MAP(NetworkAdapter) 85 COM_INTERFACE_ENTRY(ISupportErrorInfo) 86 COM_INTERFACE_ENTRY(INetworkAdapter) 85 COM_INTERFACE_ENTRY (ISupportErrorInfo) 86 COM_INTERFACE_ENTRY (INetworkAdapter) 87 COM_INTERFACE_ENTRY2 (IDispatch, INetworkAdapter) 87 88 END_COM_MAP() 88 89 -
trunk/src/VBox/Main/include/ParallelPortImpl.h
r19134 r19239 69 69 70 70 BEGIN_COM_MAP(ParallelPort) 71 COM_INTERFACE_ENTRY(ISupportErrorInfo) 72 COM_INTERFACE_ENTRY(IParallelPort) 71 COM_INTERFACE_ENTRY (ISupportErrorInfo) 72 COM_INTERFACE_ENTRY (IParallelPort) 73 COM_INTERFACE_ENTRY2 (IDispatch, IParallelPort) 73 74 END_COM_MAP() 74 75 -
trunk/src/VBox/Main/include/PerformanceImpl.h
r19134 r19239 64 64 BEGIN_COM_MAP (PerformanceMetric) 65 65 COM_INTERFACE_ENTRY (IPerformanceMetric) 66 COM_INTERFACE_ENTRY (IDispatch) 66 67 END_COM_MAP() 67 68 … … 136 137 COM_INTERFACE_ENTRY(ISupportErrorInfo) 137 138 COM_INTERFACE_ENTRY(IPerformanceCollector) 139 COM_INTERFACE_ENTRY(IDispatch) 138 140 END_COM_MAP() 139 141 -
trunk/src/VBox/Main/include/ProgressImpl.h
r19134 r19239 66 66 67 67 // IProgress properties 68 STDMETHOD(COMGETTER(Id)) ( OUT_GUIDaId);68 STDMETHOD(COMGETTER(Id)) (BSTR *aId); 69 69 STDMETHOD(COMGETTER(Description)) (BSTR *aDescription); 70 70 STDMETHOD(COMGETTER(Initiator)) (IUnknown **aInitiator); … … 146 146 147 147 BEGIN_COM_MAP (Progress) 148 COM_INTERFACE_ENTRY (ISupportErrorInfo) 149 COM_INTERFACE_ENTRY (IProgress) 148 COM_INTERFACE_ENTRY (ISupportErrorInfo) 149 COM_INTERFACE_ENTRY (IProgress) 150 COM_INTERFACE_ENTRY2 (IDispatch, IProgress) 150 151 END_COM_MAP() 151 152 … … 317 318 318 319 BEGIN_COM_MAP (CombinedProgress) 319 COM_INTERFACE_ENTRY (ISupportErrorInfo) 320 COM_INTERFACE_ENTRY (IProgress) 320 COM_INTERFACE_ENTRY (ISupportErrorInfo) 321 COM_INTERFACE_ENTRY (IProgress) 322 COM_INTERFACE_ENTRY2 (IDispatch, IProgress) 321 323 END_COM_MAP() 322 324 -
trunk/src/VBox/Main/include/RemoteUSBDeviceImpl.h
r19134 r19239 46 46 47 47 BEGIN_COM_MAP (RemoteUSBDevice) 48 COM_INTERFACE_ENTRY (ISupportErrorInfo) 49 COM_INTERFACE_ENTRY (IHostUSBDevice) 50 COM_INTERFACE_ENTRY (IUSBDevice) 48 COM_INTERFACE_ENTRY (ISupportErrorInfo) 49 COM_INTERFACE_ENTRY (IHostUSBDevice) 50 COM_INTERFACE_ENTRY (IUSBDevice) 51 COM_INTERFACE_ENTRY2 (IDispatch, IUSBDevice) 51 52 END_COM_MAP() 52 53 … … 63 64 64 65 // IUSBDevice properties 65 STDMETHOD(COMGETTER(Id)) ( OUT_GUIDaId);66 STDMETHOD(COMGETTER(Id)) (BSTR *aId); 66 67 STDMETHOD(COMGETTER(VendorId)) (USHORT *aVendorId); 67 68 STDMETHOD(COMGETTER(ProductId)) (USHORT *aProductId); -
trunk/src/VBox/Main/include/SerialPortImpl.h
r19134 r19239 76 76 77 77 BEGIN_COM_MAP(SerialPort) 78 COM_INTERFACE_ENTRY(ISupportErrorInfo) 79 COM_INTERFACE_ENTRY(ISerialPort) 78 COM_INTERFACE_ENTRY (ISupportErrorInfo) 79 COM_INTERFACE_ENTRY (ISerialPort) 80 COM_INTERFACE_ENTRY2 (IDispatch, ISerialPort) 80 81 END_COM_MAP() 81 82 -
trunk/src/VBox/Main/include/SessionImpl.h
r19134 r19239 46 46 public VirtualBoxSupportTranslation <Session>, 47 47 #ifdef RT_OS_WINDOWS 48 public IDispatchImpl<ISession, &IID_ISession, &LIBID_VirtualBox, 49 kTypeLibraryMajorVersion, kTypeLibraryMinorVersion>, 50 public IDispatchImpl<IInternalSessionControl, &IID_IInternalSessionControl, &LIBID_VirtualBox, 51 kTypeLibraryMajorVersion, kTypeLibraryMinorVersion>, 48 VBOX_SCRIPTABLE_IMPL(ISession), 49 VBOX_SCRIPTABLE_IMPL(IInternalSessionControl), 52 50 public CComCoClass<Session, &CLSID_Session> 53 51 #else … … 66 64 67 65 BEGIN_COM_MAP(Session) 68 //COM_INTERFACE_ENTRY(IDispatch) 66 COM_INTERFACE_ENTRY2(IDispatch, ISession) 67 COM_INTERFACE_ENTRY2(IDispatch, IInternalSessionControl) 69 68 COM_INTERFACE_ENTRY(IInternalSessionControl) 70 69 COM_INTERFACE_ENTRY(ISupportErrorInfo) … … 107 106 STDMETHOD(OnSharedFolderChange) (BOOL aGlobal); 108 107 STDMETHOD(OnUSBDeviceAttach) (IUSBDevice *aDevice, IVirtualBoxErrorInfo *aError, ULONG aMaskedIfs); 109 STDMETHOD(OnUSBDeviceDetach) (IN_ GUIDaId, IVirtualBoxErrorInfo *aError);108 STDMETHOD(OnUSBDeviceDetach) (IN_BSTR aId, IVirtualBoxErrorInfo *aError); 110 109 STDMETHOD(OnShowWindow) (BOOL aCheck, BOOL *aCanShow, ULONG64 *aWinId); 111 110 STDMETHOD(AccessGuestProperty) (IN_BSTR aName, IN_BSTR aValue, IN_BSTR aFlags, -
trunk/src/VBox/Main/include/SharedFolderImpl.h
r19134 r19239 55 55 56 56 BEGIN_COM_MAP(SharedFolder) 57 COM_INTERFACE_ENTRY(ISupportErrorInfo) 58 COM_INTERFACE_ENTRY(ISharedFolder) 57 COM_INTERFACE_ENTRY (ISupportErrorInfo) 58 COM_INTERFACE_ENTRY (ISharedFolder) 59 COM_INTERFACE_ENTRY2 (IDispatch, ISharedFolder) 59 60 END_COM_MAP() 60 61 -
trunk/src/VBox/Main/include/SnapshotImpl.h
r19134 r19239 59 59 60 60 BEGIN_COM_MAP(Snapshot) 61 COM_INTERFACE_ENTRY(ISupportErrorInfo) 62 COM_INTERFACE_ENTRY(ISnapshot) 61 COM_INTERFACE_ENTRY (ISupportErrorInfo) 62 COM_INTERFACE_ENTRY (ISnapshot) 63 COM_INTERFACE_ENTRY2 (IDispatch, ISnapshot) 63 64 END_COM_MAP() 64 65 … … 77 78 78 79 // ISnapshot properties 79 STDMETHOD(COMGETTER(Id)) ( OUT_GUIDaId);80 STDMETHOD(COMGETTER(Id)) (BSTR *aId); 80 81 STDMETHOD(COMGETTER(Name)) (BSTR *aName); 81 82 STDMETHOD(COMSETTER(Name)) (IN_BSTR aName); -
trunk/src/VBox/Main/include/StorageControllerImpl.h
r19134 r19239 90 90 91 91 BEGIN_COM_MAP(StorageController) 92 COM_INTERFACE_ENTRY (ISupportErrorInfo) 93 COM_INTERFACE_ENTRY (IStorageController) 92 COM_INTERFACE_ENTRY (ISupportErrorInfo) 93 COM_INTERFACE_ENTRY (IStorageController) 94 COM_INTERFACE_ENTRY2 (IDispatch, IStorageController) 94 95 END_COM_MAP() 95 96 -
trunk/src/VBox/Main/include/SystemPropertiesImpl.h
r19134 r19239 49 49 50 50 BEGIN_COM_MAP(SystemProperties) 51 COM_INTERFACE_ENTRY(ISupportErrorInfo) 52 COM_INTERFACE_ENTRY(ISystemProperties) 51 COM_INTERFACE_ENTRY (ISupportErrorInfo) 52 COM_INTERFACE_ENTRY (ISystemProperties) 53 COM_INTERFACE_ENTRY2 (IDispatch, ISystemProperties) 53 54 END_COM_MAP() 54 55 -
trunk/src/VBox/Main/include/USBControllerImpl.h
r19134 r19239 76 76 77 77 BEGIN_COM_MAP(USBController) 78 COM_INTERFACE_ENTRY (ISupportErrorInfo) 79 COM_INTERFACE_ENTRY (IUSBController) 78 COM_INTERFACE_ENTRY (ISupportErrorInfo) 79 COM_INTERFACE_ENTRY (IUSBController) 80 COM_INTERFACE_ENTRY2 (IDispatch, IUSBController) 80 81 END_COM_MAP() 81 82 -
trunk/src/VBox/Main/include/USBDeviceImpl.h
r19134 r19239 47 47 48 48 BEGIN_COM_MAP(OUSBDevice) 49 COM_INTERFACE_ENTRY (ISupportErrorInfo) 50 COM_INTERFACE_ENTRY (IUSBDevice) 49 COM_INTERFACE_ENTRY (ISupportErrorInfo) 50 COM_INTERFACE_ENTRY (IUSBDevice) 51 COM_INTERFACE_ENTRY2 (IDispatch, IUSBDevice) 51 52 END_COM_MAP() 52 53 … … 63 64 64 65 // IUSBDevice properties 65 STDMETHOD(COMGETTER(Id))( OUT_GUIDaId);66 STDMETHOD(COMGETTER(Id))(BSTR *aId); 66 67 STDMETHOD(COMGETTER(VendorId))(USHORT *aVendorId); 67 68 STDMETHOD(COMGETTER(ProductId))(USHORT *aProductId); -
trunk/src/VBox/Main/include/VRDPServerImpl.h
r19134 r19239 69 69 70 70 BEGIN_COM_MAP(VRDPServer) 71 COM_INTERFACE_ENTRY(ISupportErrorInfo) 72 COM_INTERFACE_ENTRY(IVRDPServer) 71 COM_INTERFACE_ENTRY (ISupportErrorInfo) 72 COM_INTERFACE_ENTRY (IVRDPServer) 73 COM_INTERFACE_ENTRY2 (IDispatch, IVRDPServer) 73 74 END_COM_MAP() 74 75 -
trunk/src/VBox/Main/include/VirtualBoxImpl.h
r19236 r19239 139 139 140 140 STDMETHOD(CreateMachine) (IN_BSTR aName, IN_BSTR aOsTypeId, IN_BSTR aBaseFolder, 141 IN_ GUIDaId, IMachine **aMachine);141 IN_BSTR aId, IMachine **aMachine); 142 142 STDMETHOD(CreateLegacyMachine) (IN_BSTR aName, IN_BSTR aOsTypeId, IN_BSTR aSettingsFile, 143 IN_ GUIDaId, IMachine **aMachine);143 IN_BSTR aId, IMachine **aMachine); 144 144 STDMETHOD(OpenMachine) (IN_BSTR aSettingsFile, IMachine **aMachine); 145 145 STDMETHOD(RegisterMachine) (IMachine *aMachine); 146 STDMETHOD(GetMachine) (IN_ GUIDaId, IMachine **aMachine);146 STDMETHOD(GetMachine) (IN_BSTR aId, IMachine **aMachine); 147 147 STDMETHOD(FindMachine) (IN_BSTR aName, IMachine **aMachine); 148 STDMETHOD(UnregisterMachine) (IN_ GUIDaId, IMachine **aMachine);148 STDMETHOD(UnregisterMachine) (IN_BSTR aId, IMachine **aMachine); 149 149 STDMETHOD(CreateAppliance) (IAppliance **anAppliance); 150 150 … … 152 152 IHardDisk **aHardDisk); 153 153 STDMETHOD(OpenHardDisk) (IN_BSTR aLocation, AccessMode_T accessMode, IHardDisk **aHardDisk); 154 STDMETHOD(GetHardDisk) (IN_ GUIDaId, IHardDisk **aHardDisk);154 STDMETHOD(GetHardDisk) (IN_BSTR aId, IHardDisk **aHardDisk); 155 155 STDMETHOD(FindHardDisk) (IN_BSTR aLocation, IHardDisk **aHardDisk); 156 156 157 STDMETHOD(OpenDVDImage) (IN_BSTR aLocation, IN_ GUIDaId,157 STDMETHOD(OpenDVDImage) (IN_BSTR aLocation, IN_BSTR aId, 158 158 IDVDImage **aDVDImage); 159 STDMETHOD(GetDVDImage) (IN_ GUIDaId, IDVDImage **aDVDImage);159 STDMETHOD(GetDVDImage) (IN_BSTR aId, IDVDImage **aDVDImage); 160 160 STDMETHOD(FindDVDImage) (IN_BSTR aLocation, IDVDImage **aDVDImage); 161 161 162 STDMETHOD(OpenFloppyImage) (IN_BSTR aLocation, IN_ GUIDaId,162 STDMETHOD(OpenFloppyImage) (IN_BSTR aLocation, IN_BSTR aId, 163 163 IFloppyImage **aFloppyImage); 164 STDMETHOD(GetFloppyImage) (IN_ GUIDaId, IFloppyImage **aFloppyImage);164 STDMETHOD(GetFloppyImage) (IN_BSTR aId, IFloppyImage **aFloppyImage); 165 165 STDMETHOD(FindFloppyImage) (IN_BSTR aLocation, IFloppyImage **aFloppyImage); 166 166 … … 171 171 STDMETHOD(GetExtraData) (IN_BSTR aKey, BSTR *aValue); 172 172 STDMETHOD(SetExtraData) (IN_BSTR aKey, IN_BSTR aValue); 173 STDMETHOD(OpenSession) (ISession *aSession, IN_ GUIDaMachineId);174 STDMETHOD(OpenRemoteSession) (ISession *aSession, IN_ GUIDaMachineId,173 STDMETHOD(OpenSession) (ISession *aSession, IN_BSTR aMachineId); 174 STDMETHOD(OpenRemoteSession) (ISession *aSession, IN_BSTR aMachineId, 175 175 IN_BSTR aType, IN_BSTR aEnvironment, 176 176 IProgress **aProgress); 177 STDMETHOD(OpenExistingSession) (ISession *aSession, IN_ GUIDaMachineId);177 STDMETHOD(OpenExistingSession) (ISession *aSession, IN_BSTR aMachineId); 178 178 179 179 STDMETHOD(RegisterCallback) (IVirtualBoxCallback *aCallback); -
trunk/src/VBox/Main/testcase/tstAPI.cpp
r18177 r19239 73 73 74 74 printf("Getting machine GUID...\n"); 75 Guid guid;75 Bstr guid; 76 76 CHECK_RC (machine->COMGETTER(Id) (guid.asOutParam())); 77 77 if (SUCCEEDED (rc) && !guid.isEmpty()) { 78 printf ("Guid::toString(): {%s}\n", (const char *) guid.toString());78 printf ("Guid::toString(): {%s}\n", Utf8Str(guid).c_str()); 79 79 } else { 80 80 printf ("WARNING: there's no GUID!"); -
trunk/src/VBox/Main/win/NetIf-win.cpp
r19233 r19239 1025 1025 if(hr == S_OK) 1026 1026 { 1027 GUIDIfGuid;1028 hr = pIf->COMGETTER(Id)( &IfGuid);1027 Bstr IfGuid; 1028 hr = pIf->COMGETTER(Id)(IfGuid.asOutParam()); 1029 1029 Assert(hr == S_OK); 1030 1030 if (hr == S_OK) … … 1156 1156 #else 1157 1157 HRESULT rc; 1158 GUIDguid;1159 rc = pIf->COMGETTER(Id) ( &guid);1158 Bstr guid; 1159 rc = pIf->COMGETTER(Id) (guid.asOutParam()); 1160 1160 if(SUCCEEDED(rc)) 1161 1161 { … … 1185 1185 1186 1186 d->msgCode = SVCHlpMsg::EnableStaticIpConfig; 1187 d->guid = guid;1187 d->guid = Guid(guid); 1188 1188 d->iface = pIf; 1189 1189 d->u.StaticIP.IPAddress = ip; … … 1218 1218 #else 1219 1219 HRESULT rc; 1220 GUIDguid;1221 rc = pIf->COMGETTER(Id) ( &guid);1220 Bstr guid; 1221 rc = pIf->COMGETTER(Id) (guid.asOutParam()); 1222 1222 if(SUCCEEDED(rc)) 1223 1223 { … … 1280 1280 #else 1281 1281 HRESULT rc; 1282 GUIDguid;1283 rc = pIf->COMGETTER(Id) ( &guid);1282 Bstr guid; 1283 rc = pIf->COMGETTER(Id) (guid.asOutParam()); 1284 1284 if(SUCCEEDED(rc)) 1285 1285 { … … 1340 1340 #else 1341 1341 HRESULT rc; 1342 GUIDguid;1343 rc = pIf->COMGETTER(Id) ( &guid);1342 Bstr guid; 1343 rc = pIf->COMGETTER(Id) (guid.asOutParam()); 1344 1344 if(SUCCEEDED(rc)) 1345 1345 { -
trunk/src/VBox/Main/win/dllmain.cpp
r8155 r19239 28 28 #include <atlcom.h> 29 29 30 #include <iprt/initterm.h> 31 30 32 CComModule _Module; 31 33 … … 44 46 _Module.Init(ObjectMap, hInstance, &LIBID_VirtualBox); 45 47 DisableThreadLibraryCalls(hInstance); 48 49 // idempotent, so doesn't harm, and needed for COM embedding scenario 50 RTR3Init(); 46 51 } 47 52 else if (dwReason == DLL_PROCESS_DETACH) -
trunk/src/VBox/Main/win/svchlp.cpp
r18488 r19239 248 248 int vrc = read (guidStr); 249 249 if (RT_SUCCESS (vrc)) 250 aGuid = Guid (guidStr );250 aGuid = Guid (guidStr.c_str()); 251 251 return vrc; 252 252 }
Note:
See TracChangeset
for help on using the changeset viewer.