83 lines
3.1 KiB
Mathematica
83 lines
3.1 KiB
Mathematica
XMXAPIB ;ISC-SF/GMB-Mailbox and Mail Basket APIs ;04/17/2002 14:07
|
|
;;8.0;MailMan;;Jun 28, 2002
|
|
; All entry points covered by DBIA 2723.
|
|
; XMDUZ User's DUZ, or enough of user's name for a positive ID
|
|
; XMK Basket number, or enough of a name for a positive ID
|
|
; ***** Mailbox actions
|
|
CRE8MBOX(XMDUZ,XMDATE) ; Create a mailbox
|
|
; In: User
|
|
; User must be POSTMASTER or POSTMASTER surrogate and possess XMMGR key.
|
|
I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
|
|
D CRE8MBOX^XMXPARMB(.XMDUZ,.XMDATE) Q:$D(XMERR)
|
|
D CRE8MBOX^XMXMBOX(XMDUZ,.XMDATE)
|
|
Q
|
|
FLTRMBOX(XMDUZ,XMMSG) ; Filter all messages in a user's mailbox
|
|
; In: User
|
|
I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
|
|
D MBOX^XMXPARMB(.XMDUZ) Q:$D(XMERR)
|
|
D FLTRMBOX^XMXMBOX(XMDUZ,.XMMSG)
|
|
Q
|
|
QMBOX(XMDUZ,XMMSG) ; Query a mailbox
|
|
; # msgs^# new msgs^date/time last msg received^priority mail (0/1)
|
|
; In: User, Query type
|
|
I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
|
|
D MBOX^XMXPARMB(.XMDUZ) Q:$D(XMERR)
|
|
D QMBOX^XMXMBOX(XMDUZ,.XMMSG)
|
|
Q
|
|
TERMMBOX(XMDUZ) ; Remove all traces of a user in MM globals
|
|
; In: User
|
|
; User must be POSTMASTER or POSTMASTER surrogate and possess XMMGR key.
|
|
I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
|
|
D TERMMBOX^XMXPARMB(.XMDUZ) Q:$D(XMERR)
|
|
D TERMMBOX^XMXMBOX(XMDUZ)
|
|
Q
|
|
; ***** Basket actions
|
|
CRE8BSKT(XMDUZ,XMKN,XMK) ; Create a basket
|
|
; In: User, basket name
|
|
; Out: Basket number
|
|
I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
|
|
D CRE8BSKT^XMXPARMB(.XMDUZ,.XMKN) Q:$D(XMERR)
|
|
D CRE8BSKT^XMXBSKT(XMDUZ,XMKN,.XMK)
|
|
Q
|
|
DELBSKT(XMDUZ,XMK,XMFLAGS) ; Delete basket
|
|
; In: User, basket
|
|
I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
|
|
D DELBSKT^XMXPARMB(.XMDUZ,.XMK,.XMFLAGS) Q:$D(XMERR)
|
|
D DELBSKT^XMXBSKT(XMDUZ,XMK,.XMFLAGS)
|
|
Q
|
|
FLTRBSKT(XMDUZ,XMK,XMMSG) ; Filter all messages in a user's basket
|
|
; In: User
|
|
I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
|
|
D BSKT^XMXPARMB(.XMDUZ,.XMK) Q:$D(XMERR)
|
|
D FLTRBSKT^XMXBSKT(XMDUZ,XMK,.XMMSG)
|
|
Q
|
|
LISTBSKT(XMDUZ,XMFLAGS,XMAMT,XMSTART,XMPART,XMTROOT) ;
|
|
I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
|
|
D LISTBSKT^XMXPARMB(XMDUZ,.XMFLAGS,.XMAMT,.XMSTART,.XMPART,.XMTROOT) Q:$D(XMERR)
|
|
D LISTBSKT^XMXBSKT(XMDUZ,.XMFLAGS,.XMAMT,.XMSTART,.XMPART,.XMTROOT)
|
|
Q
|
|
LISTMSGS(XMDUZ,XMK,XMFLDS,XMFLAGS,XMAMT,XMSTART,XMCRIT,XMTROOT) ; List messages
|
|
I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
|
|
D LISTMSGS^XMXPARMB(.XMDUZ,.XMK,.XMFLDS,.XMFLAGS,.XMAMT,.XMSTART,.XMCRIT,.XMTROOT) Q:$D(XMERR)
|
|
D LISTMSGS^XMXLIST(XMDUZ,.XMK,.XMFLDS,.XMFLAGS,.XMAMT,.XMSTART,.XMCRIT,.XMTROOT)
|
|
Q
|
|
NAMEBSKT(XMDUZ,XMK,XMKN) ; Change the name of a basket
|
|
; In: User, basket, new basket name (@ will delete)
|
|
I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
|
|
D NAMEBSKT^XMXPARMB(.XMDUZ,.XMK,.XMKN) Q:$D(XMERR)
|
|
D NAMEBSKT^XMXBSKT(XMDUZ,XMK,XMKN)
|
|
Q
|
|
QBSKT(XMDUZ,XMK,XMMSG) ; Get info on a basket
|
|
; In: User, basket
|
|
; Out: basket ien^basket name^# msgs^# new msgs
|
|
I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
|
|
D BSKT^XMXPARMB(.XMDUZ,.XMK) Q:$D(XMERR)
|
|
D QBSKT^XMXBSKT(XMDUZ,XMK,.XMMSG)
|
|
Q
|
|
RSEQBSKT(XMDUZ,XMK,XMMSG) ; Resequence msgs in a basket
|
|
; In: User, basket
|
|
I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
|
|
D BSKT^XMXPARMB(.XMDUZ,.XMK) Q:$D(XMERR)
|
|
D RSEQBSKT^XMXBSKT(XMDUZ,XMK,.XMMSG)
|
|
Q
|