Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef NSS_HELPER_
8 #define NSS_HELPER_
10 #include "nsIInterfaceRequestor.h"
11 #include "nsIInterfaceRequestorUtils.h"
12 #include "pk11func.h"
14 //
15 // Implementation of an nsIInterfaceRequestor for use
16 // as context for NSS calls
17 //
18 class PipUIContext : public nsIInterfaceRequestor
19 {
20 public:
21 NS_DECL_THREADSAFE_ISUPPORTS
22 NS_DECL_NSIINTERFACEREQUESTOR
24 PipUIContext();
25 virtual ~PipUIContext();
27 };
29 //
30 // Function to get the implementor for a certain set of NSS
31 // specific dialogs.
32 //
34 nsresult
35 getNSSDialogs(void **_result, REFNSIID aIID, const char *contract);
37 extern "C" {
38 // a "fake" unicode conversion function
39 PRBool
40 pip_ucs2_ascii_conversion_fn(PRBool toUnicode,
41 unsigned char *inBuf,
42 unsigned int inBufLen,
43 unsigned char *outBuf,
44 unsigned int maxOutBufLen,
45 unsigned int *outBufLen,
46 PRBool swapBytes);
47 }
49 //
50 // A function that sets the password on an unitialized slot.
51 //
52 nsresult
53 setPassword(PK11SlotInfo *slot, nsIInterfaceRequestor *ctx);
55 #endif