1/*
2 * font server extensions
3 */
4/*
5
6Copyright 1990, 1991, 1998  The Open Group
7
8Permission to use, copy, modify, distribute, and sell this software and its
9documentation for any purpose is hereby granted without fee, provided that
10the above copyright notice appear in all copies and that both that
11copyright notice and this permission notice appear in supporting
12documentation.
13
14The above copyright notice and this permission notice shall be included in
15all copies or substantial portions of the Software.
16
17THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
20OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
24Except as contained in this notice, the name of The Open Group shall not be
25used in advertising or otherwise to promote the sale, use or other dealings
26in this Software without prior written authorization from The Open Group.
27
28 * Copyright 1990, 1991 Network Computing Devices;
29 * Portions Copyright 1987 by Digital Equipment Corporation
30 *
31 * Permission to use, copy, modify, distribute, and sell this software and
32 * its documentation for any purpose is hereby granted without fee, provided
33 * that the above copyright notice appear in all copies and that both that
34 * copyright notice and this permission notice appear in supporting
35 * documentation, and that the names of Network Computing Devices, or Digital
36 * not be used in advertising or publicity pertaining to distribution
37 * of the software without specific, written prior permission.
38 *
39 * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH
40 * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
41 * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES,
42 * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
43 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
44 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
45 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
46 * THIS SOFTWARE.
47 */
48
49#include	"config.h"
50
51#include	<X11/fonts/FSproto.h>
52#include	"misc.h"
53#include	"clientstr.h"
54#include	"extentst.h"
55#include	"difs.h"
56#include	"dispatch.h"
57
58/*
59 * Provides the protocol handlers for the Query & List Extensions
60 * requests, which are effectively no-ops, as no extensions are
61 * implemented, and the extension framework has been removed.
62 * (See the git history in the unlikely event you need to create one.)
63 */
64
65int
66ProcQueryExtension(ClientPtr client)
67{
68    fsQueryExtensionReply reply = {
69        .type = FS_Reply,
70        .sequenceNumber = client->sequence,
71        .length = SIZEOF(fsQueryExtensionReply) >> 2,
72        .present = fsFalse,
73        .major_opcode = 0
74    };
75
76    REQUEST(fsQueryExtensionReq);
77
78    REQUEST_AT_LEAST_SIZE(fsQueryExtensionReq);
79
80    /* No defined extensions to query for, so always just return False */
81    WriteReplyToClient(client, SIZEOF(fsQueryExtensionReply), &reply);
82    return client->noClientException;
83}
84
85int
86ProcListExtensions(ClientPtr client)
87{
88    fsListExtensionsReply reply = {
89        .type = FS_Reply,
90        .nExtensions = 0,
91        .sequenceNumber = client->sequence,
92        .length = SIZEOF(fsListExtensionsReply) >> 2
93    };
94
95    REQUEST(fsListExtensionsReq);
96    REQUEST_SIZE_MATCH(fsListExtensionsReq);
97
98    /* No defined extensions, so always just return empty list */
99    WriteReplyToClient(client, SIZEOF(fsListExtensionsReply), &reply);
100    return client->noClientException;
101}
102