-- TalkerPrivate.mesa
-- Paul Rovner, March 22, 1983 11:48 am
-- Last Edited by: Greene, April 19, 1984 5:47:27 pm PST

DIRECTORY
Labels USING[Label],
IO USING[STREAM],
MBQueue USING[Queue],
Menus USING[MenuProc],
Rope USING[ROPE],
TalkerOpsRpcControl USING[InterfaceRecord],
TypeScript USING[TS],
ViewerClasses USING[Viewer];

TalkerPrivate: CEDAR DEFINITIONS
= BEGIN OPEN Rope;

-- TYPES
Handle: TYPE = REF ConversationObject; -- one per viewer
ConversationObject: TYPE =
MONITORED RECORD
[statusLabel: Labels.Label ← NIL,
ts: TypeScript.TSNIL,
tsInStream: IO.STREAMNIL,
tsOutStream: IO.STREAMNIL,
conversants: LIST OF Conversant ← NIL,
container: ViewerClasses.Viewer ← NIL,
shouldBlink: BOOLTRUE,
pullerStopRequested: BOOLFALSE,
mbq: MBQueue.Queue ← NIL,
localName: ROPENIL
];
Conversant: TYPE = REF ConversantObject; -- one per (conversant, conversation)
ConversantObject: TYPE =
RECORD[ir: TalkerOpsRpcControl.InterfaceRecord,
conversantName: ROPE,
senderToStop: BOOLFALSE,
outGoingLines: LIST OF ROPENIL,
newOutGoingLine: CONDITION
];


-- PROCEDURES EXPORTED BY ConversationImpl

Puller: PROC[h: Handle];

SendOutGoingLines: PROC[h: Handle, c: Conversant];

JoinConversation: PROC[h: Handle, conversantName: ROPE];

ComputeStatus: PROC[h: Handle] RETURNS[ROPE];

RemakeStatusLabel: PROC[h: Handle];

PaintLine: PROC[h: Handle, line: ROPE];

KillConversation: PROC[h: Handle];

IsViewer: PROC[h: Handle, viewer: ViewerClasses.Viewer] RETURNS[BOOL];

BlinkOff: PROC[h: Handle];

FindConversant: PROC[h: Handle, conversantName: ROPE] RETURNS[Conversant];

JoinConversationHit: Menus.MenuProc;

RemoveConversantFromOtherConversations: PROC[h: Handle, conversantName: ROPE];

ShowStatusHit: Menus.MenuProc;

LowerRope: PROC[r: ROPE] RETURNS[ROPE];

-- PROCEDURES EXPORTED BY TalkerImpl

EnumerateConversations: PROC[proc: PROC[Handle] RETURNS[stop: BOOL]]
RETURNS[Handle];

GetLocalName: PROC RETURNS[ROPE];

END.