Public Member Functions | |
def | abort (self, _) |
def | abort (self, int index) |
def | abort_all (self) |
def | abort_all (self) |
QtCore.QByteArray | blocking_get (self, str _) |
Optional[QtCore.QByteArray] | blocking_get (self, str url) |
int | submit_monitored_get (self, str url) |
int | submit_monitored_request (self, _) |
int | submit_unmonitored_get (self, str url) |
int | submit_unmonitored_request (self, _) |
Public Attributes | |
counting_iterator | |
diskCache | |
file_buffers | |
monitored_queue | |
QNAM | |
queue | |
synchronous_lock | |
unmonitored_queue | |
Static Public Attributes | |
completed | |
progress_complete | |
progress_made | |
A single global instance of NetworkManager is instantiated and stored as AM_NETWORK_MANAGER. Outside threads should send GET requests to this class by calling the submit_unmonitored_request() or submit_monitored_request() function, as needed. See the documentation of those functions for details.
A dummy class to enable an offline mode when the QtNetwork package is not yet installed
def NetworkManager.NetworkManager.abort | ( | self, | |
_ | |||
) |
Referenced by PathPythonGui.simple_edit_panel.SimpleEditPanel.clicked(), and femsolver.run.Machine.run().
def NetworkManager.NetworkManager.abort | ( | self, | |
int | index | ||
) |
References NetworkManager.NetworkManager.__create_get_request(), NetworkManager.NetworkManager.__data_incoming(), NetworkManager.NetworkManager.__last_started_index, NetworkManager.NetworkManager.__launch_request(), NetworkManager.NetworkManager.abort(), NetworkManager.NetworkManager.completed, draftguitools.gui_circulararray.CircularArray.completed(), draftguitools.gui_orthoarray.OrthoArray.completed(), draftguitools.gui_polararray.PolarArray.completed(), PartGui::TaskAttacher.completed, NetworkManager.NetworkManager.file_buffers, NetworkManager.NetworkManager.progress_complete, addonmanager_workers.CheckWorkbenchesForUpdatesWorker.progress_made, addonmanager_workers.FillMacroListWorker.progress_made, addonmanager_workers.CacheMacroCode.progress_made, addonmanager_workers.InstallWorkbenchWorker.progress_made, addonmanager_workers.UpdateMetadataCacheWorker.progress_made, addonmanager_workers.UpdateAllWorker.progress_made, NetworkManager.NetworkManager.progress_made, and NetworkManager.NetworkManager.queue.
Referenced by NetworkManager.NetworkManager.abort(), PathPythonGui.simple_edit_panel.SimpleEditPanel.clicked(), and femsolver.run.Machine.run().
def NetworkManager.NetworkManager.abort_all | ( | self | ) |
Abort ALL network calls in progress, including clearing the queue
References NetworkManager.NetworkManager.queue.
def NetworkManager.NetworkManager.abort_all | ( | self | ) |
QtCore.QByteArray NetworkManager.NetworkManager.blocking_get | ( | self, | |
str | _ | ||
) |
Optional[QtCore.QByteArray] NetworkManager.NetworkManager.blocking_get | ( | self, | |
str | url | ||
) |
Submits a GET request to the QNetworkAccessManager and block until it is complete
References NetworkManager.NetworkManager.__create_get_request(), NetworkManager.NetworkManager.__request_queued, NetworkManager.NetworkManager.counting_iterator, NetworkManager.NetworkManager.queue, and NetworkManager.NetworkManager.synchronous_lock.
Adds this request to the queue, and returns an index that can be used by calling code in conjunction with the progress_made() and progress_completed() signals to handle the results of the call. All data is cached to disk, and progress is reported periodically as the underlying QNetworkReply reports its progress. The progress_completed() signal contains a path to a temporary file with the stored data. Calling code should delete this file when done with it (or move it into its final place, etc.).
References NetworkManager.NetworkManager.__create_get_request(), NetworkManager.NetworkManager.__request_queued, NetworkManager.NetworkManager.counting_iterator, NetworkManager.NetworkManager.progress_made, and NetworkManager.NetworkManager.queue.
int NetworkManager.NetworkManager.submit_monitored_request | ( | self, | |
_ | |||
) |
References NetworkManager.NetworkManager.monitored_queue.
Adds this request to the queue, and returns an index that can be used by calling code in conjunction with the completed() signal to handle the results of the call. All data is kept in memory, and the completed() call includes a direct handle to the bytes returned. It is not called until the data transfer has finished and the connection is closed.
References NetworkManager.NetworkManager.__create_get_request(), NetworkManager.NetworkManager.__request_queued, NetworkManager.NetworkManager.completed, NetworkManager.NetworkManager.counting_iterator, and NetworkManager.NetworkManager.queue.
int NetworkManager.NetworkManager.submit_unmonitored_request | ( | self, | |
_ | |||
) |
References NetworkManager.NetworkManager.unmonitored_queue.
|
static |
Referenced by NetworkManager.NetworkManager.abort(), and NetworkManager.NetworkManager.submit_unmonitored_get().
NetworkManager.NetworkManager.counting_iterator |
NetworkManager.NetworkManager.diskCache |
NetworkManager.NetworkManager.file_buffers |
Referenced by NetworkManager.NetworkManager.abort().
NetworkManager.NetworkManager.monitored_queue |
Referenced by NetworkManager.NetworkManager.submit_monitored_request().
|
static |
Referenced by NetworkManager.NetworkManager.abort().
|
static |
Referenced by NetworkManager.NetworkManager.abort(), addonmanager_workers.UpdateMetadataCacheWorker.download_completed(), addonmanager_workers.UpdateAllWorker.on_failure(), addonmanager_workers.UpdateAllWorker.on_success(), addonmanager_workers.FillMacroListWorker.retrieve_macros_from_git(), addonmanager_workers.FillMacroListWorker.retrieve_macros_from_wiki(), addonmanager_workers.UpdateAllWorker.run(), NetworkManager.NetworkManager.submit_monitored_get(), addonmanager_workers.CacheMacroCode.update_and_advance(), addonmanager_workers.InstallWorkbenchWorker.update_status(), and addonmanager_workers.InstallWorkbenchWorker.update_zip_status().
NetworkManager.NetworkManager.QNAM |
NetworkManager.NetworkManager.queue |
NetworkManager.NetworkManager.synchronous_lock |
Referenced by NetworkManager.NetworkManager.blocking_get().
NetworkManager.NetworkManager.unmonitored_queue |
Referenced by NetworkManager.NetworkManager.submit_unmonitored_request().