michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef NSS_HELPER_ michael@0: #define NSS_HELPER_ michael@0: michael@0: #include "nsIInterfaceRequestor.h" michael@0: #include "nsIInterfaceRequestorUtils.h" michael@0: #include "pk11func.h" michael@0: michael@0: // michael@0: // Implementation of an nsIInterfaceRequestor for use michael@0: // as context for NSS calls michael@0: // michael@0: class PipUIContext : public nsIInterfaceRequestor michael@0: { michael@0: public: michael@0: NS_DECL_THREADSAFE_ISUPPORTS michael@0: NS_DECL_NSIINTERFACEREQUESTOR michael@0: michael@0: PipUIContext(); michael@0: virtual ~PipUIContext(); michael@0: michael@0: }; michael@0: michael@0: // michael@0: // Function to get the implementor for a certain set of NSS michael@0: // specific dialogs. michael@0: // michael@0: michael@0: nsresult michael@0: getNSSDialogs(void **_result, REFNSIID aIID, const char *contract); michael@0: michael@0: extern "C" { michael@0: // a "fake" unicode conversion function michael@0: PRBool michael@0: pip_ucs2_ascii_conversion_fn(PRBool toUnicode, michael@0: unsigned char *inBuf, michael@0: unsigned int inBufLen, michael@0: unsigned char *outBuf, michael@0: unsigned int maxOutBufLen, michael@0: unsigned int *outBufLen, michael@0: PRBool swapBytes); michael@0: } michael@0: michael@0: // michael@0: // A function that sets the password on an unitialized slot. michael@0: // michael@0: nsresult michael@0: setPassword(PK11SlotInfo *slot, nsIInterfaceRequestor *ctx); michael@0: michael@0: #endif michael@0: