aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src/context.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* cpp: Wrap create_key and create_subkeyAndre Heinecke2017-12-011-0/+50
| | | | | | | * lang/cpp/src/context.cpp, lang/cpp/src/context.h (Context::startCreateKey) (Context::createKey, Context::createSubkey) (Context::startCreateSubkey): New.
* cpp: Respect decrypt flags in new functionsAndre Heinecke2017-03-241-4/+4
| | | | | | | | | * lang/cpp/src/context.cpp: Respect directly provided flags in the new decrypt functions. -- Overlooked in the initial commit. Also fixed the according unused variable warnings.
* cpp: Use gpgme_op_decrypt_ex and add new flags.Andre Heinecke2017-03-241-9/+37
| | | | | | | | | | | | | | | | * lang/cpp/src/context.cpp: New decrypt and decryptVerify functions that take flags as arguments. Use new variants in old functions. (Context::setDecryptionFlags): New helper. (Context::Private::Private): Initialize new member. * lang/cpp/src/context_p.h (Context::Private::decryptFlags): New. * lang/cpp/src/context.h (Context::DecryptFlags): New enum. (Context::EncryptionFlags): Extend for EncryptWrap. -- The setDecryptionFlags provides a generic way to set decryption flags for the whole context. This allows existing code to just keep using the old functions and modify the decryption behavior in a central place.
* cpp: Add revuid and adduid supportAndre Heinecke2017-01-111-0/+24
| | | | | | | | | | | * lang/cpp/src/context.cpp (Context::revUid, Context::startRevUid), (Context::addUid, Context::startAddUid): New. * lang/cpp/src/context.h: Declare new functions. * lang/cpp/src/key.cpp (Key::UserID::revoke) (Key::addUid): Idomatic helpers. lang/cpp/src/key.h: Declare new functions. * NEWS: Update accordingly.
* cpp: Add get / set Sender APIAndre Heinecke2016-11-141-0/+10
| | | | | * cpp/src/context.cpp, cpp/src/context.h (Context::setSender), (Context::getSender): Add simple wrappers.
* cpp: Fix gcc diagnostic push / popAndre Heinecke2016-10-051-2/+2
| | | | | | | * lang/cpp/src/context.cpp: Fix pragmas. -- This fixes an error with -Werror=unknown-pragmas
* cpp, qt: Include config.hAndre Heinecke2016-09-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lang/cpp/src/callbacks.cpp, lang/cpp/src/configuration.cpp, lang/cpp/src/context.cpp, lang/cpp/src/context_glib.cpp, lang/cpp/src/context_qt.cpp, lang/cpp/src/context_vanilla.cpp, lang/cpp/src/data.cpp, lang/cpp/src/decryptionresult.cpp, lang/cpp/src/defaultassuantransaction.cpp, lang/cpp/src/editinteractor.cpp, lang/cpp/src/encryptionresult.cpp, lang/cpp/src/engineinfo.cpp, lang/cpp/src/eventloopinteractor.cpp, lang/cpp/src/exception.cpp, lang/cpp/src/gpgadduserideditinteractor.cpp, lang/cpp/src/gpgagentgetinfoassuantransaction.cpp, lang/cpp/src/gpgsetexpirytimeeditinteractor.cpp, lang/cpp/src/gpgsetownertrusteditinteractor.cpp, lang/cpp/src/gpgsignkeyeditinteractor.cpp, lang/cpp/src/importresult.cpp, lang/cpp/src/key.cpp, lang/cpp/src/keygenerationresult.cpp, lang/cpp/src/keylistresult.cpp, lang/cpp/src/scdgetinfoassuantransaction.cpp, lang/cpp/src/signingresult.cpp, lang/cpp/src/tofuinfo.cpp, lang/cpp/src/trustitem.cpp, lang/cpp/src/verificationresult.cpp, lang/cpp/src/vfsmountresult.cpp, lang/qt/src/dataprovider.cpp, lang/qt/src/defaultkeygenerationjob.cpp, lang/qt/src/gpgme_backend_debug.cpp, lang/qt/src/job.cpp, lang/qt/src/qgpgmeadduseridjob.cpp, lang/qt/src/qgpgmebackend.cpp, lang/qt/src/qgpgmechangeexpiryjob.cpp, lang/qt/src/qgpgmechangeownertrustjob.cpp, lang/qt/src/qgpgmechangepasswdjob.cpp, lang/qt/src/qgpgmedecryptjob.cpp, lang/qt/src/qgpgmedecryptverifyjob.cpp, lang/qt/src/qgpgmedeletejob.cpp, lang/qt/src/qgpgmedownloadjob.cpp, lang/qt/src/qgpgmeencryptjob.cpp, lang/qt/src/qgpgmeexportjob.cpp, lang/qt/src/qgpgmeimportfromkeyserverjob.cpp, lang/qt/src/qgpgmeimportjob.cpp, lang/qt/src/qgpgmekeyformailboxjob.cpp, lang/qt/src/qgpgmekeygenerationjob.cpp, lang/qt/src/qgpgmekeylistjob.cpp, lang/qt/src/qgpgmelistallkeysjob.cpp, lang/qt/src/qgpgmenewcryptoconfig.cpp, lang/qt/src/qgpgmerefreshkeysjob.cpp, lang/qt/src/qgpgmesecretkeyexportjob.cpp, lang/qt/src/qgpgmesignencryptjob.cpp, lang/qt/src/qgpgmesignjob.cpp, lang/qt/src/qgpgmesignkeyjob.cpp, lang/qt/src/qgpgmetofupolicyjob.cpp, lang/qt/src/qgpgmeverifydetachedjob.cpp, lang/qt/src/qgpgmeverifyopaquejob.cpp, lang/qt/src/qgpgmewkspublishjob.cpp, lang/qt/src/threadedjobmixin.cpp, lang/qt/tests/run-keyformailboxjob.cpp, lang/qt/tests/t-encrypt.cpp, lang/qt/tests/t-keylist.cpp, lang/qt/tests/t-keylocate.cpp, lang/qt/tests/t-ownertrust.cpp, lang/qt/tests/t-support.cpp, lang/qt/tests/t-tofuinfo.cpp, lang/qt/tests/t-wkspublish.cpp: Include config.h -- This fixes problems with mismatching definitions. Most notably _FILE_OFFSET_BITS is now always set correctly.
* cpp: Avoid missing returns in non-void functionsAndreas Stieger2016-09-211-0/+2
| | | | | | | | | | | | | * lang/cpp/src/context.cpp (Context::signaturePolicyURL): return nullptr on default (to_tofu_policy_t): add default case for unknown * lang/cpp/src/key.cpp (Key::primaryFingerprint): return nullptr on default * lang/cpp/src/tofuinfo.cpp (GpgME::TofuInfo::policy): add default case for unknown Signed-off-by: Andreas Stieger <[email protected]> Signed-off-by: Andre Heinecke <[email protected]>
* cpp: Add support for gpgme_op_tofu_policyAndre Heinecke2016-09-161-0/+31
| | | | | * src/context.cpp, src/context.h (setTofuPolicy, setTofuPolicyStart): New.
* cpp: Silence use of deprecated function warning.Werner Koch2016-09-161-0/+9
| | | | | | * lang/cpp/src/context.cpp (GpgME): Use pragma to silence wardning. Signed-off-by: Werner Koch <[email protected]>
* cpp: Add WithTofu Keylist ModeAndre Heinecke2016-08-251-0/+1
| | | | | | * lang/cpp/src/context.cpp: Handle WithTofu. * lang/cpp/src/global.h (KeyListMode): Add WithTofu. * lang/cpp/src/util.h (add_to_gpgme_keylist_mode_t): Handle WithTofu.
* Cpp: Add wrapper for gpgme_get_dirinfoAndre Heinecke2016-08-251-0/+5
| | | | | * lang/cpp/src/context.cpp (dirInfo): New. * lang/cpp/src/global.h (dirInfo): New.
* Cpp: Add support for spawn engineAndre Heinecke2016-08-251-0/+37
| | | | | | | * lang/cpp/src/context.cpp (Context::spawn, Context::spawnAsync): New. * lang/cpp/src/context.h: Add prototypes. (SpawnFlags): New. * lang/cpp/src/global.h (SpawnEngine): Added.
* cpp: Get rid of AssuanResult due to its deprecation.Werner Koch2016-08-241-27/+35
| | | | | | | | | | | | | | * lang/cpp/src/assuanresult.cpp: Remove. * lang/cpp/src/assuanresult.h: Remove. * lang/cpp/src/Makefile.am: Remove these files. * lang/cpp/src/context.cpp: Remove header assuanresult.h (assuanTransact): Change return type to Error. Use gpgme_op_assuan_transact_ext. (startAssuanTransaction): Change return type to Error. (assuanResult): Remove * lang/cpp/src/context.h (assuanResult): Adjust for changes. Signed-off-by: Werner Koch <[email protected]>
* Cpp: Fix some pedantic warningsAndre Heinecke2016-08-171-1/+1
| | | | | | | * lang/cpp/src/context.cpp, lang/cpp/src/context.h (Context::getKeysFromRecipients): Remove ignored / invalid const qualifier. * lang/cpp/src/result.h: Don't shadow error function in ctor.
* Cpp: Handle empty recipients consistentlyAndre Heinecke2016-08-101-38/+33
| | | | | | | | | | | | | | * lang/cpp/src/context.cpp (Context::getKeysFromRecipients): New helper. (Context::encrypt, Context::startEncryption, Context::signAndEncrypt) (Context::startCombinedSigningAndEncryption): Use new helper. * lang/cpp/src/context.h (Context::getKeysFromRecipients): Add as private helper. -- bf776ce was incomplete as the code to handle recpients was duplicated four times. This is now unified and constently uses a nullptr instead of an empty array.
* Cpp: Add support for all EncryptionFlagsAndre Heinecke2016-08-091-0/+17
| | | | | * lang/cpp/src/context.h (EncryptionFlags): Extend. * lang/cpp/src/context.cpp (encryptflags2encryptflags): Ditto.
* Cpp: Fix simple symmetric encryptionAndre Heinecke2016-08-091-1/+2
| | | | | | | | * lang/cpp/src/context.cpp (Context::encrypt): If no recipients are provided encrypt with NULL and not an empty array. -- Sending an empty array leads to an invalid argument error.
* Cpp: Add feature enum for new identifyAndre Heinecke2016-07-131-0/+1
| | | | | | | | | | | * lang/cpp/src/context.cpp (supported_features2): Add BinaryAndFineGrainedIdentify * lang/cpp/src/global.h (Feature2): ditto. -- This is mostly for compatible code with KF5::Gpgmepp where there is no hard requirement against gpgme 1.7. With 1.7 a version check would also suffice.
* Cpp: Add support for pinentry_modeAndre Heinecke2016-07-041-0/+40
| | | | | | * lang/cpp/src/context.cpp (Context::pinentryMode): Return mode. (Context::setPinentryMode): Set mode. * lang/cpp/src/context.h (PinentryMode): Add enum.
* Qt / Cpp: Port auto_ptr to unique_ptrAndre Heinecke2016-05-171-26/+26
| | | | | | | | | | | | | | | | | | | | | * lang/cpp/src/context.cpp, lang/cpp/src/context.h, lang/cpp/src/context_p.h (Context::createForEngine), (Context::edit, Context::startEditing), (Context::takeLastEditInteractor, Context::cardEdit), (Context::startCardEditing, Context::takeLastCardEditInteractor), (Context::assuanTransact, Context::startAssuanTransaction), (Context::takeLastAssuanTransaction): Port to unique_ptr. * lang/qt/src/qgpgmeadduseridjob.cpp, lang/qt/src/qgpgmechangeexpiryjob.cpp, lang/qt/src/qgpgmechangeownertrustjob.cpp, lang/qt/src/qgpgmechangepasswdjob.cpp, lang/qt/src/qgpgmesignkeyjob.cpp: Update accordingly. -- This is another API break but as we already broke API with GpgME++ and QGpgME from KDE Frameworks this is a good time to do this to avoid using a deprected C++ class in the API.
* Cpp: Remove last usages of boostAndre Heinecke2016-04-111-6/+7
| | | | | | | | * lang/cpp/src/configuration.cpp: Use std::remove_pointer. (Configuration::operator<<): std::for_each. * lang/cpp/src/context.cpp: Delete manually instead of scoped ptr. * lang/cpp/src/scdgetinfoassuantransaction.cpp: Use static_assert. (to_reader_list): Tokenize with getline.
* Remove feature check ifdefsAndre Heinecke2016-02-221-214/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/cpp/src/assuanresult.cpp, lang/cpp/src/callbacks.cpp, lang/cpp/src/configuration.cpp, lang/cpp/src/context.cpp, lang/cpp/src/context_glib.cpp, lang/cpp/src/context_qt.cpp, lang/cpp/src/context_vanilla.cpp, lang/cpp/src/data.cpp, lang/cpp/src/decryptionresult.cpp, lang/cpp/src/defaultassuantransaction.cpp, lang/cpp/src/editinteractor.cpp, lang/cpp/src/encryptionresult.cpp, lang/cpp/src/engineinfo.cpp, lang/cpp/src/eventloopinteractor.cpp, lang/cpp/src/global.h, lang/cpp/src/gpgagentgetinfoassuantransaction.cpp, lang/cpp/src/importresult.cpp, lang/cpp/src/interfaces/assuantransaction.h, lang/cpp/src/key.cpp, lang/cpp/src/keygenerationresult.cpp, lang/cpp/src/keylistresult.cpp, lang/cpp/src/scdgetinfoassuantransaction.cpp, lang/cpp/src/signingresult.cpp, lang/cpp/src/trustitem.cpp, lang/cpp/src/util.h, lang/cpp/src/verificationresult.cpp, lang/cpp/src/vfsmountresult.cpp: Remove feature checks.
* Initial checkin of gpgmepp sourcesAndre Heinecke2016-02-221-0/+1707
Based on git.kde.org/pim/gpgmepp rev. 0e3ebc02 * lang/cpp/src/assuanresult.cpp, lang/cpp/src/assuanresult.h, lang/cpp/src/callbacks.cpp, lang/cpp/src/callbacks.h, lang/cpp/src/configuration.cpp, lang/cpp/src/configuration.h, lang/cpp/src/context.cpp, lang/cpp/src/context.h, lang/cpp/src/context_glib.cpp, lang/cpp/src/context_p.h, lang/cpp/src/context_qt.cpp, lang/cpp/src/context_vanilla.cpp, lang/cpp/src/data.cpp, lang/cpp/src/data.h, lang/cpp/src/data_p.h, lang/cpp/src/decryptionresult.cpp, lang/cpp/src/decryptionresult.h, lang/cpp/src/defaultassuantransaction.cpp, lang/cpp/src/defaultassuantransaction.h, lang/cpp/src/editinteractor.cpp, lang/cpp/src/editinteractor.h, lang/cpp/src/encryptionresult.cpp, lang/cpp/src/encryptionresult.h, lang/cpp/src/engineinfo.cpp, lang/cpp/src/engineinfo.h, lang/cpp/src/error.h, lang/cpp/src/eventloopinteractor.cpp, lang/cpp/src/eventloopinteractor.h, lang/cpp/src/exception.cpp, lang/cpp/src/exception.h, lang/cpp/src/global.h, lang/cpp/src/gpgadduserideditinteractor.cpp, lang/cpp/src/gpgadduserideditinteractor.h, lang/cpp/src/gpgagentgetinfoassuantransaction.cpp, lang/cpp/src/gpgagentgetinfoassuantransaction.h, lang/cpp/src/gpgmefw.h, lang/cpp/src/gpgmepp_export.h, lang/cpp/src/gpgsetexpirytimeeditinteractor.cpp, lang/cpp/src/gpgsetexpirytimeeditinteractor.h, lang/cpp/src/gpgsetownertrusteditinteractor.cpp, lang/cpp/src/gpgsetownertrusteditinteractor.h, lang/cpp/src/gpgsignkeyeditinteractor.cpp, lang/cpp/src/gpgsignkeyeditinteractor.h, lang/cpp/src/importresult.cpp, lang/cpp/src/importresult.h, lang/cpp/src/key.cpp, lang/cpp/src/key.h, lang/cpp/src/keygenerationresult.cpp, lang/cpp/src/keygenerationresult.h, lang/cpp/src/keylistresult.cpp, lang/cpp/src/keylistresult.h, lang/cpp/src/notation.h, lang/cpp/src/result.h, lang/cpp/src/result_p.h, lang/cpp/src/scdgetinfoassuantransaction.cpp, lang/cpp/src/scdgetinfoassuantransaction.h, lang/cpp/src/signingresult.cpp, lang/cpp/src/signingresult.h, lang/cpp/src/trustitem.cpp, lang/cpp/src/trustitem.h, lang/cpp/src/util.h, lang/cpp/src/verificationresult.cpp, lang/cpp/src/verificationresult.h, lang/cpp/src/vfsmountresult.cpp, lang/cpp/src/vfsmountresult.h, lang/cpp/src/interfaces/assuantransaction.h, lang/cpp/src/interfaces/dataprovider.h, lang/cpp/src/interfaces/passphraseprovider.h, lang/cpp/src/interfaces/progressprovider.h: New.