Changeset 92171 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Nov 2, 2021 9:17:48 AM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.cpp
r91158 r92171 66 66 } 67 67 68 CCloudProvider UICloudNetworkingStuff::cloudProviderById(const QUuid &uProviderId,69 QWidget *pParent /* = 0 */)70 {71 /* Acquire cloud provider manager: */72 CCloudProviderManager comProviderManager = cloudProviderManager(pParent);73 if (comProviderManager.isNotNull())74 {75 /* Acquire cloud provider: */76 CCloudProvider comProvider = comProviderManager.GetProviderById(uProviderId);77 if (!comProviderManager.isOk())78 msgCenter().cannotFindCloudProvider(comProviderManager, uProviderId, pParent);79 else80 return comProvider;81 }82 /* Null by default: */83 return CCloudProvider();84 }85 86 CCloudProvider UICloudNetworkingStuff::cloudProviderById(const QUuid &uProviderId,87 QString &strErrorMessage)88 {89 /* Acquire cloud provider manager: */90 CCloudProviderManager comProviderManager = cloudProviderManager(strErrorMessage);91 if (comProviderManager.isNotNull())92 {93 /* Acquire cloud provider: */94 CCloudProvider comProvider = comProviderManager.GetProviderById(uProviderId);95 if (!comProviderManager.isOk())96 strErrorMessage = UIErrorString::formatErrorInfo(comProviderManager);97 else98 return comProvider;99 }100 /* Null by default: */101 return CCloudProvider();102 }103 104 68 CCloudProvider UICloudNetworkingStuff::cloudProviderByShortName(const QString &strProviderShortName, 105 69 QWidget *pParent /* = 0 */) … … 224 188 /* Null by default: */ 225 189 return CCloudClient(); 226 }227 228 CCloudMachine UICloudNetworkingStuff::cloudMachineById(const QString &strProviderShortName,229 const QString &strProfileName,230 const QUuid &uMachineId,231 QWidget *pParent /* = 0 */)232 {233 /* Acquire cloud client: */234 CCloudClient comClient = cloudClientByName(strProviderShortName, strProfileName, pParent);235 if (comClient.isNotNull())236 {237 /* Acquire cloud machine: */238 CCloudMachine comMachine = comClient.GetCloudMachine(uMachineId);239 if (!comClient.isOk())240 msgCenter().cannotAcquireCloudClientParameter(comClient, pParent);241 else242 return comMachine;243 }244 /* Null by default: */245 return CCloudMachine();246 }247 248 CCloudMachine UICloudNetworkingStuff::cloudMachineById(const QString &strProviderShortName,249 const QString &strProfileName,250 const QUuid &uMachineId,251 QString &strErrorMessage)252 {253 /* Acquire cloud client: */254 CCloudClient comClient = cloudClientByName(strProviderShortName, strProfileName, strErrorMessage);255 if (comClient.isNotNull())256 {257 /* Acquire cloud machine: */258 CCloudMachine comMachine = comClient.GetCloudMachine(uMachineId);259 if (!comClient.isOk())260 strErrorMessage = UIErrorString::formatErrorInfo(comClient);261 else262 return comMachine;263 }264 /* Null by default: */265 return CCloudMachine();266 190 } 267 191 … … 295 219 } 296 220 297 CVirtualSystemDescription UICloudNetworkingStuff::createVirtualSystemDescription(QString &strErrorMessage)298 {299 /* Acquire VBox: */300 CVirtualBox comVBox = uiCommon().virtualBox();301 if (comVBox.isNotNull())302 {303 /* Create appliance: */304 CAppliance comAppliance = comVBox.CreateAppliance();305 if (!comVBox.isOk())306 strErrorMessage = UIErrorString::formatErrorInfo(comVBox);307 else308 {309 /* Append it with one (1) description we need: */310 comAppliance.CreateVirtualSystemDescriptions(1);311 if (!comAppliance.isOk())312 strErrorMessage = UIErrorString::formatErrorInfo(comAppliance);313 else314 {315 /* Get received description: */316 QVector<CVirtualSystemDescription> descriptions = comAppliance.GetVirtualSystemDescriptions();317 AssertReturn(!descriptions.isEmpty(), CVirtualSystemDescription());318 return descriptions.at(0);319 }320 }321 }322 /* Null by default: */323 return CVirtualSystemDescription();324 }325 326 221 QVector<CCloudProvider> UICloudNetworkingStuff::listCloudProviders(QWidget *pParent /* = 0 */) 327 222 { … … 341 236 } 342 237 343 QVector<CCloudProvider> UICloudNetworkingStuff::listCloudProviders(QString &strErrorMessage)344 {345 /* Acquire cloud provider manager: */346 CCloudProviderManager comProviderManager = cloudProviderManager();347 if (comProviderManager.isNotNull())348 {349 /* Acquire cloud providers: */350 QVector<CCloudProvider> providers = comProviderManager.GetProviders();351 if (!comProviderManager.isOk())352 strErrorMessage = UIErrorString::formatErrorInfo(comProviderManager);353 else354 return providers;355 }356 /* Return empty list by default: */357 return QVector<CCloudProvider>();358 }359 360 238 bool UICloudNetworkingStuff::cloudProviderId(const CCloudProvider &comCloudProvider, 361 239 QUuid &uResult, … … 413 291 if (!comCloudProvider.isOk()) 414 292 msgCenter().cannotAcquireCloudProviderParameter(comCloudProvider, pParent); 415 else416 return profiles;417 }418 /* Return empty list by default: */419 return QVector<CCloudProfile>();420 }421 422 QVector<CCloudProfile> UICloudNetworkingStuff::listCloudProfiles(CCloudProvider comCloudProvider,423 QString &strErrorMessage)424 {425 /* Check cloud provider: */426 if (comCloudProvider.isNotNull())427 {428 /* Acquire cloud providers: */429 QVector<CCloudProfile> profiles = comCloudProvider.GetProfiles();430 if (!comCloudProvider.isOk())431 strErrorMessage = UIErrorString::formatErrorInfo(comCloudProvider);432 293 else 433 294 return profiles; … … 499 360 } 500 361 501 bool UICloudNetworkingStuff::listCloudImages(const CCloudClient &comCloudClient,502 CStringArray &comNames,503 CStringArray &comIDs,504 QString &strErrorMessage)505 {506 /* Currently we are interested in Available images only: */507 const QVector<KCloudImageState> cloudImageStates = QVector<KCloudImageState>()508 << KCloudImageState_Available;509 /* Execute ListImages async method: */510 CProgress comProgress = comCloudClient.ListImages(cloudImageStates, comNames, comIDs);511 if (!comCloudClient.isOk())512 strErrorMessage = UIErrorString::formatErrorInfo(comCloudClient);513 else514 {515 /* Wait for "Acquire cloud images" progress: */516 comProgress.WaitForCompletion(-1);517 if (!comProgress.isOk() || comProgress.GetResultCode() != 0)518 strErrorMessage = UIErrorString::formatErrorInfo(comProgress);519 else520 return true;521 }522 /* Return false by default: */523 return false;524 }525 526 362 bool UICloudNetworkingStuff::listCloudSourceBootVolumes(const CCloudClient &comCloudClient, 527 363 CStringArray &comNames, … … 548 384 } 549 385 550 bool UICloudNetworkingStuff::listCloudSourceBootVolumes(const CCloudClient &comCloudClient,551 CStringArray &comNames,552 CStringArray &comIDs,553 QString &strErrorMessage)554 {555 /* Execute ListSourceBootVolumes async method: */556 CProgress comProgress = comCloudClient.ListSourceBootVolumes(comNames, comIDs);557 if (!comCloudClient.isOk())558 strErrorMessage = UIErrorString::formatErrorInfo(comCloudClient);559 else560 {561 /* Wait for "Acquire cloud source boot volumes" progress: */562 comProgress.WaitForCompletion(-1);563 if (!comProgress.isOk() || comProgress.GetResultCode() != 0)564 strErrorMessage = UIErrorString::formatErrorInfo(comProgress);565 else566 return true;567 }568 /* Return false by default: */569 return false;570 }571 572 386 bool UICloudNetworkingStuff::listCloudSourceInstances(const CCloudClient &comCloudClient, 573 387 CStringArray &comNames, … … 594 408 } 595 409 596 bool UICloudNetworkingStuff::listCloudSourceInstances(const CCloudClient &comCloudClient,597 CStringArray &comNames,598 CStringArray &comIDs,599 QString &strErrorMessage)600 {601 /* Execute ListSourceInstances async method: */602 CProgress comProgress = comCloudClient.ListSourceInstances(comNames, comIDs);603 if (!comCloudClient.isOk())604 strErrorMessage = UIErrorString::formatErrorInfo(comCloudClient);605 else606 {607 /* Wait for "Acquire cloud source instances" progress: */608 comProgress.WaitForCompletion(-1);609 if (!comProgress.isOk() || comProgress.GetResultCode() != 0)610 strErrorMessage = UIErrorString::formatErrorInfo(comProgress);611 else612 return true;613 }614 /* Return false by default: */615 return false;616 }617 618 QVector<CCloudMachine> UICloudNetworkingStuff::listCloudMachines(CCloudClient comCloudClient,619 QWidget *pParent /* = 0 */)620 {621 /* Execute ReadCloudMachineList async method: */622 CProgress comProgress = comCloudClient.ReadCloudMachineList();623 if (!comCloudClient.isOk())624 msgCenter().cannotAcquireCloudClientParameter(comCloudClient, pParent);625 else626 {627 /* Show "Read cloud machines" progress: */628 msgCenter().showModalProgressDialog(comProgress,629 QString(),630 ":/progress_reading_appliance_90px.png", pParent, 0);631 if (!comProgress.isOk() || comProgress.GetResultCode() != 0)632 msgCenter().cannotAcquireCloudClientParameter(comProgress, pParent);633 else634 return comCloudClient.GetCloudMachineList();635 }636 /* Return empty list by default: */637 return QVector<CCloudMachine>();638 }639 640 QVector<CCloudMachine> UICloudNetworkingStuff::listCloudMachines(CCloudClient comCloudClient,641 QString &strErrorMessage)642 {643 /* Execute ReadCloudMachineList async method: */644 CProgress comProgress = comCloudClient.ReadCloudMachineList();645 if (!comCloudClient.isOk())646 strErrorMessage = UIErrorString::formatErrorInfo(comCloudClient);647 else648 {649 /* Show "Read cloud machines" progress: */650 comProgress.WaitForCompletion(-1);651 if (!comProgress.isOk() || comProgress.GetResultCode() != 0)652 strErrorMessage = UIErrorString::formatErrorInfo(comProgress);653 else654 return comCloudClient.GetCloudMachineList();655 }656 /* Return empty list by default: */657 return QVector<CCloudMachine>();658 }659 660 QVector<CCloudMachine> UICloudNetworkingStuff::listCloudMachineStubs(CCloudClient comCloudClient,661 QWidget *pParent /* = 0 */)662 {663 /* Execute ReadCloudMachineStubList async method: */664 CProgress comProgress = comCloudClient.ReadCloudMachineStubList();665 if (!comCloudClient.isOk())666 msgCenter().cannotAcquireCloudClientParameter(comCloudClient, pParent);667 else668 {669 /* Show "Read cloud machine stubs" progress: */670 msgCenter().showModalProgressDialog(comProgress,671 QString(),672 ":/progress_reading_appliance_90px.png", pParent, 0);673 if (!comProgress.isOk() || comProgress.GetResultCode() != 0)674 msgCenter().cannotAcquireCloudClientParameter(comProgress, pParent);675 else676 return comCloudClient.GetCloudMachineStubList();677 }678 /* Return empty list by default: */679 return QVector<CCloudMachine>();680 }681 682 QVector<CCloudMachine> UICloudNetworkingStuff::listCloudMachineStubs(CCloudClient comCloudClient,683 QString &strErrorMessage)684 {685 /* Execute ReadCloudMachineStubList async method: */686 CProgress comProgress = comCloudClient.ReadCloudMachineStubList();687 if (!comCloudClient.isOk())688 strErrorMessage = UIErrorString::formatErrorInfo(comCloudClient);689 else690 {691 /* Show "Read cloud machine stubs" progress: */692 comProgress.WaitForCompletion(-1);693 if (!comProgress.isOk() || comProgress.GetResultCode() != 0)694 strErrorMessage = UIErrorString::formatErrorInfo(comProgress);695 else696 return comCloudClient.GetCloudMachineStubList();697 }698 /* Return empty list by default: */699 return QVector<CCloudMachine>();700 }701 702 410 bool UICloudNetworkingStuff::exportDescriptionForm(CCloudClient comCloudClient, 703 411 CVirtualSystemDescription comDescription, … … 724 432 } 725 433 726 bool UICloudNetworkingStuff::exportDescriptionForm(CCloudClient comCloudClient,727 CVirtualSystemDescription comDescription,728 CVirtualSystemDescriptionForm &comResult,729 QString &strErrorMessage)730 {731 /* Execute GetExportDescriptionForm async method: */732 CProgress comProgress = comCloudClient.GetExportDescriptionForm(comDescription, comResult);733 if (!comCloudClient.isOk())734 strErrorMessage = UIErrorString::formatErrorInfo(comCloudClient);735 else736 {737 /* Show "Get Export Description Form" progress: */738 comProgress.WaitForCompletion(-1);739 if (!comProgress.isOk() || comProgress.GetResultCode() != 0)740 strErrorMessage = UIErrorString::formatErrorInfo(comProgress);741 else742 return true;743 }744 /* False by default: */745 return false;746 }747 748 434 bool UICloudNetworkingStuff::importDescriptionForm(CCloudClient comCloudClient, 749 435 CVirtualSystemDescription comDescription, … … 770 456 } 771 457 772 bool UICloudNetworkingStuff::importDescriptionForm(CCloudClient comCloudClient,773 CVirtualSystemDescription comDescription,774 CVirtualSystemDescriptionForm &comResult,775 QString &strErrorMessage)776 {777 /* Execute GetImportDescriptionForm async method: */778 CProgress comProgress = comCloudClient.GetImportDescriptionForm(comDescription, comResult);779 if (!comCloudClient.isOk())780 strErrorMessage = UIErrorString::formatErrorInfo(comCloudClient);781 else782 {783 /* Show "Get Import Description Form" progress: */784 comProgress.WaitForCompletion(-1);785 if (!comProgress.isOk() || comProgress.GetResultCode() != 0)786 strErrorMessage = UIErrorString::formatErrorInfo(comProgress);787 else788 return true;789 }790 /* False by default: */791 return false;792 }793 794 458 bool UICloudNetworkingStuff::cloudMachineId(const CCloudMachine &comCloudMachine, 795 459 QUuid &uResult, … … 996 660 997 661 QMap<QString, QString> UICloudNetworkingStuff::listInstances(const CCloudClient &comCloudClient, 998 QString &strErrorMessage,999 662 QWidget *pParent /* = 0 */) 1000 663 { … … 1013 676 if (pParent) 1014 677 msgCenter().cannotAcquireCloudClientParameter(comCloudClient, pParent); 1015 else1016 strErrorMessage = UIErrorString::formatErrorInfo(comCloudClient);1017 678 } 1018 679 else … … 1031 692 if (pParent) 1032 693 msgCenter().cannotAcquireCloudClientParameter(comProgress, pParent); 1033 else1034 strErrorMessage = UIErrorString::formatErrorInfo(comProgress);1035 694 } 1036 695 else … … 1050 709 return QMap<QString, QString>(); 1051 710 } 1052 1053 QMap<KVirtualSystemDescriptionType, QString> UICloudNetworkingStuff::getInstanceInfo(const CCloudClient &comCloudClient,1054 const QString &strId,1055 QString &strErrorMessage,1056 QWidget *pParent /* = 0 */)1057 {1058 /* Prepare result: */1059 QMap<KVirtualSystemDescriptionType, QString> resultMap;1060 1061 /* Get VirtualBox object: */1062 CVirtualBox comVBox = uiCommon().virtualBox();1063 1064 /* Create appliance: */1065 CAppliance comAppliance = comVBox.CreateAppliance();1066 if (!comVBox.isOk())1067 {1068 if (pParent)1069 msgCenter().cannotCreateAppliance(comVBox, pParent);1070 else1071 strErrorMessage = UIErrorString::formatErrorInfo(comVBox);1072 }1073 else1074 {1075 /* Append it with one (1) description we need: */1076 comAppliance.CreateVirtualSystemDescriptions(1);1077 if (!comAppliance.isOk())1078 {1079 if (pParent)1080 msgCenter().cannotCreateVirtualSystemDescription(comAppliance, pParent);1081 else1082 strErrorMessage = UIErrorString::formatErrorInfo(comAppliance);1083 }1084 else1085 {1086 /* Get received description: */1087 QVector<CVirtualSystemDescription> descriptions = comAppliance.GetVirtualSystemDescriptions();1088 AssertReturn(!descriptions.isEmpty(), resultMap);1089 CVirtualSystemDescription comDescription = descriptions.at(0);1090 1091 /* Now execute GetInstanceInfo async method: */1092 CProgress comProgress = comCloudClient.GetInstanceInfo(strId, comDescription);1093 if (!comCloudClient.isOk())1094 {1095 if (pParent)1096 msgCenter().cannotAcquireCloudClientParameter(comCloudClient, pParent);1097 else1098 strErrorMessage = UIErrorString::formatErrorInfo(comCloudClient);1099 }1100 else1101 {1102 /* Show "Acquire instance info" progress: */1103 if (pParent)1104 msgCenter().showModalProgressDialog(comProgress,1105 QString(),1106 ":/progress_reading_appliance_90px.png", pParent, 0);1107 else1108 comProgress.WaitForCompletion(-1);1109 if (!comProgress.isOk() || comProgress.GetResultCode() != 0)1110 {1111 if (pParent)1112 msgCenter().cannotAcquireCloudClientParameter(comProgress, pParent);1113 else1114 strErrorMessage = UIErrorString::formatErrorInfo(comProgress);1115 }1116 else1117 {1118 /* Now acquire description of certain type: */1119 QVector<KVirtualSystemDescriptionType> types;1120 QVector<QString> refs, origValues, configValues, extraConfigValues;1121 comDescription.GetDescription(types, refs, origValues, configValues, extraConfigValues);1122 1123 /* Make sure key & value vectors have the same size: */1124 AssertReturn(!types.isEmpty() && types.size() == configValues.size(), resultMap);1125 /* Append resulting map with key/value pairs we have: */1126 for (int i = 0; i < types.size(); ++i)1127 resultMap[types.at(i)] = configValues.at(i);1128 }1129 }1130 }1131 }1132 1133 /* Return result: */1134 return resultMap;1135 }1136 1137 QString UICloudNetworkingStuff::getInstanceInfo(KVirtualSystemDescriptionType enmType,1138 const CCloudClient &comCloudClient,1139 const QString &strId,1140 QString &strErrorMessage,1141 QWidget *pParent /* = 0 */)1142 {1143 return getInstanceInfo(comCloudClient, strId, strErrorMessage, pParent).value(enmType, QString());1144 }1145 1146 QMap<QString, QString> UICloudNetworkingStuff::getImageInfo(const CCloudClient &comCloudClient,1147 const QString &strId,1148 QString &strErrorMessage,1149 QWidget *pParent /* = 0 */)1150 {1151 /* Prepare result: */1152 QMap<QString, QString> resultMap;1153 1154 /* Execute GetImageInfo async method: */1155 CStringArray comStringArray;1156 CProgress comProgress = comCloudClient.GetImageInfo(strId, comStringArray);1157 if (!comCloudClient.isOk())1158 {1159 if (pParent)1160 msgCenter().cannotAcquireCloudClientParameter(comCloudClient, pParent);1161 else1162 strErrorMessage = UIErrorString::formatErrorInfo(comCloudClient);1163 }1164 else1165 {1166 /* Show "Acquire image info" progress: */1167 if (pParent)1168 msgCenter().showModalProgressDialog(comProgress,1169 QString(),1170 ":/progress_reading_appliance_90px.png", pParent, 0);1171 else1172 comProgress.WaitForCompletion(-1);1173 if (!comProgress.isOk() || comProgress.GetResultCode() != 0)1174 {1175 if (pParent)1176 msgCenter().cannotAcquireCloudClientParameter(comProgress, pParent);1177 else1178 strErrorMessage = UIErrorString::formatErrorInfo(comProgress);1179 }1180 else1181 {1182 /* Append resulting list values we have, split them by pairs: */1183 foreach (const QString &strPair, comStringArray.GetValues())1184 {1185 const QList<QString> pair = strPair.split(" = ");1186 AssertReturn(pair.size() == 2, resultMap);1187 resultMap[pair.at(0)] = pair.at(1);1188 }1189 }1190 }1191 1192 /* Return result: */1193 return resultMap;1194 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.h
r91158 r92171 43 43 * using @a strErrorMessage to store messages to. */ 44 44 SHARED_LIBRARY_STUFF CCloudProviderManager cloudProviderManager(QString &strErrorMessage); 45 /** Acquires cloud provider specified by @a uProviderId,46 * using @a pParent to show messages according to. */47 SHARED_LIBRARY_STUFF CCloudProvider cloudProviderById(const QUuid &uProviderId,48 QWidget *pParent = 0);49 /** Acquires cloud provider specified by @a uProviderId,50 * using @a strErrorMessage to store messages to. */51 SHARED_LIBRARY_STUFF CCloudProvider cloudProviderById(const QUuid &uProviderId,52 QString &strErrorMessage);53 45 /** Acquires cloud provider specified by @a strProviderShortName, 54 46 * using @a pParent to show messages according to. */ … … 87 79 const QString &strProfileName, 88 80 QString &strErrorMessage); 89 /** Acquires cloud machine specified by @a strProviderShortName, @a strProfileName and @a uMachineId,90 * using @a pParent to show messages according to. */91 SHARED_LIBRARY_STUFF CCloudMachine cloudMachineById(const QString &strProviderShortName,92 const QString &strProfileName,93 const QUuid &uMachineId,94 QWidget *pParent = 0);95 /** Acquires cloud machine specified by @a strProviderShortName, @a strProfileName and @a uMachineId,96 * using @a strErrorMessage to store messages to. */97 SHARED_LIBRARY_STUFF CCloudMachine cloudMachineById(const QString &strProviderShortName,98 const QString &strProfileName,99 const QUuid &uMachineId,100 QString &strErrorMessage);101 81 102 82 /** Creates virtual system description, using @a pParent to show messages according to. */ 103 83 SHARED_LIBRARY_STUFF CVirtualSystemDescription createVirtualSystemDescription(QWidget *pParent = 0); 104 /** Creates virtual system description, using @a strErrorMessage to store messages to. */105 SHARED_LIBRARY_STUFF CVirtualSystemDescription createVirtualSystemDescription(QString &strErrorMessage);106 84 107 85 /** Acquires cloud providers, using @a pParent to show messages according to. */ 108 86 SHARED_LIBRARY_STUFF QVector<CCloudProvider> listCloudProviders(QWidget *pParent = 0); 109 /** Acquires cloud providers, using @a strErrorMessage to store messages to. */110 SHARED_LIBRARY_STUFF QVector<CCloudProvider> listCloudProviders(QString &strErrorMessage);111 87 112 88 /** Acquires @a comCloudProvider ID as a @a uResult, using @a pParent to show messages according to. */ … … 126 102 SHARED_LIBRARY_STUFF QVector<CCloudProfile> listCloudProfiles(CCloudProvider comCloudProvider, 127 103 QWidget *pParent = 0); 128 /** Acquires cloud profiles of certain @a comCloudProvider, using @a strErrorMessage to store messages to. */129 SHARED_LIBRARY_STUFF QVector<CCloudProfile> listCloudProfiles(CCloudProvider comCloudProvider,130 QString &strErrorMessage);131 104 132 105 /** Acquires @a comCloudProfile name as a @a strResult, using @a pParent to show messages according to. */ … … 145 118 CStringArray &comIDs, 146 119 QWidget *pParent = 0); 147 /** Acquires cloud images of certain @a comCloudClient, using @a strErrorMessage to store messages to. */148 SHARED_LIBRARY_STUFF bool listCloudImages(const CCloudClient &comCloudClient,149 CStringArray &comNames,150 CStringArray &comIDs,151 QString &strErrorMessage);152 120 /** Acquires cloud source boot volumes of certain @a comCloudClient, using @a pParent to show messages according to. */ 153 121 SHARED_LIBRARY_STUFF bool listCloudSourceBootVolumes(const CCloudClient &comCloudClient, … … 155 123 CStringArray &comIDs, 156 124 QWidget *pParent = 0); 157 /** Acquires cloud source boot volumes of certain @a comCloudClient, using @a strErrorMessage to store messages to. */158 SHARED_LIBRARY_STUFF bool listCloudSourceBootVolumes(const CCloudClient &comCloudClient,159 CStringArray &comNames,160 CStringArray &comIDs,161 QString &strErrorMessage);162 125 /** Acquires cloud source instances of certain @a comCloudClient, using @a pParent to show messages according to. */ 163 126 SHARED_LIBRARY_STUFF bool listCloudSourceInstances(const CCloudClient &comCloudClient, … … 165 128 CStringArray &comIDs, 166 129 QWidget *pParent = 0); 167 /** Acquires cloud source instances of certain @a comCloudClient, using @a strErrorMessage to store messages to. */168 SHARED_LIBRARY_STUFF bool listCloudSourceInstances(const CCloudClient &comCloudClient,169 CStringArray &comNames,170 CStringArray &comIDs,171 QString &strErrorMessage);172 173 /** Acquires cloud machines of certain @a comCloudClient, using @a pParent to show messages according to. */174 SHARED_LIBRARY_STUFF QVector<CCloudMachine> listCloudMachines(CCloudClient comCloudClient,175 QWidget *pParent = 0);176 /** Acquires cloud machines of certain @a comCloudClient, using @a strErrorMessage to store messages to. */177 SHARED_LIBRARY_STUFF QVector<CCloudMachine> listCloudMachines(CCloudClient comCloudClient,178 QString &strErrorMessage);179 /** Acquires cloud machine stubs of certain @a comCloudClient, using @a pParent to show messages according to. */180 SHARED_LIBRARY_STUFF QVector<CCloudMachine> listCloudMachineStubs(CCloudClient comCloudClient,181 QWidget *pParent = 0);182 /** Acquires cloud machine stubs of certain @a comCloudClient, using @a strErrorMessage to store messages to. */183 SHARED_LIBRARY_STUFF QVector<CCloudMachine> listCloudMachineStubs(CCloudClient comCloudClient,184 QString &strErrorMessage);185 130 186 131 /** Acquires @a comCloudClient export description form as a @a comResult, using @a pParent to show messages according to. … … 190 135 CVirtualSystemDescriptionForm &comResult, 191 136 QWidget *pParent = 0); 192 /** Acquires @a comCloudClient export description form as a @a comResult, using @a strErrorMessage to store messages to.193 * @note Be aware, this is a blocking function, it will hang for a time of progress being executed. */194 SHARED_LIBRARY_STUFF bool exportDescriptionForm(CCloudClient comCloudClient,195 CVirtualSystemDescription comDescription,196 CVirtualSystemDescriptionForm &comResult,197 QString &strErrorMessage);198 137 /** Acquires @a comCloudClient import description form as a @a comResult, using @a pParent to show messages according to. 199 138 * @note Be aware, this is a blocking function, corresponding progress dialog will be executed. */ … … 202 141 CVirtualSystemDescriptionForm &comResult, 203 142 QWidget *pParent = 0); 204 /** Acquires @a comCloudClient import description form as a @a comResult, using @a strErrorMessage to store messages to.205 * @note Be aware, this is a blocking function, it will hang for a time of progress being executed. */206 SHARED_LIBRARY_STUFF bool importDescriptionForm(CCloudClient comCloudClient,207 CVirtualSystemDescription comDescription,208 CVirtualSystemDescriptionForm &comResult,209 QString &strErrorMessage);210 143 211 144 /** Acquires @a comCloudMachine ID as a @a uResult, using @a pParent to show messages according to. */ … … 257 190 258 191 /** Acquires instance map. 259 * @param comCloudClient Brings cloud client object. 260 * @param strErrorMessage Brings error message container. 261 * @param pWidget Brings parent widget to show messages according to, 262 * if no parent set, progress will be executed in blocking way. */ 192 * @param comCloudClient Brings cloud client object. 193 * @param pWidget Brings parent widget to show messages according to, 194 * if no parent set, progress will be executed in blocking way. */ 263 195 SHARED_LIBRARY_STUFF QMap<QString, QString> listInstances(const CCloudClient &comCloudClient, 264 QString &strErrorMessage,265 196 QWidget *pParent = 0); 266 /** Acquires instance info as a map.267 * @param comCloudClient Brings cloud client object.268 * @param strId Brings cloud instance id.269 * @param strErrorMessage Brings error message container.270 * @param pWidget Brings parent widget to show messages according to,271 * if no parent set, progress will be executed in blocking way. */272 SHARED_LIBRARY_STUFF QMap<KVirtualSystemDescriptionType, QString> getInstanceInfo(const CCloudClient &comCloudClient,273 const QString &strId,274 QString &strErrorMessage,275 QWidget *pParent = 0);276 /** Acquires instance info of certain @a enmType as a string.277 * @param comCloudClient Brings cloud client object.278 * @param strId Brings cloud instance id.279 * @param strErrorMessage Brings error message container.280 * @param pWidget Brings parent widget to show messages according to,281 * if no parent set, progress will be executed in blocking way. */282 SHARED_LIBRARY_STUFF QString getInstanceInfo(KVirtualSystemDescriptionType enmType,283 const CCloudClient &comCloudClient,284 const QString &strId,285 QString &strErrorMessage,286 QWidget *pParent = 0);287 /** Acquires image info as a map.288 * @param comCloudClient Brings cloud client object.289 * @param strId Brings cloud image id.290 * @param strErrorMessage Brings error message container.291 * @param pWidget Brings parent widget to show messages according to,292 * if no parent set, progress will be executed in blocking way. */293 SHARED_LIBRARY_STUFF QMap<QString, QString> getImageInfo(const CCloudClient &comCloudClient,294 const QString &strId,295 QString &strErrorMessage,296 QWidget *pParent = 0);297 197 } 298 198 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSource.cpp
r92096 r92171 258 258 /* Gather VM names, ids and states. 259 259 * Currently we are interested in Running and Stopped VMs only. */ 260 QString strErrorMessage; 261 const QMap<QString, QString> instances = listInstances(comClient, strErrorMessage, pParent); 260 const QMap<QString, QString> instances = listInstances(comClient, pParent); 262 261 263 262 /* Push acquired names to list rows: */
Note:
See TracChangeset
for help on using the changeset viewer.