PMDF Programmer's Reference Manual


Previous Next Contents Index


PMDFaddressGetProperty

Extract a property of an address from a list of parsed addresses.

PASCAL

status = PMDF_address_get_property

(addr_context, index, property, result, result_len)

argument information
Argument Data type Access Mechanism
addr_context context pointer read value
index integer read value
property integer read value
result descriptor read/write reference
result_len unsigned word write reference

C

status = PMDFaddressGetProperty

(addr_context, index, property, result, result_len)

argument information


int PMDFaddressGetProperty(PMDF_addr *addr_context, 
                           int        index, 
                           int        property, 
                           char      *result, 
                           int       *result_len) 


Arguments

addr_context

Address context generated by a previous call to PMDFaddressParseList.

index

Index of the address to obtain the property for.

property

The address property to return.

result

String to receive the address property. Must be at least ALFA_SIZE bytes in length for PMDF_address_get_property and ALFA_SIZE+1 bytes for PMDFaddressGetProperty.

result_len

Length in bytes of the returned property. Callers using PMDFaddressGetProperty must, on input, supply the maximum length in bytes of result.

Description

After parsing a line of addresses with PMDFaddressParseList, properties of individual addresses can be retrieved with PMDFaddressGetProperty.The index argument can range from 1 to count where count is the count of parsed addresses returned by PMDFaddressParseList. The first address corresponds to an index value of 1. The accepted values for property are listed and described in the table below. Note that unlike PMDFgetAddressProperty, PMDFaddressGetProperty does not accept the PMDF_PROP_FRIENDLY property.

Table 1-3 Properties of the Address phrase <@otherhost:user@host>
Symbolic name Value Description
PMDF_PROP_ADDRESS 1 Address part, @ otherhost: user@ host , of the address
PMDF_PROP_DOMAIN 2 Domain part, host , of the address
PMDF_PROP_LOCAL 4 Local part, user , of the address
PMDF_PROP_PHRASE 5 Phrase part, phrase , of the address, if any
PMDF_PROP_PROPER 6 Full address including any phrases and comments
PMDF_PROP_ROUTE 7 Source route part, @ otherhost: , of the address, if any


Return Values

PMDF__OK Normal, successful completion.
PMDF__BAD Bad parameter supplied: invalid value for property. No result returned.
PMDF__FATERRLIB Call to LIB$SCOPY_R_DX failed owing to a fatal internal error in the OpenVMS Run Time Library. No result returned.
PMDF__INSVIRMEM Insufficient virtual memory: call to LIB$GET_VM made by LIB$SCOPY_R_DX has failed. No result returned.
PMDF__INVSTRDES Invalid string descriptor for result: descriptor has an invalid value in its DSC$B_CLASS field. No result returned.
PMDF__NO Value for index is out of range. No result returned.
PMDF__STRTRU Supplied string was too long; result truncated to fit.


Previous Next Contents Index