VirtualBox

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

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

*: scm --update-copyright-year

  • 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.5 KB
Line 
1/* $Id: UIMediumDefs.h 69500 2017-10-28 15:14:05Z 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/* COM includes: */
25#include "COMEnums.h"
26
27/* Other VBox includes: */
28#include <VBox/com/defs.h>
29
30
31/** UIMediumDefs namespace. */
32namespace UIMediumDefs
33{
34 /** UIMedium types. */
35 enum UIMediumType
36 {
37 UIMediumType_HardDisk,
38 UIMediumType_DVD,
39 UIMediumType_Floppy,
40 UIMediumType_All,
41 UIMediumType_Invalid
42 };
43
44 /** Converts global medium type (KDeviceType) to local (UIMediumType). */
45 UIMediumType mediumTypeToLocal(KDeviceType globalType);
46
47 /** Convert local medium type (UIMediumType) to global (KDeviceType). */
48 KDeviceType mediumTypeToGlobal(UIMediumType localType);
49}
50/* Using this namespace globally: */
51using namespace UIMediumDefs;
52
53/** Medium-target. */
54struct UIMediumTarget
55{
56 /** Medium-target types. */
57 enum UIMediumTargetType { UIMediumTargetType_WithID, UIMediumTargetType_WithLocation };
58
59 /** Medium-target constructor. */
60 UIMediumTarget(const QString &strName = QString(), LONG iPort = 0, LONG iDevice = 0,
61 UIMediumType aMediumType = UIMediumType_Invalid,
62 UIMediumTargetType aType = UIMediumTargetType_WithID, const QString &strData = QString())
63 : name(strName), port(iPort), device(iDevice)
64 , mediumType(aMediumType)
65 , type(aType), data(strData)
66 {}
67
68 /** Determines controller name. */
69 QString name;
70 /** Determines controller port. */
71 LONG port;
72 /** Determines controller device. */
73 LONG device;
74
75 /** Determines medium-target medium-type. */
76 UIMediumType mediumType;
77
78 /** Determines medium-target type. */
79 UIMediumTargetType type;
80 /** Depending on medium-target type holds <i>ID</i> or <i>location</i>. */
81 QString data;
82};
83
84/* Let QMetaType know about our types: */
85Q_DECLARE_METATYPE(UIMediumType);
86Q_DECLARE_METATYPE(UIMediumTarget);
87
88#endif /* !___UIMediumDefs_h___ */
Note: See TracBrowser for help on using the repository browser.

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