damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

meta_verifier.h (1773B)


      1 #ifndef META_VERIFIER_H
      2 #define META_VERIFIER_H
      3 
      4 /* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */
      5 
      6 #ifndef META_READER_H
      7 #include "meta_reader.h"
      8 #endif
      9 #include "flatcc_verifier.h"
     10 #include "flatcc_prologue.h"
     11 
     12 static int NdbEventMeta_verify_table(flatcc_table_verifier_descriptor_t *td);
     13 
     14 static int NdbEventMeta_verify_table(flatcc_table_verifier_descriptor_t *td)
     15 {
     16     int ret;
     17     if ((ret = flatcc_verify_field(td, 0, 4, 4) /* received_at */)) return ret;
     18     if ((ret = flatcc_verify_field(td, 1, 4, 4) /* reactions */)) return ret;
     19     if ((ret = flatcc_verify_field(td, 2, 4, 4) /* quotes */)) return ret;
     20     if ((ret = flatcc_verify_field(td, 3, 4, 4) /* reposts */)) return ret;
     21     if ((ret = flatcc_verify_field(td, 4, 4, 4) /* zaps */)) return ret;
     22     if ((ret = flatcc_verify_field(td, 5, 8, 8) /* zap_total */)) return ret;
     23     return flatcc_verify_ok;
     24 }
     25 
     26 static inline int NdbEventMeta_verify_as_root(const void *buf, size_t bufsiz)
     27 {
     28     return flatcc_verify_table_as_root(buf, bufsiz, NdbEventMeta_identifier, &NdbEventMeta_verify_table);
     29 }
     30 
     31 static inline int NdbEventMeta_verify_as_typed_root(const void *buf, size_t bufsiz)
     32 {
     33     return flatcc_verify_table_as_root(buf, bufsiz, NdbEventMeta_type_identifier, &NdbEventMeta_verify_table);
     34 }
     35 
     36 static inline int NdbEventMeta_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
     37 {
     38     return flatcc_verify_table_as_root(buf, bufsiz, fid, &NdbEventMeta_verify_table);
     39 }
     40 
     41 static inline int NdbEventMeta_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
     42 {
     43     return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &NdbEventMeta_verify_table);
     44 }
     45 
     46 #include "flatcc_epilogue.h"
     47 #endif /* META_VERIFIER_H */