source: WorldVistAEHR/trunk/r/MAILMAN-XM/XMXAPIB.m@ 623

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

initial load of WorldVistAEHR

File size: 3.1 KB
RevLine 
[613]1XMXAPIB ;ISC-SF/GMB-Mailbox and Mail Basket APIs ;04/17/2002 14:07
2 ;;8.0;MailMan;;Jun 28, 2002
3 ; All entry points covered by DBIA 2723.
4 ; XMDUZ User's DUZ, or enough of user's name for a positive ID
5 ; XMK Basket number, or enough of a name for a positive ID
6 ; ***** Mailbox actions
7CRE8MBOX(XMDUZ,XMDATE) ; Create a mailbox
8 ; In: User
9 ; User must be POSTMASTER or POSTMASTER surrogate and possess XMMGR key.
10 I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
11 D CRE8MBOX^XMXPARMB(.XMDUZ,.XMDATE) Q:$D(XMERR)
12 D CRE8MBOX^XMXMBOX(XMDUZ,.XMDATE)
13 Q
14FLTRMBOX(XMDUZ,XMMSG) ; Filter all messages in a user's mailbox
15 ; In: User
16 I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
17 D MBOX^XMXPARMB(.XMDUZ) Q:$D(XMERR)
18 D FLTRMBOX^XMXMBOX(XMDUZ,.XMMSG)
19 Q
20QMBOX(XMDUZ,XMMSG) ; Query a mailbox
21 ; # msgs^# new msgs^date/time last msg received^priority mail (0/1)
22 ; In: User, Query type
23 I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
24 D MBOX^XMXPARMB(.XMDUZ) Q:$D(XMERR)
25 D QMBOX^XMXMBOX(XMDUZ,.XMMSG)
26 Q
27TERMMBOX(XMDUZ) ; Remove all traces of a user in MM globals
28 ; In: User
29 ; User must be POSTMASTER or POSTMASTER surrogate and possess XMMGR key.
30 I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
31 D TERMMBOX^XMXPARMB(.XMDUZ) Q:$D(XMERR)
32 D TERMMBOX^XMXMBOX(XMDUZ)
33 Q
34 ; ***** Basket actions
35CRE8BSKT(XMDUZ,XMKN,XMK) ; Create a basket
36 ; In: User, basket name
37 ; Out: Basket number
38 I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
39 D CRE8BSKT^XMXPARMB(.XMDUZ,.XMKN) Q:$D(XMERR)
40 D CRE8BSKT^XMXBSKT(XMDUZ,XMKN,.XMK)
41 Q
42DELBSKT(XMDUZ,XMK,XMFLAGS) ; Delete basket
43 ; In: User, basket
44 I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
45 D DELBSKT^XMXPARMB(.XMDUZ,.XMK,.XMFLAGS) Q:$D(XMERR)
46 D DELBSKT^XMXBSKT(XMDUZ,XMK,.XMFLAGS)
47 Q
48FLTRBSKT(XMDUZ,XMK,XMMSG) ; Filter all messages in a user's basket
49 ; In: User
50 I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
51 D BSKT^XMXPARMB(.XMDUZ,.XMK) Q:$D(XMERR)
52 D FLTRBSKT^XMXBSKT(XMDUZ,XMK,.XMMSG)
53 Q
54LISTBSKT(XMDUZ,XMFLAGS,XMAMT,XMSTART,XMPART,XMTROOT) ;
55 I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
56 D LISTBSKT^XMXPARMB(XMDUZ,.XMFLAGS,.XMAMT,.XMSTART,.XMPART,.XMTROOT) Q:$D(XMERR)
57 D LISTBSKT^XMXBSKT(XMDUZ,.XMFLAGS,.XMAMT,.XMSTART,.XMPART,.XMTROOT)
58 Q
59LISTMSGS(XMDUZ,XMK,XMFLDS,XMFLAGS,XMAMT,XMSTART,XMCRIT,XMTROOT) ; List messages
60 I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
61 D LISTMSGS^XMXPARMB(.XMDUZ,.XMK,.XMFLDS,.XMFLAGS,.XMAMT,.XMSTART,.XMCRIT,.XMTROOT) Q:$D(XMERR)
62 D LISTMSGS^XMXLIST(XMDUZ,.XMK,.XMFLDS,.XMFLAGS,.XMAMT,.XMSTART,.XMCRIT,.XMTROOT)
63 Q
64NAMEBSKT(XMDUZ,XMK,XMKN) ; Change the name of a basket
65 ; In: User, basket, new basket name (@ will delete)
66 I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
67 D NAMEBSKT^XMXPARMB(.XMDUZ,.XMK,.XMKN) Q:$D(XMERR)
68 D NAMEBSKT^XMXBSKT(XMDUZ,XMK,XMKN)
69 Q
70QBSKT(XMDUZ,XMK,XMMSG) ; Get info on a basket
71 ; In: User, basket
72 ; Out: basket ien^basket name^# msgs^# new msgs
73 I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
74 D BSKT^XMXPARMB(.XMDUZ,.XMK) Q:$D(XMERR)
75 D QBSKT^XMXBSKT(XMDUZ,XMK,.XMMSG)
76 Q
77RSEQBSKT(XMDUZ,XMK,XMMSG) ; Resequence msgs in a basket
78 ; In: User, basket
79 I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
80 D BSKT^XMXPARMB(.XMDUZ,.XMK) Q:$D(XMERR)
81 D RSEQBSKT^XMXBSKT(XMDUZ,XMK,.XMMSG)
82 Q
Note: See TracBrowser for help on using the repository browser.