annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/X11/ICE/ICEutil.h @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 /******************************************************************************
jpayne@69 2
jpayne@69 3
jpayne@69 4 Copyright 1993, 1998 The Open Group
jpayne@69 5
jpayne@69 6 Permission to use, copy, modify, distribute, and sell this software and its
jpayne@69 7 documentation for any purpose is hereby granted without fee, provided that
jpayne@69 8 the above copyright notice appear in all copies and that both that
jpayne@69 9 copyright notice and this permission notice appear in supporting
jpayne@69 10 documentation.
jpayne@69 11
jpayne@69 12 The above copyright notice and this permission notice shall be included in
jpayne@69 13 all copies or substantial portions of the Software.
jpayne@69 14
jpayne@69 15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
jpayne@69 16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
jpayne@69 17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
jpayne@69 18 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
jpayne@69 19 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
jpayne@69 20 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
jpayne@69 21
jpayne@69 22 Except as contained in this notice, the name of The Open Group shall not be
jpayne@69 23 used in advertising or otherwise to promote the sale, use or other dealings
jpayne@69 24 in this Software without prior written authorization from The Open Group.
jpayne@69 25
jpayne@69 26 Author: Ralph Mor, X Consortium
jpayne@69 27 ******************************************************************************/
jpayne@69 28
jpayne@69 29 #ifndef _ICEUTIL_H_
jpayne@69 30 #define _ICEUTIL_H_
jpayne@69 31
jpayne@69 32 #include <X11/Xfuncproto.h>
jpayne@69 33
jpayne@69 34 #include <stdio.h>
jpayne@69 35
jpayne@69 36 _XFUNCPROTOBEGIN
jpayne@69 37
jpayne@69 38 /*
jpayne@69 39 * Data structure for entry in ICE authority file
jpayne@69 40 */
jpayne@69 41
jpayne@69 42 typedef struct {
jpayne@69 43 char *protocol_name;
jpayne@69 44 unsigned short protocol_data_length;
jpayne@69 45 char *protocol_data;
jpayne@69 46 char *network_id;
jpayne@69 47 char *auth_name;
jpayne@69 48 unsigned short auth_data_length;
jpayne@69 49 char *auth_data;
jpayne@69 50 } IceAuthFileEntry;
jpayne@69 51
jpayne@69 52
jpayne@69 53 /*
jpayne@69 54 * Authentication data maintained in memory.
jpayne@69 55 */
jpayne@69 56
jpayne@69 57 typedef struct {
jpayne@69 58 char *protocol_name;
jpayne@69 59 char *network_id;
jpayne@69 60 char *auth_name;
jpayne@69 61 unsigned short auth_data_length;
jpayne@69 62 char *auth_data;
jpayne@69 63 } IceAuthDataEntry;
jpayne@69 64
jpayne@69 65
jpayne@69 66 /*
jpayne@69 67 * Return values from IceLockAuthFile
jpayne@69 68 */
jpayne@69 69
jpayne@69 70 #define IceAuthLockSuccess 0 /* lock succeeded */
jpayne@69 71 #define IceAuthLockError 1 /* lock unexpectedly failed, check errno */
jpayne@69 72 #define IceAuthLockTimeout 2 /* lock failed, timeouts expired */
jpayne@69 73
jpayne@69 74
jpayne@69 75 /*
jpayne@69 76 * Function Prototypes
jpayne@69 77 */
jpayne@69 78
jpayne@69 79 extern char *IceAuthFileName (
jpayne@69 80 void
jpayne@69 81 );
jpayne@69 82
jpayne@69 83 extern int IceLockAuthFile (
jpayne@69 84 const char * /* file_name */,
jpayne@69 85 int /* retries */,
jpayne@69 86 int /* timeout */,
jpayne@69 87 long /* dead */
jpayne@69 88 );
jpayne@69 89
jpayne@69 90 extern void IceUnlockAuthFile (
jpayne@69 91 const char * /* file_name */
jpayne@69 92 );
jpayne@69 93
jpayne@69 94 extern IceAuthFileEntry *IceReadAuthFileEntry (
jpayne@69 95 FILE * /* auth_file */
jpayne@69 96 );
jpayne@69 97
jpayne@69 98 extern void IceFreeAuthFileEntry (
jpayne@69 99 IceAuthFileEntry * /* auth */
jpayne@69 100 );
jpayne@69 101
jpayne@69 102 extern Status IceWriteAuthFileEntry (
jpayne@69 103 FILE * /* auth_file */,
jpayne@69 104 IceAuthFileEntry * /* auth */
jpayne@69 105 );
jpayne@69 106
jpayne@69 107 extern IceAuthFileEntry *IceGetAuthFileEntry (
jpayne@69 108 const char * /* protocol_name */,
jpayne@69 109 const char * /* network_id */,
jpayne@69 110 const char * /* auth_name */
jpayne@69 111 );
jpayne@69 112
jpayne@69 113 extern char *IceGenerateMagicCookie (
jpayne@69 114 int /* len */
jpayne@69 115 );
jpayne@69 116
jpayne@69 117 extern void IceSetPaAuthData (
jpayne@69 118 int /* numEntries */,
jpayne@69 119 IceAuthDataEntry * /* entries */
jpayne@69 120 );
jpayne@69 121
jpayne@69 122 _XFUNCPROTOEND
jpayne@69 123
jpayne@69 124 #endif /* _ICEUTIL_H_ */