Changeset 71434 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Mar 21, 2018 2:12:10 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 121402
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/net
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloader.cpp
r71027 r71434 5 5 6 6 /* 7 * Copyright (C) 2006-201 7Oracle Corporation7 * Copyright (C) 2006-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 /// This class requires proper doxy.19 /// For now I'm keeping the old style consistent.20 21 18 #ifdef VBOX_WITH_PRECOMPILED_HEADERS 22 19 # include <precomp.h> … … 24 21 25 22 /* GUI includes: */ 26 # include <UINetworkReply.h> 23 # include "VBoxGlobal.h" 24 # include "VBoxUtils.h" 27 25 # include "UIDownloader.h" 28 # include "VBoxGlobal.h"29 26 # include "UIMessageCenter.h" 30 # include " VBoxUtils.h"27 # include "UINetworkReply.h" 31 28 32 29 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ 33 30 34 31 35 /* Starting routine: */36 32 void UIDownloader::start() 37 33 { … … 39 35 } 40 36 41 /* Acknowledging start: */42 37 void UIDownloader::sltStartAcknowledging() 43 38 { … … 49 44 } 50 45 51 /* Downloading start: */52 46 void UIDownloader::sltStartDownloading() 53 47 { … … 59 53 } 60 54 61 /* Verifying start: */62 55 void UIDownloader::sltStartVerifying() 63 56 { … … 69 62 } 70 63 71 /* Constructor: */72 64 UIDownloader::UIDownloader() 73 65 : m_state(UIDownloaderState_Null) … … 79 71 } 80 72 81 /* virtual override */82 73 const QString UIDownloader::description() const 83 74 { … … 94 85 } 95 86 96 /* Network-reply progress handler: */ 97 void UIDownloader::processNetworkReplyProgress(qint64 iReceived, qint64 iTotal) 87 void UIDownloader::processNetworkReplyProgress(qint64, qint64) 98 88 { 99 /* Unused variables: */100 Q_UNUSED(iReceived);101 Q_UNUSED(iTotal);102 89 } 103 90 104 /* Network-reply canceled handler: */ 105 void UIDownloader::processNetworkReplyCanceled(UINetworkReply *pNetworkReply) 91 void UIDownloader::processNetworkReplyCanceled(UINetworkReply *) 106 92 { 107 /* Unused variables: */108 Q_UNUSED(pNetworkReply);109 110 93 /* Delete downloader: */ 111 94 deleteLater(); 112 95 } 113 96 114 /* Network-reply finished handler: */115 97 void UIDownloader::processNetworkReplyFinished(UINetworkReply *pNetworkReply) 116 98 { … … 138 120 } 139 121 140 /* Handle acknowledging result: */141 122 void UIDownloader::handleAcknowledgingResult(UINetworkReply *pNetworkReply) 142 123 { … … 157 138 } 158 139 159 /* Handle downloading result: */160 140 void UIDownloader::handleDownloadingResult(UINetworkReply *pNetworkReply) 161 141 { -
trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloader.h
r71027 r71434 5 5 6 6 /* 7 * Copyright (C) 2006-201 7Oracle Corporation7 * Copyright (C) 2006-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 /// This class requires proper doxy. 19 /// For now I'm keeping the old style consistent. 18 #ifndef ___UIDownloader_h___ 19 #define ___UIDownloader_h___ 20 20 21 #ifndef __UIDownloader_h__ 22 #define __UIDownloader_h__ 23 24 /* Global includes: */ 21 /* Qt includes: */ 25 22 #include <QUrl> 26 23 #include <QList> 27 24 28 /* Local includes: */ 25 /* GUI includes: */ 26 #include "UINetworkCustomer.h" 29 27 #include "UINetworkDefs.h" 30 #include "UINetworkCustomer.h"31 28 32 29 /* Forward declarations: */ 30 class QString; 33 31 class UINetworkReply; 34 32 35 /* Downloader interface.36 * UINetworkCustomer class extension which allows background http downloading. */33 /** Downloader interface. 34 * UINetworkCustomer class extension which allows background http downloading. */ 37 35 class UIDownloader : public UINetworkCustomer 38 36 { … … 41 39 signals: 42 40 43 /* Signal to start acknowledging:*/41 /** Signals to start acknowledging. */ 44 42 void sigToStartAcknowledging(); 45 /* Signal to start downloading:*/43 /** Signals to start downloading. */ 46 44 void sigToStartDownloading(); 47 /* Signal to start verifying:*/45 /** Signals to start verifying. */ 48 46 void sigToStartVerifying(); 49 47 50 48 public: 51 49 52 /* Starting routine:*/50 /** Starts the sequence. */ 53 51 void start(); 54 52 55 53 protected slots: 56 54 57 /* Acknowledging part:*/55 /** Performs acknowledging part. */ 58 56 void sltStartAcknowledging(); 59 /* Downloading part:*/57 /** Performs downloading part. */ 60 58 void sltStartDownloading(); 61 /* Verifying part:*/59 /** Performs verifying part. */ 62 60 void sltStartVerifying(); 63 61 64 62 protected: 65 63 66 /* UIDownloader states:*/64 /** UIDownloader states. */ 67 65 enum UIDownloaderState 68 66 { … … 70 68 UIDownloaderState_Acknowledging, 71 69 UIDownloaderState_Downloading, 72 UIDownloaderState_Verifying ,70 UIDownloaderState_Verifying 73 71 }; 74 72 75 /* Constructor:*/73 /** Constructs downloader. */ 76 74 UIDownloader(); 77 75 78 /* Source stuff, 79 * allows to set/get one or more sources to try to download from: */ 76 /** Appends subsequent source to try to download from. */ 80 77 void addSource(const QString &strSource) { m_sources << QUrl(strSource); } 78 /** Defines the only one source to try to download from. */ 81 79 void setSource(const QString &strSource) { m_sources.clear(); addSource(strSource); } 82 const QList<QUrl>& sources() const { return m_sources; } 83 const QUrl& source() const { return m_source; } 80 /** Returns a list of sources to try to download from. */ 81 const QList<QUrl> &sources() const { return m_sources; } 82 /** Returns a current source to try to download from. */ 83 const QUrl &source() const { return m_source; } 84 84 85 /* Target stuff, 86 * allows to set/get downloaded file destination: */ 85 /** Defines the @a strTarget file-path used to save downloaded file to. */ 87 86 void setTarget(const QString &strTarget) { m_strTarget = strTarget; } 88 const QString& target() const { return m_strTarget; } 87 /** Returns the target file-path used to save downloaded file to. */ 88 const QString &target() const { return m_strTarget; } 89 89 90 /* SHA-256 stuff, 91 * allows to set/get SHA-256 sum dictionary file for downloaded source. */ 90 /** Defines the @a strPathSHA256SumsFile. */ 91 void setPathSHA256SumsFile(const QString &strPathSHA256SumsFile) { m_strPathSHA256SumsFile = strPathSHA256SumsFile; } 92 /** Returns the SHA-256 sums file-path. */ 92 93 QString pathSHA256SumsFile() const { return m_strPathSHA256SumsFile; } 93 void setPathSHA256SumsFile(const QString &strPathSHA256SumsFile) { m_strPathSHA256SumsFile = strPathSHA256SumsFile; }94 94 95 95 /** Returns description of the current network operation. */ 96 96 virtual const QString description() const; 97 97 98 /* Start delayed acknowledging:*/98 /** Starts delayed acknowledging. */ 99 99 void startDelayedAcknowledging() { emit sigToStartAcknowledging(); } 100 /* Start delayed downloading:*/100 /** Starts delayed downloading. */ 101 101 void startDelayedDownloading() { emit sigToStartDownloading(); } 102 /* Start delayed verifying:*/102 /** Starts delayed verifying. */ 103 103 void startDelayedVerifying() { emit sigToStartVerifying(); } 104 104 105 /* Network-reply progress handler:*/105 /** Handles network-reply progress for @a iReceived bytes of @a iTotal. */ 106 106 void processNetworkReplyProgress(qint64 iReceived, qint64 iTotal); 107 /* Network-reply cancel handler:*/108 void processNetworkReplyCanceled(UINetworkReply *p NetworkReply);109 /* Network-reply finish handler:*/110 void processNetworkReplyFinished(UINetworkReply *p NetworkReply);107 /** Handles network-reply cancel request for @a pReply. */ 108 void processNetworkReplyCanceled(UINetworkReply *pReply); 109 /** Handles network-reply finish for @a pReply. */ 110 void processNetworkReplyFinished(UINetworkReply *pReply); 111 111 112 /* Handle acknowledging result:*/113 virtual void handleAcknowledgingResult(UINetworkReply *p NetworkReply);114 /* Handle downloading result:*/115 virtual void handleDownloadingResult(UINetworkReply *p NetworkReply);116 /* Handle verifying result:*/117 virtual void handleVerifyingResult(UINetworkReply *p NetworkReply);112 /** Handles acknowledging result. */ 113 virtual void handleAcknowledgingResult(UINetworkReply *pReply); 114 /** Handles downloading result. */ 115 virtual void handleDownloadingResult(UINetworkReply *pReply); 116 /** Handles verifying result. */ 117 virtual void handleVerifyingResult(UINetworkReply *pReply); 118 118 119 /* Pure virtual function to ask user about downloading confirmation:*/120 virtual bool askForDownloadingConfirmation(UINetworkReply *p NetworkReply) = 0;121 /* Pure virtual function to handle downloaded object:*/122 virtual void handleDownloadedObject(UINetworkReply *p NetworkReply) = 0;123 /* Base virtual function to handle verified object:*/124 virtual void handleVerifiedObject(UINetworkReply * /* pNetworkReply */) {}119 /** Asks user for downloading confirmation for passed @a pReply. */ 120 virtual bool askForDownloadingConfirmation(UINetworkReply *pReply) = 0; 121 /** Handles downloaded object for passed @a pReply. */ 122 virtual void handleDownloadedObject(UINetworkReply *pReply) = 0; 123 /** Handles verified object for passed @a pReply. */ 124 virtual void handleVerifiedObject(UINetworkReply *pReply) { Q_UNUSED(pReply); } 125 125 126 126 private: 127 127 128 /* Private variables:*/128 /** Holds the downloader state. */ 129 129 UIDownloaderState m_state; 130 131 /** Holds the downloading sources. */ 130 132 QList<QUrl> m_sources; 131 QUrl m_source; 133 /** Holds the current downloading source. */ 134 QUrl m_source; 135 136 /** Holds the downloading target path. */ 132 137 QString m_strTarget; 138 139 /** Holds the SHA-256 sums file path. */ 133 140 QString m_strPathSHA256SumsFile; 134 141 }; 135 142 136 #endif / / __UIDownloader_h__143 #endif /* !___UIDownloader_h___ */ 137 144 -
trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderAdditions.cpp
r71355 r71434 5 5 6 6 /* 7 * Copyright (C) 2006-201 7Oracle Corporation7 * Copyright (C) 2006-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 26 26 27 27 /* GUI includes: */ 28 # include "UIDownloaderAdditions.h"29 # include "UINetworkReply.h"30 28 # include "QIFileDialog.h" 31 29 # include "VBoxGlobal.h" 30 # include "UIDownloaderAdditions.h" 32 31 # include "UIMessageCenter.h" 33 32 # include "UIModalWindowManager.h" 33 # include "UINetworkReply.h" 34 34 # include "UIVersion.h" 35 35 … … 41 41 42 42 /* static */ 43 UIDownloaderAdditions * UIDownloaderAdditions::m_spInstance = 0;43 UIDownloaderAdditions *UIDownloaderAdditions::s_pInstance = 0; 44 44 45 45 /* static */ 46 UIDownloaderAdditions *UIDownloaderAdditions::create()46 UIDownloaderAdditions *UIDownloaderAdditions::create() 47 47 { 48 if (!m_spInstance) 49 m_spInstance = new UIDownloaderAdditions; 50 return m_spInstance; 51 } 52 53 /* static */ 54 UIDownloaderAdditions* UIDownloaderAdditions::current() 55 { 56 return m_spInstance; 48 if (!s_pInstance) 49 s_pInstance = new UIDownloaderAdditions; 50 return s_pInstance; 57 51 } 58 52 … … 60 54 { 61 55 /* Prepare instance: */ 62 if (! m_spInstance)63 m_spInstance = this;56 if (!s_pInstance) 57 s_pInstance = this; 64 58 65 59 /* Get version number and adjust it for test and trunk builds. The server only has official releases. */ … … 82 76 { 83 77 /* Cleanup instance: */ 84 if ( m_spInstance == this)85 m_spInstance = 0;78 if (s_pInstance == this) 79 s_pInstance = 0; 86 80 } 87 81 88 /* virtual override */89 82 const QString UIDownloaderAdditions::description() const 90 83 { … … 99 92 void UIDownloaderAdditions::handleDownloadedObject(UINetworkReply *pReply) 100 93 { 101 /* Read received data into the buffer: */102 94 m_receivedData = pReply->readAll(); 103 95 } -
trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderAdditions.h
r69500 r71434 5 5 6 6 /* 7 * Copyright (C) 2006-201 7Oracle Corporation7 * Copyright (C) 2006-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ UIDownloaderAdditions_h__19 #define __ UIDownloaderAdditions_h__18 #ifndef ___UIDownloaderAdditions_h___ 19 #define ___UIDownloaderAdditions_h___ 20 20 21 /* Localincludes: */21 /* GUI includes: */ 22 22 #include "UIDownloader.h" 23 23 24 /* UIDownloader extension for background additions downloading. */ 24 /* Forward declarations: */ 25 class QByteArray; 26 27 /** UIDownloader extension for background additions downloading. */ 25 28 class UIDownloaderAdditions : public UIDownloader 26 29 { … … 29 32 signals: 30 33 31 /* Notifies listeners about downloading finished: */ 34 /** Notifies listeners about downloading finished. 35 * @param strFile Brings the downloaded file-name. */ 32 36 void sigDownloadFinished(const QString &strFile); 33 37 34 38 public: 35 39 36 /* Static stuff: */ 37 static UIDownloaderAdditions* create(); 38 static UIDownloaderAdditions* current(); 40 /** Creates downloader instance. */ 41 static UIDownloaderAdditions *create(); 42 /** Returns current downloader instance. */ 43 static UIDownloaderAdditions *current() { return s_pInstance; } 39 44 40 45 private: 41 46 42 /* Constructor/destructor:*/47 /** Constructs downloader. */ 43 48 UIDownloaderAdditions(); 49 /** Destructs downloader. */ 44 50 ~UIDownloaderAdditions(); 45 51 46 52 /** Returns description of the current network operation. */ 47 virtual const QString description() const ;53 virtual const QString description() const /* override */; 48 54 49 /* Virtual stuff reimplementations: */ 50 bool askForDownloadingConfirmation(UINetworkReply *pReply); 51 void handleDownloadedObject(UINetworkReply *pReply); 52 void handleVerifiedObject(UINetworkReply *pReply); 55 /** Asks user for downloading confirmation for passed @a pReply. */ 56 virtual bool askForDownloadingConfirmation(UINetworkReply *pReply) /* override */; 57 /** Handles downloaded object for passed @a pReply. */ 58 virtual void handleDownloadedObject(UINetworkReply *pReply) /* override */; 59 /** Handles verified object for passed @a pReply. */ 60 virtual void handleVerifiedObject(UINetworkReply *pReply) /* override */; 53 61 54 /* Variables: */ 55 static UIDownloaderAdditions *m_spInstance; 62 /** Holds the static singleton instance. */ 63 static UIDownloaderAdditions *s_pInstance; 64 65 /** Holds the cached received data awaiting for verification. */ 56 66 QByteArray m_receivedData; 57 67 }; 58 68 59 #endif / / __UIDownloaderAdditions_h__69 #endif /* !___UIDownloaderAdditions_h___ */ 60 70 -
trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.cpp
r71355 r71434 5 5 6 6 /* 7 * Copyright (C) 2011-201 7Oracle Corporation7 * Copyright (C) 2011-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 26 26 27 27 /* GUI includes: */ 28 # include "UIDownloaderExtensionPack.h"29 # include "UINetworkReply.h"30 28 # include "QIFileDialog.h" 31 29 # include "VBoxGlobal.h" 30 # include "UIDownloaderExtensionPack.h" 32 31 # include "UIMessageCenter.h" 33 32 # include "UIModalWindowManager.h" 33 # include "UINetworkReply.h" 34 34 # include "UIVersion.h" 35 35 … … 41 41 42 42 /* static */ 43 UIDownloaderExtensionPack * UIDownloaderExtensionPack::m_spInstance = 0;43 UIDownloaderExtensionPack *UIDownloaderExtensionPack::s_pInstance = 0; 44 44 45 45 /* static */ 46 UIDownloaderExtensionPack *UIDownloaderExtensionPack::create()46 UIDownloaderExtensionPack *UIDownloaderExtensionPack::create() 47 47 { 48 if (!m_spInstance) 49 m_spInstance = new UIDownloaderExtensionPack; 50 return m_spInstance; 51 } 52 53 /* static */ 54 UIDownloaderExtensionPack* UIDownloaderExtensionPack::current() 55 { 56 return m_spInstance; 48 if (!s_pInstance) 49 s_pInstance = new UIDownloaderExtensionPack; 50 return s_pInstance; 57 51 } 58 52 … … 60 54 { 61 55 /* Prepare instance: */ 62 if (! m_spInstance)63 m_spInstance = this;56 if (!s_pInstance) 57 s_pInstance = this; 64 58 65 59 /* Get version number and adjust it for test and trunk builds. The server only has official releases. */ … … 83 77 { 84 78 /* Cleanup instance: */ 85 if ( m_spInstance == this)86 m_spInstance = 0;79 if (s_pInstance == this) 80 s_pInstance = 0; 87 81 } 88 82 89 /* virtual override */90 83 const QString UIDownloaderExtensionPack::description() const 91 84 { … … 100 93 void UIDownloaderExtensionPack::handleDownloadedObject(UINetworkReply *pReply) 101 94 { 102 /* Read received data into the buffer: */103 95 m_receivedData = pReply->readAll(); 104 96 } -
trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.h
r69500 r71434 5 5 6 6 /* 7 * Copyright (C) 2011-201 7Oracle Corporation7 * Copyright (C) 2011-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ UIDownloaderExtensionPack_h__19 #define __ UIDownloaderExtensionPack_h__18 #ifndef ___UIDownloaderExtensionPack_h___ 19 #define ___UIDownloaderExtensionPack_h___ 20 20 21 /* Localincludes: */21 /* GUI includes: */ 22 22 #include "UIDownloader.h" 23 23 24 /* UIDownloader extension for background extension-pack downloading. */ 24 /* Forward declarations: */ 25 class QByteArray; 26 27 /** UIDownloader extension for background extension-pack downloading. */ 25 28 class UIDownloaderExtensionPack : public UIDownloader 26 29 { … … 29 32 signals: 30 33 31 /* Notifies listeners about downloading finished: */ 32 void sigDownloadFinished(const QString &strSource, const QString &strTarget, QString strHash); 34 /** Notifies listeners about downloading finished. 35 * @param strSource Brings the downloading source. 36 * @param strTarget Brings the downloading target. 37 * @param strHash Brings the downloaded file hash. */ 38 void sigDownloadFinished(const QString &strSource, const QString &strTarget, const QString &strHash); 33 39 34 40 public: 35 41 36 /* Static stuff: */ 37 static UIDownloaderExtensionPack* create(); 38 static UIDownloaderExtensionPack* current(); 42 /** Creates downloader instance. */ 43 static UIDownloaderExtensionPack *create(); 44 /** Returns current downloader instance. */ 45 static UIDownloaderExtensionPack *current() { return s_pInstance; } 39 46 40 47 private: 41 48 42 /* Constructor/destructor:*/49 /** Constructs downloader. */ 43 50 UIDownloaderExtensionPack(); 51 /** Destructs downloader. */ 44 52 ~UIDownloaderExtensionPack(); 45 53 46 54 /** Returns description of the current network operation. */ 47 virtual const QString description() const ;55 virtual const QString description() const /* override */; 48 56 49 /* Virtual stuff reimplementations: */ 50 bool askForDownloadingConfirmation(UINetworkReply *pReply); 51 void handleDownloadedObject(UINetworkReply *pReply); 52 void handleVerifiedObject(UINetworkReply *pReply); 57 /** Asks user for downloading confirmation for passed @a pReply. */ 58 virtual bool askForDownloadingConfirmation(UINetworkReply *pReply) /* override */; 59 /** Handles downloaded object for passed @a pReply. */ 60 virtual void handleDownloadedObject(UINetworkReply *pReply) /* override */; 61 /** Handles verified object for passed @a pReply. */ 62 virtual void handleVerifiedObject(UINetworkReply *pReply) /* override */; 53 63 54 /* Variables: */ 55 static UIDownloaderExtensionPack *m_spInstance; 64 /** Holds the static singleton instance. */ 65 static UIDownloaderExtensionPack *s_pInstance; 66 67 /** Holds the cached received data awaiting for verification. */ 56 68 QByteArray m_receivedData; 57 69 }; 58 70 59 #endif / / __UIDownloaderExtensionPack_h__71 #endif /* !___UIDownloaderExtensionPack_h___ */ 60 72 -
trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderUserManual.cpp
r71355 r71434 5 5 6 6 /* 7 * Copyright (C) 2006-201 7Oracle Corporation7 * Copyright (C) 2006-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 26 26 27 27 /* GUI includes: */ 28 # include "UIDownloaderUserManual.h"29 # include "UINetworkReply.h"30 28 # include "QIFileDialog.h" 31 29 # include "VBoxGlobal.h" 30 # include "UIDownloaderUserManual.h" 32 31 # include "UIMessageCenter.h" 33 32 # include "UIModalWindowManager.h" 33 # include "UINetworkReply.h" 34 34 # include "UIVersion.h" 35 35 … … 38 38 39 39 /* static */ 40 UIDownloaderUserManual* UIDownloaderUserManual:: m_spInstance = 0;40 UIDownloaderUserManual* UIDownloaderUserManual::s_pInstance = 0; 41 41 42 42 /* static */ 43 43 UIDownloaderUserManual* UIDownloaderUserManual::create() 44 44 { 45 if (!m_spInstance) 46 m_spInstance = new UIDownloaderUserManual; 47 return m_spInstance; 48 } 49 50 /* static */ 51 UIDownloaderUserManual* UIDownloaderUserManual::current() 52 { 53 return m_spInstance; 45 if (!s_pInstance) 46 s_pInstance = new UIDownloaderUserManual; 47 return s_pInstance; 54 48 } 55 49 … … 57 51 { 58 52 /* Prepare instance: */ 59 if (! m_spInstance)60 m_spInstance = this;53 if (!s_pInstance) 54 s_pInstance = this; 61 55 62 56 /* Get version number and adjust it for test and trunk builds. The server only has official releases. */ … … 81 75 { 82 76 /* Cleanup instance: */ 83 if ( m_spInstance == this)84 m_spInstance = 0;77 if (s_pInstance == this) 78 s_pInstance = 0; 85 79 } 86 80 87 /* virtual override */88 81 const QString UIDownloaderUserManual::description() const 89 82 { -
trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderUserManual.h
r69500 r71434 5 5 6 6 /* 7 * Copyright (C) 2010-201 7Oracle Corporation7 * Copyright (C) 2010-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ UIDownloaderUserManual_h__19 #define __ UIDownloaderUserManual_h__18 #ifndef ___UIDownloaderUserManual_h___ 19 #define ___UIDownloaderUserManual_h___ 20 20 21 /* Localincludes: */21 /* GUI includes: */ 22 22 #include "UIDownloader.h" 23 23 24 /* UIDownloader extension for background user-manual downloading. */24 /** UIDownloader extension for background user-manual downloading. */ 25 25 class UIDownloaderUserManual : public UIDownloader 26 26 { … … 29 29 signals: 30 30 31 /* Notifies listeners about downloading finished: */ 31 /** Notifies listeners about downloading finished. 32 * @param strFile Brings the downloaded file-name. */ 32 33 void sigDownloadFinished(const QString &strFile); 33 34 34 35 public: 35 36 36 /* Static stuff: */ 37 static UIDownloaderUserManual* create(); 38 static UIDownloaderUserManual* current(); 37 /** Creates downloader instance. */ 38 static UIDownloaderUserManual *create(); 39 /** Returns current downloader instance. */ 40 static UIDownloaderUserManual *current() { return s_pInstance; } 39 41 40 42 private: 41 43 42 /* Constructor/destructor:*/44 /** Constructs downloader. */ 43 45 UIDownloaderUserManual(); 46 /** Destructs downloader. */ 44 47 ~UIDownloaderUserManual(); 45 48 46 49 /** Returns description of the current network operation. */ 47 virtual const QString description() const ;50 virtual const QString description() const /* override */; 48 51 49 /* Virtual stuff reimplementations: */ 50 bool askForDownloadingConfirmation(UINetworkReply *pReply); 51 void handleDownloadedObject(UINetworkReply *pReply); 52 /** Asks user for downloading confirmation for passed @a pReply. */ 53 virtual bool askForDownloadingConfirmation(UINetworkReply *pReply) /* override */; 54 /** Handles downloaded object for passed @a pReply. */ 55 virtual void handleDownloadedObject(UINetworkReply *pReply) /* override */; 52 56 53 /* Variables:*/54 static UIDownloaderUserManual * m_spInstance;57 /** Holds the static singleton instance. */ 58 static UIDownloaderUserManual *s_pInstance; 55 59 }; 56 60 57 #endif / / __UIDownloaderUserManual_h__61 #endif /* !___UIDownloaderUserManual_h___ */ 58 62
Note:
See TracChangeset
for help on using the changeset viewer.