-/*
- * libZRTP SDK library, implements the ZRTP secure VoIP protocol.
- * Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
- * Contact: http://philzimmermann.com
- * For licensing and other legal details, see the file zrtp_legal.c.
- *
- * Viktor Krykun <v.krikun at zfoneproject.com>
- */
-
-#ifndef ZRTP_WIN_CONFIG_H__
-#define ZRTP_WIN_CONFIG_H__
-
+/*\r
+ * libZRTP SDK library, implements the ZRTP secure VoIP protocol.\r
+ * Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.\r
+ * Contact: http://philzimmermann.com\r
+ * For licensing and other legal details, see the file zrtp_legal.c.\r
+ * \r
+ * Viktor Krykun <v.krikun at zfoneproject.com> \r
+ */\r
+\r
+#ifndef ZRTP_WIN_CONFIG_H__\r
+#define ZRTP_WIN_CONFIG_H__\r
+\r
#define _CRT_SECURE_NO_WARNINGS 1\r
#pragma warning(disable: 4068)\r
-
-/*
- * Used to map system integer types to zrtp integer definitions.
- * Define to 1 if you have the <inttypes.h> header file.
- */
-#undef ZRTP_HAVE_INTTYPES_H
-
-#define ZRTP_HAVE_STRING_H 1
-
-/*
- * This header is needed for operations with binary file in deefault realization
- * of the secrets' cache. Can be eliminated if default cache isn't used.
- * Define to 1 if you have the <stdio.h> header file.
- */
-#ifndef ZRTP_HAVE_STDIO_H
-# define ZRTP_HAVE_STDIO_H 1
-#endif
-
-#ifndef ZRTP_HAVE_STDARG_H
-# define ZRTP_HAVE_STDARG_H 1
-#endif
-
-/*
- * Used by bnlib, but we don't need this on Windows platform.
- */
-#ifndef NO_ASSERT_H
- #define NO_ASSERT_H 1
-#endif
-
-/*
- * Used by bnlib. We have stdlib in any Windows platform - set it to 1.
- */
-#ifndef NO_STDLIB_H
- #define NO_STDLIB_H 0
-#endif
-
-
-#define ZRTP_HAVE_INT64_T 0
-#define ZRTP_HAVE_INT32_T 0
-#define ZRTP_HAVE_INT16_T 0
-#define ZRTP_HAVE_INT8_T 0
-
-#define ZRTP_HAVE_UINT64_T 0
-#define ZRTP_HAVE_UINT32_T 0
-#define ZRTP_HAVE_UINT16_T 0
-#define ZRTP_HAVE_UINT8_T 0
-
-#define SIZEOF_UNSIGNED_LONG 4
-#define SIZEOF_UNSIGNED_LONG_LONG 8
-
-#define ZRTP_INLINE static __inline
-
-#define ZRTP_VERSION "0.90"
-
-
-#endif /* ZRTP_WIN_CONFIG_H__ */
+\r
+#if !(defined(__BUILDMACHINE__) && __BUILDMACHINE__ == WinDDK)\r
+#include <Windows.h>\r
+#endif\r
+\r
+/*\r
+ * Used to map system integer types to zrtp integer definitions.\r
+ * Define to 1 if you have the <inttypes.h> header file.\r
+ */\r
+#undef ZRTP_HAVE_INTTYPES_H\r
+\r
+#define ZRTP_HAVE_STRING_H 1\r
+\r
+/*\r
+ * This header is needed for operations with binary file in deefault realization\r
+ * of the secrets' cache. Can be eliminated if default cache isn't used.\r
+ * Define to 1 if you have the <stdio.h> header file.\r
+ */\r
+#ifndef ZRTP_HAVE_STDIO_H\r
+# define ZRTP_HAVE_STDIO_H 1\r
+#endif\r
+\r
+#ifndef ZRTP_HAVE_STDARG_H\r
+# define ZRTP_HAVE_STDARG_H 1\r
+#endif\r
+\r
+/*\r
+ * Used by bnlib, but we don't need this on Windows platform.\r
+ */\r
+#ifndef NO_ASSERT_H\r
+ #define NO_ASSERT_H 1\r
+#endif\r
+\r
+/*\r
+ * Used by bnlib. We have stdlib in any Windows platform - set it to 1.\r
+ */\r
+#ifndef NO_STDLIB_H\r
+ #define NO_STDLIB_H 0\r
+#endif\r
+\r
+\r
+#define ZRTP_HAVE_INT64_T 0\r
+#define ZRTP_HAVE_INT32_T 0\r
+#define ZRTP_HAVE_INT16_T 0\r
+#define ZRTP_HAVE_INT8_T 0\r
+\r
+#define ZRTP_HAVE_UINT64_T 0\r
+#define ZRTP_HAVE_UINT32_T 0\r
+#define ZRTP_HAVE_UINT16_T 0\r
+#define ZRTP_HAVE_UINT8_T 0\r
+\r
+#define SIZEOF_UNSIGNED_LONG 4\r
+#define SIZEOF_UNSIGNED_LONG_LONG 8\r
+\r
+#define ZRTP_INLINE static __inline\r
+\r
+#define ZRTP_VERSION "0.90"\r
+\r
+\r
+#endif /* ZRTP_WIN_CONFIG_H__ */\r
#include "zrtp_error.h"
#include "zrtp_iface.h"
-#if defined(ZRTP_USE_BUILTIN_CACHE) && (ZRTP_USE_BUILTIN_CACHE == 1)
-
#if defined(__cplusplus)
extern "C"
{
#endif
+#if defined(ZRTP_USE_BUILTIN_CACHE) && (ZRTP_USE_BUILTIN_CACHE == 1)
+
#define ZRTP_DEF_CACHE_VERSION_STR "libZRTP cache version="
#define ZRTP_DEF_CACHE_VERSION_VAL "1.0"
mlist_t _mlist;
} zrtp_cache_elem_t;
-
+#endif /* ZRTP_USE_BUILTIN_CACHE */
+
zrtp_status_t zrtp_def_cache_init(zrtp_global_t* zrtp);
void zrtp_def_cache_down();
const zrtp_stringn_t* another_zid,
uint32_t* counter);
+#if defined(ZRTP_USE_BUILTIN_CACHE) && (ZRTP_USE_BUILTIN_CACHE == 1)
/**
* @brief Cache iterator
* zrtp_def_cache_foreach() calls this function for every cache entry.
int is_mitm,
zrtp_cache_callback_t callback,
void *data);
+
+#endif /* ZRTP_USE_BUILTIN_CACHE */
/**
* @brief Store shared secrets cache to the persistent storage
const zrtp_stringn_t* another_zid,
const zrtp_stringn_t* name);
+#if defined(ZRTP_USE_BUILTIN_CACHE) && (ZRTP_USE_BUILTIN_CACHE == 1)
zrtp_cache_elem_t* zrtp_def_cache_get2(const zrtp_cache_id_t id, int is_mitm);
-
+#endif /* ZRTP_USE_BUILTIN_CACHE */
#if defined(__cplusplus)
}
#endif
-#endif /* ZRTP_USE_BUILTIN_CACHE */
-
#endif /*__ZRTP_IFACE_CACHE_H__*/