Header - Database db5, index. More...
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "db5_types.h"
#include "db5_dat.h"
Go to the source code of this file.
Defines | |
#define | DB5_IDX_CODE_DEV 0x56454440 |
index used for test - ascii - not null terminated | |
#define | DB5_IDX_CODE_FILENAME 0x4d414e46 |
filename index - ascii - not null terminated | |
#define | DB5_IDX_CODE_FILEPATH 0x48545046 |
filepath index - ascii - not null terminated | |
#define | DB5_IDX_CODE_ALBUM 0x424c4154 |
album index - ascii - not null terminated | |
#define | DB5_IDX_CODE_GENRE 0x4e4f4354 |
genre index - ascii - not null terminated | |
#define | DB5_IDX_CODE_TITLE 0x32544954 |
title index - ascii - not null terminated | |
#define | DB5_IDX_CODE_ARTIST 0x31455054 |
artist index - ascii - not null terminated | |
#define | DB5_IDX_CODE_TRACK 0x4b435254 |
track index - ascii - not null terminated | |
#define | DB5_IDX_CODE_SOURCE 0x43525358 |
source index - ascii - not null terminated | |
#define | db5_index_colindex(member, code) db5_index_index_column(offsetof(db5_row,member),membersizeof(db5_row,member),code) |
index a string column (user friendly) | |
Functions | |
bool | db5_index_index_column (const ptrdiff_t reloffset, const size_t size, const uint32_t code) |
index a column (system) |
Header - Database db5, index.
Definition in file db5_index.h.
#define db5_index_colindex | ( | member, | |||
code | ) | db5_index_index_column(offsetof(db5_row,member),membersizeof(db5_row,member),code) |
index a string column (user friendly)
member | element in structure line | |
code | index code to generate |
Definition at line 54 of file db5_index.h.
bool db5_index_index_column | ( | const ptrdiff_t | reloffset, | |
const size_t | size, | |||
const uint32_t | code | |||
) |
index a column (system)
reloffset | element address in structure line | |
size | size of element | |
code | index code to generate |
Definition at line 84 of file db5_index.c.
References add_log(), ADDLOG_DEBUG, ADDLOG_FAIL, ADDLOG_NOTICE, byteof, check, CONFIG_DB5_DATA_DIR, CONFIG_DB5_IDX_FILE, crc32(), db5_dat_select_row(), db5_hdr_count(), file_fcaseopen(), index_entry::hidden, membersizeof, index_entry::position, and index_entry::uid.