Changeset 10000 in vbox
- Timestamp:
- Jun 27, 2008 2:56:59 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 32453
- Location:
- trunk/src/VBox
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r9884 r10000 649 649 } 650 650 651 if (u64Cmd & USAGE_GET CONFIGVAL)652 { 653 RTPrintf("VBoxManage get configval<vmname>|<uuid> <key>\n"651 if (u64Cmd & USAGE_GETGUESTPROPERTY) 652 { 653 RTPrintf("VBoxManage getguestproperty <vmname>|<uuid> <key>\n" 654 654 "\n"); 655 655 } 656 656 657 if (u64Cmd & USAGE_SET CONFIGVAL)658 { 659 RTPrintf("VBoxManage set configval<vmname>|<uuid> <key>\n"657 if (u64Cmd & USAGE_SETGUESTPROPERTY) 658 { 659 RTPrintf("VBoxManage setguestproperty <vmname>|<uuid> <key>\n" 660 660 " [<value>] (no value deletes key)\n" 661 661 "\n"); … … 7470 7470 } 7471 7471 7472 static int handleGetConfigVal(int argc, char *argv[], 7473 ComPtr<IVirtualBox> virtualBox, ComPtr<ISession> session) 7472 static int handleGetGuestProperty(int argc, char *argv[], 7473 ComPtr<IVirtualBox> virtualBox, 7474 ComPtr<ISession> session) 7474 7475 { 7475 7476 HRESULT rc = S_OK; 7476 7477 7477 7478 if (argc != 2) 7478 return errorSyntax(USAGE_GET CONFIGVAL, "Incorrect number of parameters");7479 return errorSyntax(USAGE_GETGUESTPROPERTY, "Incorrect number of parameters"); 7479 7480 7480 7481 ComPtr<IMachine> machine; … … 7512 7513 { 7513 7514 Bstr value; 7514 CHECK_ERROR(machine, Get ConfigRegistryValue(Bstr(argv[1]), value.asOutParam()));7515 CHECK_ERROR(machine, GetGuestProperty(Bstr(argv[1]), value.asOutParam())); 7515 7516 if (value) 7516 7517 RTPrintf("Value: %lS\n", value.raw()); … … 7522 7523 } 7523 7524 7524 static int handleSetConfigVal(int argc, char *argv[], 7525 ComPtr<IVirtualBox> virtualBox, ComPtr<ISession> session) 7525 static int handleSetGuestProperty(int argc, char *argv[], 7526 ComPtr<IVirtualBox> virtualBox, 7527 ComPtr<ISession> session) 7526 7528 { 7527 7529 HRESULT rc = S_OK; 7528 7530 7529 7531 if (argc < 2) 7530 return errorSyntax(USAGE_SET CONFIGVAL, "Not enough parameters");7532 return errorSyntax(USAGE_SETGUESTPROPERTY, "Not enough parameters"); 7531 7533 7532 7534 ComPtr<IMachine> machine; … … 7541 7543 { 7542 7544 if (argc < 3) 7543 CHECK_ERROR(machine, Set ConfigRegistryValue(Bstr(argv[1]), NULL));7545 CHECK_ERROR(machine, SetGuestProperty(Bstr(argv[1]), NULL)); 7544 7546 else if (argc == 3) 7545 CHECK_ERROR(machine, Set ConfigRegistryValue(Bstr(argv[1]), Bstr(argv[2])));7547 CHECK_ERROR(machine, SetGuestProperty(Bstr(argv[1]), Bstr(argv[2]))); 7546 7548 else 7547 return errorSyntax(USAGE_SET CONFIGVAL, "Too many parameters");7549 return errorSyntax(USAGE_SETGUESTPROPERTY, "Too many parameters"); 7548 7550 } 7549 7551 return SUCCEEDED(rc) ? 0 : 1; … … 7884 7886 { "sharedfolder", handleSharedFolder }, 7885 7887 { "vmstatistics", handleVMStatistics }, 7886 { "get configval", handleGetConfigVal},7887 { "set configval", handleSetConfigVal},7888 { "getguestproperty", handleGetGuestProperty }, 7889 { "setguestproperty", handleSetGuestProperty }, 7888 7890 { NULL, NULL } 7889 7891 }; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
r9884 r10000 70 70 #define USAGE_MODUNINSTALL RT_BIT_64(38) 71 71 #define USAGE_RENAMEVMDK RT_BIT_64(39) 72 #define USAGE_GET CONFIGVALRT_BIT_64(40)73 #define USAGE_SET CONFIGVALRT_BIT_64(41)72 #define USAGE_GETGUESTPROPERTY RT_BIT_64(40) 73 #define USAGE_SETGUESTPROPERTY RT_BIT_64(41) 74 74 #define USAGE_ALL (~(uint64_t)0) 75 75 /** @} */ -
trunk/src/VBox/Main/ConsoleImpl.cpp
r9883 r10000 2487 2487 } 2488 2488 2489 STDMETHODIMP Console::Get ConfigRegistryValue(INPTR BSTR aKey, BSTR *aValue)2489 STDMETHODIMP Console::GetGuestProperty (INPTR BSTR aKey, BSTR *aValue) 2490 2490 { 2491 2491 if (!VALID_PTR(aValue)) … … 2527 2527 } 2528 2528 2529 STDMETHODIMP Console::Set ConfigRegistryValue(INPTR BSTR aKey, INPTR BSTR aValue)2529 STDMETHODIMP Console::SetGuestProperty (INPTR BSTR aKey, INPTR BSTR aValue) 2530 2530 { 2531 2531 #ifndef VBOX_WITH_INFO_SVC … … 4132 4132 } 4133 4133 # ifdef VBOX_WITH_INFO_SVC 4134 /* Save all guest/host configuration registryentries to the machine XML4134 /* Save all guest/host property store entries to the machine XML 4135 4135 * file as extra data. */ 4136 4136 PCFGMNODE pRegistry = CFGMR3GetChild (CFGMR3GetRoot (mpVM), "Guest/Registry/"); -
trunk/src/VBox/Main/MachineImpl.cpp
r9937 r10000 2679 2679 2680 2680 /** 2681 * Read a value from the host/guest configuration registry. If a session is2681 * Read a value from the host/guest property store. If a session is 2682 2682 * currently open for the guest then query the console object for the value, 2683 * since the current values of the registrywill be held in RAM in the2683 * since the current values of the property store will be held in RAM in the 2684 2684 * session. Otherwise read the value from machine extra data, where it is 2685 2685 * stored between sessions. … … 2691 2691 * way) between open and closed. 2692 2692 */ 2693 STDMETHODIMP Machine::Get ConfigRegistryValue(INPTR BSTR aKey, BSTR *aValue)2693 STDMETHODIMP Machine::GetGuestProperty (INPTR BSTR aKey, BSTR *aValue) 2694 2694 { 2695 2695 if (!VALID_PTR(aValue)) … … 2736 2736 { 2737 2737 ComAssertRet (!console.isNull(), E_FAIL); 2738 hrc = console->Get ConfigRegistryValue(aKey, aValue);2738 hrc = console->GetGuestProperty (aKey, aValue); 2739 2739 } 2740 2740 break; … … 2750 2750 2751 2751 /** 2752 * Write a value to the host/guest configuration registry. If a session is2752 * Write a value to the host/guest property store. If a session is 2753 2753 * currently open for the guest then query the console object for the value, 2754 * since the current values of the registrywill be held in RAM in the2754 * since the current values of the property store will be held in RAM in the 2755 2755 * session. Otherwise read the value from machine extra data, where it is 2756 2756 * stored between sessions. … … 2762 2762 * way) between open and closed. 2763 2763 */ 2764 STDMETHODIMP Machine::Set ConfigRegistryValue(INPTR BSTR aKey, INPTR BSTR aValue)2764 STDMETHODIMP Machine::SetGuestProperty (INPTR BSTR aKey, INPTR BSTR aValue) 2765 2765 { 2766 2766 #ifndef VBOX_WITH_INFO_SVC … … 2804 2804 { 2805 2805 ComAssertRet (!console.isNull(), E_FAIL); 2806 hrc = console->Set ConfigRegistryValue(aKey, aValue);2806 hrc = console->SetGuestProperty (aKey, aValue); 2807 2807 } 2808 2808 break; -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r9937 r10000 1784 1784 Returns associated global extra data. 1785 1785 1786 If the re uqested data @a key does not exist, this function will1786 If the requested data @a key does not exist, this function will 1787 1787 succeed and return @c NULL in the @a value argument. 1788 1788 </desc> … … 1799 1799 Sets associated global extra data. 1800 1800 1801 If you pass @c NULL as a key @a va ule, the given @a key will be1801 If you pass @c NULL as a key @a value, the given @a key will be 1802 1802 deleted. 1803 1803 … … 3468 3468 </method> 3469 3469 3470 <method name="get ConfigRegistryValue">3471 <desc> 3472 Reads a value from the machine's host/guest configuration registry.3470 <method name="getGuestProperty"> 3471 <desc> 3472 Reads a value from the machine's host/guest property store. 3473 3473 </desc> 3474 3474 <param name="key" type="wstring" dir="in"> … … 3485 3485 </method> 3486 3486 3487 <method name="set ConfigRegistryValue">3487 <method name="setGuestProperty"> 3488 3488 <desc> 3489 3489 Sets, changes or deletes a value in the machine's host/guest 3490 configuration registry.3490 property store. 3491 3491 </desc> 3492 3492 <param name="key" type="wstring" dir="in"> … … 4588 4588 </method> 4589 4589 4590 <method name="get ConfigRegistryValue">4591 <desc> 4592 Reads a value from the host/guest configuration registry.4590 <method name="getGuestProperty"> 4591 <desc> 4592 Reads a value from the host/guest property store. 4593 4593 </desc> 4594 4594 <param name="key" type="wstring" dir="in"> … … 4605 4605 </method> 4606 4606 4607 <method name="setConfigRegistryValue"> 4608 <desc> 4609 Sets, changes or deletes a value in the host/guest configuration 4610 registry. 4607 <method name="setGuestProperty"> 4608 <desc> 4609 Sets, changes or deletes a value in the host/guest property store. 4611 4610 </desc> 4612 4611 <param name="key" type="wstring" dir="in"> -
trunk/src/VBox/Main/include/ConsoleImpl.h
r9883 r10000 148 148 STDMETHOD(RegisterCallback) (IConsoleCallback *aCallback); 149 149 STDMETHOD(UnregisterCallback)(IConsoleCallback *aCallback); 150 STDMETHOD(Get ConfigRegistryValue)(INPTR BSTR aKey, BSTR *aValue);151 STDMETHOD(Set ConfigRegistryValue)(INPTR BSTR aKey, INPTR BSTR aValue);150 STDMETHOD(GetGuestProperty)(INPTR BSTR aKey, BSTR *aValue); 151 STDMETHOD(SetGuestProperty)(INPTR BSTR aKey, INPTR BSTR aValue); 152 152 153 153 // public methods for internal purposes only -
trunk/src/VBox/Main/include/MachineImpl.h
r9937 r10000 527 527 STDMETHOD(CanShowConsoleWindow) (BOOL *aCanShow); 528 528 STDMETHOD(ShowConsoleWindow) (ULONG64 *aWinId); 529 STDMETHOD(Get ConfigRegistryValue) (INPTR BSTR aKey, BSTR *aValue);530 STDMETHOD(Set ConfigRegistryValue) (INPTR BSTR aKey, INPTR BSTR aValue);529 STDMETHOD(GetGuestProperty) (INPTR BSTR aKey, BSTR *aValue); 530 STDMETHOD(SetGuestProperty) (INPTR BSTR aKey, INPTR BSTR aValue); 531 531 532 532 STDMETHOD(GetProcessorUsage) (ULONG *user, ULONG *system);
Note:
See TracChangeset
for help on using the changeset viewer.