tldm-universe/Ardent/UV/gcidir/include/uvmsg.h
2024-09-09 17:51:08 -04:00

93 lines
2.7 KiB
C
Executable File

#ifndef h_uvmsg
#define h_uvmsg
/******************************************************************************
*
* Definition of tokens required by the MESSAGE verb routines
*
* Module %M% Version %I% Date %H%
*
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
* This is unpublished proprietary source code of Ardent Software Inc.
* The copyright notice above does not evidence any actual or intented
* publication of such source code.
*
*******************************************************************************
*
* Maintenence log - insert most recent change descriptions at top
*
* Date.... GTAR# WHO Description.........................................
* 10/14/98 23801 SAP Change copyrights.
* 02/23/98 22623 WSM Modified changes made for gtar 21801
* 01/26/98 21801 KAM Implemented WL's fix for NT
* 03/22/96 18187 GMM Module created.
*
*****************************************************************************/
/*
* define the contents of the message control array for each platform
*/
#ifdef MSWIN
struct msg_msgout {
char *uname; /* name of the user */
unsigned int userno; /* the users uniVerse user no */
int ok;
};
#else
#include UTMP_H
PRI_RW struct utmp buf;
#define TTYlen 6 + sizeof(buf.ut_line)
#define NAMlen 1 + sizeof(buf.ut_name)
struct msg_msgout {
char tty[TTYlen];
char nam[NAMlen];
int ok;
};
#endif
/*
* define increments for space allocation in the message array
*/
#define MSG_NUM_USER_INCRS 128
/*
* now define the set of user display tokens that can be specified
*/
#define MSG_STATE_ACCEPT 1
#define MSG_STATE_REJECT 2
#define MSG_USER_NORCV 3
#define MSG_USER_NAME 4
#define MSG_USER_SENT 5
#define MSG_USER_REFUSED 6
/*
* and now declare the routines
*/
#ifdef MSWIN
extern int msg_accept_state(char *tname);
extern void msg_build_userlist(struct msg_msgout **msgs, int *msg_count,
char **argv, int args_count, int *argok,
char *tname, int all_flg, int statusme_flg);
extern void msg_change_state(int msg_state);
extern int msg_create_mailslot(int slotid);
extern void msg_delete_mailslot(void);
extern void msg_display_user(struct msg_msgout msg_entry, int display_required);
extern int msg_operator_accept_state(char *operator, struct msg_msgout *msg_entry);
extern int msg_send_msg(struct msg_msgout msg_entry, STRING message);
#else
extern int msg_accept_state();
extern void msg_build_userlist();
extern void msg_change_state();
extern void msg_display_user();
extern int msg_operator_accept_state();
extern int msg_send_msg();
#endif
#endif