Changeset 78148 in vbox for trunk/src/VBox
- Timestamp:
- Apr 16, 2019 4:48:18 PM (6 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageCloud.cpp
r77886 r78148 128 128 RTEXITCODE_FAILURE); 129 129 130 ComPtr<IStringArray> pVMNamesHolder; 131 ComPtr<IStringArray> pVMIdsHolder; 130 132 com::SafeArray<BSTR> arrayVMNames; 131 133 com::SafeArray<BSTR> arrayVMIds; 134 ComPtr<IProgress> pProgress; 135 132 136 RTPrintf("Getting a list of available cloud instances...\n"); 133 137 RTPrintf("Reply is in the form \'instance name\' = \'instance id\'\n"); 134 138 CHECK_ERROR2_RET(hrc, oCloudClient, 135 139 ListInstances(CloudMachineState_Running, 136 ComSafeArrayAsOutParam(arrayVMNames), 137 ComSafeArrayAsOutParam(arrayVMIds)), 138 RTEXITCODE_FAILURE); 140 pVMNamesHolder.asOutParam(), 141 pVMIdsHolder.asOutParam(), 142 pProgress.asOutParam()), 143 RTEXITCODE_FAILURE); 144 showProgress(pProgress); 145 CHECK_PROGRESS_ERROR_RET(pProgress, ("Failed to list instances"), RTEXITCODE_FAILURE); 146 147 CHECK_ERROR2_RET(hrc, 148 pVMNamesHolder, COMGETTER(Values)(ComSafeArrayAsOutParam(arrayVMNames)), 149 RTEXITCODE_FAILURE); 150 CHECK_ERROR2_RET(hrc, 151 pVMIdsHolder, COMGETTER(Values)(ComSafeArrayAsOutParam(arrayVMIds)), 152 RTEXITCODE_FAILURE); 153 139 154 RTPrintf("List of available instances for the cloud profile \'%ls\' \nand compartment \'%s\':\n", 140 155 bstrProfileName.raw(), strCompartmentId.c_str()); … … 148 163 RTPrintf("\t%ls = %ls\n", arrayVMNames[k], value.raw()); 149 164 } 165 166 pVMNamesHolder.setNull(); 167 pVMIdsHolder.setNull(); 168 arrayVMNames.setNull(); 169 arrayVMIds.setNull(); 170 pProgress.setNull(); 150 171 CHECK_ERROR2_RET(hrc, oCloudClient, 151 172 ListInstances(CloudMachineState_Stopped, 152 ComSafeArrayAsOutParam(arrayVMNames), 153 ComSafeArrayAsOutParam(arrayVMIds)), 154 RTEXITCODE_FAILURE); 173 pVMNamesHolder.asOutParam(), 174 pVMIdsHolder.asOutParam(), 175 pProgress.asOutParam()), 176 RTEXITCODE_FAILURE); 177 showProgress(pProgress); 178 CHECK_PROGRESS_ERROR_RET(pProgress, ("Failed to list instances"), RTEXITCODE_FAILURE); 179 180 CHECK_ERROR2_RET(hrc, 181 pVMNamesHolder, COMGETTER(Values)(ComSafeArrayAsOutParam(arrayVMNames)), 182 RTEXITCODE_FAILURE); 183 CHECK_ERROR2_RET(hrc, 184 pVMIdsHolder, COMGETTER(Values)(ComSafeArrayAsOutParam(arrayVMIds)), 185 RTEXITCODE_FAILURE); 186 155 187 cNames = arrayVMNames.size(); 156 188 cIds = arrayVMIds.size(); … … 243 275 CreateCloudClient(oCloudClient.asOutParam()), 244 276 RTEXITCODE_FAILURE); 277 278 ComPtr<IStringArray> pVMNamesHolder; 279 ComPtr<IStringArray> pVMIdsHolder; 245 280 com::SafeArray<BSTR> arrayVMNames; 246 281 com::SafeArray<BSTR> arrayVMIds; 282 ComPtr<IProgress> pProgress; 283 247 284 RTPrintf("Getting a list of available cloud images...\n"); 248 285 RTPrintf("Reply is in the form \'image name\' = \'image id\'\n"); 249 286 CHECK_ERROR2_RET(hrc, oCloudClient, 250 287 ListImages(CloudImageState_Available, 251 ComSafeArrayAsOutParam(arrayVMNames), 252 ComSafeArrayAsOutParam(arrayVMIds)), 253 RTEXITCODE_FAILURE); 288 pVMNamesHolder.asOutParam(), 289 pVMIdsHolder.asOutParam(), 290 pProgress.asOutParam()), 291 RTEXITCODE_FAILURE); 292 showProgress(pProgress); 293 CHECK_PROGRESS_ERROR_RET(pProgress, ("Failed to list images"), RTEXITCODE_FAILURE); 294 295 CHECK_ERROR2_RET(hrc, 296 pVMNamesHolder, COMGETTER(Values)(ComSafeArrayAsOutParam(arrayVMNames)), 297 RTEXITCODE_FAILURE); 298 CHECK_ERROR2_RET(hrc, 299 pVMIdsHolder, COMGETTER(Values)(ComSafeArrayAsOutParam(arrayVMIds)), 300 RTEXITCODE_FAILURE); 301 254 302 RTPrintf("List of available images for the cloud profile \'%ls\' \nand compartment \'%s\':\n", 255 303 bstrProfileName.raw(), strCompartmentId.c_str()); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp
r78127 r78148 278 278 else 279 279 { 280 #if 0 280 281 /* Read Cloud Client instances: */ 281 282 QVector<QString> vmNames; … … 299 300 } 300 301 } 302 #else // XXX: uwe 303 msgCenter().cannotAcquireCloudClientParameter(m_comCloudClient); 304 #endif 301 305 } 302 306 } -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r78124 r78148 25537 25537 25538 25538 <!-- 25539 // Auxiliary containers 25540 ////////////////////////////////////////////////////////////////////////// 25541 --> 25542 25543 <interface name="IStringArray" extends="$unknown" 25544 uuid="3890b2c8-604d-11e9-92d3-53cb473db9fb" 25545 wsmap="managed" 25546 reservedMethods="4"> 25547 <desc> 25548 When you need to return an array of strings asynchronously 25549 (under a progress) you cannot use by-value out parameter 25550 <tt>type="wstring" safearray="yes" 25551 dir="out"</tt>, hence this wrapper. 25552 </desc> 25553 <attribute name="values" type="wstring" safearray="yes" readonly="yes"/> 25554 </interface> 25555 25556 25557 <!-- 25539 25558 // IForm 25540 25559 ////////////////////////////////////////////////////////////////////////// … … 25684 25703 <interface 25685 25704 name="ICloudClient" extends="$unknown" 25686 uuid=" 07c04464-981c-4418-8fcf-5ad12aed7c38"25705 uuid="7acc426a-5f8f-11e9-9032-1b0da54759a8" 25687 25706 wsmap="managed" reservedMethods="13" reservedAttributes="8" 25688 25707 > … … 25736 25755 </desc> 25737 25756 <param name="machineState" type="CloudMachineState" dir="in"/> 25738 <param name="returnNames" type=" wstring" safearray="yes" dir="out">25757 <param name="returnNames" type="IStringArray" dir="out"> 25739 25758 <desc>VM names.</desc> 25740 25759 </param> 25741 <param name="returnIds" type=" wstring" safearray="yes" dir="return">25760 <param name="returnIds" type="IStringArray" dir="out"> 25742 25761 <desc>VM ids.</desc> 25743 25762 </param> 25763 <param name="progress" type="IProgress" dir="return"> 25764 <desc> 25765 Progress object to track the operation completion. 25766 </desc> 25767 </param> 25744 25768 </method> 25745 25769 … … 25749 25773 </desc> 25750 25774 <param name="imageState" type="CloudImageState" dir="in"/> 25751 <param name="returnNames" type=" wstring" safearray="yes" dir="out">25775 <param name="returnNames" type="IStringArray" dir="out"> 25752 25776 <desc>Images names.</desc> 25753 25777 </param> 25754 <param name="returnIds" type=" wstring" safearray="yes" dir="return">25778 <param name="returnIds" type="IStringArray" dir="out"> 25755 25779 <desc>Images ids.</desc> 25780 </param> 25781 <param name="progress" type="IProgress" dir="return"> 25782 <desc> 25783 Progress object to track the operation completion. 25784 </desc> 25756 25785 </param> 25757 25786 </method>
Note:
See TracChangeset
for help on using the changeset viewer.