summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-07-13 19:20:37 +0200
committerDavid Tardon <dtardon@redhat.com>2014-07-13 19:20:59 +0200
commitf5ad1320e3b55936947fc1cbac0892dcf0467021 (patch)
treec006a58de720a86b6d026ac29b0a5bfd51475605 /inc
parent5b880a63d15fb895c1a302d7a41e91945390ce90 (diff)
bool as result is enough
Diffstat (limited to 'inc')
-rw-r--r--inc/libsdf/SDFDocument.h48
1 files changed, 2 insertions, 46 deletions
diff --git a/inc/libsdf/SDFDocument.h b/inc/libsdf/SDFDocument.h
index c85664c..491d1f5 100644
--- a/inc/libsdf/SDFDocument.h
+++ b/inc/libsdf/SDFDocument.h
@@ -29,52 +29,8 @@ namespace libsdf
class SDFDocument
{
public:
- /** Likelihood that the file format is supported.
- */
- enum Confidence
- {
- CONFIDENCE_NONE, //< not supported
- CONFIDENCE_WEAK, //< maybe supported
- CONFIDENCE_UNSUPPORTED_ENCRYPTION, //< the format is supported, but the used encryption method is not
- CONFIDENCE_SUPPORTED_ENCRYPTION, //< the format is supported, but encrypted
- CONFIDENCE_SUPPORTED_PART, //< the file is only a part of a supported structured format
- CONFIDENCE_EXCELLENT //< supported
- };
-
- /** Result of parsing the file.
- */
- enum Result
- {
- RESULT_OK, //< parsed without any problem
- RESULT_FILE_ACCESS_ERROR, //< problem when accessing the file
- RESULT_PACKAGE_ERROR, //< problem with parsing structured file's content
- RESULT_PARSE_ERROR, //< problem when parsing the file
- RESULT_PASSWORD_MISMATCH, //< problem with given password
- RESULT_UNSUPPORTED_ENCRYPTION, //< unsupported encryption
- RESULT_UNSUPPORTED_FORMAT, //< unsupported file format
- RESULT_UNKNOWN_ERROR //< an unspecified error
- };
-
- /** Type of document.
- */
- enum Type
- {
- TYPE_UNKNOWN, //< unrecognized file
-
- TYPE_RESERVED1, //< reserved for future use
- TYPE_RESERVED2, //< reserved for future use
- TYPE_RESERVED3, //< reserved for future use
- TYPE_RESERVED4, //< reserved for future use
- TYPE_RESERVED5, //< reserved for future use
- TYPE_RESERVED6, //< reserved for future use
- TYPE_RESERVED7, //< reserved for future use
- TYPE_RESERVED8, //< reserved for future use
- TYPE_RESERVED9 //< reserved for future use
- };
-
- static SDFAPI Confidence isSupported(librevenge::RVNGInputStream *input, Type *type = 0);
- static SDFAPI Result parse(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *document, const char *password = 0);
- static SDFAPI Result parse(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *document, Type type, const char *password = 0);
+ static SDFAPI bool isSupported(librevenge::RVNGInputStream *input);
+ static SDFAPI bool parse(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *document);
};
} // namespace libsdf