inc/db5_index.h File Reference

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)

Detailed Description

Header - Database db5, index.

Author:
Julien Blitte
Version:
0.1

Definition in file db5_index.h.


Define Documentation

#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)

Parameters:
member element in structure line
code index code to generate
Returns:
true if successfull

Definition at line 54 of file db5_index.h.


Function Documentation

bool db5_index_index_column ( const ptrdiff_t  reloffset,
const size_t  size,
const uint32_t  code 
)

index a column (system)

Parameters:
reloffset element address in structure line
size size of element
code index code to generate
Returns:
true if successfull

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.

 All Classes Files Functions Variables Typedefs Defines

Generated on Mon Jan 11 00:15:07 2010 for db5fuse by  doxygen 1.6.1