Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

package.h File Reference

Package structure and support API. More...

#include <time.h>
#include <libpackman/types.h>
#include <libpackman/file.h>
#include <libpackman/downloadurl.h>
#include <libpackman/dependency.h>
#include <libpackman/module.h>
#include <libpackman/db.h>

Go to the source code of this file.

Data Structures

struct  _PmPackage
 A representation of a package. More...


PmPackage (De)allocation Functions

PmPackagepmNewPackage (void)
 Creates a new PmPackage structure.

void pmDestroyPackage (PmPackage *package)
 Destroys a PmPackage structure.


Package Modification Functions

void pmPackageAddDownloadUrl (PmPackage *pkg, PmDownloadUrl *downloadUrl)
 Adds a download URL to the package.

void pmPackageAddRequirement (PmPackage *pkg, PmDependency *requirement)
 Adds a required dependency to the package.

void pmPackageAddProvide (PmPackage *pkg, PmDependency *provide)
 Adds a provided dependency to the package.

void pmPackageAddFile (PmPackage *pkg, PmFile *file)
 Adds a file to the package.


Attribute Modification Functions

void pmSetPackageModule (PmPackage *pkg, PmModule *module)
 Sets the package's associated module.

void pmSetPackageAccessMode (PmPackage *pkg, PmAccessMode mode)
 Sets the package's file access mode.

void pmSetPackageFormat (PmPackage *pkg, const char *pkgFormat)
 Sets the package's file format.

void pmSetPackageOsDistrib (PmPackage *pkg, const char *osDistrib)
 Sets the package's supported OS distribution.

void pmSetPackageFilePath (PmPackage *pkg, const char *filePath)
 Sets the package's file path.

void pmSetPackageName (PmPackage *pkg, const char *name)
 Sets the package's name.

void pmSetPackageVersion (PmPackage *pkg, const char *version)
 Sets the package's version.

void pmSetPackageRelease (PmPackage *pkg, const char *release)
 Sets the package's release identifier.

void pmSetPackageUrl (PmPackage *pkg, const char *url)
 Sets the package's website's URL.

void pmSetPackageGroup (PmPackage *pkg, const char *group)
 Sets the package's categorical group.

void pmSetPackageLicense (PmPackage *pkg, const char *license)
 Sets the package's license.

void pmSetPackageSummary (PmPackage *pkg, const char *summary)
 Sets a brief summary of the specified package.

void pmSetPackageDescription (PmPackage *pkg, const char *description)
 Sets a detailed description of the specified package.

void pmSetPackageArch (PmPackage *pkg, const char *arch)
 Sets the supported architecture of the specified package.

void pmSetPackageBranch (PmPackage *pkg, const char *branch)
 Sets the release branch of the specified package.

void pmSetPackageFileSize (PmPackage *pkg, unsigned int fileSize)
 Sets the file size of the package file.

void pmSetPackageInstalledSize (PmPackage *pkg, unsigned int installedSize)
 Sets the total installed size of all files in the package.

void pmSetPreviousPackage (PmPackage *pkg, PmPackage *prev)
 Sets the previous package in the list.

void pmSetNextPackage (PmPackage *pkg, PmPackage *next)
 Sets the next package in the list.


Attribute Retrieval Functions

PmModulepmGetPackageModule (PmPackage *pkg)
 Returns the package's module.

PmAccessMode pmGetPackageAccessMode (PmPackage *pkg)
 Returns the package's file access mode.

const char * pmGetPackageFormat (PmPackage *pkg)
 Returns the package's file format.

const char * pmGetPackageOsDistrib (PmPackage *pkg)
 Returns the package's supported OS distribution.

const char * pmGetPackageFilePath (PmPackage *pkg)
 Returns the package's file path.

const char * pmGetPackageName (PmPackage *pkg)
 Returns the package's name.

const char * pmGetPackageVersion (PmPackage *pkg)
 Returns the package's version.

const char * pmGetPackageRelease (PmPackage *pkg)
 Returns the package's release identifier.

const char * pmGetPackageUrl (PmPackage *pkg)
 Returns the package's website's URL.

const char * pmGetPackageGroup (PmPackage *pkg)
 Returns the package's categorical group.

const char * pmGetPackageLicense (PmPackage *pkg)
 Returns the package's license.

