imap_get_attribute_int_ex

Example: imap_get_attribute_int_exInternet Messaging Functions (IMAP)

Obtains a IMAP attribute for a specific session.

int  imap_get_attribute_int_ex( IMAP *ppimap, char *attribute );
ppimap A session identifier.
attributeThe IMAP attribute to retrieve. The available attributes are: RECENT_MESSAGE_COUNT - Returns the number of recent messages in selected mailboxTOTAL_MESSAGE_COUNT - Total number of messages in selected mailboxUNSEEN_MESSAGE_COUNT - Total number of unseen message in selected mailboxREAD_WRITE_MODE - Mode of selected mailbox: "[READ-WRITE]" or "[READ-ONLY]".NEXT_MESSAGE_UID - Next valid UID in selected mailboxMAILBOX_UID - Mailbox Identifier

The imap_get_attribute_int_ex function returns the value of an IMAP attribute for a specific session, as an integer.

The values should be refreshed before calling imap_get_attribute_int_ex. The RECENT_MESSAGE_COUNT and TOTAL_MESSAGE_COUNT attributes are updated during a call to imap_select_mailbox function. The other attributes are updated by a call to imap_status_ex.

This function is for use with multiple sessions. For global sessions, use the imap_get_attribute_int function, which leaves out the session identifier.

Return Values

If this function succeeds, it returns the value of the specified property. Otherwise, it returns LR_FAIL.

Parameterization

All arguments of this function of the type char, can be parameterized with standard parameterization.