VirtualBox

Ignore:
Timestamp:
Apr 28, 2009 1:19:14 PM (16 years ago)
Author:
vboxsync
Message:

Main: support for using VBox from Python on Windows (still certain limitation apply, such as enum visibility)

Location:
trunk/src/VBox/Frontends/VirtualBox/include
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h

    r19203 r19239  
    2525
    2626#include "COMDefs.h"
     27#include "VBox/com/Guid.h"
    2728
    2829#include "VBoxGlobalSettings.h"
     
    5152{
    5253public:
    53     VBoxMachineStateChangeEvent (const QUuid &aId, KMachineState aState)
     54    VBoxMachineStateChangeEvent (const QString &aId, KMachineState aState)
    5455        : QEvent ((QEvent::Type) VBoxDefs::MachineStateChangeEventType)
    5556        , id (aId), state (aState)
    5657        {}
    5758
    58     const QUuid id;
     59    const QString id;
    5960    const KMachineState state;
    6061};
     
    6364{
    6465public:
    65     VBoxMachineDataChangeEvent (const QUuid &aId)
     66    VBoxMachineDataChangeEvent (const QString &aId)
    6667        : QEvent ((QEvent::Type) VBoxDefs::MachineDataChangeEventType)
    6768        , id (aId)
    6869        {}
    6970
    70     const QUuid id;
     71    const QString id;
    7172};
    7273
     
    7475{
    7576public:
    76     VBoxMachineRegisteredEvent (const QUuid &aId, bool aRegistered)
     77    VBoxMachineRegisteredEvent (const QString &aId, bool aRegistered)
    7778        : QEvent ((QEvent::Type) VBoxDefs::MachineRegisteredEventType)
    7879        , id (aId), registered (aRegistered)
    7980        {}
    8081
    81     const QUuid id;
     82    const QString id;
    8283    const bool registered;
    8384};
     
    8687{
    8788public:
    88     VBoxSessionStateChangeEvent (const QUuid &aId, KSessionState aState)
     89    VBoxSessionStateChangeEvent (const QString &aId, KSessionState aState)
    8990        : QEvent ((QEvent::Type) VBoxDefs::SessionStateChangeEventType)
    9091        , id (aId), state (aState)
    9192        {}
    9293
    93     const QUuid id;
     94    const QString id;
    9495    const KSessionState state;
    9596};
     
    101102    enum What { Taken, Discarded, Changed };
    102103
    103     VBoxSnapshotEvent (const QUuid &aMachineId, const QUuid &aSnapshotId,
     104    VBoxSnapshotEvent (const QString &aMachineId, const QString &aSnapshotId,
    104105                       What aWhat)
    105106        : QEvent ((QEvent::Type) VBoxDefs::SnapshotEventType)
     
    110111    const What what;
    111112
    112     const QUuid machineId;
    113     const QUuid snapshotId;
     113    const QString machineId;
     114    const QString snapshotId;
    114115};
    115116
     
    285286    bool trayIconInstall();
    286287#endif
    287     QUuid managedVMUuid() const { return vmUuid; }
     288    QString managedVMUuid() const { return vmUuid; }
    288289
    289290    VBoxDefs::RenderMode vmRenderMode() const { return vm_render_mode; }
     
    609610    { checkForAutoConvertedSettings (true); }
    610611
    611     CSession openSession (const QUuid &aId, bool aExisting = false);
     612    CSession openSession (const QString &aId, bool aExisting = false);
    612613
    613614    /** Shortcut to openSession (aId, true). */
    614     CSession openExistingSession (const QUuid &aId) { return openSession (aId, true); }
    615 
    616     bool startMachine (const QUuid &id);
     615    CSession openExistingSession (const QString &aId) { return openSession (aId, true); }
     616
     617    bool startMachine (const QString &id);
    617618
    618619    void startEnumeratingMedia();
     
    634635    void addMedium (const VBoxMedium &);
    635636    void updateMedium (const VBoxMedium &);
    636     void removeMedium (VBoxDefs::MediaType, const QUuid &);
     637    void removeMedium (VBoxDefs::MediaType, const QString &);
    637638
    638639    bool findMedium (const CMedium &, VBoxMedium &) const;
     
    795796
    796797    /** Emitted when the media is removed using #removeMedia(). */
    797     void mediumRemoved (VBoxDefs::MediaType, const QUuid &);
     798    void mediumRemoved (VBoxDefs::MediaType, const QString &);
    798799
    799800    /* signals emitted when the VirtualBox callback is called by the server
     
    852853    VBoxUpdateDlg *mUpdDlg;
    853854
    854     QUuid vmUuid;
     855    QString vmUuid;
    855856
    856857#ifdef VBOX_GUI_WITH_SYSTRAY
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxMediaComboBox.h

    r13580 r19239  
    3535public:
    3636
    37     typedef QMap <QUuid, QUuid> BaseToDiffMap;
     37    typedef QMap <QString, QString> BaseToDiffMap;
    3838
    3939    VBoxMediaComboBox (QWidget *aParent);
     
    4242    void repopulate();
    4343
    44     QUuid id (int = -1) const;
     44    QString id (int = -1) const;
    4545    QString location (int = -1) const;
    4646
    47     void setCurrentItem (const QUuid &aItemId);
     47    void setCurrentItem (const QString &aItemId);
    4848    void setType (VBoxDefs::MediaType aMediaType);
    49     void setMachineId (const QUuid &aMachineId = QUuid());
     49    void setMachineId (const QString &aMachineId = QString::null);
    5050
    5151    void setShowDiffs (bool aShowDiffs);
     
    5959    void mediumAdded (const VBoxMedium &);
    6060    void mediumUpdated (const VBoxMedium &);
    61     void mediumRemoved (VBoxDefs::MediaType, const QUuid &);
     61    void mediumRemoved (VBoxDefs::MediaType, const QString &);
    6262
    6363    void processActivated (int aIndex);
     
    7575    void replaceItem (int, const VBoxMedium &);
    7676
    77     bool findMediaIndex (const QUuid &aId, int &aIndex);
     77    bool findMediaIndex (const QString &aId, int &aIndex);
    7878
    7979    VBoxDefs::MediaType mType;
     
    8383    {
    8484        Medium() {}
    85         Medium (const QUuid &aId, const QString &aLocation,
     85        Medium (const QString &aId, const QString &aLocation,
    8686                const QString aToolTip)
    8787            : id (aId), location (aLocation), toolTip (aToolTip) {}
    8888
    89         QUuid id;
     89        QString id;
    9090        QString location;
    9191        QString toolTip;
     
    9595    Media mMedia;
    9696
    97     QUuid mLastId;
     97    QString mLastId;
    9898
    9999    bool mShowDiffs : 1;
    100100
    101     QUuid mMachineId;
     101    QString mMachineId;
    102102};
    103103
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxMediaManagerDlg.h

    r13580 r19239  
    5252                bool aRefresh = true,
    5353                const CMachine &aSessionMachine = CMachine(),
    54                 const QUuid &aSelectId = QUuid(),
     54                const QString &aSelectId = QString::null,
    5555                bool aShowDiffs = true);
    5656
    5757    static void showModeless (QWidget *aParent = NULL, bool aRefresh = true);
    5858
    59     QUuid selectedId() const;
     59    QString selectedId() const;
    6060    QString selectedLocation() const;
    6161
     
    7777    void mediumAdded (const VBoxMedium &aMedium);
    7878    void mediumUpdated (const VBoxMedium &aMedium);
    79     void mediumRemoved (VBoxDefs::MediaType aType, const QUuid &aId);
     79    void mediumRemoved (VBoxDefs::MediaType aType, const QString &aId);
    8080
    8181    void mediumEnumStarted();
     
    8888    void doReleaseMedium();
    8989
    90     bool releaseMediumFrom (const VBoxMedium &aMedium, const QUuid &aMachineId);
     90    bool releaseMediumFrom (const VBoxMedium &aMedium, const QString &aMachineId);
    9191
    9292    void processCurrentChanged (int index = -1);
     
    117117    void updateTabIcons (MediaItem *aItem, ItemAction aAction);
    118118
    119     MediaItem* searchItem (QTreeWidget *aTree, const QUuid &aId) const;
     119    MediaItem* searchItem (QTreeWidget *aTree, const QString &aId) const;
    120120
    121121    bool checkMediumFor (MediaItem *aItem, Action aAction);
     
    162162    /* Machine */
    163163    CMachine mSessionMachine;
    164     QUuid mSessionMachineId;
     164    QString mSessionMachineId;
    165165    bool mHardDisksInaccessible;
    166166    bool mDVDImagesInaccessible;
    167167    bool mFloppyImagesInaccessible;
    168     QUuid mHDSelectedId;
    169     QUuid mDVDSelectedId;
    170     QUuid mFloppySelectedId;
     168    QString mHDSelectedId;
     169    QString mDVDSelectedId;
     170    QString mFloppySelectedId;
    171171};
    172172
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxMedium.h

    r17385 r19239  
    135135    const CFloppyImage &floppyImage() const { return mFloppyImage; }
    136136
    137     QUuid id() const { return mId; }
     137    QString id() const { return mId; }
    138138
    139139    QString location (bool aNoDiffs = false) const
     
    179179     * current state.
    180180     */
    181     bool isAttachedInCurStateTo (const QUuid &aMachineId) const
     181    bool isAttachedInCurStateTo (const QString &aMachineId) const
    182182        { return mCurStateMachineIds.indexOf (aMachineId) >= 0; }
    183183
     
    186186     * to in their current state (i.e. excluding snapshots).
    187187     */
    188     const QList <QUuid> &curStateMachineIds() const
     188    const QList <QString> &curStateMachineIds() const
    189189        { return mCurStateMachineIds; }
    190190
     
    235235    CFloppyImage mFloppyImage;
    236236
    237     QUuid mId;
     237    QString mId;
    238238    QString mLocation;
    239239    QString mName;
     
    250250    bool mIsUsedInSnapshots : 1;
    251251
    252     QList <QUuid> mCurStateMachineIds;
     252    QList <QString> mCurStateMachineIds;
    253253
    254254    VBoxMedium *mParent;
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxSelectorWnd.h

    r17730 r19239  
    7777    void vmSettings (const QString &aCategory = QString::null,
    7878                     const QString &aControl = QString::null,
    79                      const QUuid & = QUuid_null);
    80     void vmDelete (const QUuid & = QUuid_null);
    81     void vmStart (const QUuid & = QUuid_null);
    82     void vmDiscard (const QUuid & = QUuid_null);
    83     void vmPause (bool, const QUuid & = QUuid_null);
    84     void vmRefresh (const QUuid & = QUuid_null);
    85     void vmShowLogs (const QUuid & = QUuid_null);
     79                     const QString & = QString::null);
     80    void vmDelete (const QString & = QString::null);
     81    void vmStart (const QString & = QString::null);
     82    void vmDiscard (const QString & = QString::null);
     83    void vmPause (bool, const QString & = QString::null);
     84    void vmRefresh (const QString & = QString::null);
     85    void vmShowLogs (const QString & = QString::null);
    8686
    8787    void refreshVMList();
    88     void refreshVMItem (const QUuid &aID, bool aDetails,
     88    void refreshVMItem (const QString &aID, bool aDetails,
    8989                                          bool aSnapshots,
    9090                                          bool aDescription);
     
    189189#ifdef VBOX_GUI_WITH_SYSTRAY
    190190
    191 Q_DECLARE_METATYPE(QUuid);
     191Q_DECLARE_METATYPE(QString);
    192192
    193193class VBoxTrayIcon : public QSystemTrayIcon
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxSnapshotsWgt.h

    r10852 r19239  
    7373
    7474    void refreshAll (bool aKeepSelected = true);
    75     SnapshotWgtItem* findItem (const QUuid &aSnapshotId);
     75    SnapshotWgtItem* findItem (const QString &aSnapshotId);
    7676    SnapshotWgtItem* curStateItem();
    7777    void populateSnapshots (const CSnapshot &aSnapshot, QTreeWidgetItem *aItem);
    7878
    7979    CMachine         mMachine;
    80     QUuid            mMachineId;
     80    QString          mMachineId;
    8181    KSessionState    mSessionState;
    8282    SnapshotWgtItem *mCurSnapshotItem;
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMListView.h

    r17412 r19239  
    4444    QString name() const { return mName; }
    4545    QIcon osIcon() const { return mAccessible ? vboxGlobal().vmGuestOSTypeIcon (mOSTypeId) : QPixmap (":/os_other.png"); }
    46     QUuid id() const { return mId; }
     46    QString id() const { return mId; }
    4747
    4848    QString sessionStateName() const;
     
    7070
    7171    /* Cached machine data (to minimize server requests) */
    72     QUuid mId;
     72    QString mId;
    7373    QString mSettingsFile;
    7474
     
    113113    void clear();
    114114
    115     VBoxVMItem *itemById (const QUuid &aId) const;
     115    VBoxVMItem *itemById (const QString &aId) const;
    116116    VBoxVMItem *itemByRow (int aRow) const;
    117     QModelIndex indexById (const QUuid &aId) const;
    118 
    119     int rowById (const QUuid &aId) const;;
     117    QModelIndex indexById (const QString &aId) const;
     118
     119    int rowById (const QString &aId) const;;
    120120
    121121    void sort (Qt::SortOrder aOrder = Qt::AscendingOrder) { sort (0, aOrder); }
     
    148148
    149149    void selectItemByRow (int row);
    150     void selectItemById (const QUuid &aID);
     150    void selectItemById (const QString &aID);
    151151    void ensureSomeRowSelected (int aRowHint);
    152152    VBoxVMItem * selectedItem() const;
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsCD.h

    r13580 r19239  
    6565    QIWidgetValidator *mValidator;
    6666    QVector<CHostDVDDrive> mHostCDs;
    67     QUuid mUuidIsoCD;
     67    QString mUuidIsoCD;
    6868    QRadioButton *mLastSelected;
    6969};
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsFD.h

    r13580 r19239  
    6565    QIWidgetValidator *mValidator;
    6666    QVector<CHostFloppyDrive> mHostFDs;
    67     QUuid mUuidIsoFD;
     67    QString mUuidIsoFD;
    6868    QRadioButton *mLastSelected;
    6969};
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsHD.h

    r17884 r19239  
    7979public:
    8080    DiskValue()
    81         : id (QUuid())
     81        : id (QString::null)
    8282        , name (QString::null), tip (QString::null), pix (QPixmap()) {}
    83     DiskValue (const QUuid &aId);
     83    DiskValue (const QString &aId);
    8484    DiskValue (const DiskValue &aOther)
    8585        : id (aOther.id)
     
    105105    }
    106106
    107     QUuid  id;
     107    QString id;
    108108    QString name;
    109109    QString tip;
     
    382382
    383383    /* private functions */
    384     QUuid getWithMediaManager (const QUuid &aInitialId = QUuid());
    385     QUuid getWithNewHDWizard();
     384    QString getWithMediaManager (const QString &aInitialId = QString::null);
     385    QString getWithNewHDWizard();
    386386    int maxNameLength() const;
    387387    void prepareComboboxes();
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