SYNOPSIS

int MGOsetsubscription (char **out, char *uwn, int sub, int act, char *data);

DESCRIPTION

The MGOsetsubscription() function performs the specified action act on the given uwnetid uwn and subscription reference code sub. The value for act may be one of:

A particular subscription may require a helper process, which is invoked as required. All text from the helper process is returned through out. If the helper process needs additional information, pass it through data, using the following format:

      MGO_DAT_xxx1=(yyy1) [MGO_DAT_xxx2=(yyy2) ...]

These will appear as environmental values for the helper process. Note: The "MGO_DAT_" prefix is required syntax. The following environmental values are passed to the helper process by default:

If you want more verbose output from the helper process for debugging purposes and such, pass the environment value MGO_DAT_VERBOSE=n, where n is the level of verbosity you wish.

RETURN VALUE

Returns the subscription status reference code upon success, or -1 if an error occurred (in which case MGOerrno and MGOerrmsg are set appropriately). A status of "pending" means that the external process will complete the request at some future time.

ERRORS

AUTHENTICATION LEVEL

wmango

SEE ALSO

MGOfreechar(), MGOselrsubscription(), MGOselrsubstatus(), MGOshowsubscription(), MGOzero()