- Timestamp:
- Jul 9, 2008 9:52:56 AM (16 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/HostImpl.cpp
r9937 r10399 101 101 #include <VBox/err.h> 102 102 #include <iprt/string.h> 103 /** @todo the following line becomes obsolete after switching to Mp runtime functions */ 103 104 #include <iprt/system.h> 105 #include <iprt/mp.h> 104 106 #include <iprt/time.h> 105 107 #include <iprt/param.h> … … 667 669 CHECK_READY(); 668 670 *count = RTSystemProcessorGetCount(); 671 /** @todo after implementing the Mp runtime on all platforms replace with 672 * *count = RTMpGetOnlineCount(); */ 669 673 return S_OK; 670 674 } 671 675 672 676 /** 673 * Returns the (approximate) speed of thehost CPU in MHz677 * Returns the (approximate) maximum speed of the given host CPU in MHz 674 678 * 675 679 * @returns COM status code 676 * @param speed address of result variable 680 * @param cpu id to get info for. 681 * @param speed address of result variable, speed is 0 if unknown or cpuId is invalid. 677 682 */ 678 STDMETHODIMP Host::COMGETTER(ProcessorSpeed)(ULONG *speed)683 STDMETHODIMP Host::COMGETTER(ProcessorSpeed)(ULONG cpuId, ULONG *speed) 679 684 { 680 685 if (!speed) … … 682 687 AutoWriteLock alock (this); 683 688 CHECK_READY(); 684 /** @todo Add a runtime function for this which uses GIP. */ 689 /** @todo after implementing the Mp runtime on all platforms replace with 690 * *speed = RTMpGetOnlineCpuMaxSpeed(cpuId); */ 691 *speed = 0; 685 692 return S_OK; 686 693 } … … 689 696 * 690 697 * @returns COM status code 691 * @param description address of result variable 698 * @param cpu id to get info for. 699 * @param description address of result variable, NULL if known or cpuId is invalid. 692 700 */ 693 STDMETHODIMP Host::COMGETTER(ProcessorDescription)( BSTR *description)701 STDMETHODIMP Host::COMGETTER(ProcessorDescription)(ULONG cpuId, BSTR *description) 694 702 { 695 703 if (!description) … … 698 706 CHECK_READY(); 699 707 /** @todo */ 700 return S_OK;708 return E_NOTIMPL; 701 709 } 702 710 … … 715 723 CHECK_READY(); 716 724 /** @todo */ 717 return S_OK;725 return E_NOTIMPL; 718 726 } 719 727 … … 731 739 CHECK_READY(); 732 740 /** @todo */ 733 return S_OK;741 return E_NOTIMPL; 734 742 } 735 743 … … 747 755 CHECK_READY(); 748 756 /** @todo */ 749 return S_OK;757 return E_NOTIMPL; 750 758 } 751 759 … … 763 771 CHECK_READY(); 764 772 /** @todo */ 765 return S_OK;773 return E_NOTIMPL; 766 774 } 767 775 -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r10333 r10399 4805 4805 <interface 4806 4806 name="IHost" extends="$unknown" 4807 uuid=" a42a480f-d554-4be0-b11c-6c2e54dd1274"4807 uuid="3d864057-ae6b-4d05-9cf7-c341139b6062" 4808 4808 wsmap="managed" 4809 4809 > … … 4879 4879 </attribute> 4880 4880 4881 <attribute name="processorSpeed" type="unsigned long" readonly="yes"> 4882 <desc>(Approximate) speed of the host CPU in Megahertz.</desc> 4883 </attribute> 4884 4885 <attribute name="processorDescription" type="wstring" readonly="yes"> 4886 <desc>Description string of the host CPU.</desc> 4887 </attribute> 4881 <method name="getProcessorSpeed"> 4882 <desc>Query the (approximate) maximum speed of a specified host CPU in Megahertz.</desc> 4883 <param name="cpuId" type="unsigned long" dir="in"> 4884 <desc> 4885 Identifier of the CPU. 4886 </desc> 4887 </param> 4888 <param name="speed" type="unsigned long" dir="return"> 4889 <desc> 4890 Speed value. 0 is returned if value is not known or @a cpuId is 4891 invalid. 4892 </desc> 4893 </param> 4894 </method> 4895 4896 <method name="getProcessorDescription"> 4897 <desc>Query the model string of a specified host CPU.</desc> 4898 <param name="cpuId" type="unsigned long" dir="in"> 4899 <desc> 4900 Identifier of the CPU. 4901 </desc> 4902 </param> 4903 <param name="description" type="wstring" dir="return"> 4904 <desc> 4905 Model string. A NULL string is returned if value is not known or 4906 @a cpuId is invalid. 4907 </desc> 4908 </param> 4909 </method> 4888 4910 4889 4911 <attribute name="memorySize" type="unsigned long" readonly="yes"> -
trunk/src/VBox/Main/include/HostImpl.h
r9937 r10399 89 89 #endif 90 90 STDMETHOD(COMGETTER(ProcessorCount))(ULONG *count); 91 STDMETHOD(COMGETTER(ProcessorSpeed))(ULONG *speed);92 STDMETHOD(COMGETTER(ProcessorDescription))( BSTR *description);91 STDMETHOD(COMGETTER(ProcessorSpeed))(ULONG cpuId, ULONG *speed); 92 STDMETHOD(COMGETTER(ProcessorDescription))(ULONG cpuId, BSTR *description); 93 93 STDMETHOD(COMGETTER(MemorySize))(ULONG *size); 94 94 STDMETHOD(COMGETTER(MemoryAvailable))(ULONG *available);
Note:
See TracChangeset
for help on using the changeset viewer.