HEX
Server: Apache/2
System: Linux ctr1224126.novalocal 4.9.241-37.el7.x86_64 #1 SMP Mon Nov 2 13:55:04 UTC 2020 x86_64
User: gokitchen (1017)
PHP: 8.0.30
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/include/dovecot/sieve/sieve-objects.h
#ifndef SIEVE_OBJECTS_H
#define SIEVE_OBJECTS_H

/*
 * Object definition
 */

struct sieve_object_def {
	const char *identifier;
	const struct sieve_operand_def *operand;
	unsigned int code;
};

#define SIEVE_OBJECT(_identifier, _operand, _code) \
	.obj_def = { \
		.identifier = (_identifier), \
		.operand = (_operand), \
		.code = (_code) \
	}

/*
 * Object instance
 */

struct sieve_object {
	const struct sieve_object_def *def;
	const struct sieve_extension *ext;
};

#define SIEVE_OBJECT_DEFAULT(_obj) \
	{ &((_obj).obj_def), NULL }

#define SIEVE_OBJECT_EXTENSION(_obj) \
	(_obj->object.ext)

#define SIEVE_OBJECT_SET_DEF(_obj, def_value) \
	STMT_START { \
			(_obj)->def = def_value;	\
			(_obj)->object.def = &(_obj)->def->obj_def; \
	} STMT_END


/*
 * Object coding
 */

void sieve_opr_object_emit
	(struct sieve_binary_block *sblock, const struct sieve_extension *ext,
		const struct sieve_object_def *obj_def);

bool sieve_opr_object_read_data
	(struct sieve_binary_block *sblock, const struct sieve_operand *operand,
		const struct sieve_operand_class *opclass, sieve_size_t *address,
		struct sieve_object *obj);

bool sieve_opr_object_read
	(const struct sieve_runtime_env *renv,
		const struct sieve_operand_class *opclass, sieve_size_t *address,
		struct sieve_object *obj);

bool sieve_opr_object_dump
	(const struct sieve_dumptime_env *denv,
		const struct sieve_operand_class *opclass, sieve_size_t *address,
		struct sieve_object *obj);


#endif