Node:get-membership, Next:mark-as-unread, Previous:query-read-texts, Up:Protocol Requests
get-membership [108] (( person : Pers-No;
first : INT16;
no-of-confs : INT16;
want-read-ranges : BOOL;
max-ranges : INT32 ))
-> ( ARRAY Membership );
This call retrieves the membership record for a list of conferences
for a single person. person is the person whose memberships are
to be retrieved. first is the first position in the membership
list to retrieve, numbered from 0 and up. no-of-confs is the
number of membership records to retrieve.
If want-read-ranges is 0, the server will not send the
contents of the read-texts array of the memberships. (The
sizes will be transmitted, but a single asterisk (*) will be
sent instead of the array itself.) The max-ranges argument is
ignored in this case.
If want-read-ranges is 1, the read-ranges arrays
of the memberships will be returned. If max-ranges is
non-zero, each array will be truncated to max-ranges ranges.
(It isn't possible to determine if an array has been truncated, or if
that array actually contained exactly that many ranges.) Unlike
query-read-texts, the ranges may not expand to include
deleted texts, so it isn't certain that you get enough information
to find the first unread text if you specify a non-zero
max-ranges argument.
The server will return a membership list that is shorter than
no-of-confs if no-of-confs + first is larger than
the number of conferences the person is a member of. Elements of the
member list that the person requesting the list does not have sufficient
privileges to see may be cleared. Cleared elements simply have all
fields set to zero.
Example:
1 108 5 0 3 1 0
=1 2 { 0 49 14 17 13 8 91 5 255 1 5 255 0 * 5
49 14 17 13 8 91 5 255 1 00000000
1 20 14 22 17 6 97 4 197 1 6 100 1 { 1 2 } 5
49 14 17 13 8 91 5 255 1 00000000 }
2 108 5 0 1 1 0
=2 1 { 0 49 14 17 13 8 91 5 255 1 5 255 0 * 5
49 14 17 13 8 91 5 255 1 00000000 }
3 108 5 1 4 1 0
=3 1 { 1 20 14 22 17 6 97 4 197 1 6 100 1 { 1 2 } 5
49 14 17 13 8 91 5 255 1 00000000 }
In this example we retrieve the memberships of person 5. The first call asks for three memberships, starting with number 0. Since this person is only a member of two conferences, the list returned only contains two memberships. The next two calls retrieve a single membership each. The first by asking for only one, and the second by asking for four memberships, starting with number 1.
login-first
undefined-person
person does not exist.
undefined-conference
person does not exist or is secret.
index-out-of-range
first is higher than the index of the last conference in the
person's membership list.
bad-bool
want-read-ranges must be either 0 or 1.