c5b925e66f7b48c84665c4f1073658b60d1001d9
[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 const QString SITUARE_URL = "http://client.situare.net/";
29 const QString API_KEY = "4197c64da2fb6b927236feaea32d7d81";
30
31 // Test server constants
32 const QString SITUARE_TEST_URL = "http://emmerichgn.facebook.joyent.us/";
33 const QString TEST_API_KEY = "cf77865a5070f2c2ba3b52cbf3371579";
34
35 // Situare JSON callback data
36 const QString NORMAL_SIZE_PROFILE_IMAGE = "pic";
37
38 // Situare PHP scripts
39 const QString UPDATE_LOCATION = "updateLocation.php";
40 const QString REVERSE_GEO = "reversegeo.php";
41 const QString GET_LOCATIONS =
42         QString("getLocations.php?extra_user_data=%1").arg(NORMAL_SIZE_PROFILE_IMAGE);
43
44 // Cookies
45 const QString COOKIE = "Cookie";
46 const QString USER = "user";
47 const QString EXPIRES = "expires";
48 const QString SESSION_KEY = "session_key";
49 const QString SESSION_SECRET = "ss";
50
51 // Locales
52 const QString LOCALE = "locale";
53 const QString EN_LOCALE = "en_EN";
54
55 // Common marks
56 const QString QUESTION_MARK = "?";
57 const QString AMBERSAND_MARK = "&";
58 const QString EQUAL_MARK = "=";
59 const QString UNDERLINE_MARK = "_";
60 const QString BREAK_MARK = ";";
61 const QString OPENING_BRACE_MARK = "{";
62
63 // Coordinates
64 const QString LATITUDE = "lat";
65 const QString LONGTITUDE = "lon";
66
67 // Url parameters
68 const QString PUBLISH = "publish";
69 const QString PUBLISH_TRUE = "true";
70 const QString PUBLISH_FALSE = "false";
71 const QString DATA = "data";
72
73 // Situare server error messages
74 const QString ERROR_LAT = "Wrong lat value: . Latitude must be between -90 and 90!";
75 const QString ERROR_LON = "Wrong lon value: . Longitude must be between -180 and 180!";
76 const QString ERROR_SESSION = "<br />\n<b>Fatal error</b>:"; // starts with
77
78 const QString SILHOUETTE_URL = "http://static.ak.fbcdn.net/pics/q_silhouette.gif";
79
80 #endif // SITUARECOMMON_H