pam_pkcs11 0.6.12
scconf.h File Reference

Go to the source code of this file.

Data Structures

struct  _scconf_entry
 
struct  _scconf_list
 
struct  _scconf_item
 
struct  _scconf_block
 
struct  scconf_context
 

Macros

#define SCCONF_PRESENT   0x00000001
 
#define SCCONF_MANDATORY   0x00000002
 
#define SCCONF_ALLOC   0x00000004
 
#define SCCONF_ALL_BLOCKS   0x00000008
 
#define SCCONF_VERBOSE   0x00000010 /* For debugging purposes only */
 
#define SCCONF_CALLBACK   1
 
#define SCCONF_BLOCK   2
 
#define SCCONF_LIST   3
 
#define SCCONF_BOOLEAN   11
 
#define SCCONF_INTEGER   12
 
#define SCCONF_STRING   13
 
#define SCCONF_ITEM_TYPE_COMMENT   0 /* key = NULL, comment */
 
#define SCCONF_ITEM_TYPE_BLOCK   1 /* key = key, block */
 
#define SCCONF_ITEM_TYPE_VALUE   2 /* key = key, list */
 

Typedefs

typedef struct _scconf_entry scconf_entry
 
typedef struct _scconf_block scconf_block
 
typedef struct _scconf_list scconf_list
 
typedef struct _scconf_item scconf_item
 

Functions

scconf_contextscconf_new (const char *filename)
 
void scconf_free (scconf_context *config)
 
int scconf_parse (scconf_context *config)
 
int scconf_parse_string (scconf_context *config, const char *string)
 
int scconf_parse_entries (const scconf_context *config, const scconf_block *block, scconf_entry *entry)
 
int scconf_write (scconf_context *config, const char *filename)
 
int scconf_write_entries (scconf_context *config, scconf_block *block, scconf_entry *entry)
 
const scconf_blockscconf_find_block (const scconf_context *config, const scconf_block *block, const char *item_name)
 
scconf_block ** scconf_find_blocks (const scconf_context *config, const scconf_block *block, const char *item_name, const char *key)
 
const scconf_listscconf_find_list (const scconf_block *block, const char *option)
 
const char * scconf_get_str (const scconf_block *block, const char *option, const char *def)
 
int scconf_get_int (const scconf_block *block, const char *option, int def)
 
int scconf_get_bool (const scconf_block *block, const char *option, int def)
 
const char * scconf_put_str (scconf_block *block, const char *option, const char *value)
 
int scconf_put_int (scconf_block *block, const char *option, int value)
 
int scconf_put_bool (scconf_block *block, const char *option, int value)
 
scconf_blockscconf_block_add (scconf_context *config, scconf_block *block, const char *key, const scconf_list *name)
 
scconf_blockscconf_block_copy (const scconf_block *src, scconf_block **dst)
 
void scconf_block_destroy (scconf_block *block)
 
scconf_itemscconf_item_add (scconf_context *config, scconf_block *block, scconf_item *item, int type, const char *key, const void *data)
 
scconf_itemscconf_item_copy (const scconf_item *src, scconf_item **dst)
 
void scconf_item_destroy (scconf_item *item)
 
scconf_listscconf_list_add (scconf_list **list, const char *value)
 
scconf_listscconf_list_copy (const scconf_list *src, scconf_list **dst)
 
void scconf_list_destroy (scconf_list *list)
 
int scconf_list_array_length (const scconf_list *list)
 
int scconf_list_strings_length (const scconf_list *list)
 
char * scconf_list_strdup (const scconf_list *list, const char *filler)
 
const char ** scconf_list_toarray (const scconf_list *list)
 

Macro Definition Documentation

◆ SCCONF_ALL_BLOCKS

#define SCCONF_ALL_BLOCKS   0x00000008

Definition at line 43 of file scconf.h.

◆ SCCONF_ALLOC

#define SCCONF_ALLOC   0x00000004

Definition at line 42 of file scconf.h.

◆ SCCONF_BLOCK

#define SCCONF_BLOCK   2

Definition at line 48 of file scconf.h.

◆ SCCONF_BOOLEAN

#define SCCONF_BOOLEAN   11

Definition at line 51 of file scconf.h.

◆ SCCONF_CALLBACK

#define SCCONF_CALLBACK   1

Definition at line 47 of file scconf.h.

◆ SCCONF_INTEGER

#define SCCONF_INTEGER   12

Definition at line 52 of file scconf.h.

◆ SCCONF_ITEM_TYPE_BLOCK

#define SCCONF_ITEM_TYPE_BLOCK   1 /* key = key, block */

Definition at line 63 of file scconf.h.

◆ SCCONF_ITEM_TYPE_COMMENT

