repodata.h File Reference

#include <stdio.h>
#include "pooltypes.h"
#include "pool.h"
#include "dirpool.h"
#include "repopage.h"

Go to the source code of this file.

Classes

struct  _Repokey
struct  _Repodata

Defines

#define SIZEOF_MD5   16
#define SIZEOF_SHA1   20
#define SIZEOF_SHA256   32
#define KEY_STORAGE_DROPPED   0
#define KEY_STORAGE_SOLVABLE   1
#define KEY_STORAGE_INCORE   2
#define KEY_STORAGE_VERTICAL_OFFSET   3
#define REPODATA_AVAILABLE   0
#define REPODATA_STUB   1
#define REPODATA_ERROR   2
#define REPODATA_STORE   3
#define REPODATA_LOADING   4
#define SOLVID_META   -1
#define SOLVID_POS   -2
#define SOLVID_SUBSCHEMA   -3

Typedefs

typedef struct _Repokey Repokey
typedef struct _Repodata Repodata

Functions

void repodata_initdata (Repodata *data, struct _Repo *repo, int localpool)
void repodata_freedata (Repodata *data)
Repodatarepodata_create (struct _Repo *repo, int localpool)
void repodata_free (Repodata *data)
Id repodata_key2id (Repodata *data, Repokey *key, int create)
static Repokeyrepodata_id2key (Repodata *data, Id keyid)
Id repodata_schema2id (Repodata *data, Id *schema, int create)
static Idrepodata_id2schema (Repodata *data, Id schemaid)
static int repodata_precheck_keyname (Repodata *data, Id keyname)
static int repodata_has_keyname (Repodata *data, Id keyname)
void repodata_search (Repodata *data, Id solvid, Id keyname, int flags, int(*callback)(void *cbdata, Solvable *s, Repodata *data, Repokey *key, struct _KeyValue *kv), void *cbdata)
int repodata_stringify (Pool *pool, Repodata *data, Repokey *key, struct _KeyValue *kv, int flags)
int repodata_filelistfilter_matches (Repodata *data, const char *str)
Id repodata_lookup_id (Repodata *data, Id solvid, Id keyname)
const char * repodata_lookup_str (Repodata *data, Id solvid, Id keyname)
int repodata_lookup_num (Repodata *data, Id solvid, Id keyname, unsigned int *value)
int repodata_lookup_void (Repodata *data, Id solvid, Id keyname)
const unsigned char * repodata_lookup_bin_checksum (Repodata *data, Id solvid, Id keyname, Id *typep)
int repodata_lookup_idarray (Repodata *data, Id solvid, Id keyname, Queue *q)
void repodata_extend (Repodata *data, Id p)
void repodata_extend_block (Repodata *data, Id p, int num)
void repodata_shrink (Repodata *data, int end)
void repodata_internalize (Repodata *data)
Id repodata_new_handle (Repodata *data)
void repodata_set_void (Repodata *data, Id solvid, Id keyname)
void repodata_set_num (Repodata *data, Id solvid, Id keyname, unsigned int num)
void repodata_set_id (Repodata *data, Id solvid, Id keyname, Id id)
void repodata_set_str (Repodata *data, Id solvid, Id keyname, const char *str)
void repodata_set_binary (Repodata *data, Id solvid, Id keyname, void *buf, int len)
void repodata_set_poolstr (Repodata *data, Id solvid, Id keyname, const char *str)
void repodata_set_constant (Repodata *data, Id solvid, Id keyname, unsigned int constant)
void repodata_set_constantid (Repodata *data, Id solvid, Id keyname, Id id)
void repodata_set_bin_checksum (Repodata *data, Id solvid, Id keyname, Id type, const unsigned char *buf)
void repodata_set_checksum (Repodata *data, Id solvid, Id keyname, Id type, const char *str)
void repodata_add_dirnumnum (Repodata *data, Id solvid, Id keyname, Id dir, Id num, Id num2)
void repodata_add_dirstr (Repodata *data, Id solvid, Id keyname, Id dir, const char *str)
void repodata_add_idarray (Repodata *data, Id solvid, Id keyname, Id id)
void repodata_add_poolstr_array (Repodata *data, Id solvid, Id keyname, const char *str)
void repodata_add_fixarray (Repodata *data, Id solvid, Id keyname, Id ghandle)
void repodata_add_flexarray (Repodata *data, Id solvid, Id keyname, Id ghandle)
void repodata_delete_uninternalized (Repodata *data, Id solvid, Id keyname)
void repodata_merge_attrs (Repodata *data, Id dest, Id src)
void repodata_merge_some_attrs (Repodata *data, Id dest, Id src, Map *keyidmap, int overwrite)
void repodata_create_stubs (Repodata *data)
void repodata_join (Repodata *data, Id joinkey)
void repodata_disable_paging (Repodata *data)
Id repodata_globalize_id (Repodata *data, Id id, int create)
Id repodata_str2dir (Repodata *data, const char *dir, int create)
const char * repodata_dir2str (Repodata *data, Id did, const char *suf)
const char * repodata_chk2str (Repodata *data, Id type, const unsigned char *buf)
void repodata_set_location (Repodata *data, Id solvid, int medianr, const char *dir, const char *file)


