summaryrefslogtreecommitdiffstats
path: root/docs/nspr/reference/prdescidentity.rst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /docs/nspr/reference/prdescidentity.rst
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/nspr/reference/prdescidentity.rst')
-rw-r--r--docs/nspr/reference/prdescidentity.rst36
1 files changed, 36 insertions, 0 deletions
diff --git a/docs/nspr/reference/prdescidentity.rst b/docs/nspr/reference/prdescidentity.rst
new file mode 100644
index 0000000000..da900f37a7
--- /dev/null
+++ b/docs/nspr/reference/prdescidentity.rst
@@ -0,0 +1,36 @@
+PRDescIdentity
+==============
+
+The identity of a file descriptor's layer.
+
+
+Syntax
+------
+
+.. code::
+
+ #include <prio.h>
+
+ 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 implementer) 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.