PMDF popstore & MessageStore Manager's Guide


Previous Contents Index


POPSTORE_manage

Allow changing of the MANAGE usage flag for accounts.

format


int POPSTORE_manage (allow) 
      int allow; 


Arguments

allow

When non-zero, the MANAGE usage flag can be changed. Used for input only.

Description

By default, the popstore API subroutines do not allow manipulation of the MANAGE usage flag for popstore accounts. Specifically, the POPSTORE_user_data_set , POPSTORE_user_update , POPSTORE_command , and POPSTORE_command_d subroutines will not, by default, allow alterations to be made to that flag for any account. In order to enable the setting or clearing of that flag, POPSTORE_manage must be called with a non-zero value for the allow argument. To subsequently disable the ability to set or clear the MANAGE flag, call POPSTORE_manage with a zero value for allow . Note that even after POPSTORE_manage has been called, a program cannot alter the MANAGE flag, or any other aspect of a popstore account, unless it has sufficient privileges to read and write profile files. Note that POPSTORE_manage does not return a POPSTORE_ status code. Instead, it returns a value indicating the state prior to calling POPSTORE_manage . If a value of 0 is returned, then previously the MANAGE flag could not be manipulated. If a value of 1 is returned, then previously the MANAGE flag could be manipulated. Thus, a subroutine which needs to briefly impose one state or another can make that imposition and then restore the prior state:


/* Change the current state */ 
old_state = POPSTORE_manage (new_state); 
 
...
 
/* Restore the old state */ 
(void) POPSTORE_manage (old_state); 


Return Values

0 or 1 The previous state prior to calling POPSTORE_manage.


Previous Next Contents Index