diff options
author | David Robillard <d@drobilla.net> | 2018-05-27 15:32:12 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-05-27 21:10:21 +0200 |
commit | 7a4582a570657cee6e62842a98a0c7be3da7cb03 (patch) | |
tree | 23dbc4451c0764caf387675495f6ea67438b95f4 /serd/serd.h | |
parent | c03c2f77ac51ac12b46408aa6a63a06dc7eefdb8 (diff) | |
download | serd-7a4582a570657cee6e62842a98a0c7be3da7cb03.tar.gz serd-7a4582a570657cee6e62842a98a0c7be3da7cb03.tar.bz2 serd-7a4582a570657cee6e62842a98a0c7be3da7cb03.zip |
Move syntax from string/filename utilities to public API
Diffstat (limited to 'serd/serd.h')
-rw-r--r-- | serd/serd.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/serd/serd.h b/serd/serd.h index 32dfa128..32b53b8b 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -399,6 +399,32 @@ serd_base64_decode(const char* str, size_t len, size_t* size); /** @} + @name Syntax Utilities + @{ +*/ + +/** + Get a syntax by name. + + Case-insensitive, supports "Turtle", "NTriples", "NQuads", and "TriG". Zero + is returned if the name is not recognized. +*/ +SERD_API +SerdSyntax +serd_syntax_by_name(const char* name); + +/** + Guess a syntax from a filename. + + This uses the file extension to guess the syntax of a file. Zero is + returned if the extension is not recognized. +*/ +SERD_API +SerdSyntax +serd_guess_syntax(const char* filename); + +/** + @} @name URI @{ */ |