replace #pragma once with include guards

ENGINE-872
Sofia Balicka 2 years ago
parent a7e4a55a6d
commit fe9a6cb363

@ -12,7 +12,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef AUX_MIME_MSG_H
#define AUX_MIME_MSG_H
#ifdef ENIGMAIL_MAY_USE_THIS
@ -182,3 +183,5 @@ DYNAMIC_API PEP_STATUS MIME_decrypt_message(
#endif
#endif
#endif

@ -6,7 +6,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef BASE64_H
#define BASE64_H
#include "dynamic_api.h"
#include "bloblist.h"
@ -31,3 +32,5 @@ bloblist_t* base64_str_to_binary_blob(const char* input, int length);
#ifdef __cplusplus
}
#endif
#endif

@ -7,7 +7,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef BASEPROTOCOL_H
#define BASEPROTOCOL_H
#include "message.h"
@ -174,3 +175,4 @@ PEP_STATUS try_base_prepare_message(
}
#endif
#endif

@ -13,7 +13,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef BLACKLIST_H
#define BLACKLIST_H
#include "pEpEngine.h"
@ -103,3 +104,4 @@ DYNAMIC_API PEP_STATUS blacklist_retrieve(
}
#endif
#endif

@ -5,7 +5,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef BLOBLIST_H
#define BLOBLIST_H
#include <stddef.h>
@ -188,3 +189,5 @@ DYNAMIC_API bloblist_t* bloblist_join(bloblist_t* first, bloblist_t* second);
#ifdef __cplusplus
}
#endif
#endif

@ -5,7 +5,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef CRYPTOTECH_H
#define CRYPTOTECH_H
#include "pEpEngine.h"
#include "bloblist.h"
@ -279,3 +280,5 @@ PEP_STATUS init_cryptotech(PEP_SESSION session, bool in_first);
*
*/
void release_cryptotech(PEP_SESSION session, bool out_last);
#endif

@ -4,7 +4,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef DYNAMIC_API_H
#define DYNAMIC_API_H
#ifdef WIN32
#ifdef _EXPORT_PEP_ENGINE_DLL
@ -16,3 +17,5 @@
#define DYNAMIC_API
#endif
#endif

@ -4,7 +4,9 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef EMAIL_H
#define EMAIL_H
#include "transport.h"
@ -30,3 +32,5 @@ PEP_STATUS email_sendto(PEP_SESSION session, const message *msg);
*
*/
PEP_STATUS email_readnext(PEP_SESSION session, message **msg, PEP_transport_t **via);
#endif

@ -4,7 +4,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef ETPAN_MIME_H
#define ETPAN_MIME_H
#define _EXPORT_PEP_ENGINE_DLL
@ -314,3 +315,6 @@ int _get_content_type(
char **type,
char **charset
);
#endif

@ -6,7 +6,9 @@
* @author Volker Birk
*/
#pragma once
#ifndef FSM_COMMON_H
#define FSM_COMMON_H
#ifdef __cplusplus
extern "C" {
@ -51,3 +53,4 @@ enum {
}
#endif
#endif

@ -5,8 +5,9 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef GROWING_BUF_H
#define GROWING_BUF_H
#include "pEpEngine.h"
@ -75,3 +76,5 @@ int growing_buf_consume(const void *src, size_t size, growing_buf_t *dst);
}
#endif
#endif

@ -4,7 +4,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef IDENTITY_LIST_H
#define IDENTITY_LIST_H
#include "pEpEngine.h"
@ -120,3 +121,5 @@ PEP_STATUS set_all_userids_in_list(identity_list* id_list, const char* user_id);
#ifdef __cplusplus
}
#endif
#endif

@ -4,7 +4,9 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef INTERNAL_FORMAT_H
#define INTERNAL_FORMAT_H
#include "message.h"
#include "cryptotech.h"
@ -74,3 +76,5 @@ DYNAMIC_API PEP_STATUS decode_internal(
#ifdef __cplusplus
}
#endif
#endif

@ -5,7 +5,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef KEY_RESET_H
#define KEY_RESET_H
#include "pEpEngine.h"
#include "keymanagement.h"
@ -271,3 +272,5 @@ PEP_STATUS PER_to_key_reset_commands(const char *cmds, size_t size, keyreset_com
#ifdef __cplusplus
}
#endif
#endif

@ -4,7 +4,9 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef KEYMANAGEMENT_H
#define KEYMANAGEMENT_H
#include "pEpEngine.h"
@ -576,3 +578,5 @@ PEP_STATUS get_valid_pubkey(PEP_SESSION session,
#ifdef __cplusplus
}
#endif
#endif

@ -4,7 +4,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef KEYRESET_COMMAND_H
#define KEYRESET_COMMAND_H
#include "dynamic_api.h"
#include "pEpEngine.h"
@ -192,3 +193,5 @@ DYNAMIC_API void free_keyreset_command_list(keyreset_command_list * command_list
}
#endif
#endif

