Buckets:
| /* | |
| * Copyright (c) 2007-2012, Novell Inc. | |
| * | |
| * This program is licensed under the BSD license, read LICENSE.BSD | |
| * for further information | |
| */ | |
| /* | |
| * dataiterator.h | |
| * | |
| */ | |
| extern "C" { | |
| typedef struct s_KeyValue { | |
| Id id; | |
| const char *str; | |
| unsigned int num; | |
| unsigned int num2; | |
| int entry; /* array entry, starts with 0 */ | |
| int eof; /* last entry reached */ | |
| struct s_KeyValue *parent; | |
| } KeyValue; | |
| /* search matcher flags */ | |
| /* iterator control */ | |
| /* stringification flags */ | |
| /* By default we stringify just to the basename of a file because | |
| the construction of the full filename is costly. Specify this | |
| flag if you want to match full filenames */ | |
| /* internal */ | |
| /* obsolete */ | |
| /* | |
| * Datamatcher: match a string against a query | |
| */ | |
| typedef struct s_Datamatcher { | |
| int flags; /* see matcher flags above */ | |
| const char *match; /* the query string */ | |
| void *matchdata; /* e.g. compiled regexp */ | |
| int error; | |
| } Datamatcher; | |
| int datamatcher_init(Datamatcher *ma, const char *match, int flags); | |
| void datamatcher_free(Datamatcher *ma); | |
| int datamatcher_match(Datamatcher *ma, const char *str); | |
| int datamatcher_checkbasename(Datamatcher *ma, const char *str); | |
| /* | |
| * Dataiterator | |
| * | |
| * Iterator like interface to 'search' functionality | |
| * | |
| * Dataiterator is per-pool, additional filters can be applied | |
| * to limit the search domain. See dataiterator_init below. | |
| * | |
| * Use these like: | |
| * Dataiterator di; | |
| * dataiterator_init(&di, repo->pool, repo, 0, 0, "bla", SEARCH_SUBSTRING); | |
| * while (dataiterator_step(&di)) | |
| * dosomething(di.solvid, di.key, di.kv); | |
| * dataiterator_free(&di); | |
| */ | |
| typedef struct s_Dataiterator | |
| { | |
| int state; | |
| int flags; | |
| Pool *pool; | |
| Repo *repo; | |
| Repodata *data; | |
| /* data pointers */ | |
| unsigned char *dp; | |
| unsigned char *ddp; | |
| Id *idp; | |
| Id *keyp; | |
| /* the result */ | |
| struct s_Repokey *key; | |
| KeyValue kv; | |
| /* our matcher */ | |
| Datamatcher matcher; | |
| /* iterators/filters */ | |
| Id keyname; | |
| Id repodataid; | |
| Id solvid; | |
| Id repoid; | |
| Id keynames[3 + 1]; | |
| int nkeynames; | |
| int rootlevel; | |
| /* recursion data */ | |
| struct di_parent { | |
| KeyValue kv; | |
| unsigned char *dp; | |
| Id *keyp; | |
| } parents[3]; | |
| int nparents; | |
| /* vertical data */ | |
| unsigned char *vert_ddp; | |
| Id vert_off; | |
| Id vert_len; | |
| Id vert_storestate; | |
| /* strdup data */ | |
| char *dupstr; | |
| int dupstrn; | |
| Id *keyskip; | |
| Id *oldkeyskip; | |
| } Dataiterator; | |
| /* | |
| * Initialize dataiterator | |
| * | |
| * di: Pointer to Dataiterator to be initialized | |
| * pool: Search domain for the iterator | |
| * repo: if non-null, limit search to this repo | |
| * solvid: if non-null, limit search to this solvable | |
| * keyname: if non-null, limit search to this keyname | |
| * match: if non-null, limit search to this match | |
| */ | |
| int dataiterator_init(Dataiterator *di, Pool *pool, Repo *repo, Id p, Id keyname, const char *match, int flags); | |
| void dataiterator_init_clone(Dataiterator *di, Dataiterator *from); | |
| void dataiterator_set_search(Dataiterator *di, Repo *repo, Id p); | |
| void dataiterator_set_keyname(Dataiterator *di, Id keyname); | |
| int dataiterator_set_match(Dataiterator *di, const char *match, int flags); | |
| void dataiterator_prepend_keyname(Dataiterator *di, Id keyname); | |
| void dataiterator_free(Dataiterator *di); | |
| int dataiterator_step(Dataiterator *di); | |
| void dataiterator_setpos(Dataiterator *di); | |
| void dataiterator_setpos_parent(Dataiterator *di); | |
| int dataiterator_match(Dataiterator *di, Datamatcher *ma); | |
| void dataiterator_skip_attribute(Dataiterator *di); | |
| void dataiterator_skip_repo(Dataiterator *di); | |
| void dataiterator_skip_solvable(Dataiterator *di); | |
| void dataiterator_final_repo(Dataiterator *di); | |
| void dataiterator_final_solvable(Dataiterator *di); | |
| void dataiterator_jump_to_repo(Dataiterator *di, Repo *repo); | |
| void dataiterator_jump_to_solvid(Dataiterator *di, Id solvid); | |
| void dataiterator_entersub(Dataiterator *di); | |
| void dataiterator_clonepos(Dataiterator *di, Dataiterator *from); | |
| void dataiterator_seek(Dataiterator *di, int whence); | |
| void dataiterator_strdup(Dataiterator *di); | |
| } | |
Xet Storage Details
- Size:
- 5.18 kB
- Xet hash:
- 540303ba34c11658772a6010b74ef04bc5820c3cd733aa606044201850dba0ff
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.