Bug 1885489 - Part 9: Add SnapshotIterator::readObject(). r=iain
[gecko.git] / docs / nspr / reference / pr_getdesctype.rst
blob66cbf5839794754786c0252184dfc4f9e0add087
1 PR_GetDescType
2 ==============
4 Describes what type of file is referenced by a specified file
5 descriptor.
8 Syntax
9 ------
11 .. code::
13    #include <prio.h>
15    PRDescType PR_GetDescType(PRFileDesc *file);
18 Parameter
19 ~~~~~~~~~
21 The function has the following parameter:
23 ``file``
24    A pointer to a :ref:`PRFileDesc` object whose descriptor type is to be
25    returned.
28 Returns
29 ~~~~~~~
31 The function returns a ``PRDescType`` enumeration constant that
32 describes the type of file.
35 Description
36 -----------
38 The ``PRDescType`` enumeration is defined as follows:
40 .. code::
42    typedef enum PRDescType {
43      PR_DESC_FILE       = 1,
44      PR_DESC_SOCKET_TCP = 2,
45      PR_DESC_SOCKET_UDP = 3,
46      PR_DESC_LAYERED    = 4
47    } PRDescType;
49 The enumeration has the following enumerators:
51 ``PR_DESC_FILE``
52    The :ref:`PRFileDesc` object represents a normal file.
53 ``PR_DESC_SOCKET_TCP``
54    The :ref:`PRFileDesc` object represents a TCP socket.
55 ``PR_DESC_SOCKET_UDP``
56    The :ref:`PRFileDesc` object represents a UDP socket.
57 ``PR_DESC_LAYERED``
58    The :ref:`PRFileDesc` object is a layered file descriptor.