Bug 1529726 [wpt PR 15414] - HTML: window.length and named access, a=testonly
[gecko.git] / mozglue / android / NSSBridge.h
blob8cfa47d6c7c18a981666bf130ddd5c3e6b6fcf08
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef NSSBridge_h
6 #define NSSBridge_h
8 #include "nss.h"
9 #include "pk11func.h"
10 #include "pk11sdr.h"
11 #include "seccomon.h"
12 #include "secitem.h"
13 #include "secmodt.h"
15 #include "prerror.h"
16 #include "plstr.h"
18 #include <jni.h>
20 int setup_nss_functions(void *nss_handle, void *nssutil_handle,
21 void *plc_handle);
23 #define NSS_WRAPPER(name, return_type, args...) \
24 typedef return_type (*name##_t)(args); \
25 extern name##_t f_##name;
27 NSS_WRAPPER(NSS_Initialize, SECStatus, const char *, const char *, const char *,
28 const char *, uint32_t)
29 NSS_WRAPPER(NSS_Shutdown, void, void)
30 NSS_WRAPPER(PK11SDR_Encrypt, SECStatus, SECItem *, SECItem *, SECItem *, void *)
31 NSS_WRAPPER(PK11SDR_Decrypt, SECStatus, SECItem *, SECItem *, void *)
32 NSS_WRAPPER(SECITEM_ZfreeItem, void, SECItem *, PRBool)
33 NSS_WRAPPER(PR_ErrorToString, char *, PRErrorCode, PRLanguageCode)
34 NSS_WRAPPER(PR_GetError, PRErrorCode, void)
35 NSS_WRAPPER(PR_Free, PRErrorCode, char *)
36 NSS_WRAPPER(PL_Base64Encode, char *, const char *, uint32_t, char *)
37 NSS_WRAPPER(PL_Base64Decode, char *, const char *, uint32_t, char *)
38 NSS_WRAPPER(PL_strfree, void, char *)
39 NSS_WRAPPER(PK11_GetInternalKeySlot, PK11SlotInfo *, void)
40 NSS_WRAPPER(PK11_NeedUserInit, PRBool, PK11SlotInfo *)
41 NSS_WRAPPER(PK11_InitPin, SECStatus, PK11SlotInfo *, const char *, const char *)
43 #endif /* NSS_h */