Changeset 52248 in vbox
- Timestamp:
- Jul 31, 2014 7:00:11 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 95331
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/apiwrap-server.xsl
r51601 r52248 805 805 806 806 <xsl:template match="attribute" mode="public"> 807 <xsl:param name="target"/> 808 809 <xsl:call-template name="emitTargetBegin"> 810 <xsl:with-param name="target" select="$target"/> 811 </xsl:call-template> 812 807 813 <xsl:variable name="attrbasename"> 808 814 <xsl:call-template name="capitalize"> … … 826 832 </xsl:text> 827 833 </xsl:if> 834 835 <xsl:call-template name="emitTargetEnd"> 836 <xsl:with-param name="target" select="$target"/> 837 </xsl:call-template> 828 838 </xsl:template> 829 839 830 840 <xsl:template match="attribute" mode="wrapped"> 841 <xsl:param name="target"/> 842 843 <xsl:call-template name="emitTargetBegin"> 844 <xsl:with-param name="target" select="$target"/> 845 </xsl:call-template> 846 831 847 <xsl:variable name="attrbasename"> 832 848 <xsl:call-template name="capitalize"> … … 862 878 </xsl:text> 863 879 </xsl:if> 880 881 <xsl:call-template name="emitTargetEnd"> 882 <xsl:with-param name="target" select="$target"/> 883 </xsl:call-template> 864 884 </xsl:template> 865 885 866 886 <xsl:template match="attribute" mode="code"> 867 887 <xsl:param name="topclass"/> 888 <xsl:param name="target"/> 889 890 <xsl:call-template name="emitTargetBegin"> 891 <xsl:with-param name="target" select="$target"/> 892 </xsl:call-template> 868 893 869 894 <xsl:variable name="attrbasename"> … … 960 985 return hrc; 961 986 } 962 963 987 </xsl:text> 964 988 <xsl:if test="not(@readonly) or @readonly!='yes'"> 989 <xsl:text> 990 </xsl:text> 965 991 <xsl:value-of select="concat('STDMETHODIMP ', $topclass, 'Wrap::COMSETTER(', $attrbasename, ')(')"/> 966 992 <xsl:apply-templates select="@type" mode="public"> … … 1026 1052 return hrc; 1027 1053 } 1028 1029 </xsl:text> 1030 </xsl:if> 1054 </xsl:text> 1055 </xsl:if> 1056 1057 <xsl:call-template name="emitTargetEnd"> 1058 <xsl:with-param name="target" select="$target"/> 1059 </xsl:call-template> 1060 1061 <xsl:text> 1062 </xsl:text> 1031 1063 </xsl:template> 1032 1064 … … 1065 1097 <xsl:choose> 1066 1098 <xsl:when test="$pmode='public'"> 1067 <xsl:apply-templates select="$iface/attribute" mode="public"/> 1099 <xsl:apply-templates select="$iface/attribute | $iface/if" mode="public"> 1100 <xsl:with-param name="emitmode" select="'attribute'"/> 1101 </xsl:apply-templates> 1068 1102 </xsl:when> 1069 1103 <xsl:when test="$pmode='wrapped'"> 1070 <xsl:apply-templates select="$iface/attribute" mode="wrapped"/> 1104 <xsl:apply-templates select="$iface/attribute | $iface/if" mode="wrapped"> 1105 <xsl:with-param name="emitmode" select="'attribute'"/> 1106 </xsl:apply-templates> 1071 1107 </xsl:when> 1072 1108 <xsl:when test="$pmode='code'"> 1073 <xsl:apply-templates select="$iface/attribute " mode="code">1109 <xsl:apply-templates select="$iface/attribute | $iface/if" mode="code"> 1074 1110 <xsl:with-param name="topclass" select="$topclass"/> 1111 <xsl:with-param name="emitmode" select="'attribute'"/> 1075 1112 </xsl:apply-templates> 1076 1113 </xsl:when> … … 1078 1115 </xsl:choose> 1079 1116 </xsl:template> 1117 1118 <xsl:template name="emitTargetBegin"> 1119 <xsl:param name="target"/> 1120 1121 <xsl:choose> 1122 <xsl:when test="$target = 'xpidl'"> 1123 <xsl:text>#ifdef VBOX_WITH_XPCOM 1124 </xsl:text> 1125 </xsl:when> 1126 <xsl:when test="$target = 'midl'"> 1127 <xsl:text>#ifndef VBOX_WITH_XPCOM 1128 </xsl:text> 1129 </xsl:when> 1130 <xsl:otherwise/> 1131 </xsl:choose> 1132 </xsl:template> 1133 1134 <xsl:template name="emitTargetEnd"> 1135 <xsl:param name="target"/> 1136 1137 <xsl:choose> 1138 <xsl:when test="$target = 'xpidl'"> 1139 <xsl:text>#endif /* VBOX_WITH_XPCOM */ 1140 </xsl:text> 1141 </xsl:when> 1142 <xsl:when test="$target = 'midl'"> 1143 <xsl:text>#endif /* !VBOX_WITH_XPCOM */ 1144 </xsl:text> 1145 </xsl:when> 1146 <xsl:otherwise/> 1147 </xsl:choose> 1148 </xsl:template> 1149 1080 1150 1081 1151 <!-- - - - - - - - - - - - - - - - - - - - - - - … … 1084 1154 1085 1155 <xsl:template match="method" mode="public"> 1156 <xsl:param name="target"/> 1157 1158 <xsl:call-template name="emitTargetBegin"> 1159 <xsl:with-param name="target" select="$target"/> 1160 </xsl:call-template> 1161 1086 1162 <xsl:variable name="methodindent"> 1087 1163 <xsl:call-template name="tospace"> … … 1107 1183 <xsl:text>); 1108 1184 </xsl:text> 1185 1186 <xsl:call-template name="emitTargetEnd"> 1187 <xsl:with-param name="target" select="$target"/> 1188 </xsl:call-template> 1109 1189 </xsl:template> 1110 1190 1111 1191 <xsl:template match="method" mode="wrapped"> 1192 <xsl:param name="target"/> 1193 1194 <xsl:call-template name="emitTargetBegin"> 1195 <xsl:with-param name="target" select="$target"/> 1196 </xsl:call-template> 1197 1112 1198 <xsl:variable name="methodindent"> 1113 1199 <xsl:call-template name="tospace"> … … 1147 1233 <xsl:text>) = 0; 1148 1234 </xsl:text> 1235 1236 <xsl:call-template name="emitTargetEnd"> 1237 <xsl:with-param name="target" select="$target"/> 1238 </xsl:call-template> 1149 1239 </xsl:template> 1150 1240 1151 1241 <xsl:template match="method" mode="code"> 1152 1242 <xsl:param name="topclass"/> 1243 <xsl:param name="target"/> 1244 1245 <xsl:call-template name="emitTargetBegin"> 1246 <xsl:with-param name="target" select="$target"/> 1247 </xsl:call-template> 1153 1248 1154 1249 <xsl:variable name="methodindent"> … … 1299 1394 return hrc; 1300 1395 } 1301 1302 </xsl:text> 1396 </xsl:text> 1397 1398 <xsl:call-template name="emitTargetEnd"> 1399 <xsl:with-param name="target" select="$target"/> 1400 </xsl:call-template> 1401 1402 <xsl:text> 1403 </xsl:text> 1404 </xsl:template> 1405 1406 <xsl:template name="emitIf"> 1407 <xsl:param name="passmode"/> 1408 <xsl:param name="target"/> 1409 <xsl:param name="topclass"/> 1410 <xsl:param name="emitmode"/> 1411 1412 <xsl:if test="($target = 'xpidl') or ($target = 'midl')"> 1413 <xsl:choose> 1414 <xsl:when test="$filelistonly=''"> 1415 <xsl:choose> 1416 <xsl:when test="$passmode='public'"> 1417 <xsl:choose> 1418 <xsl:when test="$emitmode='method'"> 1419 <xsl:apply-templates select="method" mode="public"> 1420 <xsl:with-param name="target" select="$target"/> 1421 </xsl:apply-templates> 1422 </xsl:when> 1423 <xsl:when test="$emitmode='attribute'"> 1424 <xsl:apply-templates select="attribute" mode="public"> 1425 <xsl:with-param name="target" select="$target"/> 1426 </xsl:apply-templates> 1427 </xsl:when> 1428 <xsl:otherwise/> 1429 </xsl:choose> 1430 </xsl:when> 1431 <xsl:when test="$passmode='wrapped'"> 1432 <xsl:choose> 1433 <xsl:when test="$emitmode='method'"> 1434 <xsl:apply-templates select="method" mode="wrapped"> 1435 <xsl:with-param name="target" select="$target"/> 1436 </xsl:apply-templates> 1437 </xsl:when> 1438 <xsl:when test="$emitmode='attribute'"> 1439 <xsl:apply-templates select="attribute" mode="wrapped"> 1440 <xsl:with-param name="target" select="$target"/> 1441 </xsl:apply-templates> 1442 </xsl:when> 1443 <xsl:otherwise/> 1444 </xsl:choose> 1445 </xsl:when> 1446 <xsl:when test="$passmode='code'"> 1447 <xsl:choose> 1448 <xsl:when test="$emitmode='method'"> 1449 <xsl:apply-templates select="method" mode="code"> 1450 <xsl:with-param name="target" select="$target"/> 1451 <xsl:with-param name="topclass" select="$topclass"/> 1452 </xsl:apply-templates> 1453 </xsl:when> 1454 <xsl:when test="$emitmode='attribute'"> 1455 <xsl:apply-templates select="attribute" mode="code"> 1456 <xsl:with-param name="target" select="$target"/> 1457 <xsl:with-param name="topclass" select="$topclass"/> 1458 </xsl:apply-templates> 1459 </xsl:when> 1460 <xsl:otherwise/> 1461 </xsl:choose> 1462 </xsl:when> 1463 <xsl:otherwise/> 1464 </xsl:choose> 1465 </xsl:when> 1466 <xsl:otherwise> 1467 <xsl:apply-templates/> 1468 </xsl:otherwise> 1469 </xsl:choose> 1470 </xsl:if> 1471 </xsl:template> 1472 1473 <xsl:template match="if" mode="public"> 1474 <xsl:param name="emitmode"/> 1475 1476 <xsl:call-template name="emitIf"> 1477 <xsl:with-param name="passmode" select="'public'"/> 1478 <xsl:with-param name="target" select="@target"/> 1479 <xsl:with-param name="emitmode" select="$emitmode"/> 1480 </xsl:call-template> 1481 </xsl:template> 1482 1483 <xsl:template match="if" mode="wrapped"> 1484 <xsl:param name="emitmode"/> 1485 1486 <xsl:call-template name="emitIf"> 1487 <xsl:with-param name="passmode" select="'wrapped'"/> 1488 <xsl:with-param name="target" select="@target"/> 1489 <xsl:with-param name="emitmode" select="$emitmode"/> 1490 </xsl:call-template> 1491 </xsl:template> 1492 1493 <xsl:template match="if" mode="code"> 1494 <xsl:param name="topclass"/> 1495 <xsl:param name="emitmode"/> 1496 1497 <xsl:call-template name="emitIf"> 1498 <xsl:with-param name="passmode" select="'code'"/> 1499 <xsl:with-param name="target" select="@target"/> 1500 <xsl:with-param name="emitmode" select="$emitmode"/> 1501 <xsl:with-param name="topclass" select="$topclass"/> 1502 </xsl:call-template> 1303 1503 </xsl:template> 1304 1504 … … 1337 1537 <xsl:choose> 1338 1538 <xsl:when test="$pmode='public'"> 1339 <xsl:apply-templates select="$iface/method" mode="public"/> 1539 <xsl:apply-templates select="$iface/method | $iface/if" mode="public"> 1540 <xsl:with-param name="emitmode" select="'method'"/> 1541 </xsl:apply-templates> 1340 1542 </xsl:when> 1341 1543 <xsl:when test="$pmode='wrapped'"> 1342 <xsl:apply-templates select="$iface/method" mode="wrapped"/> 1544 <xsl:apply-templates select="$iface/method | $iface/if" mode="wrapped"> 1545 <xsl:with-param name="emitmode" select="'method'"/> 1546 </xsl:apply-templates> 1343 1547 </xsl:when> 1344 1548 <xsl:when test="$pmode='code'"> 1345 <xsl:apply-templates select="$iface/method " mode="code">1549 <xsl:apply-templates select="$iface/method | $iface/if" mode="code"> 1346 1550 <xsl:with-param name="topclass" select="$topclass"/> 1551 <xsl:with-param name="emitmode" select="'method'"/> 1347 1552 </xsl:apply-templates> 1348 1553 </xsl:when> -
trunk/src/VBox/Main/include/SessionImpl.h
r52232 r52248 51 51 void uninit(); 52 52 53 #ifndef VBOX_WITH_GENERIC_SESSION_WATCHER54 STDMETHOD(AssignMachine)(IMachine *aMachine, LockType_T aLockType, IN_BSTR aTokenId);55 #else /* VBOX_WITH_GENERIC_SESSION_WATCHER */56 STDMETHOD(AssignMachine)(IMachine *aMachine, LockType_T aLockType, IToken *aToken);57 #endif /* VBOX_WITH_GENERIC_SESSION_WATCHER */58 59 53 private: 60 54 … … 69 63 HRESULT getPID(ULONG *aPid); 70 64 HRESULT getRemoteConsole(ComPtr<IConsole> &aConsole); 65 #ifndef VBOX_WITH_GENERIC_SESSION_WATCHER 66 HRESULT assignMachine(const ComPtr<IMachine> &aMachine, 67 LockType_T aLockType, 68 const com::Utf8Str &aTokenId); 69 #else 70 HRESULT assignMachine(const ComPtr<IMachine> &aMachine, 71 LockType_T aLockType, 72 const ComPtr<IToken> &aToken); 73 #endif /* !VBOX_WITH_GENERIC_SESSION_WATCHER */ 71 74 HRESULT assignRemoteMachine(const ComPtr<IMachine> &aMachine, 72 75 const ComPtr<IConsole> &aConsole); -
trunk/src/VBox/Main/src-client/SessionImpl.cpp
r52232 r52248 268 268 269 269 #ifndef VBOX_WITH_GENERIC_SESSION_WATCHER 270 STDMETHODIMP Session::AssignMachine(IMachine *aMachine, LockType_T aLockType, 271 IN_BSTR aTokenId) 272 #else /* VBOX_WITH_GENERIC_SESSION_WATCHER */ 273 STDMETHODIMP Session::AssignMachine(IMachine *aMachine, LockType_T aLockType, 274 IToken *aToken) 275 #endif /* VBOX_WITH_GENERIC_SESSION_WATCHER */ 276 { 277 LogFlowThisFuncEnter(); 278 LogFlowThisFunc(("aMachine=%p\n", aMachine)); 279 280 AutoCaller autoCaller(this); 281 AssertComRCReturn(autoCaller.rc(), autoCaller.rc()); 282 270 HRESULT Session::assignMachine(const ComPtr<IMachine> &aMachine, 271 LockType_T aLockType, 272 const com::Utf8Str &aTokenId) 273 #else 274 HRESULT Session::assignMachine(const ComPtr<IMachine> &aMachine, 275 LockType_T aLockType, 276 const ComPtr<IToken> &aToken) 277 #endif /* !VBOX_WITH_GENERIC_SESSION_WATCHER */ 278 { 283 279 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 284 280 … … 297 293 mState = SessionState_Spawning; 298 294 299 LogFlowThisFuncLeave();300 295 return S_OK; 301 296 } … … 320 315 Assert(!strTokenId.isEmpty()); 321 316 #else /* VBOX_WITH_GENERIC_SESSION_WATCHER */ 322 Assert Ptr(aToken);317 Assert(!aToken.isNull()); 323 318 #endif /* VBOX_WITH_GENERIC_SESSION_WATCHER */ 324 319 /* create the machine client token */ … … 366 361 #endif 367 362 } 368 369 LogFlowThisFunc(("rc=%08X\n", rc));370 LogFlowThisFuncLeave();371 363 372 364 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.