Changes to logout prosess and login state storing, logout bug fix
[situare] / src / error.h
1 /*
2     Situare - A location system for Facebook
3     Copyright (C) 2010  Ixonos Plc. Authors:
4
5         Henri Lampela henri.lampela@ixonos.com
6         Sami Rämö - sami.ramo@ixonos.com
7
8     Situare is free software; you can redistribute it and/or
9     modify it under the terms of the GNU General Public License
10     version 2 as published by the Free Software Foundation.
11
12     Situare is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15     GNU General Public License for more details.
16
17     You should have received a copy of the GNU General Public License
18     along with Situare; if not, write to the Free Software
19     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
20     USA.
21 */
22
23 #ifndef ERROR_H
24 #define ERROR_H
25
26 // Situare errors
27 namespace SituareError {
28     enum errors {
29         ERROR_GENERAL = 0,          // an unknown/unspecified error
30         ERROR_MISSING_ARGUMENT,     // missing mandatory argument for requested action
31         SESSION_EXPIRED = 10,       // situare session credentials expired
32         UPDATE_FAILED,              // location update to situare failed
33         DATA_RETRIEVAL_FAILED,      // user/friends list retrieval failed
34         ADDRESS_RETRIEVAL_FAILED,   // reversegeo request failed
35         IMAGE_DOWNLOAD_FAILED,      // image download failed from facebook
36         MAP_IMAGE_DOWNLOAD_FAILED,  // map image download failed from OSM
37         GPS_INITIALIZATION_FAILED,  // GPS intialization failed
38         INVALID_JSON,               // JSON parsing failed i.e. invalid JSON string
39         ERROR_ROUTING_FAILED,       // routing failed
40         ERROR_LOCATION_SEARCH_FAILED
41     };
42 }
43
44 // Error contexts
45 namespace ErrorContext {
46     enum context {
47         SITUARE = 0,                // situare context
48         NETWORK                     // QNetworkReply context
49     };
50 }
51
52 #endif // ERROR_H