Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Member Functions | Public Attributes | Static Public Attributes

# PackageInfo Class Reference

List of all members.

## Classes
class | InstallStep
## Public Member Functions
def | __init__
def | checkStatus
def | downloadDescFile
def | downloadDescFileGenerator
def | downloadPackage
def | downloadPackageGenerator
def | getDownloadEffort
def | getFormattedName
def | getPackageDir
def | getPrevDownloadedEffort
def | getUsage
def | hasCurrentDescFile
def | installPackage
def | markUsed
def | setupFilenames
## Public Attributes
| asMirror
| compressedArchive
| currentStepEffort
| descFile
| descFileBasename
| descFileDirname
| diskSpace
| displayName
| downloadProgress
| extracts
| guiApp
| hasDescFile
| hasPackage
| host
| http
| importDescFile
| installed
| installPlans
| packageDir
| packageName
| packageVersion
| patchVersion
| platform
| requires
| solo
| totalPlanCompleted
| totalPlanSize
| uncompressedArchive
| updated
## Static Public Attributes
int | downloadFactor = 1
tuple | notify = directNotify.newCategory("PackageInfo")
float | patchFactor = 0.01
int | restartDownload = 3
int | stepComplete = 1
int | stepContinue = 4
int | stepFailed = 2
float | uncompressFactor = 0.01
float | unpackFactor = 0.01
string | UsageBasename = 'usage.xml'

## Detailed Description

    This class represents a downloadable Panda3D package file that
    can be (or has been) installed into the current runtime.  It is
    the Python equivalent of the P3DPackage class in the core API.

## Constructor & Destructor Documentation

def __init__ | ( |  | self,
|  |  | host,
|  |  | packageName,
|  |  | packageVersion,
|  |  | platform = `None`,
|  |  | solo = `False`,
|  |  | asMirror = `False`
| ) |  |

## Member Function Documentation

def checkStatus | ( |  | self | ) |

    Checks the current status of the desc file and the package
    contents on disk.

def downloadDescFile | ( |  | self,
|  |  | http
| ) |  |

    Downloads the desc file for this particular package,
    synchronously, and then reads it.  Returns true on success,
    false on failure.

def downloadDescFileGenerator | ( |  | self,
|  |  | http
| ) |  |

    A generator function that implements downloadDescFile()
    one piece at a time.  It yields one of stepComplete,
    stepFailed, or stepContinue.

def downloadPackage | ( |  | self,
|  |  | http
| ) |  |

    Downloads the package file, synchronously, then
    uncompresses and unpacks it.  Returns true on success, false
    on failure.

    This assumes that self.installPlans has already been filled
    in, which will have been done by self.__readDescFile().

def downloadPackageGenerator | ( |  | self,
|  |  | http
| ) |  |

    A generator function that implements downloadPackage() one
    piece at a time.  It yields one of stepComplete, stepFailed,
    or stepContinue.

def getDownloadEffort | ( |  | self | ) |

    Returns the relative amount of effort it will take to
    download this package.  The units are meaningless, except
    relative to other packges.

def getFormattedName | ( |  | self | ) |

    Returns the name of this package, for output to the user.
    This will be the "public" name of the package, as formatted
    for user consumption; it will include capital letters and
    spaces where appropriate.

def getPackageDir | ( |  | self | ) |

    Returns the directory in which this package is installed.
    This may not be known until the host's contents.xml file has
    been downloaded, which informs us of the host's own install
    directory.

def getPrevDownloadedEffort | ( |  | self | ) |

    Returns a rough estimate of this package's total download
    effort, even if it is already downloaded.

def getUsage | ( |  | self | ) |

    Returns the xusage element that is read from the usage.xml
    file, or None if there is no usage.xml file.

def hasCurrentDescFile | ( |  | self | ) |

    Returns true if a desc file file has been successfully
    read for this package and is still current, false
    otherwise.

def installPackage | ( |  | self,
|  |  | appRunner
| ) |  |

    Mounts the package and sets up system paths so it becomes
    available for use.  Returns true on success, false on failure.

def markUsed | ( |  | self | ) |

    Marks the package as having been used.  This is normally
    called automatically by installPackage().

def setupFilenames | ( |  | self | ) |

    This is called by the HostInfo when the package is read
    from contents.xml, to set up the internal filenames and such
    that rely on some of the information from contents.xml.

## Member Data Documentation

asMirror

compressedArchive

currentStepEffort

descFile

descFileBasename

descFileDirname

diskSpace

displayName

int downloadFactor = 1`[static]`

downloadProgress

extracts

guiApp

hasDescFile

hasPackage

host

http

importDescFile

installed

installPlans

tuple notify = directNotify.newCategory("PackageInfo")`[static]`

packageDir

packageName

packageVersion

float patchFactor = 0.01`[static]`

patchVersion

platform

requires

int restartDownload = 3`[static]`

solo

int stepComplete = 1`[static]`

int stepContinue = 4`[static]`

int stepFailed = 2`[static]`

totalPlanCompleted

totalPlanSize

uncompressedArchive

float uncompressFactor = 0.01`[static]`

float unpackFactor = 0.01`[static]`

updated

string UsageBasename = 'usage.xml'`[static]`

All Classes Namespaces Functions Variables Enumerations Enumerator Properties