VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/networking/UINetworkReply.h

Last change on this file was 100818, checked in by vboxsync, 10 months ago

FE/Qt: bugref:10450: Linux: Build fix for VBox with system Qt6.4.

  • 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/net/UINetworkManager.h58652,​70973
    /branches/VBox-3.2/src/VBox/Frontends/VirtualBox/src/net/UINetworkManager.h66309,​66318
    /branches/VBox-4.0/src/VBox/Frontends/VirtualBox/src/net/UINetworkManager.h70873
    /branches/VBox-4.1/src/VBox/Frontends/VirtualBox/src/net/UINetworkManager.h74233
    /branches/VBox-4.2/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.h91503-91504,​91506-91508,​91510,​91514-91515,​91521
    /branches/VBox-4.3/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.h91223
    /branches/VBox-4.3/trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.h91223
    /branches/dsen/gui/src/VBox/Frontends/VirtualBox/src/net/UINetworkRequest.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/net/UINetworkRequest.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/net/UINetworkRequest.h79645-79692
File size: 3.5 KB
RevLine 
[55401]1/* $Id: UINetworkReply.h 100818 2023-08-07 22:28:09Z vboxsync $ */
[38421]2/** @file
[52727]3 * VBox Qt GUI - UINetworkReply stuff declaration.
[38421]4 */
5
6/*
[98103]7 * Copyright (C) 2012-2023 Oracle and/or its affiliates.
[38421]8 *
[96407]9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
[38421]26 */
27
[86996]28#ifndef FEQT_INCLUDED_SRC_networking_UINetworkReply_h
29#define FEQT_INCLUDED_SRC_networking_UINetworkReply_h
[76532]30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
[38421]33
[43707]34/* Qt includes: */
[100818]35#include <QObject>
[43707]36#include <QPointer>
[58426]37#include <QUrl>
[38421]38
[43707]39/* GUI includes: */
[71630]40#include "UILibraryDefs.h"
[39326]41#include "UINetworkDefs.h"
42
[58249]43/* Forward declarations: */
44class UINetworkReplyPrivate;
45
[58265]46/** QObject extension
47 * used as network-reply interface. */
[71630]48class SHARED_LIBRARY_STUFF UINetworkReply : public QObject
[39932]49{
50 Q_OBJECT;
51
52signals:
53
[58265]54 /** Notifies listeners about reply progress change.
55 * @param iBytesReceived Holds the current amount of bytes received.
56 * @param iBytesTotal Holds the total amount of bytes to be received. */
[43707]57 void downloadProgress(qint64 iBytesReceived, qint64 iBytesTotal);
[58265]58
59 /** Notifies listeners about reply has finished processing. */
[43707]60 void finished();
[39932]61
62public:
63
[58422]64 /** Known error codes.
65 * Came from QtNetwork module.
66 * More to go on demand when necessary. */
67 enum NetworkError
68 {
69 NoError,
70 ConnectionRefusedError,
71 RemoteHostClosedError,
[58740]72 UrlNotFoundError,
[58422]73 HostNotFoundError,
74 OperationCanceledError,
75 SslHandshakeFailedError,
76 ProxyNotFoundError,
77 ContentAccessDenied,
78 AuthenticationRequiredError,
79 ContentReSendError,
80 UnknownNetworkError,
81 ProtocolFailure,
82 };
83
84 /** Known header types.
85 * Came from QtNetwork module.
86 * More to go on demand when necessary. */
87 enum KnownHeader
88 {
89 ContentTypeHeader,
90 ContentLengthHeader,
91 LastModifiedHeader,
[70787]92 LocationHeader,
[58422]93 };
94
[78665]95 /** Constructs network-reply of the passed @a type for the passed @a url, @a strTarget and @a requestHeaders. */
96 UINetworkReply(UINetworkRequestType type, const QUrl &url, const QString &strTarget, const UserDictionary &requestHeaders);
[58265]97 /** Destructs reply. */
[43707]98 ~UINetworkReply();
[39932]99
[58265]100 /** Aborts reply. */
[43707]101 void abort();
[58265]102
103 /** Returns the URL of the reply. */
[58252]104 QUrl url() const;
[58265]105
106 /** Returns the last cached error of the reply. */
[58422]107 NetworkError error() const;
[58265]108 /** Returns the user-oriented string corresponding to the last cached error of the reply. */
[43707]109 QString errorString() const;
[58265]110
111 /** Returns binary content of the reply. */
[58249]112 QByteArray readAll() const;
[58265]113 /** Returns value for the cached reply header of the passed @a type. */
[58422]114 QVariant header(UINetworkReply::KnownHeader header) const;
[39932]115
116private:
117
[58265]118 /** Holds the reply private data instance. */
[58249]119 UINetworkReplyPrivate *m_pReply;
[39932]120};
121
[86996]122#endif /* !FEQT_INCLUDED_SRC_networking_UINetworkReply_h */
[58265]123
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use