From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- docs/nspr/reference/prdescidentity.rst | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 docs/nspr/reference/prdescidentity.rst (limited to 'docs/nspr/reference/prdescidentity.rst') diff --git a/docs/nspr/reference/prdescidentity.rst b/docs/nspr/reference/prdescidentity.rst new file mode 100644 index 0000000000..9f9ad2767f --- /dev/null +++ b/docs/nspr/reference/prdescidentity.rst @@ -0,0 +1,36 @@ +PRDescIdentity +============== + +The identity of a file descriptor's layer. + + +Syntax +------ + +.. code:: + + #include + + typedef PRUintn PRDescIdentity; + + +Description +----------- + +File descriptors may be layered. Each layer has it own identity. +Identities are allocated by the runtime and are to be associated (by the +layer implementor) with all file descriptors of that layer. It is then +possible to scan the chain of layers and find a layer that one +recognizes, then predict that it will implement a desired protocol. + +There are three well-known identities: + + - :ref:`PR_INVALID_IO_LAYER`, an invalid layer identity, for error return + - :ref:`PR_TOP_IO_LAYER`, the identity of the top of the stack + - :ref:`PR_NSPR_IO_LAYER`, the identity used by NSPR proper + +Layers are created by :ref:`PR_GetUniqueIdentity`. A string may be +associated with a layer when the layer is created. The string is copied +by the runtime, and :ref:`PR_GetNameForIdentity` returns a reference to +that copy. There is no way to delete a layer's identity after the layer +is created. -- cgit v1.2.3