Define Documentation

#define SIZEOF_MD5   16

Definition at line 23 of file repodata.h.

Referenced by data_fetch(), data_skip(), data_skip_verify(), and repodata_serialize_key().

#define SIZEOF_SHA1   20

Definition at line 24 of file repodata.h.

Referenced by data_fetch(), data_skip(), data_skip_verify(), and repodata_serialize_key().

#define SIZEOF_SHA256   32

Definition at line 25 of file repodata.h.

Referenced by data_fetch(), data_skip(), data_skip_verify(), and repodata_serialize_key().

#define KEY_STORAGE_DROPPED   0

Definition at line 37 of file repodata.h.

#define KEY_STORAGE_SOLVABLE   1

Definition at line 38 of file repodata.h.

Referenced by repo_add_solv_flags(), and repodata_stringify().

#define KEY_STORAGE_INCORE   2

#define KEY_STORAGE_VERTICAL_OFFSET   3

#define REPODATA_AVAILABLE   0

#define REPODATA_STUB   1

#define REPODATA_ERROR   2

Definition at line 48 of file repodata.h.

Referenced by load_repodata(), maybe_load_repodata(), repo_search_md(), and repodata_load_stub().

#define REPODATA_STORE   3

Definition at line 49 of file repodata.h.

#define REPODATA_LOADING   4

Definition at line 50 of file repodata.h.

Referenced by maybe_load_repodata(), repo_add_repodata(), and repodata_load_stub().

#define SOLVID_META   -1

#define SOLVID_POS   -2

#define SOLVID_SUBSCHEMA   -3

Definition at line 112 of file repodata.h.

Referenced by repodata_search().


Typedef Documentation

typedef struct _Repokey Repokey

typedef struct _Repodata Repodata


Function Documentation

void repodata_initdata ( Repodata data,
struct _Repo repo,
int  localpool 
)

void repodata_freedata ( Repodata data  ) 

Repodata* repodata_create ( struct _Repo repo,
int  localpool 
)

Definition at line 101 of file repodata.c.

References _Repo::nrepodata, _Repo::repodata, repodata_initdata(), and sat_realloc2().

Referenced by repo_add_repodata().

void repodata_free ( Repodata data  ) 

Definition at line 113 of file repodata.c.

References _Repo::nrepodata, _Repodata::repo, _Repo::repodata, and repodata_freedata().

Id repodata_key2id ( Repodata data,
Repokey key,
int  create 
)

static Repokey* repodata_id2key ( Repodata data,
Id  keyid 
) [inline, static]

Definition at line 130 of file repodata.h.

References _Repodata::keys.

Id repodata_schema2id ( Repodata data,
Id schema,
int  create 
)

static Id* repodata_id2schema ( Repodata data,
Id  schemaid 
) [inline, static]

Definition at line 140 of file repodata.h.

References _Repodata::schemadata, and _Repodata::schemata.

static int repodata_precheck_keyname ( Repodata data,
Id  keyname 
) [inline, static]

static int repodata_has_keyname ( Repodata data,
Id  keyname 
) [inline, static]

void repodata_search ( Repodata data,
Id  solvid,
Id  keyname,
int  flags,
int(*)(void *cbdata, Solvable *s, Repodata *data, Repokey *key, struct _KeyValue *kv)  callback,
void *  cbdata 
)

int repodata_stringify ( Pool pool,
Repodata data,
Repokey key,
struct _KeyValue kv,
int  flags 
)

int repodata_filelistfilter_matches ( Repodata data,
const char *  str 
)

Definition at line 1028 of file repodata.c.

Referenced by dataiterator_filelistcheck(), and pool_addfileprovides_search().

Id repodata_lookup_id ( Repodata data,
Id  solvid,
Id  keyname 
)

Definition at line 547 of file repodata.c.

References data_read_id(), find_key_data(), _Repokey::size, and _Repokey::type.

Referenced by pool_lookup_id(), and repo_lookup_id().

