c5258d4f9b7809644ca191880cbc841572b26ec8
[situare] / src / situareservice / situarecommon.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
7    Situare is free software; you can redistribute it and/or
8    modify it under the terms of the GNU General Public License
9    version 2 as published by the Free Software Foundation.
10
11    Situare is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with Situare; if not, write to the Free Software
18    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
19    USA.
20 */
21
22 #ifndef SITUARECOMMON_H
23 #define SITUARECOMMON_H
24
25 #include <QString>
26
27 // Situare server constants
28 #ifdef USE_PRODUCTION_SERVER
29     // Production server
30     const QString SITUARE_URL = "http://client.situare.net/";
31     const QString API_KEY = "4197c64da2fb6b927236feaea32d7d81";
32 #else
33     // Test server
34     const QString SITUARE_URL = "http://emmerichgn.facebook.joyent.us/";
35     const QString API_KEY = "cf77865a5070f2c2ba3b52cbf3371579";
36     const QString APP_ID = "286811277465";
37 #endif
38
39 // Situare JSON callback data
40 const QString NORMAL_SIZE_PROFILE_IMAGE = "pic";
41
42 // Situare PHP scripts
43 const QString UPDATE_LOCATION = "updateLocation.php";
44 const QString REVERSE_GEO = "reversegeo.php";
45 const QString GET_LOCATIONS = "getLocations.php";
46 const QString GET_MESSAGES = "getMessages.php";
47 const QString SEND_MESSAGE = "sendMessage.php";
48 const QString REMOVE_MESSAGE = "removeMessage.php";
49 const QString GET_PEOPLE_WITH_SIMILAR_INTEREST = "getInterestingPeople.php";
50 const QString GET_POPULAR_TAGS = "getPopularTags.php";
51
52 // Cookies
53 const QString COOKIE = "Cookie";
54 const QString USER = "user";
55 const QString EXPIRES = "expires";
56 const QString SESSION_KEY = "session_key";
57 const QString SESSION_SECRET = "ss";
58
59 // Locales
60 const QString LOCALE = "locale";
61 const QString EN_LOCALE = "en_EN";
62
63 // Common marks
64 const QString QUESTION_MARK = "?";
65 const QString AMBERSAND_MARK = "&";
66 const QString EQUAL_MARK = "=";
67 const QString UNDERLINE_MARK = "_";
68 const QString BREAK_MARK = ";";
69 const QString OPENING_BRACE_MARK = "{";
70
71 // Coordinates
72 const QString LATITUDE = "lat";
73 const QString LONGTITUDE = "lon";
74
75 // Url parameters
76 const QString PUBLISH = "publish";
77 const QString PUBLISH_TRUE = "true";
78 const QString PUBLISH_FALSE = "false";
79 const QString DATA = "data";
80 const QString JSON_FORMAT = "&format=json";
81
82 // Situare server error messages
83 const QString ERROR_LAT = "Wrong lat value: . Latitude must be between -90 and 90!";
84 const QString ERROR_LON = "Wrong lon value: . Longitude must be between -180 and 180!";
85 const QString ERROR_SESSION = "<br />\n<b>Fatal error</b>:"; // starts with
86
87 const QString SILHOUETTE_URL = "http://static.ak.fbcdn.net/pics/q_silhouette.gif";
88
89 #endif // SITUARECOMMON_H