Skip to content

Instantly share code, notes, and snippets.

@kepstin
Created October 16, 2011 17:37
Show Gist options
  • Save kepstin/1291175 to your computer and use it in GitHub Desktop.
Save kepstin/1291175 to your computer and use it in GitHub Desktop.
ExtAttributes/ExtElements API for Mb4Entity
typedef struct Mb4Entity Mb4Entity;
typedef struct Mb4ExtIterator Mb4ExtIterator;
typedef struct Mb4ExtEntry Mb4ExtEntry;
// Accessors for the Entity's ExtAttributes and ExtElements fields
const char *mb4_entity_ext_attributes_get(Mb4Entity *Entity, const char *Key);
Mb4ExtIterator *mb4_entity_ext_attributes_iterator(Mb4Entity *Entity);
const char *mb4_entity_ext_elements_get(Mb4Entity *Entity, const char *Key);
Mb4ExtIterator *mb4_entity_ext_elements_iterator(Mb4Entity *Entity);
// Iterator methods
void mb_ext_iterator_delete(Mb4ExtIterator *Iterator);
bool mb4_ext_iterator_next(Mb4ExtIterator *Iterator);
Mb4ExtEntry *mb4_ext_iterator_get(Mb4ExtIterator *Iterator);
const char *mb4_ext_iterator_get_key(Mb4ExtIterator *Iterator);
const char *mb4_ext_iterator_get_value(Mb4ExtIterator *Iterator);
// Map entry accessor methods (unlikely to be used from C, but useful in other bindings.)
const char *mb4_ext_pair_get_key(Mb4ExtEntry *Entry);
const char *mb4_ext_pair_get_value(Mb4ExtEntry *Entry);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment