| 
    Qsmtp
    0.30dev
    
   | 
 
definition of the helper functions around the user configuration More...
Go to the source code of this file.
Data Structures | |
| struct | userconf | 
Enumerations | |
| enum | userconf_flags { userconf_none = 0, userconf_global = 1, userconf_inherit = 2 } | 
Functions | |
| void | userconf_init (struct userconf *ds) | 
| initialize the struct userconf  More... | |
| void | userconf_free (struct userconf *ds) | 
| free all information in a struct userconf  More... | |
| int | userconf_load_configs (struct userconf *ds) | 
| load the filter settings for user and domain  More... | |
| int | userconf_get_buffer (const struct userconf *ds, const char *key, char ***values, checkfunc cf, const unsigned int flags) | 
| get a config buffer for a given user or domain  More... | |
| int | userconf_find_domain (const struct userconf *ds, const char *key, const char *domain, const unsigned int flags) | 
| find a domain in the user configuration key  More... | |
| int | userbackend_init (void) | 
| initialize the backend to query for local users  More... | |
| void | userbackend_free (void) | 
| free the resources needed by the user backend  | |
definition of the helper functions around the user configuration
| enum userconf_flags | 
| int userbackend_init | ( | void | ) | 
initialize the backend to query for local users
| 0 | backend was successfully initialized | 
| >0 | error code | 
| int userconf_find_domain | ( | const struct userconf * | ds, | 
| const char * | key, | ||
| const char * | domain, | ||
| const unsigned int | flags | ||
| ) | 
find a domain in the user configuration key
| ds | the userconf buffer | 
| key | the key name for lookup | 
| domain | the domain name to search for | 
| flags | search flags | 
| CONFIG_NONE | the domain was not found in the configuration | 
| >0 | the domain was found in the configuration | 
| <0 | negative error code | 
| void userconf_free | ( | struct userconf * | ds | ) | 
free all information in a struct userconf
| ds | the struct to clear | 
This will not free the struct itself so it is safe to use a static or stack allocated struct. It will reset all values to a safe value so the struct can be reused.
| int userconf_get_buffer | ( | const struct userconf * | ds, | 
| const char * | key, | ||
| char *** | values, | ||
| checkfunc | cf, | ||
| const unsigned int | flags | ||
| ) | 
get a config buffer for a given user or domain
| ds | the userconf buffer | 
| key | the key name to load the information for | 
| values | the result array | 
| cf | a function to filter the entries (may be NULL) | 
| flags | search flags | 
| <0 | negative error code | 
| void userconf_init | ( | struct userconf * | ds | ) | 
initialize the struct userconf
| ds | the struct to initialize | 
All fields of the struct are reset to a safe invalid value.
| int userconf_load_configs | ( | struct userconf * | ds | ) | 
load the filter settings for user and domain
| ds | the userconf buffer to hold the information | 
| 0 | filters were loaded (or no configuration is present) | 
| >0 | error code | 
 1.8.10