source: FOIAVistA/tag/r/MAILMAN-XM/XMXAPIU.m@ 1267

Last change on this file since 1267 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1XMXAPIU ;ISC-SF/GMB-APIs for users to use interactively ;03/26/2003 08:57
2 ;;8.0;MailMan;**15**;Jun 28, 2002
3 ; All entry points covered by DBIA 2774.
4 ;
5 ; The following are meant to be in an option's ROUTINE field.
6 ; They expect that DUZ exists, and if the user is acting as a surrogate,
7 ; that XMDUZ exists, too. Otherwise, XMDUZ will be set to DUZ.
8 ; If the XMV variables do not exist, INIT^XMVVITAE will be called.
9 Q
10READ ; Read/Manage messages in your Mailbox
11 ; Needs XMDUZ
12 I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
13 G MANAGE^XMJBM
14 Q
15READNEW ; Read new messages in your Mailbox
16 I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
17 G NEW^XMJBN
18 Q
19SEND ; Send a message
20 I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
21 G SEND^XMJMS
22 Q
23 ; The following are meant to be called from within a program.
24 ; Output, common to the following:
25 ; XMERR If there's any errors, then XMERR is set to the number of
26 ; errors, otherwise XMERR is undefined.
27 ; ^TMP("XMERR",$J,error number,"TEXT",line number)=error text
28SUBJ(XMSUBJ) ; Ask user for msg subject
29 ; XMSUBJ (in/out) Subject
30 N XMABORT
31 K XMERR,^TMP("XMERR",$J)
32 S XMABORT=0
33 D SUBJ^XMJMS(.XMSUBJ,.XMABORT) Q:'XMABORT
34 D ERRSET^XMXUTIL($S(XMABORT=1:37000,1:37001)) ; up-arrow out / time out
35 Q
36TOWHOM(XMDUZ,XMZ,XMTYPE,XMINSTR) ; Ask user for msg addressees
37 ; XMDUZ User's DUZ
38 ; XMZ message number in ^XMB(3.9,
39 ; XMTYPE
40 ; XMINSTR
41 I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
42 D ITOWHOM^XMXPARM(.XMDUZ,.XMZ,.XMTYPE,.XMINSTR) Q:$D(XMERR)
43 D ITOWHOM^XMXTO(XMDUZ,.XMZ,XMTYPE,.XMINSTR)
44 Q
45SHOWERR ; Print the errors to the screen.
46 ; Displays the errors in ^TMP("XMERR",$J),
47 ; and then kills XMERR and ^TMP("XMERR",$J).
48 D SHOW^XMJERR
49 Q
Note: See TracBrowser for help on using the repository browser.