Esempio n. 1
0
ndn_Error
ndn_Exclude_appendAny(struct ndn_Exclude *self)
{
  if (self->nEntries >= self->maxEntries)
    return NDN_ERROR_cannot_add_an_entry_past_the_maximum_number_of_entries_allowed_in_the_exclude;
  ndn_ExcludeEntry_initialize
    (self->entries + self->nEntries, ndn_Exclude_ANY, 0, 0);
  ++self->nEntries;

  return NDN_ERROR_success;
}
Esempio n. 2
0
ndn_Error
ndn_Exclude_appendComponent
  (struct ndn_Exclude *self, const uint8_t* component, size_t componentLength)
{
  if (self->nEntries >= self->maxEntries)
    return NDN_ERROR_cannot_add_an_entry_past_the_maximum_number_of_entries_allowed_in_the_exclude;
  ndn_ExcludeEntry_initialize
    (self->entries + self->nEntries, ndn_Exclude_COMPONENT, component,
     componentLength);
  ++self->nEntries;

  return NDN_ERROR_success;
}
Esempio n. 3
0
ExcludeLite::Entry::Entry(const uint8_t *component, size_t componentLength)
{
  ndn_ExcludeEntry_initialize
    (this, ndn_Exclude_COMPONENT, component, componentLength);
}
Esempio n. 4
0
ExcludeLite::Entry::Entry(const BlobLite& component)
{
  ndn_ExcludeEntry_initialize
    (this, ndn_Exclude_COMPONENT, component.buf(), component.size());
}
Esempio n. 5
0
ExcludeLite::Entry::Entry()
{
  ndn_ExcludeEntry_initialize(this, ndn_Exclude_ANY, 0, 0);
}