@ -4,7 +4,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef LABELED_INT_LIST_H
#define LABELED_INT_LIST_H
#include "dynamic_api.h"
#include "stringpair.h"
@ -72,3 +73,5 @@ DYNAMIC_API int labeled_int_list_length(const labeled_int_list_t *labeled_int_li
#ifdef __cplusplus
}
#endif
#endif

@ -4,7 +4,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef MAP_ASN1_H
#define MAP_ASN1_H
#include "pEpEngine.h"
#include "identity_list.h"
@ -95,3 +96,5 @@ identity_list *IdentityList_to_identity_list(IdentityList_t *list, identity_list
#ifdef __cplusplus
}
#endif
#endif

@ -6,7 +6,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef MESSAGE_H
#define MESSAGE_H
#include <time.h>
@ -235,3 +236,5 @@ DYNAMIC_API message_ref_list *message_ref_list_add(message_ref_list *msg_list,
#ifdef __cplusplus
}
#endif
#endif

@ -5,7 +5,8 @@
*/
#pragma once
#ifndef MESSAGE_API_H
#define MESSAGE_API_H
#include "pEpEngine.h"
#include "keymanagement.h"
@ -712,3 +713,5 @@ DYNAMIC_API PEP_STATUS probe_encrypt(PEP_SESSION session, const char *fpr);
#ifdef __cplusplus
}
#endif
#endif

@ -5,7 +5,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef MIME_H
#define MIME_H
#include "message.h"
@ -111,3 +112,5 @@ DYNAMIC_API PEP_STATUS mime_decode_message(
#ifdef __cplusplus
}
#endif
#endif

@ -5,7 +5,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef OPENPGP_COMPAT_H
#define OPENPGP_COMPAT_H
#ifdef __cplusplus
extern "C" {
@ -43,3 +44,5 @@ DYNAMIC_API PEP_STATUS OpenPGP_list_keyinfo (
#ifdef __cplusplus
}
#endif
#endif

@ -4,7 +4,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef PEP_ENGINE_H
#define PEP_ENGINE_H
#ifdef __cplusplus
extern "C" {
@ -2266,3 +2267,4 @@ PEP_STATUS has_partner_contacted_address(PEP_SESSION session, const char* partne
#ifdef __cplusplus
}
#endif
#endif

@ -6,6 +6,9 @@
// maximum attachment size to import as key 25MB, maximum of 20 attachments
#ifndef PEP_INTERNAL_H
#define PEP_INTERNAL_H
#define MAX_KEY_SIZE (25 * 1024 * 1024)
#define MAX_KEYS_TO_IMPORT 20
@ -760,3 +763,5 @@ static inline int Sqlite3_step(sqlite3_stmt* stmt)
} while (rc == SQLITE_BUSY || rc == SQLITE_LOCKED);
return rc;
}
#endif

@ -4,7 +4,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef PeP_STRING_H
#define PeP_STRING_H
#include <string.h>
#include "dynamic_api.h"
@ -66,3 +67,4 @@ DYNAMIC_API char * string_dup(const char *src, size_t len);
}
#endif
#endif

@ -13,7 +13,8 @@
* @todo tidy up tabs
*/
#pragma once
#ifndef PGP_SEQUOIA_H
#define PGP_SEQUOIA_H
#include "pEpEngine.h"
@ -423,3 +424,5 @@ PEP_STATUS pgp_config_cipher_suite(PEP_SESSION session,
PEP_CIPHER_SUITE suite);
#define PGP_BINARY_PATH pgp_binary
#endif

@ -4,6 +4,9 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef PGP_SEQUOIA_INTERNAL_H
#define PGP_SEQUOIA_INTERNAL_H
#include <sequoia/openpgp.h>
#endif

@ -4,7 +4,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef PLATFORM_H
#define PLATFORM_H
#ifdef __cplusplus
extern "C" {
@ -19,3 +20,5 @@ extern "C" {
#ifdef __cplusplus
}
#endif
#endif

@ -4,6 +4,9 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#ifndef PLATFORM_UNIX_H
#define PLATFORM_UNIX_H
#ifndef __APPLE__
#define _POSIX_C_SOURCE 200809L
#endif
@ -152,3 +155,4 @@ typedef uuid_t pEpUUID;
#ifdef __cplusplus
}
#endif
#endif

@ -4,7 +4,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef PLATFORM_WINDOWS_H
#define PLATFORM_WINDOWS_H
// Windows platform specifica
@ -275,3 +276,5 @@ void uuid_unparse_upper(pEpUUID uu, uuid_string_t out);
#ifdef __cplusplus
}
#endif
#endif

