Blame security/manager/ssl/nsNSSHelper.h

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