X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fcodec.h;h=d3737400803b700a8dd325cf5283e9adb660422d;hb=271ffa9434c8d9397bb5170cf1ee670c5265ec60;hp=3470ccc68e6c65ad4890f499a54b41c88fa91256;hpb=c88a239ff3b218ad0226e8c53356350ccc1f7014;p=libs%2Fcore.git diff --git a/source/codec.h b/source/codec.h index 3470ccc..d373740 100644 --- a/source/codec.h +++ b/source/codec.h @@ -9,7 +9,7 @@ Distributed under the LGPL #define MSP_STRINGS_CODEC_H_ #include -#include +#include namespace Msp { namespace Codecs { @@ -160,6 +160,11 @@ public: virtual ~Codec() { } + /** + Returns the name of the encoding handled by this codec. + */ + virtual const char *get_name() const =0; + /** Creates an encoder for this codec. */ @@ -231,6 +236,12 @@ deleting the codec when it's no longer needed. */ Codec *create_codec(const std::string &); +/** +Automatically detects the encoding of a string and creates a codec for it. +The codec must be deleted when it's no longer needed. +*/ +Codec *detect_codec(const std::string &); + } // namespace Codecs } // namespace Msp