const char* repodata_lookup_str ( Repodata data,
Id  solvid,
Id  keyname 
)

int repodata_lookup_num ( Repodata data,
Id  solvid,
Id  keyname,
unsigned int *  value 
)

int repodata_lookup_void ( Repodata data,
Id  solvid,
Id  keyname 
)

const unsigned char* repodata_lookup_bin_checksum ( Repodata data,
Id  solvid,
Id  keyname,
Id typep 
)

int repodata_lookup_idarray ( Repodata data,
Id  solvid,
Id  keyname,
Queue q 
)

Definition at line 650 of file repodata.c.

References data_read_ideof(), find_key_data(), queue_empty(), and queue_push().

Referenced by pool_addfileprovides_search().

void repodata_extend ( Repodata data,
Id  p 
)

void repodata_extend_block ( Repodata data,
Id  p,
int  num 
)

void repodata_shrink ( Repodata data,
int  end 
)

void repodata_internalize ( Repodata data  ) 

Id repodata_new_handle ( Repodata data  ) 

void repodata_set_void ( Repodata data,
Id  solvid,
Id  keyname 
)

void repodata_set_num ( Repodata data,
Id  solvid,
Id  keyname,
unsigned int  num 
)

void repodata_set_id ( Repodata data,
Id  solvid,
Id  keyname,
Id  id 
)

void repodata_set_str ( Repodata data,
Id  solvid,
Id  keyname,
const char *  str 
)

void repodata_set_binary ( Repodata data,
Id  solvid,
Id  keyname,
void *  buf,
int  len 
)

void repodata_set_poolstr ( Repodata data,
Id  solvid,
Id  keyname,
const char *  str 
)

void repodata_set_constant ( Repodata data,
Id  solvid,
Id  keyname,
unsigned int  constant 
)

void repodata_set_constantid ( Repodata data,
Id  solvid,
Id  keyname,
Id  id 
)

void repodata_set_bin_checksum ( Repodata data,
Id  solvid,
Id  keyname,
Id  type,
const unsigned char *  buf 
)

void repodata_set_checksum ( Repodata data,
Id  solvid,
Id  keyname,
Id  type,
const char *  str 
)

Definition at line 2080 of file repodata.c.

References hexstr2bytes(), repodata_set_bin_checksum(), and sat_chksum_len().

void repodata_add_dirnumnum ( Repodata data,
Id  solvid,
Id  keyname,
Id  dir,
Id  num,
Id  num2 
)

void repodata_add_dirstr ( Repodata data,
Id  solvid,
Id  keyname,
Id  dir,
const char *  str 
)

void repodata_add_idarray ( Repodata data,
Id  solvid,
Id  keyname,
Id  id 
)

void repodata_add_poolstr_array ( Repodata data,
Id  solvid,
Id  keyname,
const char *  str 
)

void repodata_add_fixarray ( Repodata data,
Id  solvid,
Id  keyname,
Id  ghandle 
)

void repodata_add_flexarray ( Repodata data,
Id  solvid,
Id  keyname,
Id  ghandle 
)

void repodata_delete_uninternalized ( Repodata data,
Id  solvid,
Id  keyname 
)

Definition at line 2271 of file repodata.c.

References _Repodata::keys, _Repokey::name, and repodata_get_attrp().

void repodata_merge_attrs ( Repodata data,
Id  dest,
Id  src 
)

Definition at line 2297 of file repodata.c.

References _Repodata::attrs, repodata_insert_keyid(), and _Repodata::start.

void repodata_merge_some_attrs ( Repodata data,
Id  dest,
Id  src,
Map keyidmap,
int  overwrite 
)

Definition at line 2307 of file repodata.c.

References _Repodata::attrs, MAPTST, repodata_insert_keyid(), and _Repodata::start.

void repodata_create_stubs ( Repodata data  ) 

void repodata_join ( Repodata data,
Id  joinkey 
)

void repodata_disable_paging ( Repodata data  ) 

Definition at line 2738 of file repodata.c.

References maybe_load_repodata(), repopagestore_disable_paging(), and _Repodata::store.

Referenced by repo_disable_paging().

Id repodata_globalize_id ( Repodata data,
Id  id,
int  create 
)

Id repodata_str2dir ( Repodata data,
const char *  dir,
int  create 
)

const char* repodata_dir2str ( Repodata data,
Id  did,
const char *  suf 
)

const char* repodata_chk2str ( Repodata data,
Id  type,
const unsigned char *  buf 
)

void repodata_set_location ( Repodata data,
Id  solvid,
int  medianr,
const char *  dir,
const char *  file 
)


doxygen