COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

	Copyright (c) GeoWorks 1992 -- All Rights Reserved

PROJECT:	PC GEOS
FILE:		emaillst.def

AUTHOR:		Ning Zhao, Nov 16, 1992

REVISION HISTORY:
	Name	Date		Description
	----	----		-----------
	NZ	11/16/92   	Initial revision


DESCRIPTION:
	This file is created partially for E-mail and Email-Admin to share
	code to create certain lists. But some common lists function can be
	used by all.	

	$Id: emaillst.def,v 1.1 97/04/04 14:25:33 newdeal Exp $

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@

SetDef __LISTS

StartLibrary	emaillst



; !!!!!!!!!!!!!!!!!!!!!!
; Some stuff to be taken out after we discard the netdir.tab file
;



;------------------------------------------------------------------------------
;definition for Record type
;


EntryType       etype byte

ET_HDR          enum EntryType, 0               ;host setup
ET_NAME         enum EntryType, 2               ;name of user at this host
ET_ALIAS        enum EntryType, 3               ;address book entry
ET_HOST         enum EntryType, 4               ;host, wrokgroup or gateway nam
ET_WORK         enum EntryType, 7               ;affliated workgroups
ET_ROUTE        enum EntryType, 8               ;user routes
ET_APPL         enum EntryType, 9               ;application



; Local User Field Size Constants

    LU_USERPASSWORD_SIZE        equ     10 
    LU_APP_SIZE                 equ     9
    LU_USERNAME_SIZE            equ     9
    LU_FULLNAME_SIZE            equ     25
    LU_NULLFILL_SIZE            equ     37

LF_FILE_TIME_OUT	= 100

SimpleLocalUser		struct

	SLU_userName	char	LU_USERNAME_SIZE	dup(0)
	SLU_fullName	char	LU_FULLNAME_SIZE	dup(0)
	SLU_notes	char	LU_NULLFILL_SIZE	dup(0)
	align word
SimpleLocalUser		ends



LocalUser               struct

    LU_type             EntryType
    LU_userName         char    LU_USERNAME_SIZE        dup(0)
    LU_fullName         char    LU_FULLNAME_SIZE        dup(0)
    LU_userPassword     char    LU_USERPASSWORD_SIZE    dup(0)
    LU_userIdent        sbyte
    LU_app0             char    LU_APP_SIZE             dup(0)
    LU_app1             char    LU_APP_SIZE             dup(0)
    LU_app2             char    LU_APP_SIZE             dup(0)
    LU_app3             char    LU_APP_SIZE             dup(0)
    LU_app4             char    LU_APP_SIZE             dup(0)
    LU_nullFill         char    LU_NULLFILL_SIZE        dup(0)
LocalUser               ends


;------------------------------------------------------------------------------
;		Path Constants
;------------------------------------------------------------------------------
EmailFixedPath	etype	word, 0, 4
	EFP_ROOT				enum	EmailFixedPath
	EFP_SERVICES				enum	EmailFixedPath
	EFP_SERVICES_MHS_MESSAGES		enum	EmailFixedPath
	EFP_SERVICES_MHS_ENCLOSED		enum	EmailFixedPath
	EFP_CLASSIFIER				enum	EmailFixedPath
	EFP_CLASSIFIER_MESSAGES			enum	EmailFixedPath
	EFP_CLASSIFIER_ENCLOSED			enum	EmailFixedPath
	EFP_ADMIN				enum	EmailFixedPath
	EFP_USERS				enum	EmailFixedPath
	EFP_MHS_MAIL_SND			enum	EmailFixedPath
	EFP_MHS_MAIL_PARCEL			enum	EmailFixedPath
	EFP_MHS_MAIL_USERS			enum	EmailFixedPath


EmailVariablePath	etype	word,0,4
	EVP_SERVICE		enum	EmailVariablePath
	EVP_SERVICE_MESSAGES	enum	EmailVariablePath
	EVP_SERVICE_ENCLOSED	enum	EmailVariablePath
	EVP_USER		enum	EmailVariablePath
	EVP_USER_MESSAGES	enum	EmailVariablePath
	EVP_USER_ENCLOSED	enum	EmailVariablePath

