VirtualBox

Ignore:
Timestamp:
Dec 5, 2008 5:20:00 PM (16 years ago)
Author:
vboxsync
Message:

Main: Cleaned up the long standing const BSTR = const (OLECHAR *) on WIn32 vs (const PRunichar) * on XPCOM clash. Cleaned up BSTR/GUID macros (IN_BSTR replaces INPTR BSTR, IN_GUID replaces INPTR GUIDPARAM, OUT_GUID replaces GUIDPARAMOUT).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MachineImpl.cpp

    r15050 r15051  
    380380 *  @return  Success indicator. if not S_OK, the machine object is invalid
    381381 */
    382 HRESULT Machine::init (VirtualBox *aParent, const BSTR aConfigFile,
    383                        InitMode aMode, const BSTR aName /* = NULL */,
     382HRESULT Machine::init (VirtualBox *aParent, CBSTR aConfigFile,
     383                       InitMode aMode, CBSTR aName /* = NULL */,
    384384                       GuestOSType *aOsType /* = NULL */,
    385385                       BOOL aNameSync /* = TRUE */,
     
    811811}
    812812
    813 STDMETHODIMP Machine::COMSETTER(Name) (INPTR BSTR aName)
     813STDMETHODIMP Machine::COMSETTER(Name) (IN_BSTR aName)
    814814{
    815815    CheckComArgNotNull(aName);
     
    847847}
    848848
    849 STDMETHODIMP Machine::COMSETTER(Description) (INPTR BSTR aDescription)
     849STDMETHODIMP Machine::COMSETTER(Description) (IN_BSTR aDescription)
    850850{
    851851    AutoCaller autoCaller (this);
     
    863863}
    864864
    865 STDMETHODIMP Machine::COMGETTER(Id) (GUIDPARAMOUT aId)
     865STDMETHODIMP Machine::COMGETTER(Id) (OUT_GUID aId)
    866866{
    867867    CheckComArgOutPointerValid(aId);
     
    891891}
    892892
    893 STDMETHODIMP Machine::COMSETTER(OSTypeId) (INPTR BSTR aOSTypeId)
     893STDMETHODIMP Machine::COMSETTER(OSTypeId) (IN_BSTR aOSTypeId)
    894894{
    895895    CheckComArgNotNull(aOSTypeId);
     
    13331333}
    13341334
    1335 STDMETHODIMP Machine::COMSETTER(SnapshotFolder) (INPTR BSTR aSnapshotFolder)
     1335STDMETHODIMP Machine::COMSETTER(SnapshotFolder) (IN_BSTR aSnapshotFolder)
    13361336{
    13371337    /* @todo (r=dmik):
     
    17791779
    17801780STDMETHODIMP
    1781 Machine::COMSETTER(GuestPropertyNotificationPatterns) (INPTR BSTR aPatterns)
     1781Machine::COMSETTER(GuestPropertyNotificationPatterns) (IN_BSTR aPatterns)
    17821782{
    17831783    AssertLogRelReturn (VALID_PTR(aPatterns), E_POINTER);
     
    18421842}
    18431843
    1844 STDMETHODIMP Machine::AttachHardDisk2 (INPTR GUIDPARAM aId,
     1844STDMETHODIMP Machine::AttachHardDisk2 (IN_GUID aId,
    18451845                                       StorageBus_T aBus, LONG aChannel,
    18461846                                       LONG aDevice)
     
    23362336 *  @note Locks this object for reading.
    23372337 */
    2338 STDMETHODIMP Machine::GetNextExtraDataKey (INPTR BSTR aKey, BSTR *aNextKey, BSTR *aNextValue)
     2338STDMETHODIMP Machine::GetNextExtraDataKey (IN_BSTR aKey, BSTR *aNextKey, BSTR *aNextValue)
    23392339{
    23402340    CheckComArgOutPointerValid(aNextKey);
     
    24392439 *  @note Locks this object for reading.
    24402440 */
    2441 STDMETHODIMP Machine::GetExtraData (INPTR BSTR aKey, BSTR *aValue)
     2441STDMETHODIMP Machine::GetExtraData (IN_BSTR aKey, BSTR *aValue)
    24422442{
    24432443    CheckComArgNotNull(aKey);
     
    25052505 *  @note Locks mParent for writing + this object for writing.
    25062506 */
    2507 STDMETHODIMP Machine::SetExtraData (INPTR BSTR aKey, INPTR BSTR aValue)
     2507STDMETHODIMP Machine::SetExtraData (IN_BSTR aKey, IN_BSTR aValue)
    25082508{
    25092509    CheckComArgNotNull(aKey);
     
    25762576            {
    25772577                const char *sep = error.isEmpty() ? "" : ": ";
    2578                 const BSTR err = error.isNull() ? (const BSTR) L"" : error.raw();
     2578                CBSTR err = error.isNull() ? (CBSTR) L"" : error.raw();
    25792579                LogWarningFunc (("Someone vetoed! Change refused%s%ls\n",
    25802580                                 sep, err));
     
    27732773}
    27742774
    2775 STDMETHODIMP Machine::GetSnapshot (INPTR GUIDPARAM aId, ISnapshot **aSnapshot)
     2775STDMETHODIMP Machine::GetSnapshot (IN_GUID aId, ISnapshot **aSnapshot)
    27762776{
    27772777    CheckComArgOutPointerValid(aSnapshot);
     
    27912791}
    27922792
    2793 STDMETHODIMP Machine::FindSnapshot (INPTR BSTR aName, ISnapshot **aSnapshot)
     2793STDMETHODIMP Machine::FindSnapshot (IN_BSTR aName, ISnapshot **aSnapshot)
    27942794{
    27952795    CheckComArgNotNull(aName);
     
    28092809}
    28102810
    2811 STDMETHODIMP Machine::SetCurrentSnapshot (INPTR GUIDPARAM aId)
     2811STDMETHODIMP Machine::SetCurrentSnapshot (IN_GUID aId)
    28122812{
    28132813    /// @todo (dmik) don't forget to set
     
    28182818
    28192819STDMETHODIMP
    2820 Machine::CreateSharedFolder (INPTR BSTR aName, INPTR BSTR aHostPath, BOOL aWritable)
     2820Machine::CreateSharedFolder (IN_BSTR aName, IN_BSTR aHostPath, BOOL aWritable)
    28212821{
    28222822    CheckComArgNotNull(aName);
     
    28592859}
    28602860
    2861 STDMETHODIMP Machine::RemoveSharedFolder (INPTR BSTR aName)
     2861STDMETHODIMP Machine::RemoveSharedFolder (IN_BSTR aName)
    28622862{
    28632863    CheckComArgNotNull(aName);
     
    29422942}
    29432943
    2944 STDMETHODIMP Machine::GetGuestProperty (INPTR BSTR aName, BSTR *aValue, ULONG64 *aTimestamp, BSTR *aFlags)
     2944STDMETHODIMP Machine::GetGuestProperty (IN_BSTR aName, BSTR *aValue, ULONG64 *aTimestamp, BSTR *aFlags)
    29452945{
    29462946#if !defined (VBOX_WITH_GUEST_PROPS)
     
    29982998}
    29992999
    3000 STDMETHODIMP Machine::GetGuestPropertyValue (INPTR BSTR aName, BSTR *aValue)
     3000STDMETHODIMP Machine::GetGuestPropertyValue (IN_BSTR aName, BSTR *aValue)
    30013001{
    30023002    ULONG64 dummyTimestamp;
     
    30053005}
    30063006
    3007 STDMETHODIMP Machine::GetGuestPropertyTimestamp (INPTR BSTR aName, ULONG64 *aTimestamp)
     3007STDMETHODIMP Machine::GetGuestPropertyTimestamp (IN_BSTR aName, ULONG64 *aTimestamp)
    30083008{
    30093009    BSTR dummyValue;
     
    30123012}
    30133013
    3014 STDMETHODIMP Machine::SetGuestProperty (INPTR BSTR aName, INPTR BSTR aValue, INPTR BSTR aFlags)
     3014STDMETHODIMP Machine::SetGuestProperty (IN_BSTR aName, IN_BSTR aValue, IN_BSTR aFlags)
    30153015{
    30163016#if !defined (VBOX_WITH_GUEST_PROPS)
     
    31313131}
    31323132
    3133 STDMETHODIMP Machine::SetGuestPropertyValue (INPTR BSTR aName, INPTR BSTR aValue)
     3133STDMETHODIMP Machine::SetGuestPropertyValue (IN_BSTR aName, IN_BSTR aValue)
    31343134{
    31353135    return SetGuestProperty(aName, aValue, NULL);
    31363136}
    31373137
    3138 STDMETHODIMP Machine::EnumerateGuestProperties (INPTR BSTR aPatterns, ComSafeArrayOut(BSTR, aNames), ComSafeArrayOut(BSTR, aValues), ComSafeArrayOut(ULONG64, aTimestamps), ComSafeArrayOut(BSTR, aFlags))
     3138STDMETHODIMP Machine::EnumerateGuestProperties (IN_BSTR aPatterns, ComSafeArrayOut(BSTR, aNames), ComSafeArrayOut(BSTR, aValues), ComSafeArrayOut(ULONG64, aTimestamps), ComSafeArrayOut(BSTR, aFlags))
    31393139{
    31403140#if !defined (VBOX_WITH_GUEST_PROPS)
     
    35513551 */
    35523552HRESULT Machine::openRemoteSession (IInternalSessionControl *aControl,
    3553                                     INPTR BSTR aType, INPTR BSTR aEnvironment,
     3553                                    IN_BSTR aType, IN_BSTR aEnvironment,
    35543554                                    Progress *aProgress)
    35553555{
     
    46264626 *      must be called from under the object's lock!
    46274627 */
    4628 HRESULT Machine::findSharedFolder (const BSTR aName,
     4628HRESULT Machine::findSharedFolder (CBSTR aName,
    46294629                                   ComObjPtr <SharedFolder> &aSharedFolder,
    46304630                                   bool aSetError /* = false */)
     
    55105510 *  @param aSetError    true to set extended error info on failure
    55115511 */
    5512 HRESULT Machine::findSnapshot (const BSTR aName, ComObjPtr <Snapshot> &aSnapshot,
     5512HRESULT Machine::findSnapshot (IN_BSTR aName, ComObjPtr <Snapshot> &aSnapshot,
    55135513                               bool aSetError /* = false */)
    55145514{
     
    80988098 *  @note Locks the same as Host::captureUSBDevice() does.
    80998099 */
    8100 STDMETHODIMP SessionMachine::CaptureUSBDevice (INPTR GUIDPARAM aId)
     8100STDMETHODIMP SessionMachine::CaptureUSBDevice (IN_GUID aId)
    81018101{
    81028102    LogFlowThisFunc (("\n"));
     
    81218121 *  @note Locks the same as Host::detachUSBDevice() does.
    81228122 */
    8123 STDMETHODIMP SessionMachine::DetachUSBDevice (INPTR GUIDPARAM aId, BOOL aDone)
     8123STDMETHODIMP SessionMachine::DetachUSBDevice (IN_GUID aId, BOOL aDone)
    81248124{
    81258125    LogFlowThisFunc (("\n"));
     
    83558355 *  @note Locks this object for writing.
    83568356 */
    8357 STDMETHODIMP SessionMachine::AdoptSavedState (INPTR BSTR aSavedStateFile)
     8357STDMETHODIMP SessionMachine::AdoptSavedState (IN_BSTR aSavedStateFile)
    83588358{
    83598359    LogFlowThisFunc (("\n"));
     
    83898389 */
    83908390STDMETHODIMP SessionMachine::BeginTakingSnapshot (
    8391     IConsole *aInitiator, INPTR BSTR aName, INPTR BSTR aDescription,
     8391    IConsole *aInitiator, IN_BSTR aName, IN_BSTR aDescription,
    83928392    IProgress *aProgress, BSTR *aStateFilePath,
    83938393    IProgress **aServerProgress)
     
    85778577 */
    85788578STDMETHODIMP SessionMachine::DiscardSnapshot (
    8579     IConsole *aInitiator, INPTR GUIDPARAM aId,
     8579    IConsole *aInitiator, IN_GUID aId,
    85808580    MachineState_T *aMachineState, IProgress **aProgress)
    85818581{
     
    88558855}
    88568856
    8857 STDMETHODIMP SessionMachine::PushGuestProperties (ComSafeArrayIn(INPTR BSTR, aNames),
    8858                                                   ComSafeArrayIn(INPTR BSTR, aValues),
     8857STDMETHODIMP SessionMachine::PushGuestProperties (ComSafeArrayIn(IN_BSTR, aNames),
     8858                                                  ComSafeArrayIn(IN_BSTR, aValues),
    88598859                                                  ComSafeArrayIn(ULONG64, aTimestamps),
    8860                                                   ComSafeArrayIn(INPTR BSTR, aFlags))
     8860                                                  ComSafeArrayIn(IN_BSTR, aFlags))
    88618861{
    88628862    LogFlowThisFunc (("\n"));
     
    88878887    AssertReturn(!ComSafeArrayInIsNull (aFlags), E_POINTER);
    88888888
    8889     com::SafeArray <INPTR BSTR> names(ComSafeArrayInArg(aNames));
    8890     com::SafeArray <INPTR BSTR> values(ComSafeArrayInArg(aValues));
     8889    com::SafeArray <IN_BSTR> names(ComSafeArrayInArg(aNames));
     8890    com::SafeArray <IN_BSTR> values(ComSafeArrayInArg(aValues));
    88918891    com::SafeArray <ULONG64> timestamps(ComSafeArrayInArg(aTimestamps));
    8892     com::SafeArray <INPTR BSTR> flags(ComSafeArrayInArg(aFlags));
     8892    com::SafeArray <IN_BSTR> flags(ComSafeArrayInArg(aFlags));
    88938893    DiscardSettings();
    88948894    mHWData.backup();
     
    89138913}
    89148914
    8915 STDMETHODIMP SessionMachine::PushGuestProperty (INPTR BSTR aName, INPTR BSTR aValue,
    8916                                                 ULONG64 aTimestamp, INPTR BSTR aFlags)
     8915STDMETHODIMP SessionMachine::PushGuestProperty (IN_BSTR aName, IN_BSTR aValue,
     8916                                                ULONG64 aTimestamp, IN_BSTR aFlags)
    89178917{
    89188918    LogFlowThisFunc (("\n"));
     
    93179317 *  @note The calls shall hold no locks. Will temporarily lock this object for reading.
    93189318 */
    9319 HRESULT SessionMachine::onUSBDeviceDetach (INPTR GUIDPARAM aId,
     9319HRESULT SessionMachine::onUSBDeviceDetach (IN_GUID aId,
    93209320                                           IVirtualBoxErrorInfo *aError)
    93219321{
     
    1050710507 */
    1050810508HRESULT SnapshotMachine::init (SessionMachine *aSessionMachine,
    10509                                INPTR GUIDPARAM aSnapshotId,
    10510                                INPTR BSTR aStateFilePath)
     10509                               IN_GUID aSnapshotId,
     10510                               IN_BSTR aStateFilePath)
    1051110511{
    1051210512    LogFlowThisFuncEnter();
     
    1063410634                               const settings::Key &aHWNode,
    1063510635                               const settings::Key &aHDAsNode,
    10636                                INPTR GUIDPARAM aSnapshotId, INPTR BSTR aStateFilePath)
     10636                               IN_GUID aSnapshotId, IN_BSTR aStateFilePath)
    1063710637{
    1063810638    LogFlowThisFuncEnter();
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette