Browse Source

ALL FILES - replace #pragma once with standard include guards (and make sure license header)

pull/5/head
heck 1 year ago
parent
commit
c732f24c48
23 changed files with 110 additions and 19 deletions
  1. +4
    -1
      Adapter.hh
  2. +8
    -1
      Adapter.hxx
  3. +9
    -0
      Semaphore.hh
  4. +2
    -1
      call_with_lock.cc
  5. +5
    -4
      call_with_lock.hh
  6. +3
    -0
      callback_dispatcher.cc
  7. +6
    -1
      callback_dispatcher.hh
  8. +3
    -0
      constant_time_algo.cc
  9. +7
    -1
      constant_time_algo.hh
  10. +4
    -1
      locked_queue.hh
  11. +3
    -0
      message_cache.cc
  12. +6
    -1
      message_cache.hh
  13. +3
    -0
      pEpLog.cc
  14. +3
    -0
      pEpLog.hh
  15. +3
    -0
      passphrase_cache.cc
  16. +6
    -1
      passphrase_cache.hh
  17. +7
    -0
      passphrase_cache.hxx
  18. +4
    -2
      pc_container.hh
  19. +3
    -0
      slurp.cc
  20. +6
    -3
      slurp.hh
  21. +3
    -0
      status_to_string.cc
  22. +7
    -1
      status_to_string.hh
  23. +5
    -1
      test/framework.hh

+ 4
- 1
Adapter.hh View File

@ -1,7 +1,8 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#pragma once
#ifndef LIBPEPADAPTER_ADAPTER_HH
#define LIBPEPADAPTER_ADAPTER_HH
#include <functional>
#include <string>
@ -68,3 +69,5 @@ namespace pEp {
}
#include "Adapter.hxx"
#endif //LIBPEPADAPTER_ADAPTER_HH

+ 8
- 1
Adapter.hxx View File

@ -1,7 +1,8 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#pragma once
#ifndef LIBPEPADAPTER_ADAPTER_HXX
#define LIBPEPADAPTER_ADAPTER_HXX
#include <thread>
#include "locked_queue.hh"
@ -35,11 +36,15 @@ namespace pEp {
_startup(obj);
}
pEpLog("creating session");
session();
{
//TODO: Do we need to use a passphraseWrap here???
pEpLog("register_sync_callbacks()");
PEP_STATUS status = register_sync_callbacks(session(), nullptr,
_notifyHandshake, _retrieve_next_sync_event);
pEpLog("register_sync_callbacks() return:" << status);
try {
throw_status(status);
register_done.store(true);
@ -100,3 +105,5 @@ namespace pEp {
}
}
}
#endif //LIBPEPADAPTER_ADAPTER_HXX

+ 9
- 0
Semaphore.hh View File

@ -1,3 +1,9 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#ifndef LIBPEPADAPTER_SEMAPHORE_HH
#define LIBPEPADAPTER_SEMAPHORE_HH
#include <mutex>
#include <condition_variable>
@ -41,3 +47,6 @@ namespace pEp {
};
}
#endif // LIBPEPADAPTER_SEMAPHORE_HH

+ 2
- 1
call_with_lock.cc View File

@ -1,4 +1,5 @@
// this file is under GNU GPL 3.0, see LICENSE.txt
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#include "call_with_lock.hh"


+ 5
- 4
call_with_lock.hh View File

@ -1,7 +1,8 @@
// this file is under GNU GPL 3.0, see LICENSE.txt
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#ifndef PEP_CALL_WITH_LOCK_HH
#define PEP_CALL_WITH_LOCK_HH
#ifndef LIBPEPADAPTER_CALL_WITH_LOCK_HH
#define LIBPEPADAPTER_CALL_WITH_LOCK_HH
#include <mutex>
@ -22,4 +23,4 @@ namespace pEp
}
#endif // PEP_CALL_WITH_LOCK_HH
#endif // LIBPEPADAPTER_CALL_WITH_LOCK_HH

+ 3
- 0
callback_dispatcher.cc View File

@ -1,3 +1,6 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#include "callback_dispatcher.hh"
#include "passphrase_cache.hh"
#include <stdexcept>


+ 6
- 1
callback_dispatcher.hh View File

@ -1,4 +1,8 @@
#pragma once
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#ifndef LIBPEPADAPTER_CALLBACK_DISPATCHER_HH
#define LIBPEPADAPTER_CALLBACK_DISPATCHER_HH
#include <vector>
#include <functional>
@ -60,3 +64,4 @@ namespace pEp {
extern CallbackDispatcher callback_dispatcher;
}
#endif // LIBPEPADAPTER_CALLBACK_DISPATCHER_HH

+ 3
- 0
constant_time_algo.cc View File

@ -1,3 +1,6 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#include "constant_time_algo.hh"
namespace pEp


+ 7
- 1
constant_time_algo.hh View File

@ -1,4 +1,8 @@
#pragma once
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#ifndef LIBPEPADAPTER_CONSTANT_TIME_ALGO_HH
#define LIBPEPADAPTER_CONSTANT_TIME_ALGO_HH
#include <string>
@ -12,3 +16,5 @@ namespace pEp
bool constant_time_equal(const std::string& a, const std::string& b);
} // end of namespace pEp
#endif // LIBPEPADAPTER_CONSTANT_TIME_ALGO_HH

