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

PYADPT-81
heck 3 years ago
parent 1cf31e4687
commit 47a0fb5cc1

@ -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 */

@ -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 */

@ -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 */

@ -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>

@ -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 */

@ -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 */

@ -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 */

@ -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();

@ -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