<?php // vim:set et ts=4 sw=4 sts=4:
# Copyright (C) 2003-2014 hipplay Inc.
#
# This is UNPUBLISHED PROPRIETARY SOURCE CODE OF hipplay Inc.
# The copyright notice above does not evidence any actual or intended
# publication of such source code. The contents of this file may not
# be disclosed to third parties, copied or duplicated in any form, in
# whole or in part, without the prior written permission of
# hipplay Inc.
#

namespace HipPlayConnect;

// code and message are mandatory for Recoverable Exceptions
use Exception;

class AxRecoverableErrorException extends Exception {

    const ERR_ILLEGAL_FILENAME = 1;
    const ERR_FILE_EXISTS      = 2;
    const ERR_CANNOT_PARSE_XML = 3;
    // ERR_IO_ERROR defined in AxUnrecoverableErrorException
    const ERR_INVALID_PARAMETER              = 5;
    const ERR_INVALID_EMAIL                  = 6;
    const ERR_SHARE_FROM_UNDEFINED           = 7;
    const ERR_ERROR_SENDING_EMAIL            = 8;
    const ERR_CANNOT_GET_AD                  = 9;
    const ERR_DUPLICATE_EMAIL                = 10;
    const ERR_CONTACT_DOESNT_EXIST           = 11;
    const ERR_CONTACT_USED_IN_ALBUMS         = 12;
    const ERR_INVALID_LOGIN                  = 13;
    const ERR_MUST_CHANGE_PASSWORD           = 14;
    const ERR_RELEASE_MISMATCH               = 15;
    const ERR_CANNOT_RESET_PASSWORD          = 16;
    const ERR_SAVE_POSITION_UNSUPPORTED      = 17;
    const ERR_KEYWORD_VALIDATION             = 18;
    const ERR_3RD_PARTY_UNAUTHORIZED         = 19;
    const ERR_3RD_PARTY_ERROR                = 20;
    const ERR_3RD_PARTY_PHOTOSET             = 21;
    const ERR_INVALID_AUTH_CODE              = 22;
    const ERR_SELF_COPY                      = 23;
    const ERR_BACKUP_FILE_SIZE               = 24;
    const ERR_BACKUP_STATUS_INHERITED        = 25;
    const ERR_BACKUP_FILE_TYPE               = 26;
    const ERR_BACKUP_NOT_LOCAL               = 27;
    const ERR_BACKUP_NOT_REMOTE              = 28;
    const ERR_SERVICE_DISABLED               = 29;
    const ERR_CANNOT_CLEAR_JOBS              = 30;
    const ERR_CANNOT_CANCEL_JOBS             = 31;
    const ERR_AGG_INVALID_REQUEST_URI        = 32;
    const ERR_AGG_NON_XML_RESPONSE           = 33;
    const ERR_BACKUP_NO_FILE                 = 34;
    const ERR_ORANGE_ACCOUNT_NOT_BOUND       = 35;
    const ERR_ORANGE_CANNOT_LOGON_MYCO       = 36;
    const ERR_ORANGE_MYCO_DOWN               = 37;
    const ERR_ORANGE_NO_PHOTOPRINT_SESSION   = 38;
    const ERR_ORANGE_AUTH_SERVER_UNAVAILABLE = 39;
    const ERR_ORANGE_AUTH_DENIED             = 40;
    const ERR_NO_FILE_TO_UPLOAD              = 41;
    const ERR_SERVICE_UNAVAILABLE            = 42;
    const ERR_ORANGE_ALREADY_BOUND           = 43;
    const ERR_SERVER_PROXY                   = 44;
    const ERR_FILE_TOO_LARGE                 = 45;
    const ERR_CANT_DELETE_SELF               = 46;
    const ERR_MYCO_ACCOUNT_NOT_ACTIVATED     = 47;
    const ERR_MAX_NB_USERS_REACHED           = 48;
    const ERR_CONTACT_ALREADY_OWNED_BY_USER  = 49;
    // ERR_DISK_FULL defined in AxUnrecoverableErrorException
    const ERR_FORMAT_USB = 51;
    // 52 was removed
    const ERR_RAID_REBUILD                      = 53;
    const ERR_RAID_REBUILD_TYPE_UNSUPPORTED     = 54;
    const ERR_RAID_FORMAT                       = 55;
    const ERR_RAID_FORMAT_UNAVAILABLE           = 56;
    const ERR_RAID_FORMAT_TYPE_UNSUPPORTED      = 57;
    const ERR_RAID_RECONFIGURE                  = 58;
    const ERR_RAID_RECONFIGURE_UNAVAILABLE      = 59;
    const ERR_RAID_RECONFIGURE_TYPE_UNSUPPORTED = 60;
    const ERR_WIRELESS_NO_ADAPTER               = 61;

    const ERR_NO_DATABASE_FOUND              = 1001;

    private $params = array();

    function __construct ($message, $code, array $params = NULL) {
        parent::__construct($message, $code);
        $this->params = $params;
    }

    public function getParams () {
        return $this->params;
    }
}
