428 Commits

Author SHA1 Message Date
  heck f14567078d .clang-tidy: allow implicit bool conversion 3 months ago
  heck 2dfe331cec passphrase_cache: coding conventions / readability 3 months ago
  heck b302a3a2cb passphrase_cache: missing init 3 months ago
  heck f53f1d73f5 passphrase_cache: avoid copies (use const&) 3 months ago
  heck 597bc1a76e passphrase_cache: Coding conventions / formatting 3 months ago
  heck 239f2de011 pEpSQLite: TODO non-copyable 3 months ago
  heck 7aa3fb35a1 grp_driver_dummy: useless const in func decl 3 months ago
  heck 137ef2b7c4 grp_driver_replicator: useless const in func decl 3 months ago
  heck 099c0b29bf grp_manager_interface: useless const in func decl 3 months ago
  heck 32392ef307 passphrase_cache: avoid copy 3 months ago
  heck 3002929d45 passphrase_cache: coding conventions (readability) 3 months ago
  heck f3b96d7881 passphrase_cache: uninitialized var 3 months ago
  heck 9be03de9b9 pEpSQLite: rule of 5 (non copyable explicitly) 3 months ago
  heck 687d43d02c pEpSQLite: superflous constructs 3 months ago
  heck a540460e53 listmanager_dummy.hh: add TODO rule of 5 3 months ago
  heck 60a902ee02 group_manager_api.h: useless const in func decl 3 months ago
  heck 8446aa9e8b CallbackDispatcher: use move semantics 3 months ago
  heck 68c778ba1b CallbackDispatcher: 'auto' does not AUTO declare const'ness or pointer/value semantics (use const&) 3 months ago
  heck cf8f500ba8 CallbackDispatcher: unused include 3 months ago
  heck e4ee4a9852 Adapter class: formatting and code style 3 months ago
  heck a3037609a2 Adapter class: superflous constructs 3 months ago
  heck 6b76d9bf8b Adapter class: dont call static method on object 3 months ago
  heck a9d01f54b1 Adapter class: missing initialization 3 months ago
  heck f5b82bd7dc Adapter class: unused includes 3 months ago
  heck 32b3e88a79 Adapter class: make explicitly non-copyable 3 months ago
  heck 3a3d2201b7 Test: test_group update (revert) 3 months ago
  heck 65b04152a1 RULE: In C++ NEVER take c-datatypes by reference! 3 months ago
  heck 3f87504a16 Revert "Tests: update usages of changed pEp::Utils::to_string() funcs" 3 months ago
  heck 49ccb1e806 Coding Conventions: update .clang-tidy 3 months ago
  heck 90f585bb10 Coding Conventions: .clang-tidy 3 months ago
  heck eaad5ec83f Tests: link against libpEpCxx11.a 3 months ago
  heck f846859e84 Tests: update usages of changed pEp::Utils::to_string() funcs 3 months ago
  heck 4b1ec885a0 Tests: update includes 3 months ago
  heck 1a8bfcd9b2 Tests: Move corresponding tests to libpEpCxx11 3 months ago
  heck 497afdfb2b Update includes 3 months ago
  heck b510654f56 Moved: module 'pc_container' to libpEpCxx11 3 months ago
  heck 9d50345e0e Moved: module 'locked_queue' to libpEpCxx11 3 months ago
  heck 24e5e4370b Removed: duplicate module 'slurp' (use std_utils in libpEpCxx11) 3 months ago
  heck 0241d0ad1c Moved: module 'Semaphore' to libpEpCxx11 3 months ago
  heck 04c80b63f0 Moved: module 'CountingSemaphore' to libpEpCxx11 3 months ago
  heck 2a45adcb40 Moved: module 'call_with_lock' to libpEpCxx11 3 months ago
  heck 85d7122de0 Moved: module 'constant_time_algo' to libpEpCxx11 3 months ago
  heck e9bd989020 Moved: module 'std_utils' to libpEpCxx11 3 months ago
  heck 6df8386754 Moved: module pEpLog to libpEpCxx11 3 months ago
  heck c1775a7ad0 Fix: pEp::Utils to_string() func use ref instead of ptr 3 months ago
  heck c235e6d9cd Fix: pEpLog - streams compat 3 months ago
  heck 816972b803 Doc: Add todo 3 months ago
  heck e7a8426ed4 Doc: improved for class Adapter::Session 5 months ago
  heck 1a5cc7e72b Doc: update the ancient README.md 5 months ago
  heck 2d24242010 fix .clang-format invalid value 5 months ago
  Volker Birk 6b53a820a3 FIX: .size() has type size_t 5 months ago
  Luca Saiu 67bbd51b23 counting semaphore: comment improvements 6 months ago
  Luca Saiu e6fc833bef counting semaphore: add comments, cosmetic changes 6 months ago
  Luca Saiu 94b5a61f8b .gitignore: ignore new compiled file 6 months ago
  Luca Saiu 0edfef8346 counting semaphore: rename multiple-inclusion-prevention macro 6 months ago
  Luca Saiu dd077fd7ba new CountingSemaphore class, plus test case 6 months ago
  heck ae28261ea6 Build: -lm was missing 6 months ago
  heck e7ea4a094c Build: -fPIC also for c99 6 months ago
  heck d5526ee4ee Test: hex2bin() - fixed contradicting signatures 7 months ago
  heck 5b0c58386e Revert "adapt to the engine changes in ENGINE-959" 7 months ago
  heck 4b1fb58cb8 hex2bin() - fixed contradicting signatures 7 months ago
  heck e18fcb5935 Merge pull request 'LIB-17' (#12) from LIB-17 into master 7 months ago
  Luca Saiu e568678a1d empty_message_copy: copy the rating as well (Jörg Knobloch discovered the bug) 8 months ago
  Luca Saiu fedd2dc8d2 adapt to the engine changes in ENGINE-959 8 months ago
  heck 2a91f4304d Merge pull request 'LIB-19: fix easy compilation problems' (#11) from LIB-19 into master 7 months ago
  Luca Saiu 69ce6c0550 LIB-19: fix easy compilation problems 7 months ago
  heck a17dddf716 Tests: test_hexbin.cc - we are always in namepace ::pEp 7 months ago
  heck a2856f3317 Tests: test_rand.cc 7 months ago
  heck 8a6aba672d std_utils: further improve the random funcs, hopefully. 7 months ago
  heck 634fee3bcd Merge pull request 'add missing #include directives, fixing compilation with GCC' (#9) from LIB-18 into master 7 months ago
  Luca Saiu 3d629949be add missing #include directives, fixing compilation with GCC 7 months ago
  heck f84ccc961d .gitignore 8 months ago
  heck b8a208d3a5 std_utils - Templatize bin2hex() / hex2bin() 8 months ago
  heck e449d65a4f std_utils.hh - Add dir_get_cwd() / dir_set_cwd() 8 months ago
  heck 901a9fa9a7 Merge branch 'master' of https://gitea.pep.foundation/pEp.foundation/libpEpAdapter 8 months ago
  heck f27b87d587 bin2hex - Add alternative 8 months ago
  heck 91d7e47734 Add missing includes 8 months ago
  heck f03f679360 Tests: add hex2bin() / bin2hex() 8 months ago
  heck 15f7c3de60 std_utils - add hex2bin() / bin2hex() 8 months ago
  heck 528d823b19 std_utils - add to_lower(string) 8 months ago
  heck cbdc72995e formatting only / doc 8 months ago
  heck b41bba4143 std_utils - templatize file_read_bin() / file_write_bin 8 months ago
  heck 06f9faeb32 std_utils.hh - add path_dirname() and path_get_abs(); 8 months ago
  RCE 966990f09e Fix: Add missing include 8 months ago
  heck a6ecab9602 PityTest11: EXTRACT TestFramework PitTest11 into own repo. Is a test-dependency now. 8 months ago
  heck d65b959296 Tests - rename utils.hh to test_utils.hh 8 months ago
  heck 5abcfb86bb Tests - add test for file_read_bin() / file_write_bin() 9 months ago
  heck 7c1c8016f9 std_utils.hh - add file_read_bin() / file_write_bin() 9 months ago
  heck e105634189 use solution pattern from pEp/platform_windows.h for windows compat (Move this to engine via PR, once working) 10 months ago
  heck a77a24c8b6 use pEp/platform.h for windows compat 10 months ago
  heck 8184899d9d group_manager_api - formatting only 10 months ago
  heck f1b1cd2820 Merge pull request 'master' (#8) from Thomas/libpEpAdapter:master into master 10 months ago
  Thomas c81ff7c140 Add missing header files to Windows project 10 months ago
  Thomas f1f8c0d49d Initialize status code 11 months ago
  Thomas bbb2dd7b00 Add reference to sqlite3, use _strdup() 11 months ago
  Thomas d4b35f3536 path_ensure_not_existing() doesn't seem to be used on Windows... 11 months ago
  Thomas b4d138f8e3 Adjust Windows build file. Use _getpid instead of getpid (deprecated alias) 11 months ago
  heck 651ce9be45 Test: PityTest - Fix linux build 11 months ago
  heck ce136d408d Merge branch 'LIB-11' 11 months ago
  heck 5008848ba4 Merge branch 'Release_2.1' 11 months ago
  heck 5ff47daf74 .gitignore 11 months ago
  heck 64c652652c Test: API changes update all tests 11 months ago
  heck 4a8cbbfd38 Test: re-add test_adapter_cxx.cc 11 months ago
  heck e5746295e1 Test: PitySwarm - fix bug swarm of size 1 11 months ago
  heck 080076582e API: session(init/release) removed. 11 months ago
  heck 9b922a39dc move start_sync() and stop_sync() from CallbackDispatcher to Adapter.hh 11 months ago
  heck 9780232015 add group_join() 11 months ago
  heck 44b0c23161 std_utils.cc - hopefully improve path_ensure_not_existing/dir_recreate 11 months ago
  heck ebe75b3b06 listmanager_dummy.cc - explicit constructors 11 months ago
  heck 7a8f36c32b .gitignore 11 months ago
  heck c177dc00ce Test: PityTest - framework/utils cpt idents have no id / moved group to Perspective 11 months ago
  heck 788ae51b2f Test: PityTest - a build dep to get rid of again... 11 months ago
  heck 436593676e Test: PityTest - test_swarm updated 11 months ago
  heck 4ad3823b15 Test: PityTest - PityNode add class TestIdent 11 months ago
  heck f65cd2a996 Test: PityTest - PityPerspective group and peer handling 11 months ago
  heck 0c29ed6ad9 Test: PityTest - PitySwarm perspective transformation updated 11 months ago
  heck 340e7de32d Test: swarm templates updated 11 months ago
  heck 0a0569bd53 Test: add test_sync_init - sync_initialize() 11 months ago
  heck 555834a989 Test: test_group_swarm - THE swarm based group encryption test 11 months ago
  heck 8da80a4b14 Test: test_tofu - updated 11 months ago
  heck d09983b04c Test: test_tofu_one2many - Test tofu in the swarm with 1-n topology 11 months ago
  heck 9b4450311d Test: PityTest - PitySwarm copy is borken, and also transport has a problem because ident is unit name, which exists twice then... 11 months ago
  heck ae2dd257dc Test: PityTest - update tests 11 months ago
  heck 934540625a Test: PityTest - AbstractPityUnit fix PROC_SEQ (added wait()), rename 11 months ago
  heck 24d2c072df Test: PityTest - update test_pitytree.cc 11 months ago
  heck b2491e79ef pEpLog decorate no '\n' 11 months ago
  heck b6253d5ea3 .gitignore 11 months ago
  heck 0fa7915baa Test: PityTest - PitySwarm overhaul, copyable now, getLeafUnit() HACK BECAUSE NO TIME, in the end there will of course be several leaf units in any swarm node.... but for now we just copy the swarm... 11 months ago
  heck d5c966ea6c Test: PityTest - PityUnit add setContext() twice, pointer takes reference, Value copies and own the thing.... 11 months ago
  heck 8fa9e24d1e Test: PityTest - PityTree addCopy() for lvalue refs, too, please, add getChildrenCount(), debatable, copy-assign i think i like to avoid it. 11 months ago
  heck 95234b8a2c Test: PityTest - PityPerspective make model const, lets see... 11 months ago
  heck 1a766e6ece Test: PityTest - AbstractPityUnit add setExecMode() 11 months ago
  heck 45b783c724 Test: update test_tofu 11 months ago
  heck 97e1286f5b Test: update swarm templates 11 months ago
  heck 1df2303835 Test: PityTest - update tests 11 months ago
  heck d1d4194646 Test: PitySwarm - Adjust ownership model for new PityTree 11 months ago
  heck 199581f4d4 Test: PityTest - PityUnit Include cleanup 11 months ago
  heck 9930fe69a2 Test: PityTest - PityTree Include cleanup 11 months ago
  heck 1d4ca0c549 Test: PityTest - PityTransport.cc Include cleanup 11 months ago
  heck 5bd78ad83f Test: PityTest - AbstractPityUnit.cc Include cleanup 11 months ago
  heck 5c56fc3a9b Test: PityTest - PityUnit when copy, make a copy of the inherited model. 11 months ago
  heck 0d97aaa4fb Test: PityTest - PityUnit add ad-hoc class as default TestContext. We should have a proper baseclass for the context. 11 months ago
  heck 324ffbea05 Test: PityTest - PityTree addNew() as abstract factory with perfect forwarding 11 months ago
  heck a2c5b542f2 Test: PityTest - PityUnit add copy assign operator 11 months ago
  heck 0baa54c330 Test: PityTest - AbstractPityUnit add copy assign operator 11 months ago
  heck 0ac3de4264 Test: PityTest - PityTree add copy assign operator 11 months ago
  heck c05d04683a Test: PityTest - test_assert.cc updated 11 months ago
  heck 9c164c4329 Test: PityTest - test_processdirs updated (Old/New API) 11 months ago
  heck 3735aaf896 Test: PityTest - test_processdirs updated 11 months ago
  heck 5e32091183 Test: PityTest - test_pitytree now design example 11 months ago
  heck 66bd23800e Test: PityUnit - Copy C'tor, clone() 11 months ago
  heck dc0f1e21b3 Test: PityTest - Copy C'tor 11 months ago
  heck c880a25a0d Test: PityTree - RValue refs, copy constructor, addRef/addCopy/addNew 11 months ago
  heck 018bbb0b2a Test: PityTest - add test_pitytree.cc 11 months ago
  heck debabff778 Test: PityTest - add test_assert.cc 11 months ago
  heck cf71349c56 Test: PityTest - fix PITYASSERT_THROWS() 11 months ago
  heck bf89ab6f03 .gitignore 11 months ago
  heck 72b36f8f69 Tests: PityTest - Add main header PityTest.hh 11 months ago
  heck bb831cc338 Tests: PityTree - add setName() / getChild() 11 months ago
  heck dd213604e3 Tests: AbstractPityUnit - print full path of RootUnit 11 months ago
  heck f592357827 Tests: AbstractPityUnit - init log_mutex in construction 11 months ago
  heck c3614c4cf8 Tests: AbstractPityUnit - fix init order 11 months ago
  heck bbe6b5b4c3 Tests: AbstractPityUnit - move init from constructor to run() 11 months ago
  heck baf67b3db4 Tests: update swarm test templates 11 months ago
  heck aa286f459f Tests: PityTest - update tests 11 months ago
  heck ed6947eabc Tests: PityTest - PitySwarm update constructor semantics 11 months ago
  heck 0946f32ef7 Tests: PityTest - PityUnit change constructor semantics (parent) 11 months ago
  heck f08fd36f42 Tests: PityTest - PityUnit, move tree functionality into base class 11 months ago
  heck 732571de2e Utils: comment 11 months ago
  heck d1de14487c Test: PityTest - Abstract base for PityUnit 11 months ago
  heck 1a46228b42 Test: update all tests to return int 11 months ago
  heck 8816b1e65e Test: PityTest - test_execmodes use model /prettify 11 months ago
  heck 87ed5be3d0 Test: PityTest - Units return int 11 months ago
  heck d8302d9437 Test: PityTest - processUnit term colors 11 months ago
  heck 10b720cd26 utils.cc: to_string(bloblist) - reduced details mode 11 months ago
  heck 3ac1052cda Tests: test utils - add decryptMessage() using flags 11 months ago
  heck 67bbfe67dd Tests: test_adapter_cxx use std_utils 11 months ago
  heck f95efdb92d Includes for linux build. 11 months ago
  heck 49ea80158e Tests: test_tofu - add message logging RX/TX - before/after enc/dec 11 months ago
  heck aa9139c1bc Tests: Utils - add pEpIdentList / Group / split createIdentity into createOwnIdent() / createCptIdent() / createRawIdent() 11 months ago
  heck 664bce8422 Tests: PitySwarm - own_groups auto generated 11 months ago
  heck 396d938342 Tests: PityPerspective.hh - add own_groups 11 months ago
  heck 713cdc3887 LIB-11: group_manager_api - rename funcs, add init() 11 months ago
  heck c04f2aa1af .gitignore 11 months ago
  heck a05c596be3 Tests: test_tofu now assertive 11 months ago
  heck a70692acde Tests: Utils - use tuples for EncryptResult / DecryptResult 11 months ago
  heck 5dfdce0a0f Tests: PityTest - add pEpidents to Perspective own/cpt AND change PTASSERT to take another param "reason" 11 months ago
  heck e8be7529f1 Tests: PityTest - Makefile add pEp includes 11 months ago
  heck 046665be80 Tests: add test_templates using PitySwarm 11 months ago
  heck 7f837a7120 Tests: PitySwarm - addTestUnit() returns the unit 11 months ago
  heck 5bd3c262bb Tests: PityTest - Exit status is green if 0, otherwise red 11 months ago
  heck 420ec93e9e Tests: test_tofu - refactor out the datatypes and utils 11 months ago
  heck c018c95c57 Tests: test_tofu - WORKING again \o/ 11 months ago
  heck 4fc519bd3f .gitignore 11 months ago
  heck 17e8dad825 Tests: add test_tofu (it doesnt work anymore grrrr...) 11 months ago
  heck bf203337f4 std_utils: add clip() / tldr() 11 months ago
  heck 8c7d92c5a5 Tests: test_adapter.cc - clean includes 11 months ago
  heck 4d5a64908b Utils: add to_string() 11 months ago
  heck f05879b7b2 Tests: PityTest - update tests 11 months ago
  heck 4e571998cc Tests: PityTest - transport var rename 11 months ago
  heck f2d1e6215a Tests: PityTest - report exit status 11 months ago
  heck 248d9ddcef Tests: PityTest - static lib 11 months ago
  heck e2d57a569c Tests: PityTest - HACK for transport peers problem 12 months ago
  heck 0901f2761c Tests: PityTest - add env (process_init) 12 months ago
  heck 85de5e8111 Tests: PityTest - update tests 12 months ago
  heck 09820f9e6d Tests: PityTest - PitySwarm singletyped tree 12 months ago
  heck c580adbdcf Tests: PityTest - PityUnit remove the 2nd template param. 12 months ago
  heck a5a55692c8 Tests: PityTest - cleanup model/node/persp and eliminate forward decls 12 months ago
  heck b49f588561 Tests: PityTest - fsMutex, common lets speed it a little by default 12 months ago
  heck 07b9859295 Tests: PityTest - remove prototype tests 12 months ago
  heck 8f28c98f99 Tests: PityTest - fixes 12 months ago
  heck 1a4107e662 Tests: PityTest - reflect on redesign 12 months ago
  heck 8224eea9d6 Tests: PityTest - update tests 12 months ago
  heck 717dd5acd2 Tests: PityTest - Separation of concerns 12 months ago
  heck eb2a3019ee Tests: PityTest - integrate transport into PityUnit 12 months ago
  heck f79dbbbea2 Tests: PityTest - extract perspective into class 12 months ago
  heck 9d28b5c3e3 Tests: PityTest - extract transport into class 12 months ago
  heck 14e8633b5b .gitignore 12 months ago
  heck 2245a374eb Test: PityTest - Add test_swarm 12 months ago
  heck c386664a1a Test: PityTest - Add Perspective peers/partner etc... 12 months ago
  heck 3ac5b641d8 Test: PityTest - Add fs_mutex (a very primitive IPC sync method) 12 months ago
  heck e45dd9604d Test: PityTest - Add transport 12 months ago
  heck 26996f4fd4 Test: PityTest - PityUnit move stuff to std_utils.cc 12 months ago
  heck 9f579de001 Test: utils.cc - move sleep_millis() to std_utils.cc 12 months ago
  heck 56f24c5e7b std_utils: add random_string() random_char() / dir_ensure() / file_read() / dir_recreate() 12 months ago
  heck 9849a98124 Tests: PityTest - PityNode add inbox dir 12 months ago
  heck 0e270102a3 Tests: Pitytest - Model creates ProcessNodes 12 months ago
  heck 972bf654d8 .gitignore 12 months ago
  heck c05f6e339d Tests: PityTest - Add test_transport.cc 12 months ago
  heck e651caf3b2 Tests: PityTest - Add test_model.cc 12 months ago
  heck 6ec2f2246a Tests: PityNode - update tests 12 months ago
  heck 1e50153809 Tests: PityNode - first shot 12 months ago
  heck c6f377fc2b Tests: PityModel - First shot 12 months ago
  heck 62a99f3c63 Tests: PityUnit - Fixes and renames 12 months ago
  heck 8989c84f25 Tests: PityUnit - Add termCol support 12 months ago
  heck ca05767dff std_utils: Add termCol support 12 months ago
  heck 8cb1fe5ea0 pEpLog: Add termCol support 12 months ago
  heck 6fe42706e6 Tests: PityTest11 - dirs ftw nr.2 12 months ago
  heck b496d620d2 Tests: PityTest11 - add test_linear 12 months ago
  heck 1429ef9966 Tests: PityTest11 - update tests 12 months ago
  heck 8aa9a8136d Tests: PityTest11 - create dirs 12 months ago
  heck de01a38d10 Tests: PityTest11 - test_processdirs done 12 months ago
  heck ed6d01b4e2 Tests: PityTest11 - test_execmodes 12 months ago
  heck d05a89baa6 Tests: PityTest11 - Test status output 12 months ago
  heck ed3d34f6b3 Tests: PityTest11 - add PTASSERT() 12 months ago
  heck 60655faf02 Tests: delete old prototypes 12 months ago
  heck 50b296b0b5 GroupManagerInterfaces: no virtual destructor, i think 12 months ago
  heck d6fc9cf132 Test: PityTest11 dir rename 12 months ago
  heck d04f53b4a7 Test: pEpTestTree - Rebranding! its now PityTest11 \o/ 12 months ago
  heck f54750366c Test: pEpTestTree - impl is now hxx 12 months ago
  heck 9f36d71228 Test: pEpTestTree - update tests 12 months ago
  heck 774022cb49 Test: pEpTestTree - made generic for the model type 12 months ago
  heck 82fb83b706 Test: pEpTestTree - TestModel forgot virtual (baseclass maybe not even needed) 12 months ago
  heck 6c56d3a94e pEpLog - improve decoration / add logH3 12 months ago
  heck b6e9e59658 Build: test fw not no main Makefile 12 months ago
  heck 4a38564ce6 pEpTestTree - loads of improvements and func 12 months ago
  heck ccd20fdd74 std_utils: padTo() 12 months ago
  heck 052c6d5b81 pEpLog - some improve logH1, logH2 12 months ago
  heck da671817e6 pEpLog - some improve logH1, logH2 12 months ago
  heck 4d4acd22bb grp_manager_interface.hh - forgot the virtual destructors 12 months ago
  heck ba34baa2eb Tests: pEpTest changes, its getting there... wait for it. 12 months ago
  heck e5aa2284ae pEpLog - Add PID 1 year ago
  heck 2d7ec43fbc Test: Add test_pEpTest_basic 1 year ago
  heck 17585d1ee6 Test: Add pEpTest to the build 1 year ago
  heck af276f6f70 Test: pEpTest fix execution model 1 year ago
  heck 6dcdab26d8 Tests - fix naming of test_pEpTest_basic.cc 1 year ago
  heck f62aae7658 pEpLog - fix pEpLogClassRaw 1 year ago
  heck aac0603b60 Tests: add first draft of pEpTest 1 year ago
  heck 9426b6dcfa pEpLog - typos and comments 1 year ago
  heck bb2a582e40 .gitignore 1 year ago
  heck 24aafa8311 Test: test_message_cache.cc - missing include 1 year ago
  heck e27d594be6 C++ standard pEp-wide has been reverted to C++11 1 year ago
  heck 9b3975189f Test: Build - add -lpthread 1 year ago
  heck efa54bd050 Tests: Start new Test framework for distributed testing. (Multi-User / Multi-Device) 1 year ago
  heck c3aeb1e0ff Tests: add framework/utils.cc - sleep_millis(); 1 year ago
  heck a015331c53 Split utils.cc and add std_utils.cc 1 year ago
  heck 2a5cdd4383 rename (there will be a group_member_api.h) 1 year ago
  heck 9105e95cb9 Test: update test_group.cc - WIP 1 year ago
  heck 2e7e1bfddf Refactor out into a dedicated replication driver (Implementing the GroupManagerInterface) 1 year ago
  heck 9ab5d92340 adapter_group.h - group_join() is part of the group member API 1 year ago
  heck 59110d5842 grp driver engine - restructure 1 year ago
  heck c21d0d862a grp driver dummy - restructure 1 year ago
  heck fb2ce3f063 Create GroupManagerInterface 1 year ago
  heck 062a836b49 grp_update_drv_dummy.cc - bugfixes 1 year ago
  heck 816299586b grp_query_drv_dummy.cc - impl 1 year ago
  heck 651fc5b181 grp_update_drv_dummy.cc - impl 1 year ago
  heck 8ac42950d5 utils.cc - add to_cxx() for idenitylist, is_c_str_empty() 1 year ago
  heck 2702f621f5 Tests: update because of Utils moved 1 year ago
  heck 4ab61fccdb listmanager_dummy - Separate DoesNotExistException into ListDoesNotExistException and MemberDoesNotExistException 1 year ago
  heck 0d72ea5367 Add pEp::Utils - collection of helper functions and stuff... 1 year ago
  heck 5225a3950a grp interface: group_join() is not part of the MANAGER-API. 1 year ago
  heck b832f80832 Tests: listmanager_dummy - member_add() and member_remove() 1 year ago
  heck c3f62ccb90 Fix: listmanager_dummy - member_add() and member_remove() Throw DoesNotExistException if list does not exist 1 year ago
  heck cd1c137e30 Test: test_adapter - use TESTLOG() instead od pEpLog() for tests 1 year ago
  heck be1255f263 Test: test_adapter - use TESTLOG() instead od pEpLog() for tests 1 year ago
  heck c0bc63dc8f Test: test_ensure_passphrase - remove of unused includes 1 year ago
  heck 40132db3e2 Test: test_group - use pEpLog::log() instead of cout 1 year ago
  heck 5ec8455792 Test: test_listmanager_dummy - move the ASSERT_EXCEPT macro to utils 1 year ago
  heck b5bd084580 Test: test_pEpSQLite - Switch from pEpLog() to using TESTLOG() 1 year ago
  heck cf7c5feea1 Test: Framework improve logging 1 year ago
  heck 629d17f809 correct the typo in "m4gic_logger_n4me" 1 year ago
  heck b42b971966 pEpLog - Add functions and Macros for logH1() logH2() 1 year ago
  heck 3444377bc2 Tests: test_listmanager_dummy - use log() 1 year ago
  heck 42855fdeee Test: Utils - add const, add log() and lograw() 1 year ago
  heck ae0eee6f97 grp enc interface - add noexcept, just more as a comment 1 year ago
  heck a2c5c99046 grp enc interface - ommit pEp_group in adapter_group_create() 1 year ago
  heck 9ea23feeb2 LIB-11: ListManagerInterface is misconception 1 year ago
  heck 02d7ec1387 LIB-11: adapter_group.cc - add some impl 1 year ago
  heck abea6b17f9 LIB-11: Add GroupQuery Dummy Driver 1 year ago
  heck 2d32c442ff LIB-11: Add GroupUpdate Dummy Driver 1 year ago
  heck fc7f8b5af3 LIB-11: Add GroupUpdate Engine Driver 1 year ago
  heck 711a896095 LIB-11: Add GroupQueryInterface 1 year ago
  heck a8916c9ac1 LIB-11: Add GroupUpdateInterface 1 year ago
  heck 14cb72dca9 adapter_group.h - group_rating() is not part of this interface 1 year ago
  heck e19e3a42a4 Merge branch 'LIB-12' into LIB-11 - "Add List Manager Backend: Dummy (SQLite3)" 1 year ago
  heck 943f07c469 test_listmanager_dummy - Add Error conditions / add list_exists(), member_exists() 1 year ago
  heck c905aaaefb ListManagerDummy - throw AlreadyExisting / DoesNotExist to indicate state 1 year ago
  heck 179f02e683 .gitignore 1 year ago
  heck 68b336a758 ListManagerDummy - Add public methods list_exists() / member_exists() 1 year ago
  heck d7ef4bba10 ListManagerDummy - Add custom exceptions and slight rename 1 year ago
  heck 706431c85c pEpSQLite - Add helper function eval_sql_count() 1 year ago
  heck 82359fdb9d pEpSQLite - Add custom exceptions and revise .what() 1 year ago
  heck aab0d35ab8 ListManagerDummy - Revise Exception .what() 1 year ago
  heck c333d779ce listmanager_dummy.hh - formatting 1 year ago
  heck edc8fde83d pEpSQLite.* - formatting 1 year ago
  heck 8df335e64d pEpLog.cc - formatting 1 year ago
  heck 122d16c376 C++ standard pEp-Wide back to C++11 1 year ago
  heck 2dd7dbf597 pEpLog.hh - formatting 1 year ago
  heck aa3a8f6304 listManagerDummy - had too much const 1 year ago
  heck a93aedc3d5 pEpLog - can have more const too 1 year ago
  heck 2b0489f114 pEpSQLite - some const members 1 year ago
  heck 316e7cc5d5 Tests: test_listmanager_dummy - forgot some const 1 year ago
  heck ace39bb69d Tests: test_pEpSQLite.cc - clean 1 year ago
  heck e741064461 ListMangerDummy - some const for the methods 1 year ago
  heck 220f588cb4 rm old prototype 1 year ago
  heck 48d2a7670a Tests: Add tests for class ListManagerDummy 1 year ago
  heck ab32655c63 LIB-12 - Add class ListManagerDummy 1 year ago
  heck a116f897ed pEpLog - pEpLogClass doesnt need to print __FILE__, we have the classname instead 1 year ago
  heck c42866978f test: pEpSQLite - fix cleanup 1 year ago
  heck d2e16f8059 Merge branch 'LIB-12' of https://gitea.pep.foundation/pEp.foundation/libpEpAdapter into LIB-12 1 year ago
  heck 0ec9e4054c .gitignore 1 year ago
  heck 14c6c76d4b .gitignore 1 year ago
  heck 99f32d1f1e Project Structure: Create folder src/internal - Move sqlite3.h there. 1 year ago
  heck 06a3fdb0b0 Tests: Utils rename to_string() functions 1 year ago
  heck 50130c5caf Tests: Move util functions to utils.cc 1 year ago
  heck 082e886357 Tests: Add tests for pEpSQLite 1 year ago
  heck 8548eb9d77 pEpSQLite - bugfixes 1 year ago
  heck 3c3aaf5a48 pEpSQLite - Exception on execute() on closed db. (not segfault) 1 year ago
  heck 6c47eb3eea pEpSQLite - Fix delete_db() 1 year ago
  heck 7ae66e5f53 pEpLog / pEpSQLite - the "magic" logger alias can be private 1 year ago
  heck 826989f273 Add class pEpSQLite 1 year ago
  heck 9dddab4388 pEpLog: Add class and macros to support runtime switching on a class and instance basis. 1 year ago
  heck 591b5c0fc2 Tests: add util functions 1 year ago
  heck 6d758fb5c3 cerr, definitely cerr 1 year ago
  heck 939719dea2 LIB-12: listmanager prototype done 1 year ago
  heck aadeb4bd25 LIB-12: Simplification Massive - BIGUP FDIK! 1 year ago
  heck 3079dff801 LIB-12: Dummy List manager prototype complete 1 year ago
  heck cf262572ab LIB-12: add test_sqlite3.cc as a playground 1 year ago
  heck 70718ddfed LIB-12: Build - Add *.c files (sqlite3.c) 1 year ago
  heck c9cf471308 LIB-12: Add sqlite3 amalgamation (f&^ks up the git stats, *damnit* i was almost there) 1 year ago
  heck a56bf005f8 .gitignore 1 year ago
  heck c3cd6623ce LIB-12: Test - Add test_lm_dummy.cc 1 year ago
  heck 07db7ede2a LIB-12: Add class ListManagerDummy 1 year ago
  heck c856185001 LIB-12: Add class ListManagerInterface 1 year ago
  heck 384753a177 Merge branch 'LIB-11' - The group update API can be regarded stable, and can be used by the adapters. But no query functions yet (because no dummy backend yet) 1 year ago
  heck 5e7a46b5ec LIB11: adapter_group.h - comment out unimplemented query functions 1 year ago
  heck c28ecc5764 LIB11: Test - update 1 year ago
  heck d79fb50070 Tests: Framework - Add funcs logH1 / logH2 1 year ago
  heck 18d61b9f06 LIB-11: Test - add group_rating() / Failing / create / functions for Test Units 1 year ago
  heck dc8d340190 adapter_group.cc - pEpLog() every function call 1 year ago
  heck 5df8a83544 LIB-11: update test (memberlist of create_group() can only have NON-OWN identities) 1 year ago
  heck 805c28a92f LIB-11: update test 1 year ago
  heck 1de257538d Tests: Framework - add identitylist_to_string() 1 year ago
  heck 030164dbe2 LIB-11: Update adapter_group.h from engine group.h 1 year ago
  heck 706e2d343d .gitignore 1 year ago
  heck 5555066c4b Tests: add test_group.cc 1 year ago
  heck c8590750c8 Tests: Framework - Add utils.cc with some *_to_string() funcs 1 year ago
  heck 0aa66aa543 Tests: compiler generated header prerequisites somehow not working 1 year ago
  heck b02fb84ecf Tests: lets use namespace pEp, but not more. (Its just a LOT easier to navigate especially for other people, plus the habit of just including every namespace everywhere does not scale, its messy). Use namespace aliases. 1 year ago
  heck 04b86758fa Tests: framework.hh - no using directives in headers.... 1 year ago
  heck b54f9d122b Build: Makefiles cleanup 1 year ago
  heck 07b4ee6e97 tests: create subdir "framework" 1 year ago
  heck e87cbc18dd move group module to src 1 year ago
  heck 69367324f9 adapter_group.cc - initial draft 1 year ago
  heck 91583a93fd minor formatting only (auto) 1 year ago
  heck f33262f152 LIB-11: use prefix "group_" for query functions / use prefix "adapter_" for "wrapped" Group management functions 1 year ago
  heck 8d6be151ad LIB-11: Add "Group management functions" from pEpEngine/group.h 1 year ago
  heck 28d80bf2b1 LIB-11: Add const to [in] params 1 year ago
  heck cbeb640237 LIB-11: Add group query API (1st draft) 1 year ago
  heck 768e02a6a4 Merge branch 'Release_2.1' 1 year ago
  heck c2e6504895 LIB-15 - update test (just add some output) 1 year ago
  heck 08a09d41e6 LIB-15 - "Need cache_decrypt_message() to pass back longmsg/longmsg_formatted" 1 year ago
  Thomas 1483087317 Adapt Windows build project to new file structure 1 year ago
  heck 3dd36d3c5e Merge branch 'master' into Release_2.1 1 year ago
  heck 1511498d82 Merge branch 'android-build' into Release_2.1 1 year ago
  Hussein Kasem 424cf17bf4
Android build: Update for 2.1.19+ 1 year ago
  heck 0517b9be69 Add Adapter::inject_sync_shutdown() to be used if _adapter_manages_sync_thread 1 year ago
  heck 2b41a6717e pEpLog - includes in headers are to be avoided if possible 1 year ago
  heck b9b67866c4 Merge branch 'Release_2.1' 1 year ago
  heck 9eb0b4c032 _inject_sync_event: undo the renaming for now. 1 year ago
  heck ba3f8d141d Merge branch 'master' into Release_2.1 1 year ago
  heck 9b4a3c7871 CI: DEPENDENCIES - libpEpAdapter does not specify engine version to be used. 1 year ago
  heck 35fda5286b Merge branch 'android-build' into Release_2.1 1 year ago
  Hussein Kasem 54875050e2
LIB-14 Android build: Always include android/log.h not just on debug 1 year ago
  heck 364bc2214d Tests: ensure GPL3.0 License Header 1 year ago
  Volker Birk 25379daed8 Merge branch 'master' of ssh://gitea.pep.foundation:23065/pEp.foundation/libpEpAdapter 1 year ago
  heck 9f342cef80 Tests: Be ::explicit about global namespace, dont include headers in headers (unnecessarily), be in the namespace pEp, not more 1 year ago
  heck 7cd8f9eaec Tests: Build: include project headers first, then prefix 1 year ago
  heck 9b2defe5fb LIB-13: YES, diff breaking cahnge, reformat tests. clang-format now or never! 1 year ago
  heck 1a14b1a205 Adapter.*: Add Sync/Async switchable Event execution. rework needed, higher level API, as a class. 1 year ago
  heck 6fe0f96ee7 Adapter.hxx: session needs to be re-initialized here. To make sure that the session of the main thread and the session ot the sync thread have the same messageToSend, _inject_sync_event, _ensure_passphrase callbacks registered 1 year ago
  heck 21e4496fd2 Adapter.hxx: add documentation 1 year ago
  heck a38ac80bf3 Adapter.hxx: be explicit about global namespace usage (pEpEngine) 1 year ago
  heck ca0d30c175 Merge branch 'LIB-13' - Define Coding Standards And Project Structure 1 year ago
  heck ef5bc0a7c0 LIB-13: Standard project layout (src dir added) 1 year ago
  heck 84eccb382a The max. C++ Standard to be used (pEp-wide) has now been raised to C++14 1 year ago
  heck 9d810df05e LIB-13: "Define Coding Standards And Project Structure" - Reformat (almost) the whole codebase using clang-format. 1 year ago
  heck cb1e95b469 LIB-13: Add Carefully crafted .clang-format 1 year ago
  heck 1270d1476e BUILD: use pEpEngine=Release_2.1.23 1 year ago
  heck c961f665d6 BUILD: use pEpEngine=Release_2.1.23 1 year ago
  heck 7344ab26eb BUILD: use pEpEngine=Release_2.1.22 1 year ago
  heck e69179229e BUILD: use pEpEngine=Release_2.1.21 1 year ago
  heck 8612056193 BUILD: use pEpEngine=Release_2.1.22 1 year ago
  heck 842c764e85 BUILD: use pEpEngine=Release_2.1.21 1 year ago
  heck dbc036a95d BUILD: use pEpEngine=Release_2.1.20 1 year ago
  heck e0371109df BUILD: use pEpEngine=Release_2.1.19 1 year ago
  heck 915632d3fa BUILD: use pEpEngine=Release_2.1.20 1 year ago
  heck 6d318e5685 BUILD: use pEpEngine=Release_2.1.19 1 year ago
79 changed files with 253071 additions and 1901 deletions
Split View
  1. +42
  2. +36
  3. +47
  4. +0
  5. +0
  6. +0
  7. +9
  8. +9
  9. +10
  10. +32
  11. +0
  12. +2
  13. +1
  14. +9
  15. +383
  16. +0
  17. +0
  18. +0
  19. +0
  20. +0
  21. +0
  22. +0
  23. +0
  24. +0
  25. +0
  26. +0
  27. +0
  28. +252
  29. +156
  30. +119
  31. +42
  32. +22
  33. +10
  34. +150
  35. +237
  36. +383
  37. +69
  38. +63
  39. +52
  40. +267
  41. +84
  42. +66
  43. +12264
  44. +367
  45. +68
  46. +200
  47. +128
  48. +163
  49. +70
  50. +39
  51. +13
  52. +8
  53. +234229
  54. +23
  55. +2
  56. +293
  57. +46
  58. +0
  59. +33
  60. +49
  61. +15
  62. +25
  63. +51
  64. +16
  65. +254
  66. +49
  67. +0
  68. +307
  69. +48
  70. +642
  71. +115
  72. +50
  73. +0
  74. +492
  75. +135
  76. +53
  77. +65
  78. +55
  79. +152

+ 42
- 0
.clang-format View File

@ -0,0 +1,42 @@
BasedOnStyle: LLVM
Language: Cpp
Standard: c++11
DerivePointerAlignment: true
SortIncludes: Never
ReflowComments: false
PointerAlignment: Left
AlignAfterOpenBracket: AlwaysBreak
AlignOperands: AlignAfterOperator
BreakConstructorInitializers: AfterColon
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
ExperimentalAutoDetectBinPacking: true
BreakBeforeBraces: Custom
AfterFunction: true
ColumnLimit: 100
AllowAllConstructorInitializersOnNextLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
PenaltyBreakBeforeFirstCallParameter: 0
PenaltyReturnTypeOnItsOwnLine: 1000000
PenaltyBreakAssignment: 1000000
PenaltyExcessCharacter: 10
IndentCaseLabels: true
IndentWidth: 4
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
SpaceAfterTemplateKeyword: false
AccessModifierOffset: -4
AllowShortBlocksOnASingleLine: Always
IndentPPDirectives: BeforeHash
Cpp11BracedListStyle: false
BreakStringLiterals: false

+ 36
- 0
.clang-tidy View File

@ -0,0 +1,36 @@
Checks: >

+ 47
- 22
.gitignore View File

@ -2,6 +2,7 @@
@ -15,25 +16,49 @@ build/

+ 0
- 154
Adapter.cc View File

@ -1,154 +0,0 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#include "Adapter.hh"
#include <sstream>
#include <iomanip>
#include <assert.h>
#include "status_to_string.hh"
#include "pEpLog.hh"
#include "passphrase_cache.hh"
using namespace std;
thread_local pEp::Adapter::Session pEp::Adapter::session;
namespace pEp {
void throw_status(PEP_STATUS status)
if (status == PEP_STATUS_OK)
if (status >= 0x400 && status <= 0x4ff)
if (status == PEP_OUT_OF_MEMORY)
throw bad_alloc();
if (status == PEP_ILLEGAL_VALUE)
throw invalid_argument("illegal value");
string _status = status_to_string(status);
throw RuntimeError(_status, status);
RuntimeError::RuntimeError(const std::string& _text, PEP_STATUS _status)
: std::runtime_error(_text.c_str()), text(_text), status(_status)
namespace Adapter {
messageToSend_t _messageToSend = nullptr;
notifyHandshake_t _notifyHandshake = nullptr;
std::thread _sync_thread;
::utility::locked_queue< SYNC_EVENT, ::free_Sync_event > sync_evt_q;
std::mutex m;
std::thread::id sync_thread_id()
return _sync_thread.get_id();
int _inject_sync_event(SYNC_EVENT ev, void *management)
try {
if (ev == nullptr) {
else {
catch (exception&) {
return 1;
return 0;
PEP_STATUS _ensure_passphrase(PEP_SESSION session, const char *fpr)
return passphrase_cache.ensure_passphrase(session, fpr);
// threshold: max waiting time in seconds
SYNC_EVENT _retrieve_next_sync_event(void *management, unsigned threshold)
SYNC_EVENT syncEvent = nullptr;
const bool success = sync_evt_q.try_pop_front(syncEvent, std::chrono::seconds(threshold));
if (!success) {
return new_sync_timeout_event();
return syncEvent;
bool on_sync_thread()
return _sync_thread.get_id() == this_thread::get_id();
PEP_SESSION Session::operator()(session_action action)
std::lock_guard<mutex> lock(m);
switch (action) {
case release:
if (_session.get()) {
_session = nullptr;
case init:
if (!_session.get()) {
PEP_SESSION session_;
status = ::init(&session_, _messageToSend, _inject_sync_event, _ensure_passphrase);
_session = SessionPtr{session_, ::release};
return _session.get();
void shutdown()
if (_sync_thread.joinable()) {
pEpLog("sync_is_running - injecting null event");
_inject_sync_event(nullptr, nullptr);
bool is_sync_running()
return _sync_thread.joinable();
bool in_shutdown()
try {
ev = sync_evt_q.back();
catch (std::underflow_error&) {
return false;
if (ev) {
return false;
} else {
return true;

+ 0
- 73
Adapter.hh View File

@ -1,73 +0,0 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#include <functional>
#include <string>
#include <thread>
#include <stdexcept>
#include <memory>
#include <pEp/sync_api.h>
namespace pEp {
// throws std::bad_alloc if status==PEP_OUT_OF_MEMORY,
// throws std::invalid_argument if status==PEP_ILLEGAL_VALUE,
// throws RuntimeError when 'status' represents another exceptional value.
void throw_status(PEP_STATUS status);
struct RuntimeError : std::runtime_error {
RuntimeError(const std::string& _text, PEP_STATUS _status);
std::string text;
PEP_STATUS status;
namespace Adapter {
int _inject_sync_event(SYNC_EVENT ev, void *management);
PEP_STATUS _ensure_passphrase(PEP_SESSION session, const char *fpr);
template<class T = void>
void startup(
messageToSend_t messageToSend,
notifyHandshake_t notifyHandshake,
T *obj = nullptr,
std::function< void (T *) > _startup = nullptr,
std::function< void (T *) > _shutdown = nullptr
// returns 'true' when called from the "sync" thread, 'false' otherwise.
bool on_sync_thread();
// returns the thread id of the sync thread
std::thread::id sync_thread_id();
enum session_action {
class Session {
using SessionPtr = std::unique_ptr<_pEpSession, std::function<void(PEP_SESSION)>>;
SessionPtr _session = nullptr;
PEP_SESSION operator()(session_action action = init);
extern thread_local Session session;
// injects a NULL event into sync_event_queue to denote sync thread to shutdown,
// and joins & removes the sync thread
void shutdown();
bool is_sync_running();
bool in_shutdown();
#include "Adapter.hxx"

+ 0
- 110
Adapter.hxx View File

@ -1,110 +0,0 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#include <thread>
#include "locked_queue.hh"
#include <cassert>
#include "pEpLog.hh"
#include <atomic>
namespace pEp {
namespace Adapter {
using std::function;
extern messageToSend_t _messageToSend;
extern notifyHandshake_t _notifyHandshake;
extern std::thread _sync_thread;
extern ::utility::locked_queue< SYNC_EVENT, ::free_Sync_event > sync_evt_q;
extern std::mutex m;
SYNC_EVENT _retrieve_next_sync_event(void *management, unsigned threshold);
static std::exception_ptr _ex;
static std::atomic_bool register_done{false};
template< class T >
void sync_thread(T *obj, function< void(T *) > _startup, function< void(T *) > _shutdown)
_ex = nullptr;
if (obj && _startup) {
pEpLog("creating session");
//TODO: Do we need to use a passphraseWrap here???
PEP_STATUS status = register_sync_callbacks(session(), nullptr,
_notifyHandshake, _retrieve_next_sync_event);
pEpLog("register_sync_callbacks() return:" << status);
try {
catch (...) {
_ex = std::current_exception();
pEpLog("sync protocol loop started");
do_sync_protocol(session(), (void *)obj);
pEpLog("sync protocol loop ended");
if (obj && _shutdown) {
template< class T >
void startup(
messageToSend_t messageToSend,
notifyHandshake_t notifyHandshake,
T *obj,
function< void(T *) > _startup,
function< void(T *) > _shutdown)
if (messageToSend) {
_messageToSend = messageToSend;
if (notifyHandshake) {
_notifyHandshake = notifyHandshake;
pEpLog("creating session");
if (!_sync_thread.joinable()) {
pEpLog("creating sync-thread");
_sync_thread = std::thread(sync_thread<T>, obj, _startup, _shutdown);
while (register_done.load() == false) {
pEpLog("waiting for sync-thread to init...");
if (_ex) {
pEpLog("exception pending, rethrowing");

+ 9
- 2

@ -1,5 +1,12 @@
# 1st Party Dependencies
## Prefer git tags instead of SHA hashes when possible.
# Change:
# libpEpAdapter does not specify any dependencies atm.
# libpEpAdapter is always being used as part of an adapter
# This adapter has to specify the pEpEngine version .e.g
# fdik: dep graph has to be taken from DEP file
# fdik: dependencies need to be resolved recursively from top to bottom
# fdik: stack then needs to be built from the bottom up

+ 9
- 32
Makefile View File

@ -3,45 +3,22 @@
# This file may be used under the terms of the GNU General Public License version 3
# see LICENSE.txt
include Makefile.conf
.PHONY: src test install uninstall clean
all: src
.PHONY: install uninstall clean
$(MAKE) -C src
SOURCE=$(wildcard *.cc)
HEADERS=$(wildcard *.hh *.hxx)
OBJECTS=$(subst .cc,.o,$(SOURCE))
DEPENDS=$(subst .cc,.d,$(SOURCE))
all: $(TARGET)
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPENDS)
lib: $(TARGET)
all: lib
test: lib
test: src
$(MAKE) -C test
$(AR) -rc $@ $^
rm -f *.d.*
$(MAKE) -C src clean
$(MAKE) -C test clean
install: $(TARGET)
mkdir -p $(PREFIX)/include/pEp
mkdir -p $(PREFIX)/lib
cp -v $(HEADERS) $(PREFIX)/include/pEp/
cp -v $(TARGET) $(PREFIX)/lib/
$(MAKE) -C src install
cd $(PREFIX)/include/pEp && rm -vf $(HEADERS)
cd $(PREFIX)/lib && rm -vf $(TARGET)
$(MAKE) -C src uninstall

+ 10
- 20
Makefile.conf View File

@ -1,21 +1,26 @@
# Copyright 2018, pEp Foundation
# This file is part of lib pEp Adapter
# This file is part of libpEpAdapter
# This file may be used under the terms of the GNU General Public License version 3
# see LICENSE.txt
HERE:=$(dir $(lastword $(MAKEFILE_LIST)))
# Build config
# Defaults
CXXFLAGS+=-std=c++11 -fPIC
# Build target
BUILD_FOR:=$(shell uname)
# Overrides
-include $(HERE)local.conf
# Constants
CXXFLAGS+=-std=c++11 -fPIC
ifneq (,$(findstring g++,$(CXX)))
@ -23,27 +28,12 @@ else ifneq (,$(findstring clang,$(CXX)))
######### Overrides #########
-include $(HERE)local.conf
ifeq ($(DEBUG),1)
# Add -L Prefixes to LIB/INC paths,
# if not already explicitly set in local.conf
ENGINE_TEST = \"$(HOME)/dev/pEpEngine/test\"

+ 32
- 0
README.md View File

@ -0,0 +1,32 @@
# libpEpAdapter
## Build Configuration
The build configuration file is called `local.conf`.
Use the file `local.conf.example` as a template.
cp local.conf.example local.conf
Then, tweak it to your needs.
## Make Targets
The default make target is `src`.
### Build
`make src` - Builds the complete library
### Test
`make test` - Builds all tests
### Install
`make install` - Installs the library into your $PREFIX
`make uninstall` - Uninstalls the library from your $PREFIX
### Clean
`make clean`

+ 0
- 53
Semaphore.hh View File

@ -1,53 +0,0 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#include <mutex>
#include <condition_variable>
#include <atomic>
namespace pEp {
class Semaphore {
std::mutex mtx;
std::condition_variable cv;
// Atomic types are types that encapsulate a value whose access is guaranteed
// to not cause data races and can be used to synchronize memory accesses among
// different threads.
// To synchronize threads, ALWAYS use <atomic> types
std::atomic_bool _stop;
Semaphore() : _stop(false) { }
void stop()
std::unique_lock<std::mutex> lock(mtx);
void try_wait()
std::unique_lock<std::mutex> lock(mtx);
if (!_stop.load()) {
while(_stop.load()) {
void go()
std::unique_lock<std::mutex> lock(mtx);

+ 2
- 2
build-android/jni/Android.mk View File

@ -18,14 +18,14 @@ LOCAL_CPPFLAGS += -std=c++14 -DANDROID_STL=c++_shared
STUB = $(shell sh $(LOCAL_PATH)/../takeOutHeaderFiles.sh $(LOCAL_PATH)/../../../pEpEngine/ $(LOCAL_PATH)/../../)
$(info $(STUB))
LIB_PEP_ADAPTER_INCLUDE_FILES := $(wildcard $(LOCAL_PATH)/../../*.h*)
LIB_PEP_ADAPTER_INCLUDE_FILES := $(wildcard $(LOCAL_PATH)/../../src/*.h*)
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../../pEpEngine/build-android/include \
LOCAL_SRC_FILES += $(wildcard $(LOCAL_PATH)/../../*.cc)
LOCAL_SRC_FILES += $(wildcard $(LOCAL_PATH)/../../src/*.cc)

+ 1
- 1
build-android/takeOutHeaderFiles.sh View File

@ -6,5 +6,5 @@ engine_dir="$1"
mkdir -p "$engine_dir/build-android/include/pEp"
cp $2/*.h* "$engine_dir/build-android/include/pEp"
cp $2/src/*.h* "$engine_dir/build-android/include/pEp"

+ 9
- 24
build-windows/libpEpAdapter.vcxproj View File

@ -58,8 +58,9 @@
@ -73,8 +74,9 @@
@ -86,30 +88,13 @@
<Text Include="ReadMe.txt" />
<ClCompile Include="..\Adapter.cc" />
<ClCompile Include="..\callback_dispatcher.cc" />
<ClCompile Include="..\call_with_lock.cc" />
<ClCompile Include="..\constant_time_algo.cc" />
<ClCompile Include="..\message_cache.cc" />
<ClCompile Include="..\passphrase_cache.cc" />
<ClCompile Include="..\pEpLog.cc" />
<ClCompile Include="..\slurp.cc" />
<ClCompile Include="..\status_to_string.cc" />
<ClCompile Include="..\src\*.cc" />
<ClCompile Include="..\..\pEpEngine\src\sqlite3.c" />
<ClInclude Include="..\Adapter.hh" />
<ClInclude Include="..\Adapter.hxx" />
<ClInclude Include="..\callback_dispatcher.hh" />
<ClInclude Include="..\constant_time_algo.hh" />
<ClInclude Include="..\locked_queue.hh" />
<ClInclude Include="..\message_cache.hh" />
<ClInclude Include="..\passphrase_cache.hh" />
<ClInclude Include="..\passphrase_cache.hxx" />
<ClInclude Include="..\pc_container.hh" />
<ClInclude Include="..\pEpLog.hh" />
<ClInclude Include="..\Semaphore.hh" />
<ClInclude Include="..\slurp.hh" />
<ClInclude Include="..\status_to_string.hh" />
<ClInclude Include="..\src\*.h" />
<ClInclude Include="..\src\*.hh" />
<ClInclude Include="..\src\*.hxx" />
<ProjectReference Include="..\..\pEpEngine\build-windows\pEpEngine.vcxproj">

+ 383
- 23
build-windows/libpEpAdapter.vcxproj.filters View File

@ -18,72 +18,432 @@
<Text Include="ReadMe.txt" />
<ClCompile Include="..\Adapter.cc">
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\status_to_string.cc">
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\call_with_lock.cc">
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\slurp.cc">
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\passphrase_cache.cc">
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\callback_dispatcher.cc">
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\message_cache.cc">
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\constant_time_algo.cc">
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\pEpLog.cc">
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>
<ClCompile Include="..\src\*.cc">
<Filter>Source Files</Filter>