diff options
Diffstat (limited to 'include/serd')
-rw-r--r-- | include/serd/serd.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h index e2e610db..e13fc2db 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -349,17 +349,20 @@ serd_byte_sink_free(SerdByteSink* SERD_NULLABLE sink); /// Syntax supported by serd typedef enum { - SERD_TURTLE = 1, ///< Terse triples http://www.w3.org/TR/turtle - SERD_NTRIPLES = 2, ///< Line-based triples http://www.w3.org/TR/n-triples/ - SERD_NQUADS = 3, ///< Line-based quads http://www.w3.org/TR/n-quads/ - SERD_TRIG = 4 ///< Terse quads http://www.w3.org/TR/trig/ + SERD_SYNTAX_EMPTY = 0, ///< Empty syntax + SERD_TURTLE = 1, ///< Terse triples http://www.w3.org/TR/turtle + SERD_NTRIPLES = 2, ///< Flat triples http://www.w3.org/TR/n-triples/ + SERD_NQUADS = 3, ///< Flat quads http://www.w3.org/TR/n-quads/ + SERD_TRIG = 4 ///< Terse quads http://www.w3.org/TR/trig/ } SerdSyntax; /** Get a syntax by name. - Case-insensitive, supports "Turtle", "NTriples", "NQuads", and "TriG". Zero - is returned if the name is not recognized. + Case-insensitive, supports "Turtle", "NTriples", "NQuads", and "TriG". + + @return The syntax with the given name, or the empty syntax if the name is + not recognised. */ SERD_PURE_API SerdSyntax @@ -368,8 +371,11 @@ serd_syntax_by_name(const char* SERD_NONNULL 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. + This uses the file extension to guess the syntax of a file, for example + recognising ".ttl" as the extension of a Turtle file. + + @return The likely syntax of the given file, or the empty syntax if the + extension is not recognised. */ SERD_PURE_API SerdSyntax |