libfossil
fsl_cx_config Struct Reference

A part of the configuration used by fsl_cx_init() and friends. More...

#include "core.h"

Collaboration diagram for fsl_cx_config:

Data Fields

fsl_hashpolicy_e hashPolicy
 Specifies the default hash policy.
fsl_msg_listener listener
 Listener for fsl_msg-type events.
fsl_outputer output
 The output channel for the Fossil instance.
struct { 
   fsl_see_key_f   getSEEKey 
 If this is non NULL, it is called when the library needs to fetch the encryption key to use for a db. More...
   void *   pState 
 Optional state for use as the first argument to getSEEKey. More...
} see
 Config state for use with the SQLite3 Encryption Extension (SEE).
bool sqlPrint
 If true, the fsl_print() SQL function will output its output to the fsl_output()-configured channel, else it is a no-op.
bool traceSql
 If true, all SQL which goes through the fossil engine will be traced to stdout.

Detailed Description

A part of the configuration used by fsl_cx_init() and friends.

Definition at line 817 of file core.h.

Field Documentation

◆ getSEEKey

fsl_see_key_f fsl_cx_config::getSEEKey

If this is non NULL, it is called when the library needs to fetch the encryption key to use for a db.

Its first argument will be the pState member of this struct.

Note that the library does not actually know whether it is built with SEE support or not.

Definition at line 868 of file core.h.

◆ hashPolicy

fsl_hashpolicy_e fsl_cx_config::hashPolicy

Specifies the default hash policy.

Definition at line 835 of file core.h.

◆ listener

fsl_msg_listener fsl_cx_config::listener

Listener for fsl_msg-type events.

This is how the library provides status updates for potentially long-running operations like synchronization.

Definition at line 842 of file core.h.

◆ output

fsl_outputer fsl_cx_config::output

The output channel for the Fossil instance.

Reminder to self: if this is not used at the library level then consider removing it. This addition may have been a piece of unnecessary overengineering. To the best of my recollection, the library internals do not use this, but the fcli API does. If that is indeed the case, we can move it into that API.

Definition at line 853 of file core.h.

◆ pState

void* fsl_cx_config::pState

Optional state for use as the first argument to getSEEKey.

This may be NULL, so long as the getSEEKey argument accepts NULL. Ownership of this pointer is the client's responsibility. It must survive as as long as any fsl_cx which it is assigned to, but the library cannot know when (or whether) to clean it up.

Definition at line 877 of file core.h.

◆ [struct]

struct { ... } fsl_cx_config::see

Config state for use with the SQLite3 Encryption Extension (SEE).

This state is only useful together with encrypted databases.

◆ sqlPrint

bool fsl_cx_config::sqlPrint

If true, the fsl_print() SQL function will output its output to the fsl_output()-configured channel, else it is a no-op.

Definition at line 830 of file core.h.

◆ traceSql

bool fsl_cx_config::traceSql

If true, all SQL which goes through the fossil engine will be traced to stdout.

This is, of course, only intended for use in debugging.

TODO: replace this with a fsl_outputer.

Definition at line 825 of file core.h.


The documentation for this struct was generated from the following file: