<?php

    
	
	define( "PRIVATE_MESSAGE_RECEIVER_ALL", -1, true );
    define( "PRIVATE_MESSAGE_RECEIVER_UNREAD", 1, true );
    define( "PRIVATE_MESSAGE_RECEIVER_READ", 2, true );

    /**
     * This class keeps track of all the possible status that a private message can have. If plugins dynamically 
	 * register new private message statuses, this class will still be able to handle them
	 * 
	 * \ingroup DAO
     */    
    class PrivateMessageReceiverReadStatus extends GenericStatusList
    {
    
        /**
         * returns a list with all the private message statuses that have been defined
         * so far in the code.
         *
         * @return Returns an array where every position is an array with two
         * keys: "constant" and "value", where "constant" is the name of the constant
         * that defines this status and "value" is the value assigned to it
         */
        function getStatusList( $includeStatusAll = false )
        {
            return( GenericStatusList::getStatusList( "PRIVATE_MESSAGE_RECEIVER_", "PRIVATE_MESSAGE_RECEIVER_ALL", $includeStatusAll ));
        }
        
        /**
         * @param status The status code we'd like to check
         * 
         * @return Returns true if the status is valid or false otherwise
         */
        function isValidStatus( $status )
        {
	    	$statusList = PrivateMessageReceiverReadStatus::getStatusList( true );
	    	return( in_array( $status, $statusList ));
        }
        
        /**
         * returns the default status code for this class
         *
         * @return The default status
         */
        function getDefaultStatus()
        {
	     	return( PRIVATE_MESSAGE_RECEIVER_ALL );   
        }        
    }
?>