cpp: Add support for URL Data encodings
* lang/cpp/src/data.h (Data::Encoding): Extend enum. * lang/cpp/src/data.cpp (Data::encoding), Data::setEncoding): Support new values.
This commit is contained in:
parent
39dd7585f5
commit
370ee1aa80
@ -161,6 +161,9 @@ GpgME::Data::Encoding GpgME::Data::encoding() const
|
||||
case GPGME_DATA_ENCODING_BASE64: return Base64Encoding;
|
||||
case GPGME_DATA_ENCODING_ARMOR: return ArmorEncoding;
|
||||
case GPGME_DATA_ENCODING_MIME: return MimeEncoding;
|
||||
case GPGME_DATA_ENCODING_URL: return UrlEncoding;
|
||||
case GPGME_DATA_ENCODING_URLESC: return UrlEscEncoding;
|
||||
case GPGME_DATA_ENCODING_URL0: return Url0Encoding;
|
||||
}
|
||||
return AutoEncoding;
|
||||
}
|
||||
@ -174,6 +177,9 @@ GpgME::Error GpgME::Data::setEncoding(Encoding enc)
|
||||
case Base64Encoding: ge = GPGME_DATA_ENCODING_BASE64; break;
|
||||
case ArmorEncoding: ge = GPGME_DATA_ENCODING_ARMOR; break;
|
||||
case MimeEncoding: ge = GPGME_DATA_ENCODING_MIME; break;
|
||||
case UrlEncoding: ge = GPGME_DATA_ENCODING_URL; break;
|
||||
case UrlEscEncoding: ge = GPGME_DATA_ENCODING_URLESC; break;
|
||||
case Url0Encoding: ge = GPGME_DATA_ENCODING_URL0; break;
|
||||
}
|
||||
return Error(gpgme_data_set_encoding(d->data, ge));
|
||||
}
|
||||
|
@ -78,7 +78,10 @@ public:
|
||||
BinaryEncoding,
|
||||
Base64Encoding,
|
||||
ArmorEncoding,
|
||||
MimeEncoding
|
||||
MimeEncoding,
|
||||
UrlEncoding,
|
||||
UrlEscEncoding,
|
||||
Url0Encoding,
|
||||
};
|
||||
Encoding encoding() const;
|
||||
Error setEncoding(Encoding encoding);
|
||||
|
Loading…
Reference in New Issue
Block a user