Browse Source

include guards, replace #pragma once, make sure license headers, minor formatting

PYADPT-81
heck 1 year ago
parent
commit
47a0fb5cc1
9 changed files with 42 additions and 24 deletions
  1. +6
    -3
      src/pEp/native_pEp/basic_api.hh
  2. +5
    -3
      src/pEp/native_pEp/identity.hh
  3. +5
    -3
      src/pEp/native_pEp/message.hh
  4. +0
    -1
      src/pEp/native_pEp/message_api.cc
  5. +6
    -3
      src/pEp/native_pEp/message_api.hh
  6. +8
    -3
      src/pEp/native_pEp/pEpmodule.hh
  7. +5
    -3
      src/pEp/native_pEp/str_attr.hh
  8. +1
    -2
      src/pEp/native_pEp/user_interface.cc
  9. +6
    -3
      src/pEp/native_pEp/user_interface.hh

+ 6
- 3
src/pEp/native_pEp/basic_api.hh View File

@ -1,7 +1,8 @@
// This file is under GNU Affero General Public License 3.0
// see LICENSE.txt
#pragma once
#ifndef BASIC_API_HH
#define BASIC_API_HH
#include "pEpmodule.hh"
@ -23,5 +24,7 @@ string export_key(Identity ident);
string export_secret_key(Identity ident);
void set_own_key(Identity& ident, string fpr);
} // namespace PythonAdapter
} // namespace pEp {
} /* namespace PythonAdapter */
} /* namespace pEp */
#endif /* BASIC_API_HH */

+ 5
- 3
src/pEp/native_pEp/identity.hh View File

@ -1,7 +1,8 @@
// This file is under GNU Affero General Public License 3.0
// see LICENSE.txt
#pragma once
#ifndef IDENTITY_HH
#define IDENTITY_HH
// System
#include <boost/python.hpp>
@ -95,6 +96,7 @@ void identity_attr(pEp_identity *&ident, object value);
boost::python::list identitylist_attr(identity_list *&il);
void identitylist_attr(identity_list *&il, boost::python::list value);
} // namespace PythonAdapter
} // namespace pEp {
} /* namespace PythonAdapter */
} /* namespace pEp */
#endif /* IDENTITY_HH */

+ 5
- 3
src/pEp/native_pEp/message.hh View File

@ -1,7 +1,8 @@
// This file is under GNU Affero General Public License 3.0
// see LICENSE.txt
#pragma once
#ifndef MESSAGE_HH
#define MESSAGE_HH
// System
#include <string>
@ -147,6 +148,7 @@ public:
Message outgoing_message(Identity me);
Message incoming_message(string mime_text);
} // namespace PythonAdapter
} // namespace pEp {
} /* namespace PythonAdapter */
} /* namespace pEp */
#endif /* MESSAGE_HH */

+ 0
- 1
src/pEp/native_pEp/message_api.cc View File

@ -1,7 +1,6 @@
// This file is under GNU Affero General Public License 3.0
// see LICENSE.txt
// Engine
#include <pEp/pEpEngine.h>
#include <pEp/message_api.h>


+ 6
- 3
src/pEp/native_pEp/message_api.hh View File

@ -1,7 +1,8 @@
// This file is under GNU Affero General Public License 3.0
// see LICENSE.txt
#pragma once
#ifndef MESSAGE_API_HH
#define MESSAGE_API_HH
#include "pEpmodule.hh"
@ -20,5 +21,7 @@ PEP_color _color(int rating);
object sync_search(string name);
object distribution_search(string name);
} // namespace PythonAdapter
} // namespace pEp {
} /* namespace PythonAdapter */
} /* namespace pEp */
#endif /* MESSAGE_API_HH */

+ 8
- 3
src/pEp/native_pEp/pEpmodule.hh View File

@ -1,4 +1,8 @@
#pragma once
// This file is under GNU Affero General Public License 3.0
// see LICENSE.txt
#ifndef PEPMODULE_HH
#define PEPMODULE_HH
// Engine
#include <pEp/pEpEngine.h>
@ -18,6 +22,7 @@ void _throw_status(PEP_STATUS status);
PEP_STATUS _messageToSend(::message *msg);
PEP_STATUS notifyHandshake(pEp_identity *me, pEp_identity *partner, sync_handshake_signal signal);
} // namespace PythonAdapter
} // namespace pEp {
} /* namespace PythonAdapter */
} /* namespace pEp */
#endif /* PEPMODULE_HH */

+ 5
- 3
src/pEp/native_pEp/str_attr.hh View File

@ -1,7 +1,8 @@
// This file is under GNU Affero General Public License 3.0
// see LICENSE.txt
#pragma once
#ifndef STR_ATTR_HH
#define STR_ATTR_HH
// System
#include <string>
@ -36,6 +37,7 @@ void strdict_attr(stringpair_list_t *&spl, dict value);
stringlist_t *to_stringlist(boost::python::list l);
boost::python::list from_stringlist(const stringlist_t *sl);
} // namespace PythonAdapter
} // namespace pEp {
} /* namespace PythonAdapter */
} /* namespace pEp */
#endif /* STR_ATTR_HH */

+ 1
- 2
src/pEp/native_pEp/user_interface.cc View File

@ -59,8 +59,7 @@ PEP_STATUS UserInterface::_notifyHandshake(
void UserInterface::deliverHandshakeResult(int result, object identities)
{
identity_list *shared_identities = nullptr;
if (identities != boost::python::api::object() &&
boost::python::len(identities)) {
if (identities != boost::python::api::object() && boost::python::len(identities)) {
shared_identities = new_identity_list(nullptr);
if (!shared_identities)
throw bad_alloc();


+ 6
- 3
src/pEp/native_pEp/user_interface.hh View File

@ -1,7 +1,8 @@
// This file is under GNU Affero General Public License 3.0
// see LICENSE.txt
#pragma once
#ifndef USER_INTERFACE_HH
#define USER_INTERFACE_HH
// System
#include <csetjmp>
@ -52,6 +53,8 @@ public:
);
};
} // namespace PythonAdapter
} // namespace pEp {
} /* namespace PythonAdapter */
} /* namespace pEp */
#endif /* USER_INTERFACE_HH */

Loading…
Cancel
Save