/* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "fs-api.h"
#include "istream.h"
#include "str.h"
#include "dict-transaction-memory.h"
#include "dict-private.h"
struct fs_dict {
char *username;
};
struct fs_dict_iterate_context {
const char **paths;
unsigned int path_idx;
char *error;
};
static int
const struct dict_settings *set,
{
if (p == NULL) {
fs_args = "";
} else {
fs_args = p+1;
}
return -1;
return 0;
}
{
}
{
} else {
i_unreached();
}
}
{
const unsigned char *data;
const char *path;
int ret;
(void)i_stream_read(input);
}
if (input->stream_errno == 0) {
ret = 1;
} else {
ret = 0;
else {
}
}
return ret;
}
static struct dict_iterate_context *
enum dict_iterate_flags flags)
{
/* these flags are not supported for now */
DICT_ITERATE_FLAG_SORT_BY_VALUE)) == 0);
}
{
(struct fs_dict_iterate_context *)ctx;
int ret;
return FALSE;
return FALSE;
}
return FALSE;
}
return TRUE;
}
/* I/O error */
return FALSE;
} else if (ret == 0) {
/* file was just deleted, just skip to next one */
}
return TRUE;
}
const char **error_r)
{
(struct fs_dict_iterate_context *)ctx;
int ret;
}
return ret;
}
static struct dict_transaction_context *
{
}
const char **error_r)
{
const char *key;
int ret = 0;
case DICT_CHANGE_TYPE_SET:
"fs_write(%s) failed: %s", key,
ret = -1;
}
break;
case DICT_CHANGE_TYPE_UNSET:
"fs_delete(%s) failed: %s", key,
ret = -1;
}
break;
case DICT_CHANGE_TYPE_INC:
i_unreached();
}
if (ret < 0)
return -1;
}
return 0;
}
static void
bool async ATTR_UNUSED,
void *context)
{
(struct dict_transaction_memory_context *)_ctx;
}
.name = "fs",
{
.init = fs_dict_init,
.deinit = fs_dict_deinit,
.lookup = fs_dict_lookup,
}
};