delta.h File Reference

#include "alpm.h"

Include dependency graph for delta.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  __pmdelta_t

Defines

#define DLT_FILENAME_LEN   512
#define DLT_VERSION_LEN   64
#define DLT_MD5SUM_LEN   33

Functions

unsigned long _alpm_delta_path_size (alpm_list_t *deltas)
unsigned long _alpm_delta_path_size_uncached (alpm_list_t *deltas)
pmdelta_t_alpm_delta_parse (char *line)
alpm_list_t_alpm_shortest_delta_path (alpm_list_t *deltas, const char *from, const char *to)


Define Documentation

#define DLT_FILENAME_LEN   512

Definition at line 24 of file delta.h.

Referenced by _alpm_delta_parse().

#define DLT_MD5SUM_LEN   33

Definition at line 26 of file delta.h.

Referenced by _alpm_delta_parse().

#define DLT_VERSION_LEN   64

Definition at line 25 of file delta.h.

Referenced by _alpm_delta_parse().


Function Documentation

pmdelta_t* _alpm_delta_parse ( char *  line  ) 

Parses the string representation of a pmdelta_t object.

This function assumes that the string is in the correct format.

Parameters:
line the string to parse
Returns:
A pointer to the new pmdelta_t object

Definition at line 234 of file delta.c.

References CALLOC, DLT_FILENAME_LEN, DLT_MD5SUM_LEN, DLT_VERSION_LEN, __pmdelta_t::filename, __pmdelta_t::from, __pmdelta_t::md5sum, PM_ERR_MEMORY, RET_ERR, __pmdelta_t::size, and __pmdelta_t::to.

Referenced by _alpm_db_read().

Here is the caller graph for this function:

unsigned long _alpm_delta_path_size ( alpm_list_t deltas  ) 

Calculates the combined size of a list of delta files.

Parameters:
deltas the list of pmdelta_t * objects
Returns:
the combined size

Definition at line 96 of file delta.c.

References alpm_list_getdata(), alpm_list_next(), and __pmdelta_t::size.

Here is the call graph for this function:

unsigned long _alpm_delta_path_size_uncached ( alpm_list_t deltas  ) 

Calculates the combined size of a list of delta files that are not in the cache.

Parameters:
deltas the list of pmdelta_t * objects
Returns:
the combined size

Definition at line 118 of file delta.c.

References _alpm_filecache_find(), alpm_list_getdata(), alpm_list_next(), __pmdelta_t::filename, FREE, and __pmdelta_t::size.

Referenced by alpm_pkg_download_size().

Here is the call graph for this function:

Here is the caller graph for this function:

alpm_list_t* _alpm_shortest_delta_path ( alpm_list_t deltas,
const char *  from,
const char *  to 
)

Calculates the shortest path from one version to another.

The shortest path is defined as the path with the smallest combined size, not the length of the path.

Parameters:
deltas the list of pmdelta_t * objects that a package has
from the version to start from
to the version to end at
Returns:
the list of pmdelta_t * objects that has the smallest size. NULL (the empty list) is returned if there is no path between the versions.

Definition at line 216 of file delta.c.


Generated on Mon Jan 14 23:56:32 2008 for libalpm by  doxygen 1.5.4