Main Page | Data Structures | File List | Data Fields | Globals

network.c File Reference

#include <unistd.h>
#include <string.h>
#include "libuau.h"
#include "network.h"
#include "ftp.h"
#include "util.h"
#include "error.h"
#include "parseupdates.h"
#include "md5.h"

Go to the source code of this file.

Functions

GPtrArray * luau_net_queryServer (const AProgInfo *info)
 Query a luau server for a list of updates.

gboolean luau_net_downloadUpdate (const AProgInfo *info, const AUpdate *update, APkgType pkgType, const char *downloadTo)
 Download the specified update to downloadTo.


Function Documentation

gboolean luau_net_downloadUpdate const AProgInfo info,
const AUpdate update,
APkgType  pkgType,
const char *  downloadTo
 

Download the specified update to downloadTo.

Download the specified update to downloadTo, or do a temporary location if downloadTo == NULL

Warning:
Even if downloadTo is specified, this function returns a newly allocated string that must be free'd!
  • info describes the program we're downloading updates for.
  • update describes the update we're downloading.
  • pkgType is the package type we want (RPM, .deb, ...)
  • downloadTo is where we'd like to download the file, or NULL if a temporary location is desired.
    Returns:
    whether the download was successful

Definition at line 93 of file network.c.

References ERROR, luau_getPackageURL(), lutil_error_prompt(), lutil_ftp_downloadToFile(), lutil_md5_file(), lutil_streq(), and APackage::md5sum.

Referenced by luau_downloadUpdate().

GPtrArray* luau_net_queryServer const AProgInfo info  ) 
 

Query a luau server for a list of updates.

Downloads the update file from the luau server for the given program and parses it to read in the updates listed. Note that it returns an array of all the updates listed, including ones that have already been installed.

  • info is a struct describing the program updates are wanted for.
    Returns:
    a GPtrArray of updates

Definition at line 48 of file network.c.

References DBUGOUT, ERROR, luau_parseUpdateFileXML(), lutil_ftp_getURL(), lutil_streq(), lutil_uncompress(), and AProgInfo::url.

Referenced by luau_checkForUpdates().


Generated on Mon Apr 12 22:17:11 2004 for luau by doxygen 1.3.2