const char * pmGetPackageSummary (PmPackage *pkg)
 Returns a brief summary of the specified package.

const char * pmGetPackageDescription (PmPackage *pkg)
 Returns a detailed description of the specified package.

const char * pmGetPackageArch (PmPackage *pkg)
 Returns the supported architecture of the specified package.

const char * pmGetPackageBranch (PmPackage *pkg)
 Returns the package's release branch.

unsigned int pmGetPackageFileSize (PmPackage *pkg)
 Returns the file size of the specified package.

unsigned int pmGetPackageInstalledSize (PmPackage *pkg)
 Returns the total size of all installed files in the package.

unsigned int pmGetPackageDownloadUrlCount (PmPackage *pkg)
 Returns the number of download URLs in the specified package.

unsigned int pmGetPackageRequirementCount (PmPackage *pkg)
 Returns the number of required dependencies in the specified package.

unsigned int pmGetPackageProvideCount (PmPackage *pkg)
 Returns the number of provided dependencies in the specified package.

unsigned int pmGetPackageFileCount (PmPackage *pkg)
 Returns the number of files in the specified package.

PmPackagepmGetPreviousPackage (PmPackage *pkg)
 Returns the previous package in the list.

PmPackagepmGetNextPackage (PmPackage *pkg)
 Returns the next package in the list.


Typedefs

typedef _PmPackage PmPackage
 PmPackage.


Detailed Description

Package structure and support API.

Id:
package.h,v 1.26 2002/03/06 01:36:08 chipx86 Exp
Copyright:
(C) 1999-2002 The GNUpdate Project.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


Typedef Documentation

typedef struct _PmPackage PmPackage
 

PmPackage.


Function Documentation

void pmDestroyPackage PmPackage   package
 

Destroys a PmPackage structure.

Parameters:
package  The structure to destroy.
See also:
pmNewPackage()

PmPackage* pmGetNextPackage PmPackage   pkg
 

Returns the next package in the list.

Parameters:
pkg  The current package.
Returns:
The next package in the list.
See also:
pmGetPreviousPackage() , pmSetNextPackage() , pmSetPreviousPackage()

PmAccessMode pmGetPackageAccessMode PmPackage   pkg
 

Returns the package's file access mode.

Parameters:
pkg  The package.
Returns:
The file access mode, or PM_MODE_ERROR if pkg is NULL.
See also:
pmSetPackageAccessMode()

const char* pmGetPackageArch PmPackage   pkg
 

Returns the supported architecture of the specified package.

Parameters:
pkg  The package.
Returns:
The supported architecture.
See also:
pmSetPackageArch()

const char* pmGetPackageBranch PmPackage   pkg
 

Returns the package's release branch.

Parameters:
pkg  The package.
Returns:
The package's release branch.
See also:
pmSetPackageBranch()

const char* pmGetPackageDescription PmPackage   pkg
 

Returns a detailed description of the specified package.

Parameters:
pkg  The package.
Returns:
A detailed description.
See also:
pmSetPackageDescription()

unsigned int pmGetPackageDownloadUrlCount PmPackage   pkg
 

Returns the number of download URLs in the specified package.

Parameters:
pkg  The package.
Returns:
The number of download URLs.
See also:
pmPackageAddDownloadUrl()

unsigned int pmGetPackageFileCount PmPackage   pkg
 

Returns the number of files in the specified package.

Parameters:
pkg  The package.
Returns:
The number of files.
See also:
pmPackageAddFile()

const char* pmGetPackageFilePath PmPackage   pkg
 

Returns the package's file path.

Parameters:
pkg  The package.
Returns:
The physical location of the package.
See also:
pmSetPackageFilePath()

unsigned int pmGetPackageFileSize PmPackage   pkg
 

Returns the file size of the specified package.

Parameters:
pkg  The package.
Returns:
The file size of the package.
See also:
pmSetPackageFileSize()

const char* pmGetPackageFormat PmPackage   pkg
 

Returns the package's file format.

Parameters:
pkg  The package.
Returns:
The package's file format.
See also:
pmSetPackageFormat()

const char* pmGetPackageGroup PmPackage   pkg
 

Returns the package's categorical group.

Parameters:
pkg  The package.
Returns:
The package's group.
See also:
pmSetPackageGroup()

unsigned int pmGetPackageInstalledSize PmPackage   pkg
 

