mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 08:35:26 +00:00
e368dc9c85
This patch was generated by a script. Here's the source of the script for future reference: function convert() { echo "Converting $1 to $2..." find . ! -wholename "*nsprpub*" \ ! -wholename "*security/nss*" \ ! -wholename "*/.hg*" \ ! -wholename "obj-ff-dbg*" \ ! -name nsXPCOMCID.h \ ! -name prtypes.h \ -type f \ \( -iname "*.cpp" \ -o -iname "*.h" \ -o -iname "*.c" \ -o -iname "*.cc" \ -o -iname "*.idl" \ -o -iname "*.ipdl" \ -o -iname "*.ipdlh" \ -o -iname "*.mm" \) | \ xargs -n 1 sed -i -e "s/\b$1\b/$2/g" } convert PRInt8 int8_t convert PRUint8 uint8_t convert PRInt16 int16_t convert PRUint16 uint16_t convert PRInt32 int32_t convert PRUint32 uint32_t convert PRInt64 int64_t convert PRUint64 uint64_t convert PRIntn int convert PRUintn unsigned convert PRSize size_t convert PROffset32 int32_t convert PROffset64 int64_t convert PRPtrdiff ptrdiff_t convert PRFloat64 double
54 lines
2.1 KiB
Plaintext
54 lines
2.1 KiB
Plaintext
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
[scriptable, uuid(3a5c7a0f-f5da-4a8b-a748-d7c5a528f33b)]
|
|
interface nsINSSErrorsService : nsISupports
|
|
{
|
|
/**
|
|
* @param aNSPRCode An error code obtained using PR_GetError()
|
|
* @return True if it is error code defined by the NSS library
|
|
*/
|
|
boolean isNSSErrorCode(in int32_t aNSPRCode);
|
|
|
|
/**
|
|
* Function will fail if aNSPRCode is not an NSS error code.
|
|
* @param aNSPRCode An error code obtained using PR_GetError()
|
|
* @return The result of the conversion, an XPCOM error code
|
|
*/
|
|
nsresult getXPCOMFromNSSError(in int32_t aNSPRCode);
|
|
|
|
/**
|
|
* Function will fail if aXPCOMErrorCode is not an NSS error code.
|
|
* @param aXPCOMErrorCode An error code obtain using getXPCOMFromNSSError
|
|
* return A localized human readable error explanation.
|
|
*/
|
|
AString getErrorMessage(in nsresult aXPCOMErrorCode);
|
|
|
|
/**
|
|
* Function will fail if aXPCOMErrorCode is not an NSS error code.
|
|
* @param aXPCOMErrorCode An error code obtain using getXPCOMFromNSSError
|
|
* return the
|
|
*/
|
|
uint32_t getErrorClass(in nsresult aXPCOMErrorCode);
|
|
|
|
const unsigned long ERROR_CLASS_SSL_PROTOCOL = 1;
|
|
const unsigned long ERROR_CLASS_BAD_CERT = 2;
|
|
|
|
/**
|
|
* The following values define the range of NSPR error codes used by NSS.
|
|
* NSS remains the authorative source for these numbers, as a result,
|
|
* the values might change in the future.
|
|
* The security module will perform a runtime check and assertion
|
|
* to ensure the values are in synch with NSS.
|
|
*/
|
|
const long NSS_SEC_ERROR_BASE = -(0x2000);
|
|
const long NSS_SEC_ERROR_LIMIT = (NSS_SEC_ERROR_BASE + 1000);
|
|
const long NSS_SSL_ERROR_BASE = -(0x3000);
|
|
const long NSS_SSL_ERROR_LIMIT = (NSS_SSL_ERROR_BASE + 1000);
|
|
};
|