|
|
|
@ -13,30 +13,31 @@ namespace pEp
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template<>
|
|
|
|
|
pEp_identity* identity_list::* const ListWrapper<identity_list*, const char*>::Value = &identity_list::ident;
|
|
|
|
|
::pEp_identity* identity_list::* const ListWrapper<::identity_list*, ::pEp_identity*>::Value
|
|
|
|
|
= &identity_list::ident;
|
|
|
|
|
|
|
|
|
|
template<>
|
|
|
|
|
int identity_list::size() const
|
|
|
|
|
int IdentityList::size() const
|
|
|
|
|
{
|
|
|
|
|
return identity_list_length(value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// faster than .size()==0 because it's not necessary to iterate throgh the whole list
|
|
|
|
|
template<>
|
|
|
|
|
bool identity_list::empty() const
|
|
|
|
|
bool IdentityList::empty() const
|
|
|
|
|
{
|
|
|
|
|
return !(value && value->ident);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template<>
|
|
|
|
|
void identity_list::clear()
|
|
|
|
|
void IdentityList::clear()
|
|
|
|
|
{
|
|
|
|
|
free_identity_list(value);
|
|
|
|
|
value = nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template<>
|
|
|
|
|
void identity_list::push_back(pEp_identity*&& id)
|
|
|
|
|
void IdentityList::push_back(pEp_identity*&& id)
|
|
|
|
|
{
|
|
|
|
|
auto last = identity_list_add(value, id);
|
|
|
|
|
if(value==nullptr)
|
|
|
|
@ -46,7 +47,7 @@ namespace pEp
|
|
|
|
|
|
|
|
|
|
template<>
|
|
|
|
|
ListWrapper<::identity_list*, pEp_identity*>::ListWrapper(const std::initializer_list<Wrapper<pEp_identity*>>& il)
|
|
|
|
|
: identity_list{}
|
|
|
|
|
: Base{}
|
|
|
|
|
{
|
|
|
|
|
::identity_list* last = nullptr;
|
|
|
|
|
for(const Wrapper<pEp_identity*>& id : il)
|
|
|
|
|