Returns the total size of all installed files in the package.

Parameters:
pkg  The package.
Returns:
The total size of all installed files.
See also:
pmSetPackageInstalledSize()

const char* pmGetPackageLicense PmPackage   pkg
 

Returns the package's license.

Parameters:
pkg  The package.
Returns:
The package's license.
See also:
pmSetPackageLicense()

PmModule* pmGetPackageModule PmPackage   pkg
 

Returns the package's module.

Parameters:
pkg  The package.
Returns:
The package's module.
See also:
pmSetPackageModule()

const char* pmGetPackageName PmPackage   pkg
 

Returns the package's name.

Parameters:
pkg  The package.
Returns:
The package's name.
See also:
pmSetPackageName()

const char* pmGetPackageOsDistrib PmPackage   pkg
 

Returns the package's supported OS distribution.

Parameters:
pkg  The package.
Returns:
The package's supported OS distribution.
See also:
pmSetPackageOsDistrib()

unsigned int pmGetPackageProvideCount PmPackage   pkg
 

Returns the number of provided dependencies in the specified package.

Parameters:
pkg  The package.
Returns:
The number of provided dependencies.
See also:
pmPackageAddProvide()

const char* pmGetPackageRelease PmPackage   pkg
 

Returns the package's release identifier.

Parameters:
pkg  The package.
Returns:
The package's release identifier.
See also:
pmSetPackageRelease()

unsigned int pmGetPackageRequirementCount PmPackage   pkg
 

Returns the number of required dependencies in the specified package.

Parameters:
pkg  The package.
Returns:
The number of required dependencies.
See also:
pmPackageAddRequirement()

const char* pmGetPackageSummary PmPackage   pkg
 

Returns a brief summary of the specified package.

Parameters:
pkg  The package.
Returns:
A brief summary.
See also:
pmSetPackageSummary()

const char* pmGetPackageUrl PmPackage   pkg
 

Returns the package's website's URL.

Parameters:
pkg  The package.
Returns:
The package's website's URL.
See also:
pmSetPackageUrl()

const char* pmGetPackageVersion PmPackage   pkg
 

Returns the package's version.

Parameters:
pkg  The package.
Returns:
The package's version.
See also:
pmSetPackageVersion()

PmPackage* pmGetPreviousPackage PmPackage   pkg
 

Returns the previous package in the list.

Parameters:
pkg  The current package.
Returns:
The previous package in the list.
See also:
pmGetNextPackage() , pmSetNextPackage() , pmSetPreviousPackage()

PmPackage* pmNewPackage void   
 

Creates a new PmPackage structure.

Returns:
A new, empty PmPackage structure.
See also:
pmDestroyPackage()

void pmPackageAddDownloadUrl PmPackage   pkg,
PmDownloadUrl   downloadUrl
 

Adds a download URL to the package.

Parameters:
pkg  The package to add the download URL to.
downloadUrl  The download URL to add.
See also:
PmDownloadUrl , pmFirstDownloadUrl() , pmPreviousDownloadUrl() , pmNextDownloadUrl()

void pmPackageAddFile PmPackage   pkg,
PmFile   file
 

Adds a file to the package.

Parameters:
pkg  The package to add the file to.
file  The file to add.
See also:
PmFile , pmFirstFile() , pmPreviousFile() , pmNextFile()

void pmPackageAddProvide PmPackage   pkg,
PmDependency   provide
 

Adds a provided dependency to the package.

Parameters:
pkg  The package to add the provided dependency to.
provide  The provided dependency to add.
See also:
PmDependency , pmFirstProvide() , pmPreviousProvide() , pmNextProvide()

void pmPackageAddRequirement PmPackage   pkg,
PmDependency   requirement
 

Adds a required dependency to the package.

Parameters:
pkg  The package to add the required dependency to.
requirement  The required dependency to add.
See also:
PmDependency , pmFirstRequirement() , pmPreviousRequirement() , pmNextRequirement()

void pmSetNextPackage PmPackage   pkg,
PmPackage   next
 

Sets the next package in the list.

Parameters:
pkg  The current package.
next  The next package.
See also:
pmGetNextPackage() , pmGetPreviousPackage() , pmSetPreviousPackage()

void pmSetPackageAccessMode PmPackage   pkg,
PmAccessMode    mode
 

