Changeset 83992 in vbox
- Timestamp:
- Apr 27, 2020 10:16:01 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 137559
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.cpp
r83720 r83992 27 27 #include "CStringArray.h" 28 28 #include "CVirtualBox.h" 29 #include "CVirtualBoxErrorInfo.h" 29 30 #include "CVirtualSystemDescription.h" 30 31 … … 117 118 /* Null by default: */ 118 119 return CCloudMachine(); 120 } 121 122 bool UICloudNetworkingStuff::cloudMachineId(const CCloudMachine &comCloudMachine, 123 QUuid &uResult, 124 QWidget *pParent /* = 0 */) 125 { 126 const QUuid uId = comCloudMachine.GetId(); 127 if (!comCloudMachine.isOk()) 128 { 129 msgCenter().cannotAcquireCloudMachineParameter(comCloudMachine, pParent); 130 return false; 131 } 132 uResult = uId; 133 return true; 134 } 135 136 bool UICloudNetworkingStuff::cloudMachineAccessible(const CCloudMachine &comCloudMachine, 137 bool &fResult, 138 QWidget *pParent /* = 0 */) 139 { 140 const bool fAccessible = comCloudMachine.GetAccessible(); 141 if (!comCloudMachine.isOk()) 142 { 143 msgCenter().cannotAcquireCloudMachineParameter(comCloudMachine, pParent); 144 return false; 145 } 146 fResult = fAccessible; 147 return true; 148 } 149 150 bool UICloudNetworkingStuff::cloudMachineAccessError(const CCloudMachine &comCloudMachine, 151 CVirtualBoxErrorInfo &comResult, 152 QWidget *pParent /* = 0 */) 153 { 154 const CVirtualBoxErrorInfo comAccessError = comCloudMachine.GetAccessError(); 155 if (!comCloudMachine.isOk()) 156 { 157 msgCenter().cannotAcquireCloudMachineParameter(comCloudMachine, pParent); 158 return false; 159 } 160 comResult = comAccessError; 161 return true; 162 } 163 164 bool UICloudNetworkingStuff::cloudMachineName(const CCloudMachine &comCloudMachine, 165 QString &strResult, 166 QWidget *pParent /* = 0 */) 167 { 168 const QString strName = comCloudMachine.GetName(); 169 if (!comCloudMachine.isOk()) 170 { 171 msgCenter().cannotAcquireCloudMachineParameter(comCloudMachine, pParent); 172 return false; 173 } 174 strResult = strName; 175 return true; 176 } 177 178 bool UICloudNetworkingStuff::cloudMachineOSTypeId(const CCloudMachine &comCloudMachine, 179 QString &strResult, 180 QWidget *pParent /* = 0 */) 181 { 182 const QString strOSTypeId = comCloudMachine.GetOSTypeId(); 183 if (!comCloudMachine.isOk()) 184 { 185 msgCenter().cannotAcquireCloudMachineParameter(comCloudMachine, pParent); 186 return false; 187 } 188 strResult = strOSTypeId; 189 return true; 190 } 191 192 bool UICloudNetworkingStuff::cloudMachineState(const CCloudMachine &comCloudMachine, 193 KMachineState &enmResult, 194 QWidget *pParent /* = 0 */) 195 { 196 const KMachineState enmState = comCloudMachine.GetState(); 197 if (!comCloudMachine.isOk()) 198 { 199 msgCenter().cannotAcquireCloudMachineParameter(comCloudMachine, pParent); 200 return false; 201 } 202 enmResult = enmState; 203 return true; 119 204 } 120 205 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.h
r83720 r83992 50 50 const QString &strProfileName, 51 51 const QUuid &uMachineId); 52 53 /** Acquires @a comCloudMachine ID as a @a uResult, using @a pParent to show messages according to. */ 54 SHARED_LIBRARY_STUFF bool cloudMachineId(const CCloudMachine &comCloudMachine, 55 QUuid &uResult, 56 QWidget *pParent = 0); 57 /** Acquires @a comCloudMachine accessible state as a @a fResult, using @a pParent to show messages according to. */ 58 SHARED_LIBRARY_STUFF bool cloudMachineAccessible(const CCloudMachine &comCloudMachine, 59 bool &fResult, 60 QWidget *pParent = 0); 61 /** Acquires @a comCloudMachine accessible error as a @a comResult, using @a pParent to show messages according to. */ 62 SHARED_LIBRARY_STUFF bool cloudMachineAccessError(const CCloudMachine &comCloudMachine, 63 CVirtualBoxErrorInfo &comResult, 64 QWidget *pParent = 0); 65 /** Acquires @a comCloudMachine name as a @a strResult, using @a pParent to show messages according to. */ 66 SHARED_LIBRARY_STUFF bool cloudMachineName(const CCloudMachine &comCloudMachine, 67 QString &strResult, 68 QWidget *pParent = 0); 69 /** Acquires @a comCloudMachine OS type ID as a @a strResult, using @a pParent to show messages according to. */ 70 SHARED_LIBRARY_STUFF bool cloudMachineOSTypeId(const CCloudMachine &comCloudMachine, 71 QString &strResult, 72 QWidget *pParent = 0); 73 /** Acquires @a comCloudMachine state as a @a enmResult, using @a pParent to show messages according to. */ 74 SHARED_LIBRARY_STUFF bool cloudMachineState(const CCloudMachine &comCloudMachine, 75 KMachineState &enmResult, 76 QWidget *pParent = 0); 52 77 53 78 /** Acquires instance map.
Note:
See TracChangeset
for help on using the changeset viewer.