+ 4
- 1
locked_queue.hh View File

@ -1,7 +1,8 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#pragma once
#ifndef LIBPEPADAPTER_LOCKED_QUEUE_HH
#define LIBPEPADAPTER_LOCKED_QUEUE_HH
#include <deque>
#include <condition_variable>
@ -182,3 +183,5 @@ namespace utility
};
} // end of namespace utility
#endif // LIBPEPADAPTER_LOCKED_QUEUE_HH

+ 3
- 0
message_cache.cc View File

@ -1,3 +1,6 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#include "message_cache.hh"
#include <cassert>
#include <cstring>


+ 6
- 1
message_cache.hh View File

@ -1,4 +1,8 @@
#pragma once
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#ifndef LIBPEPADAPTER_MESSAGE_CACHE_HH
#define LIBPEPADAPTER_MESSAGE_CACHE_HH
#include <string>
#include <unordered_map>
@ -128,3 +132,4 @@ namespace pEp {
extern MessageCache message_cache;
};
#endif // LIBPEPADAPTER_MESSAGE_CACHE_HH

+ 3
- 0
pEpLog.cc View File

@ -1,3 +1,6 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#include "pEpLog.hh"
#include <iostream> // cout and cerr
#include <sstream> // for stringstream


+ 3
- 0
pEpLog.hh View File

@ -1,3 +1,6 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#ifndef LIBPEPADAPTER_PEPLOG_HH
#define LIBPEPADAPTER_PEPLOG_HH


+ 3
- 0
passphrase_cache.cc View File

@ -1,3 +1,6 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#include <cassert>
#include "Adapter.hh"
#include "passphrase_cache.hh"


+ 6
- 1
passphrase_cache.hh View File

@ -1,4 +1,8 @@
#pragma once
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#ifndef LIBPEPADAPTER_PASSPHRASE_CACHE_HH
#define LIBPEPADAPTER_PASSPHRASE_CACHE_HH
#include <list>
#include <string>
@ -85,3 +89,4 @@ namespace pEp {
#include "passphrase_cache.hxx"
#endif // LIBPEPADAPTER_PASSPHRASE_CACHE_HH

+ 7
- 0
passphrase_cache.hxx View File

@ -1,3 +1,9 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#ifndef LIBPEPADAPTER_PASSPHRASE_CACHE_HXX
#define LIBPEPADAPTER_PASSPHRASE_CACHE_HXX
#include "passphrase_cache.hh"
namespace pEp {
@ -20,3 +26,4 @@ namespace pEp {
}
};
#endif // LIBPEPADAPTER_PASSPHRASE_CACHE_HXX

+ 4
- 2
pc_container.hh View File

@ -1,9 +1,10 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#pragma once
#ifndef LIBPEPADAPTER_PC_CONTAINER_HH
#define LIBPEPADAPTER_PC_CONTAINER_HH
// Conainer adapter that contains a container and a producer/consume queue
// Container adapter that contains a container and a producer/consume queue
// that holds references to all changed elements
#include <functional>
@ -82,4 +83,5 @@ private:
};
} // end of namespace pEp
#endif // LIBPEPADAPTER_PC_CONTAINER_HH

+ 3
- 0
slurp.cc View File

@ -1,3 +1,6 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#include "slurp.hh"
#include <fstream>
#include <sstream>


+ 6
- 3
slurp.hh View File

@ -1,5 +1,8 @@
#ifndef PEP_LIB_SLURP_HH
#define PEP_LIB_SLURP_HH
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#ifndef LIBPEPADAPTER_LIB_SLURP_HH
#define LIBPEPADAPTER_LIB_SLURP_HH
#include <string>
@ -11,4 +14,4 @@ namespace pEp
} // end of namespace pEp
#endif // PEP_LIB_SLURP_HH
#endif // LIBPEPADAPTER_LIB_SLURP_HH

+ 3
- 0
status_to_string.cc View File

@ -1,3 +1,6 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#include "status_to_string.hh"
#include <sstream>


+ 7
- 1
status_to_string.hh View File

@ -1,4 +1,8 @@
#pragma once
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#ifndef LIBPEPADAPTER_STATUS_TO_STRING_HH
#define LIBPEPADAPTER_STATUS_TO_STRING_HH
#include <pEp/pEpEngine.h>
#include <pEp/status_to_string.h>
@ -11,3 +15,5 @@ namespace pEp
std::string status_to_string(PEP_STATUS status);
} // end of namespace pEp
#endif // LIBPEPADAPTER_STATUS_TO_STRING_HH

+ 5
- 1
test/framework.hh View File

@ -1,4 +1,7 @@
#pragma once
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#ifndef LIBPEPADAPTER_FRAMEWORK_HH
#define LIBPEPADAPTER_FRAMEWORK_HH
#include <string>
#include <vector>
@ -57,3 +60,4 @@ namespace pEp {
};
};
#endif // LIBPEPADAPTER_FRAMEWORK_HH

Loading…
Cancel
Save