Previous | Contents | Index |
Access a user account.
int POPSTORE_user_begin_d (user_context, domain, domain_len, user, user_len, do_accounting, usage, usage_len) POPSTORE_user_context **user_context; char *domain; int domain_len; char *user; int user_len; int do_accounting; char *usage; int usage_len;
Name of the user domain to use. Supply a value of NULL to indicate the
domain
default
domain. Used for input only.Length in bytes of the user domain name,
domain_len
domain
. Supply a value of zero to indicate thedefault
domain. Used for input only.User context returned by a successful call to this subroutine. Used for output only.
user_context
Name of the popstore user to obtain a user context for. Used for input only.
user
Length in bytes of the username string,
user_len
user
. Used for input only.Boolean flag indicating whether or not to update accounting information for this user when the user context is disposed of. Used for input only.
do_accounting
A short description identifying the usage being made by the caller. This description is passed to site-supplied logging subroutines for logging purposes. Used for input only.
usage
Length in bytes of the usage description,
usage_len
usage
. Used for input only.
User accounts are accessed with thePOPSTORE_user_begin_d
subroutine. On input, provide the username associated with the account you are interested in and an optional usage string describing the purpose for the access. On output, a pointer to aPOPSTORE_user_context
structure is returned. That structure will contain the profile information for the account as well as the list of stored messages for the account. See Section 12.11.3 for a description of that structure. When you are finished using the context, dispose of it with a call toPOPSTORE_user_end
. This call is important as it is during the call that accounting information is recorded and any manipulations of messages actually carried out (e.g., stored messages deleted). Fields in the returnedPOPSTORE_user_context
must not be changed. Fields which you want to be changed should be changed by calling the appropriate API subroutines. For instance,POPSTORE_user_update
to change profile fields, thePOPSTORE_message_mark_
subroutines to change the disposition of a stored message, etc. When accessing an account, you must indicate whether or not accounting information should be recorded for the access. This indication is expressed with thedo_accounting
argument. Specify for that argument a value ofPOPSTORE_ACCOUNTING
if accounting information should be recorded; otherwise, specify a value ofPOPSTORE_NOACCOUNTING
. Accounting should only be recorded when the access is being done on the behalf of the actual user (i.e., is a billable event). For example, a POP server when accessing the account for a remote user would request accounting. A program doing account management would not. Accounting operations entail recording the time of attempted access and deaccess and updating the total connect time. The optional usage description, specified with theusage
andusage_len
arguments, are passed to any site-supplied logging subroutines. The popstore does not itself make any use of those strings.
POPSTORE_SUCCESS Normal, successful completion. POPSTORE_FILOPNERR Unable to open the profile file for reading. POPSTORE_INSUFPRIV Insufficient privileges to access the profile file, or, on OpenVMS, the process lacks SYSLCK privilege. POPSTORE_LCKOPNERR Unable to obtain lock information for the profile file. POPSTORE_LOCKERROR Unable to obtain a lock for the profile file. POPSTORE_NOSUCHUSR No such user account. POPSTORE_READERROR An error while attempting to read data from the profile file. POPSTORE_TOOLONG The resulting profile file name is too long. POPSTORE_VMERROR Insufficient virtual memory.
Previous | Next | Contents | Index |