0byt3m1n1
Path:
/
data
/
applications
/
aps
/
gallery
/
2.2-08
/
htdocs
/
modules
/
remote
/
classes
/
[
Home
]
File: GalleryRemoteConstants.class
<?php /* * Gallery - a web based photo album viewer and editor * Copyright (C) 2000-2007 Bharat Mediratta * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ /** * Constants used by the Remote module * @package Remote * @subpackage Classes * @author Pierre-Luc Paour * @author Bharat Mediratta * @version $Revision: 15513 $ * @static */ class GalleryRemoteConstants { /** * Return the current Major/Minor version codes * @return array (MAJ => ##, MIN => ##) */ function getVersionCodes() { static $grVersionCodes; if (empty($grVersionCodes)) { $grVersionCodes['MAJ'] = 2; $grVersionCodes['MIN'] = 11; } return $grVersionCodes; } /** * Return remote protocol status codes * @return array (SUCCESS => ##, PASSWORD_WRONG => ##, ...) */ function getStatusCodes() { static $grStatusCodes; if (empty($grStatusCodes)) { $grStatusCodes['SUCCESS'] = 0; $grStatusCodes['PROTOCOL_MAJOR_VERSION_INVALID'] = 101; $grStatusCodes['PROTOCOL_MINOR_VERSION_INVALID'] = 102; $grStatusCodes['PROTOCOL_VERSION_FORMAT_INVALID'] = 103; $grStatusCodes['PROTOCOL_VERSION_MISSING'] = 104; $grStatusCodes['PASSWORD_WRONG'] = 201; $grStatusCodes['LOGIN_MISSING'] = 202; $grStatusCodes['UNKNOWN_COMMAND'] = 301; $grStatusCodes['MISSING_ARGUMENTS'] = 302; $grStatusCodes['NO_ADD_PERMISSION'] = 401; $grStatusCodes['NO_FILENAME'] = 402; $grStatusCodes['UPLOAD_PHOTO_FAIL'] = 403; $grStatusCodes['NO_WRITE_PERMISSION'] = 404; $grStatusCodes['NO_VIEW PERMISSION'] = 405; $grStatusCodes['NO_CREATE_ALBUM_PERMISSION'] = 501; $grStatusCodes['CREATE_ALBUM_FAILED'] = 502; $grStatusCodes['MOVE_ALBUM_FAILED'] = 503; $grStatusCodes['ROTATE_IMAGE_FAILED'] = 504; } return $grStatusCodes; } } ?>