@ -4,7 +4,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef RESOURCE_ID_H
#define RESOURCE_ID_H
/* structs to contain info about parsed resource ids (filenames, uids) */
/**
@ -104,3 +105,5 @@ bool is_file_uri(char* str);
*
*/
bool is_cid_uri(const char* str);
#endif

@ -4,6 +4,10 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
* @todo generate this file
*/
#ifndef STATUS_TO_STRING_H
#define STATUS_TO_STRING_H
#ifdef __cplusplus
extern "C" {
#endif
@ -178,3 +182,4 @@ static inline const char *pEp_comm_type_to_string(PEP_comm_type ct) {
#ifdef __cplusplus
} // "C"
#endif
#endif

@ -4,7 +4,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef STRINGLIST_H
#define STRINGLIST_H
#include "dynamic_api.h"
@ -211,3 +212,5 @@ void dedup_stringlist(stringlist_t* stringlist);
#ifdef __cplusplus
}
#endif
#endif

@ -4,7 +4,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef STRINGPAIR_H
#define STRINGPAIR_H
#include "dynamic_api.h"
@ -227,3 +228,5 @@ DYNAMIC_API stringpair_list_t *stringpair_list_delete_by_key(
#ifdef __cplusplus
}
#endif
#endif

@ -4,7 +4,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef SYNC_API_H
#define SYNC_API_H
#include "message.h"
@ -308,3 +309,5 @@ DYNAMIC_API PEP_STATUS disable_identity_for_sync(PEP_SESSION session,
#ifdef __cplusplus
}
#endif
#endif

@ -4,7 +4,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef TIMESTAMP_H
#define TIMESTAMP_H
#include <time.h>
#include "dynamic_api.h"
@ -93,3 +94,4 @@ DYNAMIC_API timestamp * timestamp_dup(const timestamp *src);
}
#endif
#endif

@ -4,7 +4,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef TRANS_AUTO_H
#define TRANS_AUTO_H
#include "transport.h"
@ -20,3 +21,5 @@ PEP_STATUS auto_sendto(PEP_SESSION session, const message *msg);
*
*/
PEP_STATUS auto_readnext(PEP_SESSION session, message **msg, PEP_transport_t **via);
#endif

@ -4,7 +4,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef TRANSPORT_H
#define TRANSPORT_H
#include "pEpEngine.h"
#include "message.h"
@ -59,3 +60,4 @@ typedef uint64_t transports_mask;
}
#endif
#endif

@ -4,7 +4,8 @@
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef WRAPPERS_H
#define WRAPPERS_H
#include "platform.h"
@ -260,3 +261,5 @@ static inline int Close(int fildes)
return r;
}
#endif

@ -26,8 +26,9 @@ tstylesheet {
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef «yml:ucase(@name)»_CODEC_H
#define «yml:ucase(@name)»_CODEC_H
#include "pEpEngine.h"
@ -116,6 +117,7 @@ tstylesheet {
#ifdef __cplusplus
}
#endif
#endif
||
document "generated/{yml:lcase(@name)}_codec.c", "text"

@ -30,7 +30,8 @@ template "protocol", mode=header
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef «yml:ucase(@name)»_FUNC_H
#define «yml:ucase(@name)»_FUNC_H
#ifdef __cplusplus
extern "C" {
@ -172,6 +173,7 @@ PEP_STATUS update_«@name»_message(PEP_SESSION session, «@name»_t *msg);
#ifdef __cplusplus
}
#endif
#endif
||

@ -24,7 +24,8 @@ tstylesheet {
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef «yml:ucase(@name)»_EVENT_H
#define «yml:ucase(@name)»_EVENT_H
#include "pEpEngine.h"
@ -88,6 +89,7 @@ tstylesheet {
#ifdef __cplusplus
}
#endif
#endif
||
@ -156,7 +158,8 @@ tstylesheet {
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef «yml:ucase(@name)»_IMPL_H
#define «yml:ucase(@name)»_IMPL_H
#include "fsm_common.h"
#include "«@name»_event.h"
@ -330,6 +333,7 @@ tstylesheet {
#ifdef __cplusplus
}
#endif
#endif
||
}
@ -1376,7 +1380,8 @@ tstylesheet {
* @license GNU General Public License 3.0 - see LICENSE.txt
*/
#pragma once
#ifndef «yml:ucase(@name)»_FSM_H
#define «yml:ucase(@name)»_FSM_H
#include "«../@name»_impl.h"
@ -1474,6 +1479,7 @@ tstylesheet {
#ifdef __cplusplus
}
#endif
#endif
||
}
@ -1752,3 +1758,4 @@ tstylesheet {
| }
}
}

@ -1,4 +1,5 @@
#pragma once
#ifndef LOCKED_QUEUE_H
#define LOCKED_QUEUE_H
#include <list>
#include <mutex>
@ -59,3 +60,5 @@ namespace utility
}
};
}
#endif

Loading…
Cancel
Save