;------------------------------------------------------------------------------
;		Other Constants
;------------------------------------------------------------------------------
ADDRESSES_LIST_FILE_MINOR_PROTOCOL 	= 4
ADDRESSES_LIST_FILE_MAJOR_PROTOCOL 	= 3

USERS_LIST_FILE_MINOR_PROTOCOL 		= 2
USERS_LIST_FILE_MAJOR_PROTOCOL 		= 5

ADDRESS_DEFINITION_LIST_NAME_OFFSET 	= 0
USER_LIST_NAME_OFFSET           	= 4
ADDRESS_LIST_NAME_OFFSET        	= 2
LIST_A_STEP_FORWARD             	= 2


;******************************************************************************


;------------------------------------------------------------------------------
;		EXPORTED ROUTINES
;------------------------------------------------------------------------------
global	GenCheckListsFileExists:	far
global	GenListsFileOpen:		far
global	GenListsFileClose:		far
global	GenListsFileCreate:		far
global	GenListsFileDelete:		far
global	GenListsAddEntry:		far
global	GenListsDeleteEntry:		far
global	GenListsLookUpEntry:		far
global	GenListsLockEntry:		far
global	GenListsUnlockEntry:		far
global	SetupBufferForHugeArrayElement:	far
global	InsertElementToHugeArray:	far
global	AppendElementToHugeArray:	far
global	MarkVMBlockDirty:		far


global	EmailUsersListFilePresent:		far
global	EmailUsersListFileOpen:			far
global	EmailUsersListFileClose:		far
global	EmailUsersListFileCreate:		far
global	EmailUsersListFileDelete:		far
global	EmailUsersListAddEntry:			far
global	EmailUsersListDeleteEntry:		far
global	EmailUsersListLockEntry:		far
global	EmailUsersListUnlockEntry:		far
global	EmailUsersListGetCount:			far
global	EmailUsersListNumOfAlias:		far
global	EmailUsersListGetHugeArrayHandle:	far

global	EmailAddressesListFilePresent:					far
global	EmailAddressesListFileOpen:					far
global	EmailAddressesListFileClose:					far
global	EmailAddressesListFileCreate:					far
global	EmailAddressesListFileDelete:					far
global	EmailAddressesListAddEntry:					far
global	EmailAddressesListDestroyChildrenList:				far
global	EmailAddressesListDeleteEntry:					far
global	EmailAddressesListLockEntry:					far
global	EmailAddressesListUnlockEntry:					far
global	EmailAddressesListLookUpEntry:					far
global	EmailAddressesListGetCount:					far
global	EmailAddressesListGetHugeArrayHandle:				far
global	EmailAddressesListAddressDefinitionAddEntry:			far
global	EmailAddressesListAddressDefinitionLockEntry:			far
global	EmailAddressesListAddressDefinitionUnlockEntry:			far
global	EmailAddressesListAddressDefinitionGetCount:			far
global	EmailAddressesListAddressDefinitionLookUpEntry:			far
global	EmailAddressesListAddressDefinitionGetHugeArrayHandle:		far
global	EmailAddressesListLooseLockEntry:				far
global	EmailAddressesListLooseUnlockEntry:				far

global	AdminFilePresent:			far
global	AdminFileOpen:				far
global	AdminFileClose:				far
global	AdminFileCreate:			far
global	AdminFileDelete:			far
global	AdminFileGetWorkGroup:			far
global	AdminFileChangeWorkGroup:		far
global	AdminFileGetMHS:			far
global	AdminFileChangeMHS:			far
global	AdminFileChangePO:			far
global	AdminFileIsWorkGroupSet:		far
global	AdminFileIsMHSSet:			far
global	AdminFileIsPOSet:			far

global	AdminFileGetFixedPath:			far
global	AdminFileGetVariablePath:		far

global	AdminWriteLogMessagePtr:		far
global	AdminWriteLogMessageOptr:		far
global	AdminLogFileCreateOrOpen:		far
global	AdminLogFileLock:			far
global	AdminLogFileUnlock:			far

EndLibrary	emaillst



