File: wx.lib.softwareupdate.SoftwareUpdate.txt

package info (click to toggle)
wxpython4.0 4.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 211,112 kB
  • sloc: cpp: 888,355; python: 223,130; makefile: 52,087; ansic: 45,780; sh: 3,012; xml: 1,534; perl: 264
file content (111 lines) | stat: -rw-r--r-- 4,872 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2018 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. currentmodule:: wx.lib.softwareupdate

.. highlight:: python



.. _wx.lib.softwareupdate.SoftwareUpdate:

==========================================================================================================================================
|phoenix_title|  **wx.lib.softwareupdate.SoftwareUpdate**
==========================================================================================================================================

Mix this class with :class:`App` and call :meth:`InitForUpdates` from the derived class'
OnInit method. Be sure that the :class:`App` has set a display name
(self.SetAppDisplayName) as that value will be used in the update dialogs.



|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>SoftwareUpdate</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.lib.softwareupdate.SoftwareUpdate_inheritance.png" alt="Inheritance diagram of SoftwareUpdate" usemap="#dummy" class="inheritance"/></center>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.softwareupdate.SoftwareUpdate.html" title="wx.lib.softwareupdate.SoftwareUpdate" alt="" coords="5,5,272,35"/> </map> 
   </p>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.lib.softwareupdate.SoftwareUpdate.AutoCheckForUpdate`                 If it has been `frequencyInDays` since the last auto-check then check if
:meth:`~wx.lib.softwareupdate.SoftwareUpdate.CheckForUpdate`                     This method will check for the availability of a new update, and will
:meth:`~wx.lib.softwareupdate.SoftwareUpdate.InitUpdates`                        Set up the Esky object for doing software updates. Passing either the
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: SoftwareUpdate(object)

   Mix this class with :class:`App` and call :meth:`InitForUpdates` from the derived class'
   OnInit method. Be sure that the :class:`App` has set a display name
   (self.SetAppDisplayName) as that value will be used in the update dialogs.

   .. method:: AutoCheckForUpdate(self, frequencyInDays, parentWindow=None, cfg=None)

      If it has been `frequencyInDays` since the last auto-check then check if
      a software update is available and prompt the user to download and
      install it. This can be called after a application has started up, and
      if there is no update available the user will not be bothered.


   .. method:: CheckForUpdate(self, silentUnlessUpdate=False, parentWindow=None, cfg=None)

      This method will check for the availability of a new update, and will
      prompt the user with details if there is one there. By default it will
      also tell the user if there is not a new update, but you can pass
      silentUnlessUpdate=True to not bother the user if there isn't a new
      update available.
      
      This method should be called from an event handler for a "Check for
      updates" menu item, or something similar. The actual update check
      will be run in a background thread and this function will return
      immediately after starting the thread so the application is not
      blocked if there is network communication problems. A callback to the
      GUI thread will be made to do the update or report problems as
      needed.


   .. method:: InitUpdates(self, updatesURL, changelogURL=None, icon=None)

      Set up the Esky object for doing software updates. Passing either the
      base URL (with a trailing '/') for the location of the update
      packages, or an instance of a class derived from the
      esky.finder.VersionFinder class is required. A custom VersionFinder
      can be used to find and fetch the newer verison of the software in
      some other way, if desired.
      
      Call this method from the app's OnInit method.