Sets the package's file access mode.

Parameters:
pkg  The package.
mode  The access mode.
See also:
pmGetPackageAccessMode()

void pmSetPackageArch PmPackage   pkg,
const char *    arch
 

Sets the supported architecture of the specified package.

Common architectures include (but are not limited to):

  • i386
  • i486
  • i586
  • i686
  • alpha
  • src
  • noarch
Parameters:
pkg  The package.
arch  The supported architecture.
See also:
pmGetPackageArch()

void pmSetPackageBranch PmPackage   pkg,
const char *    branch
 

Sets the release branch of the specified package.

Common branches include (but are not limited to):

  • default
  • stable
  • unstable
  • cvs
Parameters:
pkg  The package.
branch  The release branch of the package.
See also:
pmGetPackageBranch()

void pmSetPackageDescription PmPackage   pkg,
const char *    description
 

Sets a detailed description of the specified package.

Parameters:
pkg  The package.
description  The description of the package.
See also:
pmGetPackageDescription()

void pmSetPackageFilePath PmPackage   pkg,
const char *    filePath
 

Sets the package's file path.

This should really only be used by libpackman.

Parameters:
pkg  The package.
filePath  The physical location of the package.
See also:
pmGetPackageFilePath()

void pmSetPackageFileSize PmPackage   pkg,
unsigned int    fileSize
 

Sets the file size of the package file.

Parameters:
pkg  The package.
fileSize  The file size.
See also:
pmGetPackageFileSize()

void pmSetPackageFormat PmPackage   pkg,
const char *    pkgFormat
 

Sets the package's file format.

This should really only be used by libpackman.

Parameters:
pkg  The package.
pkgFormat  The file format of the package.
See also:
pmGetPackageFormat()

void pmSetPackageGroup PmPackage   pkg,
const char *    group
 

Sets the package's categorical group.

Parameters:
pkg  The package.
group  The package's group.
See also:
pmGetPackageGroup()

void pmSetPackageInstalledSize PmPackage   pkg,
unsigned int    installedSize
 

Sets the total installed size of all files in the package.

Parameters:
pkg  The package.
installedSize  The total installed size of the package's contents.
See also:
pmGetPackageInstalledSize()

void pmSetPackageLicense PmPackage   pkg,
const char *    license
 

Sets the package's license.

Parameters:
pkg  The package.
license  The license.
See also:
pmGetPackageLicense()

void pmSetPackageModule PmPackage   pkg,
PmModule   module
 

Sets the package's associated module.

This should really only be used by libpackman.

Parameters:
pkg  The package.
module  The associated module.
See also:
pmGetPackageModule()

void pmSetPackageName PmPackage   pkg,
const char *    name
 

Sets the package's name.

Parameters:
pkg  The package.
name  The package's name.
See also:
pmGetPackageName()

void pmSetPackageOsDistrib PmPackage   pkg,
const char *    osDistrib
 

Sets the package's supported OS distribution.

This should really only be used by libpackman.

Parameters:
pkg  The package.
osDistrib  The supported OS distribution.
See also:
pmGetPackageOsDistrib()

void pmSetPackageRelease PmPackage   pkg,
const char *    release
 

Sets the package's release identifier.

Parameters:
pkg  The package.
release  The release identifier.
See also:
pmGetPackageRelease()

void pmSetPackageSummary PmPackage   pkg,
const char *    summary
 

Sets a brief summary of the specified package.

Parameters:
pkg  The package.
summary  The brief summary of the package.
See also:
pmGetPackageSummary()

void pmSetPackageUrl PmPackage   pkg,
const char *    url
 

Sets the package's website's URL.

Parameters:
pkg  The package.
url  The website's URL.
See also:
pmGetPackageUrl()

void pmSetPackageVersion PmPackage   pkg,
const char *    version
 

Sets the package's version.

Parameters:
pkg  The package.
version  The package's version.
See also:
pmGetPackageVersion()

void pmSetPreviousPackage PmPackage   pkg,
PmPackage   prev
 

Sets the previous package in the list.

Parameters:
pkg  The current package.
prev  The previous package.
See also:
pmGetNextPackage() , pmGetPreviousPackage() , pmSetNextPackage()


Generated on Tue Jul 2 03:15:24 2002 for libpackman by doxygen1.2.15-20020430