Inherits EventHandler
Maps IMAP flag names to ids using the flag_names table.
An IMAP flag is just a string, like "\Deleted" or "spam". RFC 3501 defines "\Seen", "\Flagged", "\Answered", "\Draft", "\Deleted", and "\Recent", and clients may create other flags.
The flag_names table contains an (id,name) map for all known flags, and the flags table refers to it by id. This class provides lookup functions by id and name.
("\Recent" is special; it is not stored in the flag_names table.)
Constructs a Flag cache. The new object will listen for new flags continuously.
Reimplements EventHandler::EventHandler().
Records that s should be called whenever a new flag is recorded.
Returns a list of all current known flags (except "\recent" of course), sorted by the lowercase version of their names.
Updates the RAM cache from the database table.
Reimplements EventHandler::execute().
Returns the id of the flag with the given name, or 0 if the flag is not known.
Returns true if f is the "\Deleted" flag and false otherwise.
Returns true if f is the "\Seen" flag and false otherwise.
Returns the largest ID currently used by a flag.
Returns the name of the flag with the given id, or an empty string if the flag is not known.
Forgets s.
This function must be called once from main() to set up and load the flag_names table.
This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.