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