00001 /* 00002 Situare - A location system for Facebook 00003 Copyright (C) 2010 Ixonos Plc. Authors: 00004 00005 Henri Lampela henri.lampela@ixonos.com 00006 Sami Rämö - sami.ramo@ixonos.com 00007 00008 Situare is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU General Public License 00010 version 2 as published by the Free Software Foundation. 00011 00012 Situare is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with Situare; if not, write to the Free Software 00019 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 00020 USA. 00021 */ 00022 00023 #ifndef ERROR_H 00024 #define ERROR_H 00025 00026 // Situare errors 00027 namespace SituareError { 00028 enum errors { 00029 ERROR_GENERAL = 0, // an unknown/unspecified error 00030 ERROR_MISSING_ARGUMENT, // missing mandatory argument for requested action 00031 SESSION_EXPIRED = 10, // situare session credentials expired 00032 LOGIN_FAILED, // login to situare service failed 00033 UPDATE_FAILED, // location update to situare failed 00034 DATA_RETRIEVAL_FAILED, // user/friends list retrieval failed 00035 ADDRESS_RETRIEVAL_FAILED, // reversegeo request failed 00036 IMAGE_DOWNLOAD_FAILED, // image download failed from facebook 00037 MAP_IMAGE_DOWNLOAD_FAILED, // map image download failed from OSM 00038 GPS_INITIALIZATION_FAILED, // GPS intialization failed 00039 INVALID_JSON, // JSON parsing failed i.e. invalid JSON string 00040 ERROR_ROUTING_FAILED, // routing failed 00041 ERROR_LOCATION_SEARCH_FAILED 00042 }; 00043 } 00044 00045 // Error contexts 00046 namespace ErrorContext { 00047 enum context { 00048 SITUARE = 0, // situare context 00049 NETWORK // QNetworkReply context 00050 }; 00051 } 00052 00053 #endif // ERROR_H