Migrate all enumerators to venumerate() interface change

This commit is contained in:
Tobias Brunner
2017-05-26 13:56:44 +02:00
parent 16bffa8b55
commit 95a63bf281
68 changed files with 851 additions and 560 deletions
+15 -7
View File
@@ -209,9 +209,12 @@ typedef struct {
} child_cfgs_replace_enumerator_t;
METHOD(enumerator_t, child_cfgs_replace_enumerate, bool,
child_cfgs_replace_enumerator_t *this, child_cfg_t **chd, bool *added)
child_cfgs_replace_enumerator_t *this, va_list args)
{
child_cfg_t *child_cfg;
child_cfg_t *child_cfg, **chd;
bool *added;
VA_ARGS_VGET(args, chd, added);
if (!this->wrapped)
{
@@ -303,8 +306,9 @@ METHOD(peer_cfg_t, replace_child_cfgs, enumerator_t*,
INIT(enumerator,
.public = {
.enumerate = (void*)_child_cfgs_replace_enumerate,
.destroy = (void*)_child_cfgs_replace_enumerator_destroy,
.enumerate = enumerator_enumerate_default,
.venumerate = _child_cfgs_replace_enumerate,
.destroy = _child_cfgs_replace_enumerator_destroy,
},
.removed = removed,
.added = added,
@@ -336,8 +340,11 @@ METHOD(enumerator_t, child_cfg_enumerator_destroy, void,
}
METHOD(enumerator_t, child_cfg_enumerate, bool,
child_cfg_enumerator_t *this, child_cfg_t **chd)
child_cfg_enumerator_t *this, va_list args)
{
child_cfg_t **chd;
VA_ARGS_VGET(args, chd);
return this->wrapped->enumerate(this->wrapped, chd);
}
@@ -348,8 +355,9 @@ METHOD(peer_cfg_t, create_child_cfg_enumerator, enumerator_t*,
INIT(enumerator,
.public = {
.enumerate = (void*)_child_cfg_enumerate,
.destroy = (void*)_child_cfg_enumerator_destroy,
.enumerate = enumerator_enumerate_default,
.venumerate = _child_cfg_enumerate,
.destroy = _child_cfg_enumerator_destroy,
},
.mutex = this->mutex,
.wrapped = this->child_cfgs->create_enumerator(this->child_cfgs),