/*
 * BEGIN FLOCK GPL
 * 
 * Copyright Flock Inc. 2005-2006
 * http://flock.com
 * 
 * This file may be used under the terms of of the
 * GNU General Public License Version 2 or later (the "GPL"),
 * http://www.gnu.org/licenses/gpl.html
 * 
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 * 
 * END FLOCK GPL
 */

#include "nsISupports.idl"
#include "nsISimpleEnumerator.idl"
#include "nsIDictionary.idl"
#include "nsIDOMDocument.idl"


///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////

[scriptable, uuid(2DB3FC08-E5F8-11DA-8ACF-C9DED1573834)]
interface flockIError: nsISupports
{
    attribute long errorCode;
    readonly attribute AString errorString;
    attribute AString serviceErrorCode;
    attribute AString serviceErrorString;
    
    // NETWORK errors 
    const long XML_HTTP_REQUEST_ERROR = 9001;
    
    // HTTP errors
    const long HTTP_BAD_REQUEST = 400;
    const long HTTP_UNAUTHORIZED = 401;
    const long HTTP_NOTFOUND = 404;
    const long HTTP_INTERNAL_SERVER_ERROR = 500;
    const long HTTP_SERVER_UNAVAILABLE = 503;
    const long HTTP_GATEWAY_TIMEOUT = 504;
    
    // photo errors 1001-1999
    const long PHOTOSERVICE_UNAVAILABLE = 1001;
    const long PHOTOSERVICE_LOGIN_FAILED = 1002;
    const long PHOTOSERVICE_INSUFFICIENT_PERMISSIONS = 1003;
    const long PHOTOSERVICE_INVALID_USER = 1004;
    const long PHOTOSERVICE_INVALID_SEARCH_QUERY = 1005;
    const long PHOTOSERVICE_INVALID_SEARCH_TERMS = 1006;
    const long PHOTOSERVICE_INVALID_UPLOAD_FILE = 1007;
    const long PHOTOSERVICE_UPLOAD_ERROR = 1008;
    const long PHOTOSERVICE_INVALID_ALBUM = 1009;
    const long PHOTOSERVICE_PRIVATE_ALBUM = 1010;
    const long PHOTOSERVICE_INVALID_RESPONSE = 1011;
    const long PHOTOSERVICE_USER_NOT_LOGGED_IN = 1012;
    const long PHOTOSERVICE_PHOTOS_IN_ALBUM_LIMIT_REACHED = 1013;
    const long PHOTOSERVICE_ALBUM_IS_OVER_SIZE_LIMIT = 1014;
    const long PHOTOSERVICE_NO_FILE_UPLOADED = 1015;
    const long PHOTOSERVICE_DUPLICATE_FILENAME = 1016;
    const long PHOTOSERVICE_BANDWIDTH_REACHED = 1017;
    const long PHOTOSERVICE_UNSUPPORTED_IMAGE_FORMAT = 1018;
    const long PHOTOSERVICE_UNKNOWN_ERROR = 1999;
    
    
    // blog errors 2000-2999
    
    // favorites errors 3000-3999
};