VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDefs.h@ 71630

Last change on this file since 71630 was 71630, checked in by vboxsync, 7 years ago

FE/Qt: bugref:9049: Initial commit for VBoxGlobal library (for now it works on X11 only).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
  • Property svn:mergeinfo set to (toggle deleted branches)
    /branches/VBox-3.0/src/VBox/Frontends/VirtualBox/src/globals/VBoxDefs.h58652,​70973
    /branches/VBox-3.2/src/VBox/Frontends/VirtualBox/src/globals/VBoxDefs.h66309,​66318
    /branches/VBox-4.0/src/VBox/Frontends/VirtualBox/src/globals/VBoxDefs.h70873
    /branches/VBox-4.1/src/VBox/Frontends/VirtualBox/src/globals/VBoxDefs.h74233
    /branches/VBox-4.2/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDefs.h91503-91504,​91506-91508,​91510,​91514-91515,​91521
    /branches/VBox-4.3/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDefs.h91223
    /branches/VBox-4.3/trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDefs.h91223
    /branches/dsen/gui/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDefs.h79076-79078,​79089,​79109-79110,​79112-79113,​79127-79130,​79134,​79141,​79151,​79155,​79157-79159,​79193,​79197
    /branches/dsen/gui2/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDefs.h79224,​79228,​79233,​79235,​79258,​79262-79263,​79273,​79341,​79345,​79354,​79357,​79387-79388,​79559-79569,​79572-79573,​79578,​79581-79582,​79590-79591,​79598-79599,​79602-79603,​79605-79606,​79632,​79635,​79637,​79644
    /branches/dsen/gui3/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDefs.h79645-79692
File size: 2.7 KB
Line 
1/* $Id: UIMediumDefs.h 71630 2018-04-03 16:37:08Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIMedium related declarations.
4 */
5
6/*
7 * Copyright (C) 2006-2017 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef ___UIMediumDefs_h___
19#define ___UIMediumDefs_h___
20
21/* Qt includes: */
22#include <QString>
23
24/* GUI includes: */
25#include "UILibraryDefs.h"
26
27/* COM includes: */
28#include "COMEnums.h"
29
30/* Other VBox includes: */
31#include <VBox/com/defs.h>
32
33
34/** UIMediumDefs namespace. */
35namespace UIMediumDefs
36{
37 /** UIMedium types. */
38 enum UIMediumType
39 {
40 UIMediumType_HardDisk,
41 UIMediumType_DVD,
42 UIMediumType_Floppy,
43 UIMediumType_All,
44 UIMediumType_Invalid
45 };
46
47 /** Converts global medium type (KDeviceType) to local (UIMediumType). */
48 SHARED_LIBRARY_STUFF UIMediumType mediumTypeToLocal(KDeviceType globalType);
49
50 /** Convert local medium type (UIMediumType) to global (KDeviceType). */
51 SHARED_LIBRARY_STUFF KDeviceType mediumTypeToGlobal(UIMediumType localType);
52}
53/* Using this namespace globally: */
54using namespace UIMediumDefs;
55
56/** Medium-target. */
57struct UIMediumTarget
58{
59 /** Medium-target types. */
60 enum UIMediumTargetType { UIMediumTargetType_WithID, UIMediumTargetType_WithLocation, UIMediumTargetType_CreateAdHocVISO };
61
62 /** Medium-target constructor. */
63 UIMediumTarget(const QString &strName = QString(), LONG iPort = 0, LONG iDevice = 0,
64 UIMediumType aMediumType = UIMediumType_Invalid,
65 UIMediumTargetType aType = UIMediumTargetType_WithID, const QString &strData = QString())
66 : name(strName), port(iPort), device(iDevice)
67 , mediumType(aMediumType)
68 , type(aType), data(strData)
69 {}
70
71 /** Determines controller name. */
72 QString name;
73 /** Determines controller port. */
74 LONG port;
75 /** Determines controller device. */
76 LONG device;
77
78 /** Determines medium-target medium-type. */
79 UIMediumType mediumType;
80
81 /** Determines medium-target type. */
82 UIMediumTargetType type;
83 /** Depending on medium-target type holds <i>ID</i> or <i>location</i>. */
84 QString data;
85};
86
87/* Let QMetaType know about our types: */
88Q_DECLARE_METATYPE(UIMediumType);
89Q_DECLARE_METATYPE(UIMediumTarget);
90
91#endif /* !___UIMediumDefs_h___ */
Note: See TracBrowser for help on using the repository browser.

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