2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Ville Tiensuu - ville.tiensuu@ixonos.com
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.
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.
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,
23 #include "facebookcredentials.h"
25 FacebookCredentials::FacebookCredentials()
29 void FacebookCredentials::clearCredentials()
33 m_sessionSecret.clear();
38 void FacebookCredentials::setSessionKey(const QString & sessionKeyParameter)
40 m_sessionKey = sessionKeyParameter;
43 void FacebookCredentials::setSessionSecret(const QString & sessionSecretParameter)
45 m_sessionSecret = sessionSecretParameter;
49 void FacebookCredentials::setExpires (const QString & expiresParameter)
51 m_expires = expiresParameter;
54 void FacebookCredentials::setUserID (const QString & userIDParameter)
56 m_userID = userIDParameter;
59 void FacebookCredentials::setSig(const QString & sigParameter)
64 QString FacebookCredentials::sessionKey() const
69 QString FacebookCredentials::sessionSecret() const
71 return m_sessionSecret;
74 QString FacebookCredentials::expires() const
79 QString FacebookCredentials::userID() const
84 QString FacebookCredentials::sig() const
89 bool FacebookCredentials::operator==(const FacebookCredentials &credentials)
91 bool expireBool = (m_expires == credentials.expires());
92 bool sessionKeyBool = (m_sessionKey == credentials.sessionKey());
93 bool sessionSecretBool = (m_sessionSecret == credentials.sessionSecret());
94 bool sigBool = (m_sig == credentials.sig());
95 bool userIdBool = (m_userID == credentials.userID());
97 return expireBool && sessionKeyBool && sessionSecretBool && sigBool && userIdBool;