int MGOgetsubscriptions_ext (Subscription **lst, Subscription *sub, Validation *val, int map);
The MGOgetsubscriptions_ext() function returns a list of subscriptions (implicit and/or explicit) for the given uwnetid. Information is passed through sub and val and returned through the linked list lst. The required and optional fields are:
sub.uwnetid is the uwnetid name. sub.subscription_code is the subscription reference code. val.validid is the validation id. val.source_code is the validation source reference code. val.ein is the employee number. val.ssn is the social security number. val.studentid is the student number. val.account is the AVF account name. val.system_key is the student system key value. val.advanceid is the advance number. val.regid is the registry id. map is the validation source code expiration map. This field instructs MGOgetsubscriptions_ext() on how it should treat a validation status_code for the given validation source. The value is as follows (specify "0" to disable this feature):
Note: Searching by uwnetid will return both the implicit and explicit subscriptions, while searching by validid, ein, ssn, studentid, system_key, account, advanceid or regid will return only the implicit subscription list.
The following fields are set for each matched subscription. The values between the brackets indicate these fields are set depending on whether its an implicit or an explicit subscription (see note below).
Notes: lst.source_code is non-zero if it's an implicit subscription, and zero if it's an explicit subscription. Implicit subscriptions are inhereted by virtue of being affiliated with a particular validation, whereas explicit subscriptions are granted individually. The lst.status_code and lst.status_name fields are set as follows: For implicit subscriptions, this is the validation reference status; for explicit subscriptions, this is the subscription reference status.
Returns the number of subscriptions found upon success or -1 if an error occurred (in which case MGOerrno and MGOerrmsg are set appropriately).
rmango
MGOanalsubscription(), MGOfreesubscription(), MGOselrsubscription(), MGOselrsubstatus(), MGOselrvalstatus(), MGOzero()