#define SCCONF_ITEM_TYPE_COMMENT   0 /* key = NULL, comment */

Definition at line 62 of file scconf.h.

◆ SCCONF_ITEM_TYPE_VALUE

#define SCCONF_ITEM_TYPE_VALUE   2 /* key = key, list */

Definition at line 64 of file scconf.h.

◆ SCCONF_LIST

#define SCCONF_LIST   3

Definition at line 49 of file scconf.h.

◆ SCCONF_MANDATORY

#define SCCONF_MANDATORY   0x00000002

Definition at line 41 of file scconf.h.

◆ SCCONF_PRESENT

#define SCCONF_PRESENT   0x00000001

Definition at line 40 of file scconf.h.

◆ SCCONF_STRING

#define SCCONF_STRING   13

Definition at line 53 of file scconf.h.

◆ SCCONF_VERBOSE

#define SCCONF_VERBOSE   0x00000010 /* For debugging purposes only */

Definition at line 44 of file scconf.h.

Typedef Documentation

◆ scconf_block

typedef struct _scconf_block scconf_block

Definition at line 55 of file scconf.h.

◆ scconf_entry

typedef struct _scconf_entry scconf_entry

◆ scconf_item

typedef struct _scconf_item scconf_item

◆ scconf_list

typedef struct _scconf_list scconf_list

Function Documentation

◆ scconf_block_add()

scconf_block * scconf_block_add ( scconf_context * config,
scconf_block * block,
const char * key,
const scconf_list * name )
extern

◆ scconf_block_copy()

scconf_block * scconf_block_copy ( const scconf_block * src,
scconf_block ** dst )
extern

◆ scconf_block_destroy()

void scconf_block_destroy ( scconf_block * block)
extern

◆ scconf_find_block()

const scconf_block * scconf_find_block ( const scconf_context * config,
const scconf_block * block,
const char * item_name )
extern

◆ scconf_find_blocks()

scconf_block ** scconf_find_blocks ( const scconf_context * config,
const scconf_block * block,
const char * item_name,
const char * key )
extern

◆ scconf_find_list()

const scconf_list * scconf_find_list ( const scconf_block * block,
const char * option )
extern

◆ scconf_free()

void scconf_free ( scconf_context * config)
extern

◆ scconf_get_bool()

int scconf_get_bool ( const scconf_block * block,
const char * option,
int def )
extern

◆ scconf_get_int()

int scconf_get_int ( const scconf_block * block,
const char * option,
int def )
extern

◆ scconf_get_str()

const char * scconf_get_str ( const scconf_block * block,
const char * option,
const char * def )
extern

◆ scconf_item_add()

scconf_item * scconf_item_add ( scconf_context * config,
scconf_block * block,
scconf_item * item,
int type,
const char * key,
const void * data )
extern

◆ scconf_item_copy()

scconf_item * scconf_item_copy ( const scconf_item * src,
scconf_item ** dst )
extern

◆ scconf_item_destroy()

void scconf_item_destroy ( scconf_item * item)
extern

◆ scconf_list_add()

scconf_list * scconf_list_add ( scconf_list ** list,
const char * value )
extern

◆ scconf_list_array_length()

int scconf_list_array_length ( const scconf_list * list)
extern

◆ scconf_list_copy()

scconf_list * scconf_list_copy ( const scconf_list * src,
scconf_list ** dst )
extern

◆ scconf_list_destroy()

void scconf_list_destroy ( scconf_list * list)
extern

◆ scconf_list_strdup()

char * scconf_list_strdup ( const scconf_list * list,
const char * filler )
extern

◆ scconf_list_strings_length()

int scconf_list_strings_length ( const scconf_list * list)
extern

◆ scconf_list_toarray()

const char ** scconf_list_toarray ( const scconf_list * list)
extern

◆ scconf_new()

scconf_context * scconf_new ( const char * filename)
extern

◆ scconf_parse()

int scconf_parse ( scconf_context * config)
extern

◆ scconf_parse_entries()

int scconf_parse_entries ( const scconf_context * config,
const scconf_block * block,
scconf_entry * entry )
extern

◆ scconf_parse_string()

int scconf_parse_string ( scconf_context * config,
const char * string )
extern

◆ scconf_put_bool()

int scconf_put_bool ( scconf_block * block,
const char * option,
int value )
extern

◆ scconf_put_int()

int scconf_put_int ( scconf_block * block,
const char * option,
int value )
extern

◆ scconf_put_str()

const char * scconf_put_str ( scconf_block * block,
const char * option,
const char * value )
extern

◆ scconf_write()

int scconf_write ( scconf_context * config,
const char * filename )
extern

◆ scconf_write_entries()

int scconf_write_entries ( scconf_context * config,
scconf_block * block,
scconf_entry * entry )
extern